update once more
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
// 1.21 2024-12-30T14:50:30.7413735 Tags for minecraft:item mod id nuggetmod
|
||||
562be55fb606ffa455100bd2a6942846dcd124cb data/nuggetmod/tags/item/transformable_items.json
|
||||
// 1.21 2024-12-30T14:50:30.7413735 Tags for minecraft:item mod id nuggetmod
|
||||
562be55fb606ffa455100bd2a6942846dcd124cb data/nuggetmod/tags/item/transformable_items.json
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// 1.21 2024-12-30T14:50:30.7520688 Tags for minecraft:block mod id nuggetmod
|
||||
265fffb09f55ddbd810e4aca08e95427b6f8abb8 data/minecraft/tags/block/mineable/pickaxe.json
|
||||
6b9f8ad5cb4e30e1a1e5fed561cbcdf19794cfba data/minecraft/tags/block/needs_diamond_tool.json
|
||||
532756f975f04ecee6d351a7d1086a9c9921d694 data/minecraft/tags/block/needs_iron_tool.json
|
||||
// 1.21 2024-12-30T18:01:57.8471253 Tags for minecraft:block mod id nuggetmod
|
||||
265fffb09f55ddbd810e4aca08e95427b6f8abb8 data/minecraft/tags/block/mineable/pickaxe.json
|
||||
d3afbade112106a4f7dba97fc08964398669700a data/minecraft/tags/block/needs_stone_tool.json
|
||||
768d28c36c35fda7aa9d014ae9d9ce7ba23fdfb8 data/nuggetmod/tags/block/incorrect_for_nugget_tool.json
|
||||
9c48de48f12ecaae54ddd4a48ea1ac229e0bcaa4 data/nuggetmod/tags/block/needs_nugget_tool.json
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// 1.21 2024-12-30T14:50:30.7468819 Loot Tables
|
||||
74a43d938ccd280fff25bd66ec0f55a3e2c30ad0 data/nuggetmod/loot_table/blocks/nugget_block.json
|
||||
206de236ad19cf2d06cf21b0f282e5b64bd5918d data/nuggetmod/loot_table/blocks/nugget_deepslate_ore.json
|
||||
d65584c1286a06f15f88db5682372d78e8e0ebf7 data/nuggetmod/loot_table/blocks/nugget_ore.json
|
||||
2b4a937626ec0aa515a8a78663ce0f6142b843a6 data/nuggetmod/loot_table/blocks/raw_nugget_block.json
|
||||
// 1.21 2024-12-30T14:50:30.7468819 Loot Tables
|
||||
74a43d938ccd280fff25bd66ec0f55a3e2c30ad0 data/nuggetmod/loot_table/blocks/nugget_block.json
|
||||
206de236ad19cf2d06cf21b0f282e5b64bd5918d data/nuggetmod/loot_table/blocks/nugget_deepslate_ore.json
|
||||
d65584c1286a06f15f88db5682372d78e8e0ebf7 data/nuggetmod/loot_table/blocks/nugget_ore.json
|
||||
2b4a937626ec0aa515a8a78663ce0f6142b843a6 data/nuggetmod/loot_table/blocks/raw_nugget_block.json
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// 1.21 2024-12-30T14:50:30.7393544 Item Models: nuggetmod
|
||||
90b22d61432e35fb68e2232a3eb76e15d2a77d89 assets/nuggetmod/models/item/nugget.json
|
||||
762606d79e485c8a5e4447e8a1236bee89185245 assets/nuggetmod/models/item/raw_nugget.json
|
||||
// 1.21 2024-12-30T18:01:57.8351251 Item Models: nuggetmod
|
||||
90b22d61432e35fb68e2232a3eb76e15d2a77d89 assets/nuggetmod/models/item/nugget.json
|
||||
cac221f8a7659366628c3b429c22ebd27f5adadd assets/nuggetmod/models/item/nugget_axe.json
|
||||
cc6e0d754901f7397916b947124acf6ba8467153 assets/nuggetmod/models/item/nugget_hoe.json
|
||||
1453d89f622ad5616505f248996b1715b196af76 assets/nuggetmod/models/item/nugget_pickaxe.json
|
||||
f67a964a8a74c61df4d090dc5b250ad03bb16d8f assets/nuggetmod/models/item/nugget_shovel.json
|
||||
dcc1dd8bb95c5c088212a9584d952a11ac2a840d assets/nuggetmod/models/item/nugget_sword.json
|
||||
762606d79e485c8a5e4447e8a1236bee89185245 assets/nuggetmod/models/item/raw_nugget.json
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// 1.21 2024-12-30T14:50:30.7438816 Block States: nuggetmod
|
||||
e458b67af79198beb28149bb003b81fd70269977 assets/nuggetmod/blockstates/nugget_block.json
|
||||
878193901a69171263432147c8d69dc3ad6a3329 assets/nuggetmod/blockstates/nugget_deepslate_ore.json
|
||||
97b7f829a5952c457a7bd71a23fd2e40c9e41afd assets/nuggetmod/blockstates/nugget_ore.json
|
||||
fc3b3199be08abb9ba378b6500ae96db0336a2ac assets/nuggetmod/blockstates/raw_nugget_block.json
|
||||
5cd8b360f3c316bc790a0a08cca2902f5494ecb1 assets/nuggetmod/models/block/nugget_block.json
|
||||
04a6c3905fc9bebb1701de7bf870efea11648a0e assets/nuggetmod/models/block/nugget_deepslate_ore.json
|
||||
d8685b96ce2399042e685f5a0d52cc6f93aa2f7c assets/nuggetmod/models/block/nugget_ore.json
|
||||
22ddcb7a66f04ae207af491a5e9264556726fec1 assets/nuggetmod/models/block/raw_nugget_block.json
|
||||
87d953ce0211f8d1ae9e2f0411c38e6a937db408 assets/nuggetmod/models/item/nugget_block.json
|
||||
1cbd017c90351ede4f571a9e6efd9b78640fed67 assets/nuggetmod/models/item/nugget_deepslate_ore.json
|
||||
e8d9aff343954c5f248feb0b5fda5d9719aff29e assets/nuggetmod/models/item/nugget_ore.json
|
||||
54f4c1e65c7687038adaf302a6471a1591ec2c2e assets/nuggetmod/models/item/raw_nugget_block.json
|
||||
// 1.21 2024-12-30T14:50:30.7438816 Block States: nuggetmod
|
||||
e458b67af79198beb28149bb003b81fd70269977 assets/nuggetmod/blockstates/nugget_block.json
|
||||
878193901a69171263432147c8d69dc3ad6a3329 assets/nuggetmod/blockstates/nugget_deepslate_ore.json
|
||||
97b7f829a5952c457a7bd71a23fd2e40c9e41afd assets/nuggetmod/blockstates/nugget_ore.json
|
||||
fc3b3199be08abb9ba378b6500ae96db0336a2ac assets/nuggetmod/blockstates/raw_nugget_block.json
|
||||
5cd8b360f3c316bc790a0a08cca2902f5494ecb1 assets/nuggetmod/models/block/nugget_block.json
|
||||
04a6c3905fc9bebb1701de7bf870efea11648a0e assets/nuggetmod/models/block/nugget_deepslate_ore.json
|
||||
d8685b96ce2399042e685f5a0d52cc6f93aa2f7c assets/nuggetmod/models/block/nugget_ore.json
|
||||
22ddcb7a66f04ae207af491a5e9264556726fec1 assets/nuggetmod/models/block/raw_nugget_block.json
|
||||
87d953ce0211f8d1ae9e2f0411c38e6a937db408 assets/nuggetmod/models/item/nugget_block.json
|
||||
1cbd017c90351ede4f571a9e6efd9b78640fed67 assets/nuggetmod/models/item/nugget_deepslate_ore.json
|
||||
e8d9aff343954c5f248feb0b5fda5d9719aff29e assets/nuggetmod/models/item/nugget_ore.json
|
||||
54f4c1e65c7687038adaf302a6471a1591ec2c2e assets/nuggetmod/models/item/raw_nugget_block.json
|
||||
|
||||
@@ -1,21 +1,31 @@
|
||||
// 1.21 2024-12-30T15:05:08.206774 Recipes
|
||||
39a320d3e238f524a92dae1eaa1c60d0e45ba296 data/nuggetmod/advancement/recipes/misc/nugget.json
|
||||
8160ae7d8117c0cc293fcd40e22d1072c16ca478 data/nuggetmod/advancement/recipes/misc/nugget_block.json
|
||||
ebf761f6dad07dac9f3ac9f8732d291cf7930611 data/nuggetmod/advancement/recipes/misc/nugget_from_blasting_nugget_deepslate_ore.json
|
||||
e10188670de3a7a815f73a66fc5f4e92a648b51e data/nuggetmod/advancement/recipes/misc/nugget_from_blasting_nugget_ore.json
|
||||
6138abcf020eb5235f574a65048b88a03b8dc057 data/nuggetmod/advancement/recipes/misc/nugget_from_blasting_raw_nugget.json
|
||||
16fc56222bdb61afa3618038ee189f405fd20922 data/nuggetmod/advancement/recipes/misc/nugget_from_smelting_nugget_deepslate_ore.json
|
||||
7b9dcb92c1af9c1982292c1efd6b4fb27513b3f5 data/nuggetmod/advancement/recipes/misc/nugget_from_smelting_nugget_ore.json
|
||||
762af010e4f2c6dbf4b54f5f7c4575f28b47c524 data/nuggetmod/advancement/recipes/misc/nugget_from_smelting_raw_nugget.json
|
||||
59e41b4b30c51f225ccb673f401839ec7e77fe20 data/nuggetmod/advancement/recipes/misc/raw_nugget.json
|
||||
0eac4876a225ba434ebefcecb2d9a3d5b1af5cc3 data/nuggetmod/advancement/recipes/misc/raw_nugget_block.json
|
||||
46cf496588958f9727af31d89b8adfa56f319b32 data/nuggetmod/recipe/nugget.json
|
||||
a616003c555df86443a939fff05be631f005b5e7 data/nuggetmod/recipe/nugget_block.json
|
||||
7cb0715c46c01f7dd8802b3cd8302c20ccb281cf data/nuggetmod/recipe/nugget_from_blasting_nugget_deepslate_ore.json
|
||||
662c0a68d691fcb004fdfa4b18af745502eb51c4 data/nuggetmod/recipe/nugget_from_blasting_nugget_ore.json
|
||||
67a9834245f8ecd74cf7b72ebeddee9e9d2296a5 data/nuggetmod/recipe/nugget_from_blasting_raw_nugget.json
|
||||
61bc79a197aa3f00ccdbc3a573c1dc90bbb380e1 data/nuggetmod/recipe/nugget_from_smelting_nugget_deepslate_ore.json
|
||||
da4d3a890cd2a10ef6502861f80d89da01c38533 data/nuggetmod/recipe/nugget_from_smelting_nugget_ore.json
|
||||
b7053163e6e237928a9de0b5dfe921883a6e6b5c data/nuggetmod/recipe/nugget_from_smelting_raw_nugget.json
|
||||
c30c2ad83bc1c296f619a1d111eb11aff1155f0b data/nuggetmod/recipe/raw_nugget.json
|
||||
0a4297bae4d63ee5ba5092d4000e888112186293 data/nuggetmod/recipe/raw_nugget_block.json
|
||||
// 1.21 2024-12-30T18:01:57.8391248 Recipes
|
||||
587bf7befb4b1be77e7002038b9faf0eb5bb4ce5 data/nuggetmod/advancement/recipes/combat/nugget_sword.json
|
||||
39a320d3e238f524a92dae1eaa1c60d0e45ba296 data/nuggetmod/advancement/recipes/misc/nugget.json
|
||||
8160ae7d8117c0cc293fcd40e22d1072c16ca478 data/nuggetmod/advancement/recipes/misc/nugget_block.json
|
||||
ebf761f6dad07dac9f3ac9f8732d291cf7930611 data/nuggetmod/advancement/recipes/misc/nugget_from_blasting_nugget_deepslate_ore.json
|
||||
e10188670de3a7a815f73a66fc5f4e92a648b51e data/nuggetmod/advancement/recipes/misc/nugget_from_blasting_nugget_ore.json
|
||||
6138abcf020eb5235f574a65048b88a03b8dc057 data/nuggetmod/advancement/recipes/misc/nugget_from_blasting_raw_nugget.json
|
||||
16fc56222bdb61afa3618038ee189f405fd20922 data/nuggetmod/advancement/recipes/misc/nugget_from_smelting_nugget_deepslate_ore.json
|
||||
7b9dcb92c1af9c1982292c1efd6b4fb27513b3f5 data/nuggetmod/advancement/recipes/misc/nugget_from_smelting_nugget_ore.json
|
||||
762af010e4f2c6dbf4b54f5f7c4575f28b47c524 data/nuggetmod/advancement/recipes/misc/nugget_from_smelting_raw_nugget.json
|
||||
59e41b4b30c51f225ccb673f401839ec7e77fe20 data/nuggetmod/advancement/recipes/misc/raw_nugget.json
|
||||
0eac4876a225ba434ebefcecb2d9a3d5b1af5cc3 data/nuggetmod/advancement/recipes/misc/raw_nugget_block.json
|
||||
a159ddd57f6c263d4862f5ee479f3df3595379d9 data/nuggetmod/advancement/recipes/tools/nugget_axe.json
|
||||
1889633531251f9d32df839f13041a7839569079 data/nuggetmod/advancement/recipes/tools/nugget_hoe.json
|
||||
e6dbb4576802c7009518fe2bc4dbe541f16b6687 data/nuggetmod/advancement/recipes/tools/nugget_pickaxe.json
|
||||
f63988753316f6848707a1bebb9004bff2f6d5e4 data/nuggetmod/advancement/recipes/tools/nugget_shovel.json
|
||||
46cf496588958f9727af31d89b8adfa56f319b32 data/nuggetmod/recipe/nugget.json
|
||||
7a93996e567af4358d0add13412438c89efff405 data/nuggetmod/recipe/nugget_axe.json
|
||||
a616003c555df86443a939fff05be631f005b5e7 data/nuggetmod/recipe/nugget_block.json
|
||||
7cb0715c46c01f7dd8802b3cd8302c20ccb281cf data/nuggetmod/recipe/nugget_from_blasting_nugget_deepslate_ore.json
|
||||
662c0a68d691fcb004fdfa4b18af745502eb51c4 data/nuggetmod/recipe/nugget_from_blasting_nugget_ore.json
|
||||
67a9834245f8ecd74cf7b72ebeddee9e9d2296a5 data/nuggetmod/recipe/nugget_from_blasting_raw_nugget.json
|
||||
61bc79a197aa3f00ccdbc3a573c1dc90bbb380e1 data/nuggetmod/recipe/nugget_from_smelting_nugget_deepslate_ore.json
|
||||
da4d3a890cd2a10ef6502861f80d89da01c38533 data/nuggetmod/recipe/nugget_from_smelting_nugget_ore.json
|
||||
b7053163e6e237928a9de0b5dfe921883a6e6b5c data/nuggetmod/recipe/nugget_from_smelting_raw_nugget.json
|
||||
5502215f2426567d06785639a9011f601e9593a4 data/nuggetmod/recipe/nugget_hoe.json
|
||||
b983b6efee4952a3a2dee230c8f13b363894d29e data/nuggetmod/recipe/nugget_pickaxe.json
|
||||
2c25036d787f791caa37836de3c04b31ab9e9551 data/nuggetmod/recipe/nugget_shovel.json
|
||||
af124114b7882426d847851db6f2f1c8bba4e6eb data/nuggetmod/recipe/nugget_sword.json
|
||||
c30c2ad83bc1c296f619a1d111eb11aff1155f0b data/nuggetmod/recipe/raw_nugget.json
|
||||
0a4297bae4d63ee5ba5092d4000e888112186293 data/nuggetmod/recipe/raw_nugget_block.json
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "nuggetmod:item/nugget_axe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "nuggetmod:item/nugget_hoe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "nuggetmod:item/nugget_pickaxe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "nuggetmod:item/nugget_shovel"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/handheld",
|
||||
"textures": {
|
||||
"layer0": "nuggetmod:item/nugget_sword"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"values": [
|
||||
"nuggetmod:nugget_deepslate_ore"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"values": [
|
||||
"nuggetmod:nugget_deepslate_ore",
|
||||
"nuggetmod:raw_nugget_block"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_nugget": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "nuggetmod:nugget"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "nuggetmod:nugget_sword"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_nugget"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"nuggetmod:nugget_sword"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_nugget": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "nuggetmod:nugget"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "nuggetmod:nugget_axe"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_nugget"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"nuggetmod:nugget_axe"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_nugget": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "nuggetmod:nugget"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "nuggetmod:nugget_hoe"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_nugget"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"nuggetmod:nugget_hoe"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_nugget": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "nuggetmod:nugget"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "nuggetmod:nugget_pickaxe"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_nugget"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"nuggetmod:nugget_pickaxe"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_nugget": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"items": "nuggetmod:nugget"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "nuggetmod:nugget_shovel"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_the_recipe",
|
||||
"has_nugget"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"nuggetmod:nugget_shovel"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"A": {
|
||||
"item": "nuggetmod:nugget"
|
||||
},
|
||||
"B": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
" AA",
|
||||
" BA",
|
||||
" B "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "nuggetmod:nugget_axe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"A": {
|
||||
"item": "nuggetmod:nugget"
|
||||
},
|
||||
"B": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
" AA",
|
||||
" B ",
|
||||
" B "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "nuggetmod:nugget_hoe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"A": {
|
||||
"item": "nuggetmod:nugget"
|
||||
},
|
||||
"B": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
"AAA",
|
||||
" B ",
|
||||
" B "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "nuggetmod:nugget_pickaxe"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"A": {
|
||||
"item": "nuggetmod:nugget"
|
||||
},
|
||||
"B": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
" A ",
|
||||
" B ",
|
||||
" B "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "nuggetmod:nugget_shovel"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"key": {
|
||||
"A": {
|
||||
"item": "nuggetmod:nugget"
|
||||
},
|
||||
"B": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"pattern": [
|
||||
" A ",
|
||||
" A ",
|
||||
" B "
|
||||
],
|
||||
"result": {
|
||||
"count": 1,
|
||||
"id": "nuggetmod:nugget_sword"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"remove": [
|
||||
"#nuggetmod:needs_nugget_tool"
|
||||
],
|
||||
"values": [
|
||||
"#minecraft:incorrect_for_diamond_tool"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"values": [
|
||||
"nuggetmod:raw_nugget_block",
|
||||
"#minecraft:needs_diamond_tool"
|
||||
]
|
||||
}
|
||||
@@ -1,63 +1,63 @@
|
||||
package xyz.sillyangel.nugget;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.config.ModConfigEvent;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
// An example config class. This is not required, but it's a good idea to have one to keep your config organized.
|
||||
// Demonstrates how to use Forge's config APIs
|
||||
@Mod.EventBusSubscriber(modid = NuggetMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class Config
|
||||
{
|
||||
private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
|
||||
|
||||
private static final ForgeConfigSpec.BooleanValue LOG_DIRT_BLOCK = BUILDER
|
||||
.comment("Whether to log the dirt block on common setup")
|
||||
.define("logDirtBlock", true);
|
||||
|
||||
private static final ForgeConfigSpec.IntValue MAGIC_NUMBER = BUILDER
|
||||
.comment("A magic number")
|
||||
.defineInRange("magicNumber", 42, 0, Integer.MAX_VALUE);
|
||||
|
||||
public static final ForgeConfigSpec.ConfigValue<String> MAGIC_NUMBER_INTRODUCTION = BUILDER
|
||||
.comment("What you want the introduction message to be for the magic number")
|
||||
.define("magicNumberIntroduction", "The magic number is... ");
|
||||
|
||||
// a list of strings that are treated as resource locations for items
|
||||
private static final ForgeConfigSpec.ConfigValue<List<? extends String>> ITEM_STRINGS = BUILDER
|
||||
.comment("A list of items to log on common setup.")
|
||||
.defineListAllowEmpty("items", List.of("minecraft:iron_ingot"), Config::validateItemName);
|
||||
|
||||
static final ForgeConfigSpec SPEC = BUILDER.build();
|
||||
|
||||
public static boolean logDirtBlock;
|
||||
public static int magicNumber;
|
||||
public static String magicNumberIntroduction;
|
||||
public static Set<Item> items;
|
||||
|
||||
private static boolean validateItemName(final Object obj)
|
||||
{
|
||||
return obj instanceof final String itemName && ForgeRegistries.ITEMS.containsKey(ResourceLocation.tryParse(itemName));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
static void onLoad(final ModConfigEvent event)
|
||||
{
|
||||
logDirtBlock = LOG_DIRT_BLOCK.get();
|
||||
magicNumber = MAGIC_NUMBER.get();
|
||||
magicNumberIntroduction = MAGIC_NUMBER_INTRODUCTION.get();
|
||||
|
||||
// convert the list of strings into a set of items
|
||||
items = ITEM_STRINGS.get().stream()
|
||||
.map(itemName -> ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(itemName)))
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
package xyz.sillyangel.nugget;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.config.ModConfigEvent;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
// An example config class. This is not required, but it's a good idea to have one to keep your config organized.
|
||||
// Demonstrates how to use Forge's config APIs
|
||||
@Mod.EventBusSubscriber(modid = NuggetMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class Config
|
||||
{
|
||||
private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
|
||||
|
||||
private static final ForgeConfigSpec.BooleanValue LOG_DIRT_BLOCK = BUILDER
|
||||
.comment("Whether to log the dirt block on common setup")
|
||||
.define("logDirtBlock", true);
|
||||
|
||||
private static final ForgeConfigSpec.IntValue MAGIC_NUMBER = BUILDER
|
||||
.comment("A magic number")
|
||||
.defineInRange("magicNumber", 42, 0, Integer.MAX_VALUE);
|
||||
|
||||
public static final ForgeConfigSpec.ConfigValue<String> MAGIC_NUMBER_INTRODUCTION = BUILDER
|
||||
.comment("What you want the introduction message to be for the magic number")
|
||||
.define("magicNumberIntroduction", "The magic number is... ");
|
||||
|
||||
// a list of strings that are treated as resource locations for items
|
||||
private static final ForgeConfigSpec.ConfigValue<List<? extends String>> ITEM_STRINGS = BUILDER
|
||||
.comment("A list of items to log on common setup.")
|
||||
.defineListAllowEmpty("items", List.of("minecraft:iron_ingot"), Config::validateItemName);
|
||||
|
||||
static final ForgeConfigSpec SPEC = BUILDER.build();
|
||||
|
||||
public static boolean logDirtBlock;
|
||||
public static int magicNumber;
|
||||
public static String magicNumberIntroduction;
|
||||
public static Set<Item> items;
|
||||
|
||||
private static boolean validateItemName(final Object obj)
|
||||
{
|
||||
return obj instanceof final String itemName && ForgeRegistries.ITEMS.containsKey(ResourceLocation.tryParse(itemName));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
static void onLoad(final ModConfigEvent event)
|
||||
{
|
||||
logDirtBlock = LOG_DIRT_BLOCK.get();
|
||||
magicNumber = MAGIC_NUMBER.get();
|
||||
magicNumberIntroduction = MAGIC_NUMBER_INTRODUCTION.get();
|
||||
|
||||
// convert the list of strings into a set of items
|
||||
items = ITEM_STRINGS.get().stream()
|
||||
.map(itemName -> ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(itemName)))
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
@@ -1,70 +1,70 @@
|
||||
package xyz.sillyangel.nugget;
|
||||
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.ModLoadingContext;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.config.ModConfig;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.slf4j.Logger;
|
||||
import xyz.sillyangel.nugget.item.ModCreativeModeTabs;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
|
||||
// Very important Comment
|
||||
// The value here should match an entry in the META-INF/mods.toml file
|
||||
@Mod(NuggetMod.MOD_ID)
|
||||
public class NuggetMod {
|
||||
// Define mod id in a common place for everything to reference
|
||||
public static final String MOD_ID = "nuggetmod";
|
||||
// Directly reference a slf4j logger
|
||||
public static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
public NuggetMod() {
|
||||
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
modEventBus.addListener(this::commonSetup);
|
||||
// Register ourselves for server and other game events we are interested in
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
ModCreativeModeTabs.register(modEventBus);
|
||||
|
||||
ModItems.register(modEventBus);
|
||||
ModBlocks.register(modEventBus);
|
||||
|
||||
// Register the item to a creative tab
|
||||
modEventBus.addListener(this::addCreative);
|
||||
// Register our mod's ForgeConfigSpec so that Forge can create and load the config file for us
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Config.SPEC);
|
||||
}
|
||||
|
||||
private void commonSetup(final FMLCommonSetupEvent event) {
|
||||
|
||||
}
|
||||
|
||||
// Add the example block item to the building blocks tab
|
||||
private void addCreative(BuildCreativeModeTabContentsEvent event) {
|
||||
|
||||
}
|
||||
|
||||
// You can use SubscribeEvent and let the Event Bus discover methods to call
|
||||
@SubscribeEvent
|
||||
public void onServerStarting(ServerStartingEvent event) {
|
||||
|
||||
}
|
||||
|
||||
// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
|
||||
@Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||
public static class ClientModEvents {
|
||||
@SubscribeEvent
|
||||
public static void onClientSetup(FMLClientSetupEvent event) {
|
||||
|
||||
}
|
||||
}
|
||||
package xyz.sillyangel.nugget;
|
||||
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.ModLoadingContext;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.config.ModConfig;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.slf4j.Logger;
|
||||
import xyz.sillyangel.nugget.item.ModCreativeModeTabs;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
|
||||
// Very important Comment
|
||||
// The value here should match an entry in the META-INF/mods.toml file
|
||||
@Mod(NuggetMod.MOD_ID)
|
||||
public class NuggetMod {
|
||||
// Define mod id in a common place for everything to reference
|
||||
public static final String MOD_ID = "nuggetmod";
|
||||
// Directly reference a slf4j logger
|
||||
public static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
public NuggetMod() {
|
||||
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
modEventBus.addListener(this::commonSetup);
|
||||
// Register ourselves for server and other game events we are interested in
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
ModCreativeModeTabs.register(modEventBus);
|
||||
|
||||
ModItems.register(modEventBus);
|
||||
ModBlocks.register(modEventBus);
|
||||
|
||||
// Register the item to a creative tab
|
||||
modEventBus.addListener(this::addCreative);
|
||||
// Register our mod's ForgeConfigSpec so that Forge can create and load the config file for us
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Config.SPEC);
|
||||
}
|
||||
|
||||
private void commonSetup(final FMLCommonSetupEvent event) {
|
||||
|
||||
}
|
||||
|
||||
// Add the example block item to the building blocks tab
|
||||
private void addCreative(BuildCreativeModeTabContentsEvent event) {
|
||||
|
||||
}
|
||||
|
||||
// You can use SubscribeEvent and let the Event Bus discover methods to call
|
||||
@SubscribeEvent
|
||||
public void onServerStarting(ServerStartingEvent event) {
|
||||
|
||||
}
|
||||
|
||||
// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
|
||||
@Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||
public static class ClientModEvents {
|
||||
@SubscribeEvent
|
||||
public static void onClientSetup(FMLClientSetupEvent event) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,52 +1,52 @@
|
||||
package xyz.sillyangel.nugget.block;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import net.minecraft.util.valueproviders.UniformInt;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.DropExperienceBlock;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class ModBlocks {
|
||||
public static final DeferredRegister<Block> BLOCKS =
|
||||
DeferredRegister.create(ForgeRegistries.BLOCKS, NuggetMod.MOD_ID);
|
||||
|
||||
public static final RegistryObject<Block> NUGGET_BLOCK = registerBlock("nugget_block",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(4f).requiresCorrectToolForDrops().sound(SoundType.AMETHYST)));
|
||||
|
||||
public static final RegistryObject<Block> RAW_NUGGET_BLOCK = registerBlock("raw_nugget_block",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(3f).requiresCorrectToolForDrops()));
|
||||
// ores
|
||||
public static final RegistryObject<Block> NUGGET_ORE = registerBlock("nugget_ore",
|
||||
() -> new DropExperienceBlock(UniformInt.of(2, 4), BlockBehaviour.Properties.of()
|
||||
.strength(4f).requiresCorrectToolForDrops()));
|
||||
|
||||
public static final RegistryObject<Block> NUGGET_DEEPSLATE_ORE = registerBlock("nugget_deepslate_ore",
|
||||
() -> new DropExperienceBlock(UniformInt.of(2, 4), BlockBehaviour.Properties.of()
|
||||
.strength(5f).requiresCorrectToolForDrops().sound(SoundType.DEEPSLATE)));
|
||||
|
||||
private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block) {
|
||||
RegistryObject<T> toReturn = BLOCKS.register(name, block);
|
||||
registerBlockItem(name, toReturn);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
private static <T extends Block> void registerBlockItem(String name, RegistryObject<T> block) {
|
||||
ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties()));
|
||||
}
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
BLOCKS.register(eventBus);
|
||||
}
|
||||
package xyz.sillyangel.nugget.block;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import net.minecraft.util.valueproviders.UniformInt;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.DropExperienceBlock;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class ModBlocks {
|
||||
public static final DeferredRegister<Block> BLOCKS =
|
||||
DeferredRegister.create(ForgeRegistries.BLOCKS, NuggetMod.MOD_ID);
|
||||
|
||||
public static final RegistryObject<Block> NUGGET_BLOCK = registerBlock("nugget_block",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(4f).requiresCorrectToolForDrops().sound(SoundType.AMETHYST)));
|
||||
|
||||
public static final RegistryObject<Block> RAW_NUGGET_BLOCK = registerBlock("raw_nugget_block",
|
||||
() -> new Block(BlockBehaviour.Properties.of()
|
||||
.strength(3f).requiresCorrectToolForDrops()));
|
||||
// ores
|
||||
public static final RegistryObject<Block> NUGGET_ORE = registerBlock("nugget_ore",
|
||||
() -> new DropExperienceBlock(UniformInt.of(2, 4), BlockBehaviour.Properties.of()
|
||||
.strength(4f).requiresCorrectToolForDrops()));
|
||||
|
||||
public static final RegistryObject<Block> NUGGET_DEEPSLATE_ORE = registerBlock("nugget_deepslate_ore",
|
||||
() -> new DropExperienceBlock(UniformInt.of(2, 4), BlockBehaviour.Properties.of()
|
||||
.strength(5f).requiresCorrectToolForDrops().sound(SoundType.DEEPSLATE)));
|
||||
|
||||
private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block) {
|
||||
RegistryObject<T> toReturn = BLOCKS.register(name, block);
|
||||
registerBlockItem(name, toReturn);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
private static <T extends Block> void registerBlockItem(String name, RegistryObject<T> block) {
|
||||
ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties()));
|
||||
}
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
BLOCKS.register(eventBus);
|
||||
}
|
||||
}
|
||||
@@ -1,39 +1,39 @@
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.data.loot.LootTableProvider;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
||||
import net.minecraftforge.common.data.BlockTagsProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.data.event.GatherDataEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = NuggetMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class DataGenerators {
|
||||
@SubscribeEvent
|
||||
public static void gatherData(GatherDataEvent event) {
|
||||
DataGenerator generator = event.getGenerator();
|
||||
PackOutput packOutput = generator.getPackOutput();
|
||||
ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
|
||||
CompletableFuture<HolderLookup.Provider> lookupProvider = event.getLookupProvider();
|
||||
|
||||
generator.addProvider(event.includeServer(), new LootTableProvider(packOutput, Collections.emptySet(),
|
||||
List.of(new LootTableProvider.SubProviderEntry(ModBlockLootTableProvider::new, LootContextParamSets.BLOCK)), lookupProvider));
|
||||
generator.addProvider(event.includeServer(), new ModRecipeProvider(packOutput, lookupProvider));
|
||||
|
||||
BlockTagsProvider blockTagsProvider = new ModBlockTagProvider(packOutput, lookupProvider, existingFileHelper);
|
||||
generator.addProvider(event.includeServer(), blockTagsProvider);
|
||||
generator.addProvider(event.includeServer(), new ModItemTagProvider(packOutput, lookupProvider, blockTagsProvider.contentsGetter(), existingFileHelper));
|
||||
|
||||
generator.addProvider(event.includeClient(), new ModItemModelProvider(packOutput, existingFileHelper));
|
||||
generator.addProvider(event.includeClient(), new ModBlockStateProvider(packOutput, existingFileHelper));
|
||||
}
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.data.loot.LootTableProvider;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
||||
import net.minecraftforge.common.data.BlockTagsProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.data.event.GatherDataEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = NuggetMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class DataGenerators {
|
||||
@SubscribeEvent
|
||||
public static void gatherData(GatherDataEvent event) {
|
||||
DataGenerator generator = event.getGenerator();
|
||||
PackOutput packOutput = generator.getPackOutput();
|
||||
ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
|
||||
CompletableFuture<HolderLookup.Provider> lookupProvider = event.getLookupProvider();
|
||||
|
||||
generator.addProvider(event.includeServer(), new LootTableProvider(packOutput, Collections.emptySet(),
|
||||
List.of(new LootTableProvider.SubProviderEntry(ModBlockLootTableProvider::new, LootContextParamSets.BLOCK)), lookupProvider));
|
||||
generator.addProvider(event.includeServer(), new ModRecipeProvider(packOutput, lookupProvider));
|
||||
|
||||
BlockTagsProvider blockTagsProvider = new ModBlockTagProvider(packOutput, lookupProvider, existingFileHelper);
|
||||
generator.addProvider(event.includeServer(), blockTagsProvider);
|
||||
generator.addProvider(event.includeServer(), new ModItemTagProvider(packOutput, lookupProvider, blockTagsProvider.contentsGetter(), existingFileHelper));
|
||||
|
||||
generator.addProvider(event.includeClient(), new ModItemModelProvider(packOutput, existingFileHelper));
|
||||
generator.addProvider(event.includeClient(), new ModBlockStateProvider(packOutput, existingFileHelper));
|
||||
}
|
||||
}
|
||||
@@ -1,55 +1,55 @@
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.data.loot.BlockLootSubProvider;
|
||||
import net.minecraft.world.flag.FeatureFlags;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.enchantment.Enchantment;
|
||||
import net.minecraft.world.item.enchantment.Enchantments;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.storage.loot.LootTable;
|
||||
import net.minecraft.world.level.storage.loot.entries.LootItem;
|
||||
import net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer;
|
||||
import net.minecraft.world.level.storage.loot.functions.ApplyBonusCount;
|
||||
import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction;
|
||||
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class ModBlockLootTableProvider extends BlockLootSubProvider {
|
||||
protected ModBlockLootTableProvider(HolderLookup.Provider pRegistries) {
|
||||
super(Set.of(), FeatureFlags.REGISTRY.allFlags(), pRegistries);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void generate() {
|
||||
dropSelf(ModBlocks.NUGGET_BLOCK.get());
|
||||
dropSelf(ModBlocks.RAW_NUGGET_BLOCK.get());
|
||||
|
||||
this.add(ModBlocks.NUGGET_ORE.get(),
|
||||
block -> createOreDrop(ModBlocks.NUGGET_ORE.get(), ModItems.RAW_NUGGET.get()));
|
||||
this.add(ModBlocks.NUGGET_DEEPSLATE_ORE.get(),
|
||||
block -> createMultipleOreDrops(ModBlocks.NUGGET_DEEPSLATE_ORE.get(), ModItems.RAW_NUGGET.get(), 2, 6));
|
||||
}
|
||||
|
||||
protected LootTable.Builder createMultipleOreDrops(Block pBlock, Item item, float minDrops, float maxDrops) {
|
||||
HolderLookup.RegistryLookup<Enchantment> registrylookup = this.registries.lookupOrThrow(Registries.ENCHANTMENT);
|
||||
return this.createSilkTouchDispatchTable(
|
||||
pBlock, this.applyExplosionDecay(
|
||||
pBlock, LootItem.lootTableItem(item)
|
||||
.apply(SetItemCountFunction.setCount(UniformGenerator.between(minDrops, maxDrops)))
|
||||
.apply(ApplyBonusCount.addOreBonusCount(registrylookup.getOrThrow(Enchantments.FORTUNE)))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterable<Block> getKnownBlocks() {
|
||||
return ModBlocks.BLOCKS.getEntries().stream().map(RegistryObject::get)::iterator;
|
||||
}
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.data.loot.BlockLootSubProvider;
|
||||
import net.minecraft.world.flag.FeatureFlags;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.enchantment.Enchantment;
|
||||
import net.minecraft.world.item.enchantment.Enchantments;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.storage.loot.LootTable;
|
||||
import net.minecraft.world.level.storage.loot.entries.LootItem;
|
||||
import net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer;
|
||||
import net.minecraft.world.level.storage.loot.functions.ApplyBonusCount;
|
||||
import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction;
|
||||
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class ModBlockLootTableProvider extends BlockLootSubProvider {
|
||||
protected ModBlockLootTableProvider(HolderLookup.Provider pRegistries) {
|
||||
super(Set.of(), FeatureFlags.REGISTRY.allFlags(), pRegistries);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void generate() {
|
||||
dropSelf(ModBlocks.NUGGET_BLOCK.get());
|
||||
dropSelf(ModBlocks.RAW_NUGGET_BLOCK.get());
|
||||
|
||||
this.add(ModBlocks.NUGGET_ORE.get(),
|
||||
block -> createOreDrop(ModBlocks.NUGGET_ORE.get(), ModItems.RAW_NUGGET.get()));
|
||||
this.add(ModBlocks.NUGGET_DEEPSLATE_ORE.get(),
|
||||
block -> createMultipleOreDrops(ModBlocks.NUGGET_DEEPSLATE_ORE.get(), ModItems.RAW_NUGGET.get(), 2, 6));
|
||||
}
|
||||
|
||||
protected LootTable.Builder createMultipleOreDrops(Block pBlock, Item item, float minDrops, float maxDrops) {
|
||||
HolderLookup.RegistryLookup<Enchantment> registrylookup = this.registries.lookupOrThrow(Registries.ENCHANTMENT);
|
||||
return this.createSilkTouchDispatchTable(
|
||||
pBlock, this.applyExplosionDecay(
|
||||
pBlock, LootItem.lootTableItem(item)
|
||||
.apply(SetItemCountFunction.setCount(UniformGenerator.between(minDrops, maxDrops)))
|
||||
.apply(ApplyBonusCount.addOreBonusCount(registrylookup.getOrThrow(Enchantments.FORTUNE)))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Iterable<Block> getKnownBlocks() {
|
||||
return ModBlocks.BLOCKS.getEntries().stream().map(RegistryObject::get)::iterator;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,29 @@
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraftforge.client.model.generators.BlockStateProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class ModBlockStateProvider extends BlockStateProvider {
|
||||
public ModBlockStateProvider(PackOutput output, ExistingFileHelper exFileHelper) {
|
||||
super(output, NuggetMod.MOD_ID, exFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerStatesAndModels() {
|
||||
blockWithItem(ModBlocks.NUGGET_BLOCK);
|
||||
blockWithItem(ModBlocks.RAW_NUGGET_BLOCK);
|
||||
|
||||
blockWithItem(ModBlocks.NUGGET_ORE);
|
||||
blockWithItem(ModBlocks.NUGGET_DEEPSLATE_ORE);
|
||||
|
||||
}
|
||||
|
||||
private void blockWithItem(RegistryObject<Block> blockRegistryObject) {
|
||||
simpleBlockWithItem(blockRegistryObject.get(), cubeAll(blockRegistryObject.get()));
|
||||
}
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraftforge.client.model.generators.BlockStateProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class ModBlockStateProvider extends BlockStateProvider {
|
||||
public ModBlockStateProvider(PackOutput output, ExistingFileHelper exFileHelper) {
|
||||
super(output, NuggetMod.MOD_ID, exFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerStatesAndModels() {
|
||||
blockWithItem(ModBlocks.NUGGET_BLOCK);
|
||||
blockWithItem(ModBlocks.RAW_NUGGET_BLOCK);
|
||||
|
||||
blockWithItem(ModBlocks.NUGGET_ORE);
|
||||
blockWithItem(ModBlocks.NUGGET_DEEPSLATE_ORE);
|
||||
|
||||
}
|
||||
|
||||
private void blockWithItem(RegistryObject<Block> blockRegistryObject) {
|
||||
simpleBlockWithItem(blockRegistryObject.get(), cubeAll(blockRegistryObject.get()));
|
||||
}
|
||||
}
|
||||
@@ -1,42 +1,42 @@
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraftforge.common.data.BlockTagsProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import xyz.sillyangel.nugget.util.ModTags;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
public ModBlockTagProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> lookupProvider, @Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(output, lookupProvider, NuggetMod.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addTags(HolderLookup.Provider pProvider) {
|
||||
tag(BlockTags.MINEABLE_WITH_PICKAXE)
|
||||
.add(ModBlocks.NUGGET_BLOCK.get())
|
||||
.add(ModBlocks.RAW_NUGGET_BLOCK.get())
|
||||
.add(ModBlocks.NUGGET_ORE.get())
|
||||
.add(ModBlocks.NUGGET_DEEPSLATE_ORE.get());
|
||||
|
||||
tag(BlockTags.NEEDS_STONE_TOOL)
|
||||
.add(ModBlocks.NUGGET_DEEPSLATE_ORE.get())
|
||||
.add(ModBlocks.RAW_NUGGET_BLOCK.get());
|
||||
|
||||
// tag(BlockTags.NEEDS_STONE_TOOL)
|
||||
tag(ModTags.Blocks.NEEDS_NUGGET_TOOL)
|
||||
.add(ModBlocks.RAW_NUGGET_BLOCK.get())
|
||||
.addTag(BlockTags.NEEDS_DIAMOND_TOOL);
|
||||
|
||||
tag(ModTags.Blocks.INCORRECT_FOR_NUGGET_TOOL)
|
||||
.addTag(BlockTags.INCORRECT_FOR_DIAMOND_TOOL)
|
||||
.remove(ModTags.Blocks.NEEDS_NUGGET_TOOL);
|
||||
}
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraftforge.common.data.BlockTagsProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import xyz.sillyangel.nugget.util.ModTags;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ModBlockTagProvider extends BlockTagsProvider {
|
||||
public ModBlockTagProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> lookupProvider, @Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(output, lookupProvider, NuggetMod.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addTags(HolderLookup.Provider pProvider) {
|
||||
tag(BlockTags.MINEABLE_WITH_PICKAXE)
|
||||
.add(ModBlocks.NUGGET_BLOCK.get())
|
||||
.add(ModBlocks.RAW_NUGGET_BLOCK.get())
|
||||
.add(ModBlocks.NUGGET_ORE.get())
|
||||
.add(ModBlocks.NUGGET_DEEPSLATE_ORE.get());
|
||||
|
||||
tag(BlockTags.NEEDS_STONE_TOOL)
|
||||
.add(ModBlocks.NUGGET_DEEPSLATE_ORE.get())
|
||||
.add(ModBlocks.RAW_NUGGET_BLOCK.get());
|
||||
|
||||
// tag(BlockTags.NEEDS_STONE_TOOL)
|
||||
tag(ModTags.Blocks.NEEDS_NUGGET_TOOL)
|
||||
.add(ModBlocks.RAW_NUGGET_BLOCK.get())
|
||||
.addTag(BlockTags.NEEDS_DIAMOND_TOOL);
|
||||
|
||||
tag(ModTags.Blocks.INCORRECT_FOR_NUGGET_TOOL)
|
||||
.addTag(BlockTags.INCORRECT_FOR_DIAMOND_TOOL)
|
||||
.remove(ModTags.Blocks.NEEDS_NUGGET_TOOL);
|
||||
}
|
||||
}
|
||||
@@ -1,61 +1,61 @@
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraftforge.client.model.generators.ItemModelBuilder;
|
||||
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class ModItemModelProvider extends ItemModelProvider {
|
||||
public ModItemModelProvider(PackOutput output, ExistingFileHelper existingFileHelper) {
|
||||
super(output, NuggetMod.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerModels() {
|
||||
basicItem(ModItems.NUGGET.get());
|
||||
basicItem(ModItems.RAW_NUGGET.get());
|
||||
|
||||
handheldItem(ModItems.NUGGET_SWORD);
|
||||
handheldItem(ModItems.NUGGET_PICKAXE);
|
||||
handheldItem(ModItems.NUGGET_SHOVEL);
|
||||
handheldItem(ModItems.NUGGET_AXE);
|
||||
handheldItem(ModItems.NUGGET_HOE);
|
||||
}
|
||||
|
||||
private ItemModelBuilder handheldItem(RegistryObject<Item> item) {
|
||||
return withExistingParent(item.getId().getPath(),
|
||||
ResourceLocation.parse("item/handheld")).texture("layer0",
|
||||
ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,"item/" + item.getId().getPath()));
|
||||
}
|
||||
|
||||
public void buttonItem(RegistryObject<? extends Block> block, RegistryObject<Block> baseBlock) {
|
||||
this.withExistingParent(ForgeRegistries.BLOCKS.getKey(block.get()).getPath(), mcLoc("block/button_inventory"))
|
||||
.texture("texture", ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,
|
||||
"block/" + ForgeRegistries.BLOCKS.getKey(baseBlock.get()).getPath()));
|
||||
}
|
||||
|
||||
public void fenceItem(RegistryObject<? extends Block> block, RegistryObject<Block> baseBlock) {
|
||||
this.withExistingParent(ForgeRegistries.BLOCKS.getKey(block.get()).getPath(), mcLoc("block/fence_inventory"))
|
||||
.texture("texture", ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,
|
||||
"block/" + ForgeRegistries.BLOCKS.getKey(baseBlock.get()).getPath()));
|
||||
}
|
||||
|
||||
public void wallItem(RegistryObject<? extends Block> block, RegistryObject<Block> baseBlock) {
|
||||
this.withExistingParent(ForgeRegistries.BLOCKS.getKey(block.get()).getPath(), mcLoc("block/wall_inventory"))
|
||||
.texture("wall", ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,
|
||||
"block/" + ForgeRegistries.BLOCKS.getKey(baseBlock.get()).getPath()));
|
||||
}
|
||||
|
||||
private ItemModelBuilder simpleBlockItem(RegistryObject<? extends Block> item) {
|
||||
return withExistingParent(item.getId().getPath(),
|
||||
ResourceLocation.parse("item/generated")).texture("layer0",
|
||||
ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,"item/" + item.getId().getPath()));
|
||||
}
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraftforge.client.model.generators.ItemModelBuilder;
|
||||
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class ModItemModelProvider extends ItemModelProvider {
|
||||
public ModItemModelProvider(PackOutput output, ExistingFileHelper existingFileHelper) {
|
||||
super(output, NuggetMod.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerModels() {
|
||||
basicItem(ModItems.NUGGET.get());
|
||||
basicItem(ModItems.RAW_NUGGET.get());
|
||||
|
||||
handheldItem(ModItems.NUGGET_SWORD);
|
||||
handheldItem(ModItems.NUGGET_PICKAXE);
|
||||
handheldItem(ModItems.NUGGET_SHOVEL);
|
||||
handheldItem(ModItems.NUGGET_AXE);
|
||||
handheldItem(ModItems.NUGGET_HOE);
|
||||
}
|
||||
|
||||
private ItemModelBuilder handheldItem(RegistryObject<Item> item) {
|
||||
return withExistingParent(item.getId().getPath(),
|
||||
ResourceLocation.parse("item/handheld")).texture("layer0",
|
||||
ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,"item/" + item.getId().getPath()));
|
||||
}
|
||||
|
||||
public void buttonItem(RegistryObject<? extends Block> block, RegistryObject<Block> baseBlock) {
|
||||
this.withExistingParent(ForgeRegistries.BLOCKS.getKey(block.get()).getPath(), mcLoc("block/button_inventory"))
|
||||
.texture("texture", ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,
|
||||
"block/" + ForgeRegistries.BLOCKS.getKey(baseBlock.get()).getPath()));
|
||||
}
|
||||
|
||||
public void fenceItem(RegistryObject<? extends Block> block, RegistryObject<Block> baseBlock) {
|
||||
this.withExistingParent(ForgeRegistries.BLOCKS.getKey(block.get()).getPath(), mcLoc("block/fence_inventory"))
|
||||
.texture("texture", ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,
|
||||
"block/" + ForgeRegistries.BLOCKS.getKey(baseBlock.get()).getPath()));
|
||||
}
|
||||
|
||||
public void wallItem(RegistryObject<? extends Block> block, RegistryObject<Block> baseBlock) {
|
||||
this.withExistingParent(ForgeRegistries.BLOCKS.getKey(block.get()).getPath(), mcLoc("block/wall_inventory"))
|
||||
.texture("wall", ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,
|
||||
"block/" + ForgeRegistries.BLOCKS.getKey(baseBlock.get()).getPath()));
|
||||
}
|
||||
|
||||
private ItemModelBuilder simpleBlockItem(RegistryObject<? extends Block> item) {
|
||||
return withExistingParent(item.getId().getPath(),
|
||||
ResourceLocation.parse("item/generated")).texture("layer0",
|
||||
ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID,"item/" + item.getId().getPath()));
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,31 @@
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import xyz.sillyangel.nugget.util.ModTags;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.data.tags.ItemTagsProvider;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ModItemTagProvider extends ItemTagsProvider {
|
||||
public ModItemTagProvider(PackOutput packOutput, CompletableFuture<HolderLookup.Provider> completableFuture,
|
||||
CompletableFuture<TagLookup<Block>> lookupCompletableFuture, @Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(packOutput, completableFuture, lookupCompletableFuture, NuggetMod.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addTags(HolderLookup.Provider pProvider) {
|
||||
tag(ModTags.Items.TRANSFORMABLE_ITEMS)
|
||||
.add(ModItems.NUGGET.get())
|
||||
.add(ModItems.RAW_NUGGET.get())
|
||||
.add(Items.COAL)
|
||||
.add(Items.STICK)
|
||||
.add(Items.COMPASS);
|
||||
}
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import xyz.sillyangel.nugget.util.ModTags;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.data.tags.ItemTagsProvider;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ModItemTagProvider extends ItemTagsProvider {
|
||||
public ModItemTagProvider(PackOutput packOutput, CompletableFuture<HolderLookup.Provider> completableFuture,
|
||||
CompletableFuture<TagLookup<Block>> lookupCompletableFuture, @Nullable ExistingFileHelper existingFileHelper) {
|
||||
super(packOutput, completableFuture, lookupCompletableFuture, NuggetMod.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addTags(HolderLookup.Provider pProvider) {
|
||||
tag(ModTags.Items.TRANSFORMABLE_ITEMS)
|
||||
.add(ModItems.NUGGET.get())
|
||||
.add(ModItems.RAW_NUGGET.get())
|
||||
.add(Items.COAL)
|
||||
.add(Items.STICK)
|
||||
.add(Items.COMPASS);
|
||||
}
|
||||
}
|
||||
@@ -1,76 +1,120 @@
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.data.recipes.*;
|
||||
import net.minecraft.world.item.crafting.*;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraftforge.common.crafting.conditions.IConditionBuilder;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ModRecipeProvider extends RecipeProvider implements IConditionBuilder {
|
||||
public ModRecipeProvider(PackOutput pOutput, CompletableFuture<HolderLookup.Provider> pRegistries) {
|
||||
super(pOutput, pRegistries);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildRecipes(RecipeOutput pRecipeOutput) {
|
||||
List<ItemLike> NUGGET_SMELTABLES = List.of(ModItems.RAW_NUGGET.get(),
|
||||
ModBlocks.NUGGET_ORE.get(), ModBlocks.NUGGET_DEEPSLATE_ORE.get());
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModBlocks.NUGGET_BLOCK.get())
|
||||
.pattern("AAA")
|
||||
.pattern("AAA")
|
||||
.pattern("AAA")
|
||||
.define('A', ModItems.NUGGET.get())
|
||||
.unlockedBy(getHasName(ModItems.NUGGET.get()), has(ModItems.NUGGET.get())).save(pRecipeOutput);
|
||||
|
||||
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ModItems.NUGGET.get(), 9)
|
||||
.requires(ModBlocks.NUGGET_BLOCK.get())
|
||||
.unlockedBy(getHasName(ModBlocks.NUGGET_BLOCK.get()), has(ModBlocks.NUGGET_BLOCK.get())).save(pRecipeOutput);
|
||||
|
||||
// RAW NUGGET
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModBlocks.RAW_NUGGET_BLOCK.get())
|
||||
.pattern("AAA")
|
||||
.pattern("AAA")
|
||||
.pattern("AAA")
|
||||
.define('A', ModItems.RAW_NUGGET.get())
|
||||
.unlockedBy(getHasName(ModItems.RAW_NUGGET.get()), has(ModItems.RAW_NUGGET.get())).save(pRecipeOutput);
|
||||
|
||||
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ModItems.RAW_NUGGET.get(), 9)
|
||||
.requires(ModBlocks.RAW_NUGGET_BLOCK.get())
|
||||
.unlockedBy(getHasName(ModBlocks.RAW_NUGGET_BLOCK.get()), has(ModBlocks.RAW_NUGGET_BLOCK.get())).save(pRecipeOutput);
|
||||
|
||||
|
||||
oreSmelting(pRecipeOutput, NUGGET_SMELTABLES, RecipeCategory.MISC, ModItems.NUGGET.get(), 0.25f, 200, "nugget");
|
||||
oreBlasting(pRecipeOutput, NUGGET_SMELTABLES, RecipeCategory.MISC, ModItems.NUGGET.get(), 0.25f, 100, "nugget");
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected static void oreSmelting(RecipeOutput recipeOutput, List<ItemLike> pIngredients, RecipeCategory pCategory, ItemLike pResult,
|
||||
float pExperience, int pCookingTIme, String pGroup) {
|
||||
oreCooking(recipeOutput, RecipeSerializer.SMELTING_RECIPE, SmeltingRecipe::new, pIngredients, pCategory, pResult,
|
||||
pExperience, pCookingTIme, pGroup, "_from_smelting");
|
||||
}
|
||||
|
||||
protected static void oreBlasting(RecipeOutput recipeOutput, List<ItemLike> pIngredients, RecipeCategory pCategory, ItemLike pResult,
|
||||
float pExperience, int pCookingTime, String pGroup) {
|
||||
oreCooking(recipeOutput, RecipeSerializer.BLASTING_RECIPE, BlastingRecipe::new, pIngredients, pCategory, pResult,
|
||||
pExperience, pCookingTime, pGroup, "_from_blasting");
|
||||
}
|
||||
|
||||
protected static <T extends AbstractCookingRecipe> void oreCooking(RecipeOutput recipeOutput, RecipeSerializer<T> pCookingSerializer, AbstractCookingRecipe.Factory<T> factory,
|
||||
List<ItemLike> pIngredients, RecipeCategory pCategory, ItemLike pResult, float pExperience, int pCookingTime, String pGroup, String pRecipeName) {
|
||||
for(ItemLike itemlike : pIngredients) {
|
||||
SimpleCookingRecipeBuilder.generic(Ingredient.of(itemlike), pCategory, pResult, pExperience, pCookingTime, pCookingSerializer, factory).group(pGroup).unlockedBy(getHasName(itemlike), has(itemlike))
|
||||
.save(recipeOutput, NuggetMod.MOD_ID + ":" + getItemName(pResult) + pRecipeName + "_" + getItemName(itemlike));
|
||||
}
|
||||
}
|
||||
package xyz.sillyangel.nugget.datagen;
|
||||
|
||||
import net.minecraft.world.item.Items;
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
import xyz.sillyangel.nugget.item.ModItems;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.data.recipes.*;
|
||||
import net.minecraft.world.item.crafting.*;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraftforge.common.crafting.conditions.IConditionBuilder;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class ModRecipeProvider extends RecipeProvider implements IConditionBuilder {
|
||||
public ModRecipeProvider(PackOutput pOutput, CompletableFuture<HolderLookup.Provider> pRegistries) {
|
||||
super(pOutput, pRegistries);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildRecipes(RecipeOutput pRecipeOutput) {
|
||||
List<ItemLike> NUGGET_SMELTABLES = List.of(ModItems.RAW_NUGGET.get(),
|
||||
ModBlocks.NUGGET_ORE.get(), ModBlocks.NUGGET_DEEPSLATE_ORE.get());
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModBlocks.NUGGET_BLOCK.get())
|
||||
.pattern("AAA")
|
||||
.pattern("AAA")
|
||||
.pattern("AAA")
|
||||
.define('A', ModItems.NUGGET.get())
|
||||
.unlockedBy(getHasName(ModItems.NUGGET.get()), has(ModItems.NUGGET.get())).save(pRecipeOutput);
|
||||
|
||||
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ModItems.NUGGET.get(), 9)
|
||||
.requires(ModBlocks.NUGGET_BLOCK.get())
|
||||
.unlockedBy(getHasName(ModBlocks.NUGGET_BLOCK.get()), has(ModBlocks.NUGGET_BLOCK.get())).save(pRecipeOutput);
|
||||
|
||||
// RAW NUGGET
|
||||
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModBlocks.RAW_NUGGET_BLOCK.get())
|
||||
.pattern("AAA")
|
||||
.pattern("AAA")
|
||||
.pattern("AAA")
|
||||
.define('A', ModItems.RAW_NUGGET.get())
|
||||
.unlockedBy(getHasName(ModItems.RAW_NUGGET.get()), has(ModItems.RAW_NUGGET.get())).save(pRecipeOutput);
|
||||
|
||||
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ModItems.RAW_NUGGET.get(), 9)
|
||||
.requires(ModBlocks.RAW_NUGGET_BLOCK.get())
|
||||
.unlockedBy(getHasName(ModBlocks.RAW_NUGGET_BLOCK.get()), has(ModBlocks.RAW_NUGGET_BLOCK.get())).save(pRecipeOutput);
|
||||
// TOOLS
|
||||
|
||||
//SWORD
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, ModItems.NUGGET_SWORD.get())
|
||||
.pattern(" A ")
|
||||
.pattern(" A ")
|
||||
.pattern(" B ")
|
||||
.define('A', ModItems.NUGGET.get())
|
||||
.define('B', Items.STICK)
|
||||
.unlockedBy(getHasName(ModItems.NUGGET.get()), has(ModItems.NUGGET.get())).save(pRecipeOutput);
|
||||
//PICAXE
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.NUGGET_PICKAXE.get())
|
||||
.pattern("AAA")
|
||||
.pattern(" B ")
|
||||
.pattern(" B ")
|
||||
.define('A', ModItems.NUGGET.get())
|
||||
.define('B', Items.STICK)
|
||||
.unlockedBy(getHasName(ModItems.NUGGET.get()), has(ModItems.NUGGET.get())).save(pRecipeOutput);
|
||||
//AXE
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.NUGGET_AXE.get())
|
||||
.pattern(" AA")
|
||||
.pattern(" BA")
|
||||
.pattern(" B ")
|
||||
.define('A', ModItems.NUGGET.get())
|
||||
.define('B', Items.STICK)
|
||||
.unlockedBy(getHasName(ModItems.NUGGET.get()), has(ModItems.NUGGET.get())).save(pRecipeOutput);
|
||||
//SHOVEL
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.NUGGET_SHOVEL.get())
|
||||
.pattern(" A ")
|
||||
.pattern(" B ")
|
||||
.pattern(" B ")
|
||||
.define('A', ModItems.NUGGET.get())
|
||||
.define('B', Items.STICK)
|
||||
.unlockedBy(getHasName(ModItems.NUGGET.get()), has(ModItems.NUGGET.get())).save(pRecipeOutput);
|
||||
//HOE
|
||||
ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, ModItems.NUGGET_HOE.get())
|
||||
.pattern(" AA")
|
||||
.pattern(" B ")
|
||||
.pattern(" B ")
|
||||
.define('A', ModItems.NUGGET.get())
|
||||
.define('B', Items.STICK)
|
||||
.unlockedBy(getHasName(ModItems.NUGGET.get()), has(ModItems.NUGGET.get())).save(pRecipeOutput);
|
||||
|
||||
// END OF TOOLS
|
||||
|
||||
oreSmelting(pRecipeOutput, NUGGET_SMELTABLES, RecipeCategory.MISC, ModItems.NUGGET.get(), 0.25f, 200, "nugget");
|
||||
oreBlasting(pRecipeOutput, NUGGET_SMELTABLES, RecipeCategory.MISC, ModItems.NUGGET.get(), 0.25f, 100, "nugget");
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected static void oreSmelting(RecipeOutput recipeOutput, List<ItemLike> pIngredients, RecipeCategory pCategory, ItemLike pResult,
|
||||
float pExperience, int pCookingTIme, String pGroup) {
|
||||
oreCooking(recipeOutput, RecipeSerializer.SMELTING_RECIPE, SmeltingRecipe::new, pIngredients, pCategory, pResult,
|
||||
pExperience, pCookingTIme, pGroup, "_from_smelting");
|
||||
}
|
||||
|
||||
protected static void oreBlasting(RecipeOutput recipeOutput, List<ItemLike> pIngredients, RecipeCategory pCategory, ItemLike pResult,
|
||||
float pExperience, int pCookingTime, String pGroup) {
|
||||
oreCooking(recipeOutput, RecipeSerializer.BLASTING_RECIPE, BlastingRecipe::new, pIngredients, pCategory, pResult,
|
||||
pExperience, pCookingTime, pGroup, "_from_blasting");
|
||||
}
|
||||
|
||||
protected static <T extends AbstractCookingRecipe> void oreCooking(RecipeOutput recipeOutput, RecipeSerializer<T> pCookingSerializer, AbstractCookingRecipe.Factory<T> factory,
|
||||
List<ItemLike> pIngredients, RecipeCategory pCategory, ItemLike pResult, float pExperience, int pCookingTime, String pGroup, String pRecipeName) {
|
||||
for(ItemLike itemlike : pIngredients) {
|
||||
SimpleCookingRecipeBuilder.generic(Ingredient.of(itemlike), pCategory, pResult, pExperience, pCookingTime, pCookingSerializer, factory).group(pGroup).unlockedBy(getHasName(itemlike), has(itemlike))
|
||||
.save(recipeOutput, NuggetMod.MOD_ID + ":" + getItemName(pResult) + pRecipeName + "_" + getItemName(itemlike));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,49 @@
|
||||
package xyz.sillyangel.nugget.item;
|
||||
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
|
||||
public class ModCreativeModeTabs {
|
||||
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS =
|
||||
DeferredRegister.create(Registries.CREATIVE_MODE_TAB, NuggetMod.MOD_ID);
|
||||
|
||||
public static final RegistryObject<CreativeModeTab> NUGGET_ITEMS_TAB = CREATIVE_MODE_TABS.register("nuggetmod_items_tab",
|
||||
() -> CreativeModeTab.builder().icon(() -> new ItemStack(ModItems.NUGGET.get()))
|
||||
.title(Component.translatable("creativetab.nuggetmod.nugget_items"))
|
||||
.displayItems((itemDisplayParameters, output) -> {
|
||||
output.accept(ModItems.NUGGET.get());
|
||||
output.accept(ModItems.RAW_NUGGET.get());
|
||||
|
||||
output.accept(ModItems.NUGGET_SWORD.get());
|
||||
output.accept(ModItems.NUGGET_PICKAXE.get());
|
||||
output.accept(ModItems.NUGGET_SHOVEL.get());
|
||||
output.accept(ModItems.NUGGET_AXE.get());
|
||||
output.accept(ModItems.NUGGET_HOE.get());
|
||||
|
||||
}).build());
|
||||
|
||||
public static final RegistryObject<CreativeModeTab> NUGGET_BLOCKS_TAB = CREATIVE_MODE_TABS.register("nuggetmod_blocks_tab",
|
||||
() -> CreativeModeTab.builder().icon(() -> new ItemStack(ModBlocks.NUGGET_BLOCK.get()))
|
||||
.withTabsBefore(NUGGET_ITEMS_TAB.getId())
|
||||
.title(Component.translatable("creativetab.nuggetmod.nugget_blocks"))
|
||||
.displayItems((itemDisplayParameters, output) -> {
|
||||
output.accept(ModBlocks.NUGGET_BLOCK.get());
|
||||
output.accept(ModBlocks.RAW_NUGGET_BLOCK.get());
|
||||
output.accept(ModBlocks.NUGGET_ORE.get());
|
||||
output.accept(ModBlocks.NUGGET_DEEPSLATE_ORE.get());
|
||||
}).build());
|
||||
|
||||
|
||||
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
CREATIVE_MODE_TABS.register(eventBus);
|
||||
}
|
||||
}
|
||||
package xyz.sillyangel.nugget.item;
|
||||
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import xyz.sillyangel.nugget.block.ModBlocks;
|
||||
|
||||
public class ModCreativeModeTabs {
|
||||
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS =
|
||||
DeferredRegister.create(Registries.CREATIVE_MODE_TAB, NuggetMod.MOD_ID);
|
||||
|
||||
public static final RegistryObject<CreativeModeTab> NUGGET_ITEMS_TAB = CREATIVE_MODE_TABS.register("nuggetmod_items_tab",
|
||||
() -> CreativeModeTab.builder().icon(() -> new ItemStack(ModItems.NUGGET.get()))
|
||||
.title(Component.translatable("creativetab.nuggetmod.nugget_items"))
|
||||
.displayItems((itemDisplayParameters, output) -> {
|
||||
output.accept(ModItems.NUGGET.get());
|
||||
output.accept(ModItems.RAW_NUGGET.get());
|
||||
|
||||
output.accept(ModItems.NUGGET_SWORD.get());
|
||||
output.accept(ModItems.NUGGET_PICKAXE.get());
|
||||
output.accept(ModItems.NUGGET_SHOVEL.get());
|
||||
output.accept(ModItems.NUGGET_AXE.get());
|
||||
output.accept(ModItems.NUGGET_HOE.get());
|
||||
|
||||
}).build());
|
||||
|
||||
public static final RegistryObject<CreativeModeTab> NUGGET_BLOCKS_TAB = CREATIVE_MODE_TABS.register("nuggetmod_blocks_tab",
|
||||
() -> CreativeModeTab.builder().icon(() -> new ItemStack(ModBlocks.NUGGET_BLOCK.get()))
|
||||
.withTabsBefore(NUGGET_ITEMS_TAB.getId())
|
||||
.title(Component.translatable("creativetab.nuggetmod.nugget_blocks"))
|
||||
.displayItems((itemDisplayParameters, output) -> {
|
||||
output.accept(ModBlocks.NUGGET_BLOCK.get());
|
||||
output.accept(ModBlocks.RAW_NUGGET_BLOCK.get());
|
||||
output.accept(ModBlocks.NUGGET_ORE.get());
|
||||
output.accept(ModBlocks.NUGGET_DEEPSLATE_ORE.get());
|
||||
}).build());
|
||||
|
||||
|
||||
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
CREATIVE_MODE_TABS.register(eventBus);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package xyz.sillyangel.nugget.item;
|
||||
|
||||
import net.minecraft.world.food.FoodProperties;
|
||||
|
||||
public class ModFoodProperties {
|
||||
public static final FoodProperties Nugget = new FoodProperties.Builder().nutrition(5).saturationModifier(0.5f)
|
||||
.build();
|
||||
}
|
||||
package xyz.sillyangel.nugget.item;
|
||||
|
||||
import net.minecraft.world.food.FoodProperties;
|
||||
|
||||
public class ModFoodProperties {
|
||||
public static final FoodProperties Nugget = new FoodProperties.Builder().nutrition(5).saturationModifier(0.5f)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
package xyz.sillyangel.nugget.item;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import net.minecraft.world.item.*;
|
||||
import java.util.List;
|
||||
|
||||
public class ModItems {
|
||||
public static final DeferredRegister<Item> ITEMS =
|
||||
DeferredRegister.create(ForgeRegistries.ITEMS, NuggetMod.MOD_ID);
|
||||
|
||||
public static final RegistryObject<Item> NUGGET = ITEMS.register("nugget",
|
||||
() -> new Item(new Item.Properties().food(ModFoodProperties.Nugget)) {
|
||||
@Override
|
||||
public void appendHoverText(ItemStack pStack, TooltipContext pContext, List<Component> pTooltipComponent, TooltipFlag pTooltipFlag) {
|
||||
pTooltipComponent.add(Component.translatable("item.nuggetmod.nugget.tooltip"));
|
||||
super.appendHoverText(pStack, pContext, pTooltipComponent, pTooltipFlag);
|
||||
}
|
||||
});
|
||||
|
||||
public static final RegistryObject<Item> RAW_NUGGET = ITEMS.register("raw_nugget",
|
||||
() -> new Item(new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Item> NUGGET_SWORD = ITEMS.register("nugget_sword",
|
||||
() -> new SwordItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(SwordItem.createAttributes(ModToolTiers.NUGGET, 3, -2.4f))));
|
||||
public static final RegistryObject<Item> NUGGET_PICKAXE = ITEMS.register("nugget_pickaxe",
|
||||
() -> new PickaxeItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(PickaxeItem.createAttributes(ModToolTiers.NUGGET, 1, -2.8f))));
|
||||
public static final RegistryObject<Item> NUGGET_SHOVEL = ITEMS.register("nugget_shovel",
|
||||
() -> new ShovelItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(ShovelItem.createAttributes(ModToolTiers.NUGGET, 1.5f, -3.0f))));
|
||||
public static final RegistryObject<Item> NUGGET_AXE = ITEMS.register("nugget_axe",
|
||||
() -> new AxeItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(AxeItem.createAttributes(ModToolTiers.NUGGET, 6, -3.2f))));
|
||||
public static final RegistryObject<Item> NUGGET_HOE = ITEMS.register("nugget_hoe",
|
||||
() -> new HoeItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(HoeItem.createAttributes(ModToolTiers.NUGGET, 0, -3.0f))));
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
ITEMS.register(eventBus);
|
||||
}
|
||||
|
||||
}
|
||||
package xyz.sillyangel.nugget.item;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import net.minecraft.world.item.*;
|
||||
import java.util.List;
|
||||
|
||||
public class ModItems {
|
||||
public static final DeferredRegister<Item> ITEMS =
|
||||
DeferredRegister.create(ForgeRegistries.ITEMS, NuggetMod.MOD_ID);
|
||||
|
||||
public static final RegistryObject<Item> NUGGET = ITEMS.register("nugget",
|
||||
() -> new Item(new Item.Properties().food(ModFoodProperties.Nugget)) {
|
||||
@Override
|
||||
public void appendHoverText(ItemStack pStack, TooltipContext pContext, List<Component> pTooltipComponent, TooltipFlag pTooltipFlag) {
|
||||
pTooltipComponent.add(Component.translatable("item.nuggetmod.nugget.tooltip"));
|
||||
super.appendHoverText(pStack, pContext, pTooltipComponent, pTooltipFlag);
|
||||
}
|
||||
});
|
||||
|
||||
public static final RegistryObject<Item> RAW_NUGGET = ITEMS.register("raw_nugget",
|
||||
() -> new Item(new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Item> NUGGET_SWORD = ITEMS.register("nugget_sword",
|
||||
() -> new SwordItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(SwordItem.createAttributes(ModToolTiers.NUGGET, 3, -2.4f))));
|
||||
public static final RegistryObject<Item> NUGGET_PICKAXE = ITEMS.register("nugget_pickaxe",
|
||||
() -> new PickaxeItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(PickaxeItem.createAttributes(ModToolTiers.NUGGET, 1, -2.8f))));
|
||||
public static final RegistryObject<Item> NUGGET_SHOVEL = ITEMS.register("nugget_shovel",
|
||||
() -> new ShovelItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(ShovelItem.createAttributes(ModToolTiers.NUGGET, 1.5f, -3.0f))));
|
||||
public static final RegistryObject<Item> NUGGET_AXE = ITEMS.register("nugget_axe",
|
||||
() -> new AxeItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(AxeItem.createAttributes(ModToolTiers.NUGGET, 6, -3.2f))));
|
||||
public static final RegistryObject<Item> NUGGET_HOE = ITEMS.register("nugget_hoe",
|
||||
() -> new HoeItem(ModToolTiers.NUGGET, new Item.Properties()
|
||||
.attributes(HoeItem.createAttributes(ModToolTiers.NUGGET, 0, -3.0f))));
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
ITEMS.register(eventBus);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package xyz.sillyangel.nugget.item;
|
||||
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraftforge.common.ForgeTier;
|
||||
import xyz.sillyangel.nugget.util.ModTags;
|
||||
|
||||
public class ModToolTiers {
|
||||
public static final Tier NUGGET = new ForgeTier(1500, 4.5f, 3.5f, 25,
|
||||
ModTags.Blocks.NEEDS_NUGGET_TOOL, () -> Ingredient.of(ModItems.NUGGET.get()),
|
||||
ModTags.Blocks.INCORRECT_FOR_NUGGET_TOOL);
|
||||
}
|
||||
package xyz.sillyangel.nugget.item;
|
||||
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraftforge.common.ForgeTier;
|
||||
import xyz.sillyangel.nugget.util.ModTags;
|
||||
|
||||
public class ModToolTiers {
|
||||
public static final Tier NUGGET = new ForgeTier(1500, 4.5f, 3.5f, 22,
|
||||
ModTags.Blocks.NEEDS_NUGGET_TOOL, () -> Ingredient.of(ModItems.NUGGET.get()),
|
||||
ModTags.Blocks.INCORRECT_FOR_NUGGET_TOOL);
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
package xyz.sillyangel.nugget.util;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
public class ModTags {
|
||||
public static class Blocks {
|
||||
public static final TagKey<Block> NEEDS_NUGGET_TOOL = createTag("needs_nugget_tool");
|
||||
public static final TagKey<Block> INCORRECT_FOR_NUGGET_TOOL = createTag("incorrect_for_nugget_tool");
|
||||
|
||||
private static TagKey<Block> createTag(String name) {
|
||||
return BlockTags.create(ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Items {
|
||||
public static final TagKey<Item> TRANSFORMABLE_ITEMS = createTag("transformable_items");
|
||||
|
||||
private static TagKey<Item> createTag(String name) {
|
||||
return ItemTags.create(ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
package xyz.sillyangel.nugget.util;
|
||||
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
public class ModTags {
|
||||
public static class Blocks {
|
||||
public static final TagKey<Block> NEEDS_NUGGET_TOOL = createTag("needs_nugget_tool");
|
||||
public static final TagKey<Block> INCORRECT_FOR_NUGGET_TOOL = createTag("incorrect_for_nugget_tool");
|
||||
|
||||
private static TagKey<Block> createTag(String name) {
|
||||
return BlockTags.create(ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Items {
|
||||
public static final TagKey<Item> TRANSFORMABLE_ITEMS = createTag("transformable_items");
|
||||
|
||||
private static TagKey<Item> createTag(String name) {
|
||||
return ItemTags.create(ResourceLocation.fromNamespaceAndPath(NuggetMod.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,20 @@
|
||||
{
|
||||
"item.nuggetmod.raw_nugget": "Raw Nugget",
|
||||
"item.nuggetmod.nugget": "nugget",
|
||||
|
||||
"block.nuggetmod.nugget_block": "Nugget Block",
|
||||
"block.nuggetmod.raw_nugget_block": "Raw Nugget Block",
|
||||
"block.nuggetmod.nugget_ore": "Nugget Ore",
|
||||
"block.nuggetmod.nugget_deepslate_ore": "Nugget Deepslate Ore",
|
||||
|
||||
"creativetab.nuggetmod.nugget_items": "Nugget Mod Items",
|
||||
"creativetab.nuggetmod.nugget_blocks": "Nugget Mod Blocks",
|
||||
|
||||
"item.nuggetmod.nugget.tooltip": "THE NUGGET"
|
||||
{
|
||||
"item.nuggetmod.raw_nugget": "Raw Nugget",
|
||||
"item.nuggetmod.nugget": "nugget",
|
||||
|
||||
"block.nuggetmod.nugget_block": "Nugget Block",
|
||||
"block.nuggetmod.raw_nugget_block": "Raw Nugget Block",
|
||||
"block.nuggetmod.nugget_ore": "Nugget Ore",
|
||||
"block.nuggetmod.nugget_deepslate_ore": "Nugget Deepslate Ore",
|
||||
|
||||
"item.nuggetmod.nugget_sword": "Nugget Sword",
|
||||
"item.nuggetmod.nugget_pickaxe": "Nugget Pickaxe",
|
||||
"item.nuggetmod.nugget_shovel": "Nugget Shovel",
|
||||
"item.nuggetmod.nugget_axe": "Nugget Axe",
|
||||
"item.nuggetmod.nugget_hoe": "Nugget Hoe",
|
||||
|
||||
"creativetab.nuggetmod.nugget_items": "Nugget Mod Items",
|
||||
"creativetab.nuggetmod.nugget_blocks": "Nugget Mod Blocks",
|
||||
|
||||
"item.nuggetmod.nugget.tooltip": "THE NUGGET"
|
||||
}
|
||||
BIN
src/main/resources/assets/nuggetmod/textures/item/nugget_axe.png
Normal file
BIN
src/main/resources/assets/nuggetmod/textures/item/nugget_axe.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/main/resources/assets/nuggetmod/textures/item/nugget_hoe.png
Normal file
BIN
src/main/resources/assets/nuggetmod/textures/item/nugget_hoe.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"nuggetmod:nugget_axe"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"nuggetmod:nugget_hoe"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"nuggetmod:nugget_pickaxe"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"nuggetmod:nugget_shovel"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"nuggetmod:nugget_sword"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user