diff --git a/src/generated/resources/.cache/71e72dbdeb626cc835aaccd2ae47fd3d8794cd24 b/src/generated/resources/.cache/71e72dbdeb626cc835aaccd2ae47fd3d8794cd24 new file mode 100644 index 0000000..597b61a --- /dev/null +++ b/src/generated/resources/.cache/71e72dbdeb626cc835aaccd2ae47fd3d8794cd24 @@ -0,0 +1,6 @@ +// 1.21 2024-08-12T10:19:52.413361 Item Models: lingshi +bad0cb5e093fa42331c2d4a1157d1a7b5b3fc588 assets/lingshi/models/item/chopping_board.json +249957a6811e300efca306db358e468855851d73 assets/lingshi/models/item/iron_knife.json +496d711c2d4af0f851d40f859b102da69188089d assets/lingshi/models/item/rice.json +abe8ae1523c26af167289fe958382b2477d96ea1 assets/lingshi/models/item/rice_of_ear.json +57cfb1f90de649ab0f56f107cb56e1d0d2f87ae6 assets/lingshi/models/item/rice_seedling.json diff --git a/src/generated/resources/assets/lingshi/models/item/chopping_board.json b/src/generated/resources/assets/lingshi/models/item/chopping_board.json new file mode 100644 index 0000000..079e6df --- /dev/null +++ b/src/generated/resources/assets/lingshi/models/item/chopping_board.json @@ -0,0 +1,3 @@ +{ + "parent": "lingshi:block/chopping_board" +} \ No newline at end of file diff --git a/src/generated/resources/assets/lingshi/models/item/iron_knife.json b/src/generated/resources/assets/lingshi/models/item/iron_knife.json new file mode 100644 index 0000000..6d91a0c --- /dev/null +++ b/src/generated/resources/assets/lingshi/models/item/iron_knife.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "lingshi:item/iron_knife" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/lingshi/models/item/rice.json b/src/generated/resources/assets/lingshi/models/item/rice.json new file mode 100644 index 0000000..ee2f862 --- /dev/null +++ b/src/generated/resources/assets/lingshi/models/item/rice.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "lingshi:item/rice" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/lingshi/models/item/rice_of_ear.json b/src/generated/resources/assets/lingshi/models/item/rice_of_ear.json new file mode 100644 index 0000000..2f67fef --- /dev/null +++ b/src/generated/resources/assets/lingshi/models/item/rice_of_ear.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "lingshi:item/rice_of_ear" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/lingshi/models/item/rice_seedling.json b/src/generated/resources/assets/lingshi/models/item/rice_seedling.json new file mode 100644 index 0000000..3f46a81 --- /dev/null +++ b/src/generated/resources/assets/lingshi/models/item/rice_seedling.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "lingshi:item/rice_seedling" + } +} \ No newline at end of file diff --git a/src/main/java/mczme/lingshi/common/data/DataGenerators.java b/src/main/java/mczme/lingshi/common/data/DataGenerators.java index d3aad33..574a15c 100644 --- a/src/main/java/mczme/lingshi/common/data/DataGenerators.java +++ b/src/main/java/mczme/lingshi/common/data/DataGenerators.java @@ -31,7 +31,7 @@ public static void onGatherData(GatherDataEvent event) { ExistingFileHelper existingFileHelper = event.getExistingFileHelper(); CompletableFuture lookupProvider = event.getLookupProvider(); -// block loot +// block loot datagen event.getGenerator().addProvider( event.includeServer(), new LootTableProvider(output, Set.of(), @@ -47,10 +47,16 @@ public static void onGatherData(GatherDataEvent event) { // state datagen event.getGenerator().addProvider( - event.includeServer(), + event.includeClient(), new BlockStates(output, existingFileHelper) ); + // Item Model datagen + event.getGenerator().addProvider( + event.includeClient(), + new ItemModels(output, existingFileHelper) + ); + // chopping_board recipe datagen event.getGenerator().addProvider( event.includeServer(), diff --git a/src/main/java/mczme/lingshi/common/data/ItemModels.java b/src/main/java/mczme/lingshi/common/data/ItemModels.java new file mode 100644 index 0000000..a91f0b8 --- /dev/null +++ b/src/main/java/mczme/lingshi/common/data/ItemModels.java @@ -0,0 +1,25 @@ +package mczme.lingshi.common.data; + +import mczme.lingshi.common.registry.ModItems; +import mczme.lingshi.lingshi; +import net.minecraft.data.PackOutput; +import net.neoforged.neoforge.client.model.generators.ItemModelProvider; +import net.neoforged.neoforge.common.data.ExistingFileHelper; + +public class ItemModels extends ItemModelProvider { + public ItemModels(PackOutput output, ExistingFileHelper existingFileHelper) { + super(output, lingshi.MODID, existingFileHelper); + } + + @Override + protected void registerModels() { + basicItem(ModItems.RICE.get()); + basicItem(ModItems.RICE_OF_EAR.get()); + basicItem(ModItems.RICE_SEEDLING.get()); + + withExistingParent(String.valueOf(ModItems.CHOPPING_BOARD.get()), modLoc("block/chopping_board")); + withExistingParent(String.valueOf(ModItems.IRON_KNIFE.get()),mcLoc("item/handheld")).texture("layer0", modLoc("item/iron_knife")); + + + } +} diff --git a/src/main/resources/assets/lingshi/models/block/chopping_board.json b/src/main/resources/assets/lingshi/models/block/chopping_board.json index de22cab..789df7c 100644 --- a/src/main/resources/assets/lingshi/models/block/chopping_board.json +++ b/src/main/resources/assets/lingshi/models/block/chopping_board.json @@ -1,66 +1,91 @@ { "credit": "Made with Blockbench", + "texture_size": [16, 9], + "textures": { + "0": "lingshi:block/chopping_board", + "particle": "lingshi:block/chopping_board" + }, "elements": [ { "from": [1, 0, 3], "to": [13, 1, 12], - "rotation": {"angle": 0, "axis": "y", "origin": [11, 0.5, 8.75]}, - "color": 5, + "rotation": {"angle": 0, "axis": "y", "origin": [7, 0.5, 7.5]}, "faces": { - "north": {"uv": [0, 0, 12, 1], "texture": "#missing"}, - "east": {"uv": [0, 0, 9, 1], "texture": "#missing"}, - "south": {"uv": [0, 0, 12, 1], "texture": "#missing"}, - "west": {"uv": [0, 0, 9, 1], "texture": "#missing"}, - "up": {"uv": [7, 4, 16, 16], "rotation": 90, "texture": "#missing"}, - "down": {"uv": [7, 4, 16, 16], "rotation": 270, "texture": "#missing"} + "north": {"uv": [2.28571, 14.22222, 16, 16], "texture": "#0"}, + "east": {"uv": [2.28571, 0, 3.42857, 16], "rotation": 270, "texture": "#0"}, + "south": {"uv": [2.28571, 0, 16, 1.77778], "rotation": 180, "texture": "#0"}, + "west": {"uv": [15, 0, 16, 16], "rotation": 90, "texture": "#0"}, + "up": {"uv": [16, 16, 2.28571, 0], "texture": "#0"}, + "down": {"uv": [16, 0, 2.28571, 15.85714], "texture": "#0"} } }, { "from": [13, 0, 11], "to": [15, 1, 12], "rotation": {"angle": 0, "axis": "y", "origin": [11, 0.5, 8.75]}, - "color": 0, "faces": { - "north": {"uv": [0, 0, 2, 1], "texture": "#missing"}, - "east": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "south": {"uv": [0, 0, 2, 1], "texture": "#missing"}, - "west": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "up": {"uv": [1, 2, 2, 4], "rotation": 90, "texture": "#missing"}, - "down": {"uv": [1, 2, 2, 4], "rotation": 270, "texture": "#missing"} + "north": {"uv": [0, 0, 2.28571, 1.77778], "texture": "#0"}, + "east": {"uv": [0, 0, 1.14286, 1.77778], "texture": "#0"}, + "south": {"uv": [0, 0, 2.28571, 1.77778], "texture": "#0"}, + "west": {"uv": [1.14286, 0, 2.28571, 1.77778], "texture": "#0"}, + "up": {"uv": [0, 0, 2.28571, 1.77778], "texture": "#0"}, + "down": {"uv": [0, 0, 2.28571, 1.77778], "texture": "#0"} } }, { "from": [14, 0, 3], "to": [15, 1, 11], "rotation": {"angle": 0, "axis": "y", "origin": [11, 0.5, 8.75]}, - "color": 8, "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "east": {"uv": [0, 0, 8, 1], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "west": {"uv": [0, 0, 8, 1], "texture": "#missing"}, - "up": {"uv": [8, 1, 16, 2], "rotation": 90, "texture": "#missing"}, - "down": {"uv": [8, 1, 16, 2], "rotation": 270, "texture": "#missing"} + "north": {"uv": [0, 14.22222, 1.14286, 16], "texture": "#0"}, + "east": {"uv": [0, 1.77778, 1.14286, 16], "rotation": 270, "texture": "#0"}, + "south": {"uv": [0, 14.22222, 1.14286, 16], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 1.77778], "texture": "#0"}, + "up": {"uv": [0, 1.77778, 1.14286, 16], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 1.77778, 1.14286, 16], "texture": "#0"} } }, { "from": [13, 0, 3], "to": [14, 1, 10], "rotation": {"angle": 0, "axis": "y", "origin": [10, 0.5, 8.75]}, - "color": 7, "faces": { - "north": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "east": {"uv": [0, 0, 7, 1], "texture": "#missing"}, - "south": {"uv": [0, 0, 1, 1], "texture": "#missing"}, - "west": {"uv": [0, 0, 7, 1], "texture": "#missing"}, - "up": {"uv": [7, 1, 14, 2], "rotation": 90, "texture": "#missing"}, - "down": {"uv": [7, 1, 14, 2], "rotation": 270, "texture": "#missing"} + "north": {"uv": [1.14286, 16, 2.28571, 14.22222], "texture": "#0"}, + "east": {"uv": [1.14286, 3.55556, 2.28571, 16], "texture": "#0"}, + "south": {"uv": [1.14286, 3.55556, 2.28571, 5.33333], "texture": "#0"}, + "west": {"uv": [1.14286, 3.55556, 2.28571, 16], "texture": "#0"}, + "up": {"uv": [2.28571, 3.55556, 1.14286, 16], "rotation": 180, "texture": "#0"}, + "down": {"uv": [1.14286, 3.55556, 2.28571, 16], "texture": "#0"} } } ], + "gui_light": "front", "display": { "thirdperson_righthand": { "translation": [0, 6.25, 0] + }, + "thirdperson_lefthand": { + "translation": [0, 5.5, 0] + }, + "firstperson_righthand": { + "translation": [1.75, 4, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [18, 180, 0], + "translation": [-0.75, 3.5, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 5.25, 0] + }, + "gui": { + "rotation": [30, 225, 0], + "translation": [0, 5, 0], + "scale": [0.9, 0.9, 0.9] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] } } } \ No newline at end of file diff --git a/src/main/resources/assets/lingshi/textures/block/chopping_board.png b/src/main/resources/assets/lingshi/textures/block/chopping_board.png new file mode 100644 index 0000000..d50aed8 Binary files /dev/null and b/src/main/resources/assets/lingshi/textures/block/chopping_board.png differ diff --git a/src/main/resources/assets/lingshi/textures/item/iron_knife.png b/src/main/resources/assets/lingshi/textures/item/iron_knife.png new file mode 100644 index 0000000..211ed10 Binary files /dev/null and b/src/main/resources/assets/lingshi/textures/item/iron_knife.png differ diff --git a/src/main/resources/assets/lingshi/textures/item/rice.png b/src/main/resources/assets/lingshi/textures/item/rice.png new file mode 100644 index 0000000..4704af2 Binary files /dev/null and b/src/main/resources/assets/lingshi/textures/item/rice.png differ diff --git a/src/main/resources/assets/lingshi/textures/item/rice_of_ear.png b/src/main/resources/assets/lingshi/textures/item/rice_of_ear.png new file mode 100644 index 0000000..0763b60 Binary files /dev/null and b/src/main/resources/assets/lingshi/textures/item/rice_of_ear.png differ diff --git a/src/main/resources/assets/lingshi/textures/item/rice_seedling.png b/src/main/resources/assets/lingshi/textures/item/rice_seedling.png new file mode 100644 index 0000000..1b08e3c Binary files /dev/null and b/src/main/resources/assets/lingshi/textures/item/rice_seedling.png differ