From 95c97bb5a68858735dc2f3913f16cd1a2cb854d5 Mon Sep 17 00:00:00 2001 From: MCZME <13183052+mczme@user.noreply.gitee.com> Date: Wed, 28 Aug 2024 03:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E7=83=B9=E9=A5=AA?= =?UTF-8?q?=E9=94=85=E9=94=85=E7=9B=96=E5=90=88=E6=88=90=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../71e72dbdeb626cc835aaccd2ae47fd3d8794cd24 | 3 +- .../85f12f813aff948f91f5cd129c0ffa86bcb17361 | 4 +-- .../9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e | 8 ++++- .../d88813880ae3e40e9724fa9bc86e438c1f5ddb3d | 3 +- .../resources/assets/lingshi/lang/zh_cn.json | 1 + .../recipes/decorations/cooking_pot.json | 32 +++++++++++++++++++ .../recipes/decorations/pot_lid.json | 32 +++++++++++++++++++ .../data/lingshi/recipe/cooking_pot.json | 21 ++++++++++++ .../data/lingshi/recipe/pot_lid.json | 20 ++++++++++++ .../lingshi/common/block/CookingPotBlock.java | 16 +++++++--- .../mczme/lingshi/common/data/ItemModels.java | 2 ++ .../data/lang/ChineseLanguageProvider.java | 1 + .../data/recipe/CraftingRecipeDataGen.java | 15 +++++++++ .../data/recipe/SkilletRecipeDatagen.java | 6 +++- .../lingshi/common/data/tag/BlockTags.java | 7 ++-- .../lingshi/common/item/SpatulaItem.java | 3 -- .../lingshi/common/registry/ModBlocks.java | 4 +-- .../lingshi/common/registry/ModItems.java | 6 ++-- .../assets/lingshi/models/item/pot_lid.json | 3 +- 19 files changed, 165 insertions(+), 22 deletions(-) create mode 100644 src/generated/resources/data/lingshi/advancement/recipes/decorations/cooking_pot.json create mode 100644 src/generated/resources/data/lingshi/advancement/recipes/decorations/pot_lid.json create mode 100644 src/generated/resources/data/lingshi/recipe/cooking_pot.json create mode 100644 src/generated/resources/data/lingshi/recipe/pot_lid.json diff --git a/src/generated/resources/.cache/71e72dbdeb626cc835aaccd2ae47fd3d8794cd24 b/src/generated/resources/.cache/71e72dbdeb626cc835aaccd2ae47fd3d8794cd24 index 545df70..8bff09a 100644 --- a/src/generated/resources/.cache/71e72dbdeb626cc835aaccd2ae47fd3d8794cd24 +++ b/src/generated/resources/.cache/71e72dbdeb626cc835aaccd2ae47fd3d8794cd24 @@ -1,7 +1,8 @@ -// 1.21 2024-08-28T02:16:16.4080139 Item Models: lingshi +// 1.21 2024-08-28T02:42:11.0001379 Item Models: lingshi bad0cb5e093fa42331c2d4a1157d1a7b5b3fc588 assets/lingshi/models/item/chopping_board.json 7bc27021669767547c0b0bd606195e5f80cea272 assets/lingshi/models/item/cooked_rice.json 8106af92df770f5e2062db0b6aaed967fe386d87 assets/lingshi/models/item/cooking_pot.json +37db2e9897cd20f19d58456cafcb898f113c1d4b assets/lingshi/models/item/egg_fried_rice.json 014b17c43a62c41d623a0d944e434cf1ac3986be assets/lingshi/models/item/fried_egg.json 249957a6811e300efca306db358e468855851d73 assets/lingshi/models/item/iron_knife.json b767fc7952daf0eff3485fe4d8c06c5bba930c22 assets/lingshi/models/item/oil_bucket.json diff --git a/src/generated/resources/.cache/85f12f813aff948f91f5cd129c0ffa86bcb17361 b/src/generated/resources/.cache/85f12f813aff948f91f5cd129c0ffa86bcb17361 index 84b223c..f8a9f1d 100644 --- a/src/generated/resources/.cache/85f12f813aff948f91f5cd129c0ffa86bcb17361 +++ b/src/generated/resources/.cache/85f12f813aff948f91f5cd129c0ffa86bcb17361 @@ -1,2 +1,2 @@ -// 1.21 2024-08-27T05:38:33.2066749 Languages: zh_cn for mod: lingshi -c4e31085268a58b4bdb72f5cc12a36fecd42c0d3 assets/lingshi/lang/zh_cn.json +// 1.21 2024-08-28T02:42:11.0041386 Languages: zh_cn for mod: lingshi +b2ef29629af36b1f8e45f0739bad28409bf893ba assets/lingshi/lang/zh_cn.json diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index ffd656b..9443613 100644 --- a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -1,8 +1,10 @@ -// 1.21 2024-08-28T02:16:16.4100096 Recipes +// 1.21 2024-08-28T03:29:31.4157872 Recipes b8cb7428b718c0ca190af49165cd25554d27fa19 data/lingshi/advancement/recipes/cooking_pot/cooked_rice.json 7d0ef4cd02c38f4648e712a935f0ea32fb50aeff data/lingshi/advancement/recipes/cooking_pot/cooked_rice_1.json d918a2369d899974ffa38d6a363553af9e97fdee data/lingshi/advancement/recipes/cooking_pot/cooked_rice_2.json 6a319c97da924f9ab21b5d264c18cb8ad9da8755 data/lingshi/advancement/recipes/decorations/chopping_board.json +316ee6a89da986357d408cff58db9554636fc16a data/lingshi/advancement/recipes/decorations/cooking_pot.json +0486b842988b1d1ac0abb797a91d26077583679e data/lingshi/advancement/recipes/decorations/pot_lid.json 0a4b54bfda8aa98f1a26bbf1d8231c76ed12e770 data/lingshi/advancement/recipes/decorations/skillet.json e4ccb4f32d90b93ef63a3f2a17e843c6a8b2322b data/lingshi/advancement/recipes/skillet/baked_potato.json c9b88b929d6f4b7d68c10c6a3915182cb096d363 data/lingshi/advancement/recipes/skillet/cooked_beef.json @@ -12,15 +14,18 @@ c9b88b929d6f4b7d68c10c6a3915182cb096d363 data/lingshi/advancement/recipes/skille 11c0e1c5c1fee50df7de493ee95764ca109b36f3 data/lingshi/advancement/recipes/skillet/cooked_porkchop.json 938ed8fe297341fd3b755b1381bae2e276a00eb3 data/lingshi/advancement/recipes/skillet/cooked_rabbit.json de37dcaf7e9f79459492cd69ddb81d8d27406f99 data/lingshi/advancement/recipes/skillet/cooked_salmon.json +e6b8f09f653cc6c1180feb64eaf5b196543ae4f7 data/lingshi/advancement/recipes/skillet/egg_fried_rice.json ee50d7e3c59e644ce93e46945ff090c3c68fda04 data/lingshi/advancement/recipes/skillet/fried_egg.json 0e940fa2ba82aed478ee367c4b998f0bc7ead5c3 data/lingshi/advancement/recipes/tools/iron_knife.json e511f76246f906a279fc1ec531922d8f70dfb68c data/lingshi/advancement/recipes/tools/spatula.json bec1047337843fdd073fe87393c3b500ae11a1de data/lingshi/recipe/chopping_board.json 3e41620c4ec5b19f87046dad7fe5c7ed6ede21c2 data/lingshi/recipe/chopping_board/rice.json +2bca8f59bf6fc074377fc44b2331427a96aea5d4 data/lingshi/recipe/cooking_pot.json 2e23fcd215c647e72e989050fbfe466f419bed56 data/lingshi/recipe/cooking_pot/cooked_rice.json d0f1076aaf14e4191918a911196f1aeac7d7a59d data/lingshi/recipe/cooking_pot/cooked_rice_1.json 1bb4304dfdcc5be7539818738d41ff2c0f17f1b7 data/lingshi/recipe/cooking_pot/cooked_rice_2.json e6daac4cca245fc9e220e2fcb1f2b27e410ba503 data/lingshi/recipe/iron_knife.json +dba470601fa51254c73ae3c63fa858de333a48c2 data/lingshi/recipe/pot_lid.json a0c7fd85028ea7997689d7bc093b9d025c522ea6 data/lingshi/recipe/skillet.json e2328874e467cf5efdb65d0fedeac1cfe1677e98 data/lingshi/recipe/skillet/baked_potato.json f028991439854ef986d28feab97a637b53df876a data/lingshi/recipe/skillet/cooked_beef.json @@ -30,5 +35,6 @@ a7eb02ae67924077e8066c8cc2c5a05e02b5bb44 data/lingshi/recipe/skillet/cooked_chic c3cfbc2afc0b4cec90a57fdac12ec3bc7b462b4f data/lingshi/recipe/skillet/cooked_porkchop.json c60918f7fafeb03f1c8244417c151ea7a5e44a31 data/lingshi/recipe/skillet/cooked_rabbit.json e72067c16cd3f5e2ec6a11abb0c7a9e41d3e3fd4 data/lingshi/recipe/skillet/cooked_salmon.json +1f718cba48b75cc98ae479a6765f76506c0eea3a data/lingshi/recipe/skillet/egg_fried_rice.json 0c39fdabe7970065856b4adc9e9f3eae7690ea2d data/lingshi/recipe/skillet/fried_egg.json 3563171190654e76637de2fa78a6c750389674d7 data/lingshi/recipe/spatula.json diff --git a/src/generated/resources/.cache/d88813880ae3e40e9724fa9bc86e438c1f5ddb3d b/src/generated/resources/.cache/d88813880ae3e40e9724fa9bc86e438c1f5ddb3d index 3b25ea5..655d4ed 100644 --- a/src/generated/resources/.cache/d88813880ae3e40e9724fa9bc86e438c1f5ddb3d +++ b/src/generated/resources/.cache/d88813880ae3e40e9724fa9bc86e438c1f5ddb3d @@ -1,4 +1,5 @@ -// 1.21 2024-08-13T03:35:37.9402366 Tags for minecraft:block mod id lingshi +// 1.21 2024-08-28T02:56:53.2804386 Tags for minecraft:block mod id lingshi 639716446e0ad4bc759f5d086b91d0e4a9215ab7 data/lingshi/tags/block/can_support.json 8f3ae1f87856cf69d686ec0be92f6b700f51bd30 data/lingshi/tags/block/heat_source.json e00d57f2828f9f55903e8c8c9f4b95dfeca4135d data/minecraft/tags/block/mineable/axe.json +5edc606bce3187f422626ac4390c718b9b4f881b data/minecraft/tags/block/mineable/pickaxe.json diff --git a/src/generated/resources/assets/lingshi/lang/zh_cn.json b/src/generated/resources/assets/lingshi/lang/zh_cn.json index 6a111b6..02f6e56 100644 --- a/src/generated/resources/assets/lingshi/lang/zh_cn.json +++ b/src/generated/resources/assets/lingshi/lang/zh_cn.json @@ -8,6 +8,7 @@ "gui.lingshi.cooking_pot_menu": "烹饪锅", "gui.lingshi.skillet_menu": "平底锅", "item.lingshi.cooked_rice": "米饭", + "item.lingshi.egg_fried_rice": "蛋炒饭", "item.lingshi.fried_egg": "煎鸡蛋", "item.lingshi.iron_knife": "铁菜刀", "item.lingshi.oil_bucket": "油桶", diff --git a/src/generated/resources/data/lingshi/advancement/recipes/decorations/cooking_pot.json b/src/generated/resources/data/lingshi/advancement/recipes/decorations/cooking_pot.json new file mode 100644 index 0000000..519cd10 --- /dev/null +++ b/src/generated/resources/data/lingshi/advancement/recipes/decorations/cooking_pot.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_iron_ingot": { + "conditions": { + "items": [ + { + "items": "#minecraft:terracotta" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "lingshi:cooking_pot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_iron_ingot" + ] + ], + "rewards": { + "recipes": [ + "lingshi:cooking_pot" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/lingshi/advancement/recipes/decorations/pot_lid.json b/src/generated/resources/data/lingshi/advancement/recipes/decorations/pot_lid.json new file mode 100644 index 0000000..cdc8ab2 --- /dev/null +++ b/src/generated/resources/data/lingshi/advancement/recipes/decorations/pot_lid.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_iron_ingot": { + "conditions": { + "items": [ + { + "items": "#minecraft:terracotta" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "lingshi:pot_lid" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_iron_ingot" + ] + ], + "rewards": { + "recipes": [ + "lingshi:pot_lid" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/lingshi/recipe/cooking_pot.json b/src/generated/resources/data/lingshi/recipe/cooking_pot.json new file mode 100644 index 0000000..37a0518 --- /dev/null +++ b/src/generated/resources/data/lingshi/recipe/cooking_pot.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "A": { + "item": "minecraft:iron_ingot" + }, + "X": { + "tag": "minecraft:terracotta" + } + }, + "pattern": [ + "A A", + "X X", + "XXX" + ], + "result": { + "count": 1, + "id": "lingshi:cooking_pot" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/lingshi/recipe/pot_lid.json b/src/generated/resources/data/lingshi/recipe/pot_lid.json new file mode 100644 index 0000000..4f3dcaf --- /dev/null +++ b/src/generated/resources/data/lingshi/recipe/pot_lid.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "A": { + "item": "minecraft:iron_ingot" + }, + "X": { + "tag": "minecraft:terracotta" + } + }, + "pattern": [ + " A ", + "XXX" + ], + "result": { + "count": 1, + "id": "lingshi:pot_lid" + } +} \ No newline at end of file diff --git a/src/main/java/mczme/lingshi/common/block/CookingPotBlock.java b/src/main/java/mczme/lingshi/common/block/CookingPotBlock.java index 0f969c6..f0acc91 100644 --- a/src/main/java/mczme/lingshi/common/block/CookingPotBlock.java +++ b/src/main/java/mczme/lingshi/common/block/CookingPotBlock.java @@ -53,12 +53,18 @@ public CookingPotBlock(Properties pProperties) { public ItemInteractionResult useItemOn(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) { if (pLevel.getBlockEntity(pPos) instanceof CookingPotBlockEntity blockEntity) { if (!blockEntity.getItemStacks().getStackInSlot(6).isEmpty() && pStack.is(blockEntity.getItemStacks().getStackInSlot(6).getItem())) { - if(pPlayer.addItem(new ItemStack(blockEntity.getItemStacks().getStackInSlot(7).getItem(),1))){ + if (pPlayer.addItem(new ItemStack(blockEntity.getItemStacks().getStackInSlot(7).getItem(), 1))) { blockEntity.getItemStacks().getStackInSlot(7).shrink(1); pStack.consume(1, pPlayer); blockEntity.setChanged(); return ItemInteractionResult.SUCCESS; } + } else if (pStack.is(ModItems.SPATULA.get())) { + if (blockEntity.size() == 0) { + blockEntity.setFluid(FluidStack.EMPTY); + blockEntity.setChanged(); + return ItemInteractionResult.SUCCESS; + } } else if (!blockEntity.isFull() && !pStack.isEmpty() && !pStack.is(ModItems.POT_LID.get()) && !pState.getValue(COVER)) { if (pStack.is(Items.WATER_BUCKET)) { blockEntity.setFluid(new FluidStack(Fluids.WATER, 1000)); @@ -71,9 +77,9 @@ public ItemInteractionResult useItemOn(ItemStack pStack, BlockState pState, Leve blockEntity.setChanged(); return ItemInteractionResult.SUCCESS; } - if(pStack.getCount()<=16) { + if (pStack.getCount() <= 16) { blockEntity.setItem(pStack.consumeAndReturn(pStack.getCount(), pPlayer)); - }else { + } else { blockEntity.setItem(pStack.consumeAndReturn(16, pPlayer)); } blockEntity.setChanged(); @@ -91,7 +97,7 @@ protected InteractionResult useWithoutItem(BlockState pState, Level pLevel, Bloc if (pState.getValue(COVER)) { pLevel.setBlockAndUpdate(pPos, pState.setValue(COVER, false)); Containers.dropItemStack(pLevel, pPos.getX(), pPos.getY() + 0.7, pPos.getZ(), new ItemStack(ModItems.POT_LID.get())); - blockEntity.stewingTime=0; + blockEntity.stewingTime = 0; return InteractionResult.SUCCESS; } else if (pPlayer.isShiftKeyDown()) { pPlayer.openMenu(blockEntity, pPos); @@ -109,7 +115,7 @@ protected InteractionResult useWithoutItem(BlockState pState, Level pLevel, Bloc @Override protected void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState pNewState, boolean pMovedByPiston) { if (pLevel.getBlockEntity(pPos) instanceof CookingPotBlockEntity blockEntity) { - if(!pNewState.is(ModBlocks.COOKING_POT.get())) { + if (!pNewState.is(ModBlocks.COOKING_POT.get())) { for (int i = 0; i < blockEntity.getMAX(); i++) { Containers.dropItemStack(pLevel, pPos.getX(), pPos.getY(), pPos.getZ(), blockEntity.dropItem()); } diff --git a/src/main/java/mczme/lingshi/common/data/ItemModels.java b/src/main/java/mczme/lingshi/common/data/ItemModels.java index 5cf00b2..fd682ca 100644 --- a/src/main/java/mczme/lingshi/common/data/ItemModels.java +++ b/src/main/java/mczme/lingshi/common/data/ItemModels.java @@ -16,8 +16,10 @@ protected void registerModels() { basicItem(ModItems.RICE.get()); basicItem(ModItems.RICE_OF_EAR.get()); basicItem(ModItems.RICE_SEEDLING.get()); + basicItem(ModItems.FRIED_EGG.get()); basicItem(ModItems.COOKED_RICE.get()); + basicItem(ModItems.EGG_FRIED_RICE.get()); basicItem(ModItems.OIL_BUCKET.get()); diff --git a/src/main/java/mczme/lingshi/common/data/lang/ChineseLanguageProvider.java b/src/main/java/mczme/lingshi/common/data/lang/ChineseLanguageProvider.java index 92235de..472e1a0 100644 --- a/src/main/java/mczme/lingshi/common/data/lang/ChineseLanguageProvider.java +++ b/src/main/java/mczme/lingshi/common/data/lang/ChineseLanguageProvider.java @@ -36,6 +36,7 @@ protected void addTranslations() { this.add(ModItems.FRIED_EGG.get(),"煎鸡蛋"); this.add(ModItems.COOKED_RICE.get(),"米饭"); + this.add(ModItems.EGG_FRIED_RICE.get(), "蛋炒饭"); } } diff --git a/src/main/java/mczme/lingshi/common/data/recipe/CraftingRecipeDataGen.java b/src/main/java/mczme/lingshi/common/data/recipe/CraftingRecipeDataGen.java index ad93897..4536b33 100644 --- a/src/main/java/mczme/lingshi/common/data/recipe/CraftingRecipeDataGen.java +++ b/src/main/java/mczme/lingshi/common/data/recipe/CraftingRecipeDataGen.java @@ -45,6 +45,21 @@ protected void buildRecipes(RecipeOutput output) { .define('A', Items.IRON_INGOT) .unlockedBy("has_iron_ingot", has(ItemTags.PLANKS)) .save(output); + ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, ModItems.COOKING_POT.get()) + .pattern("A A") + .pattern("X X") + .pattern("XXX") + .define('X', ItemTags.TERRACOTTA) + .define('A', Items.IRON_INGOT) + .unlockedBy("has_iron_ingot", has(ItemTags.TERRACOTTA)) + .save(output); + ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, ModItems.POT_LID.get()) + .pattern(" A ") + .pattern("XXX") + .define('X', ItemTags.TERRACOTTA) + .define('A', Items.IRON_INGOT) + .unlockedBy("has_iron_ingot", has(ItemTags.TERRACOTTA)) + .save(output); } } diff --git a/src/main/java/mczme/lingshi/common/data/recipe/SkilletRecipeDatagen.java b/src/main/java/mczme/lingshi/common/data/recipe/SkilletRecipeDatagen.java index 3191b84..7547161 100644 --- a/src/main/java/mczme/lingshi/common/data/recipe/SkilletRecipeDatagen.java +++ b/src/main/java/mczme/lingshi/common/data/recipe/SkilletRecipeDatagen.java @@ -2,6 +2,7 @@ import mczme.lingshi.client.recipebook.CookingFoodRecipeLabel; import mczme.lingshi.common.data.builder.SkilletRecipeBuilder; +import mczme.lingshi.common.recipe.SkilletRecipe; import mczme.lingshi.common.registry.ModFluids; import mczme.lingshi.common.registry.ModItems; import mczme.lingshi.lingshi; @@ -43,7 +44,10 @@ protected void buildRecipes(RecipeOutput output) { build(List.of(Ingredient.of(Items.EGG)),new FluidStack(ModFluids.OIL_SOURCE.get(),100),new ItemStack(ModItems.FRIED_EGG.get())) .setLabel(CookingFoodRecipeLabel.PAN_FRY).save(output,create("fried_egg")); // 炒 - + build(List.of(Ingredient.of(Items.EGG),Ingredient.of(ModItems.RICE.get())),new FluidStack(ModFluids.OIL_SOURCE.get(),100),new ItemStack(ModItems.EGG_FRIED_RICE.get())) + .setLabel(CookingFoodRecipeLabel.PAN_FRY) + .setContainer(new SkilletRecipe.SkilletCookingContainer(new ItemStack(Items.BOWL),3)) + .save(output,create("egg_fried_rice")); // 煮 } diff --git a/src/main/java/mczme/lingshi/common/data/tag/BlockTags.java b/src/main/java/mczme/lingshi/common/data/tag/BlockTags.java index e729292..5ba1f12 100644 --- a/src/main/java/mczme/lingshi/common/data/tag/BlockTags.java +++ b/src/main/java/mczme/lingshi/common/data/tag/BlockTags.java @@ -24,10 +24,11 @@ public BlockTags(PackOutput output, CompletableFuture loo protected void addTags(HolderLookup.@NotNull Provider pProvider) { // 斧 可挖掘 tag(MINEABLE_WITH_AXE).add(ModBlocks.CHOPPING_BOARD.get()); - +// 镐 可挖掘 + tag(MINEABLE_WITH_PICKAXE).add(ModBlocks.COOKING_POT.get()); + tag(MINEABLE_WITH_PICKAXE).add(ModBlocks.SKILLET.get()); // 热源方块 - tag(HEAT_SOURCE).add(Blocks.CAMPFIRE, - Blocks.MAGMA_BLOCK); + tag(HEAT_SOURCE).add(Blocks.CAMPFIRE, Blocks.MAGMA_BLOCK); // 可以支撑方块 tag(CAN_SUPPORT).add(Blocks.CAMPFIRE); diff --git a/src/main/java/mczme/lingshi/common/item/SpatulaItem.java b/src/main/java/mczme/lingshi/common/item/SpatulaItem.java index 6cf138e..572c4f4 100644 --- a/src/main/java/mczme/lingshi/common/item/SpatulaItem.java +++ b/src/main/java/mczme/lingshi/common/item/SpatulaItem.java @@ -1,12 +1,9 @@ package mczme.lingshi.common.item; import net.minecraft.world.item.Item; -import net.neoforged.neoforge.fluids.FluidStack; public class SpatulaItem extends Item { - FluidStack fluidStack = FluidStack.EMPTY; - public SpatulaItem(Properties properties) { super(properties); } diff --git a/src/main/java/mczme/lingshi/common/registry/ModBlocks.java b/src/main/java/mczme/lingshi/common/registry/ModBlocks.java index 3e72766..5c10f97 100644 --- a/src/main/java/mczme/lingshi/common/registry/ModBlocks.java +++ b/src/main/java/mczme/lingshi/common/registry/ModBlocks.java @@ -32,9 +32,9 @@ public class ModBlocks { BlockBehaviour.Properties.of().randomTicks().mapColor(MapColor.PLANT).noCollission().instabreak().sound(SoundType.CROP).pushReaction(PushReaction.DESTROY)); public static final Supplier SKILLET = BLOCKS.registerBlock("skillet", SkilletBlock::new, - BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_ORE)); + BlockBehaviour.Properties.of().destroyTime(1.5F)); public static final Supplier COOKING_POT = BLOCKS.registerBlock("cooking_pot", CookingPotBlock::new, - BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_ORE)); + BlockBehaviour.Properties.of().destroyTime(1.5F)); public static final Supplier CHOPPING_BOARD = BLOCKS.registerBlock("chopping_board", ChoppingBoardBlock::new, BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_PLANKS)); diff --git a/src/main/java/mczme/lingshi/common/registry/ModItems.java b/src/main/java/mczme/lingshi/common/registry/ModItems.java index 2eb0ca8..c337531 100644 --- a/src/main/java/mczme/lingshi/common/registry/ModItems.java +++ b/src/main/java/mczme/lingshi/common/registry/ModItems.java @@ -26,16 +26,18 @@ public class ModItems { public static final Supplier SKILLET = registerWithCreateTab("skillet", () -> new BlockItem(ModBlocks.SKILLET.get(), new Item.Properties())); public static final Supplier COOKING_POT = registerWithCreateTab("cooking_pot", () -> new BlockItem(ModBlocks.COOKING_POT.get(), new Item.Properties())); + public static final Supplier POT_LID = registerWithCreateTab("pot_lid", () -> new PotLid(new Item.Properties())); public static final Supplier CHOPPING_BOARD = registerWithCreateTab("chopping_board", () -> new BlockItem(ModBlocks.CHOPPING_BOARD.get(), new Item.Properties())); - public static final Supplier POT_LID = registerWithCreateTab("pot_lid", () -> new PotLid(new Item.Properties())); public static final Supplier SPATULA = registerWithCreateTab("spatula", () -> new SpatulaItem(new Item.Properties().stacksTo(1))); public static final Supplier IRON_KNIFE = registerWithCreateTab("iron_knife", () -> new KnifeItem(Tiers.IRON, new Item.Properties().attributes(SwordItem.createAttributes(Tiers.IRON, 3, -2.4F)))); public static final Supplier OIL_BUCKET = registerWithCreateTab("oil_bucket", () -> new BucketItem(ModFluids.OIL_SOURCE.get(), new Item.Properties().craftRemainder(Items.BUCKET).stacksTo(1))); + public static final Supplier STRANGE_FOOD = registerWithCreateTab("strange_food", () -> new Item(new Item.Properties())); public static final Supplier FRIED_EGG = registerWithCreateTab("fried_egg", () -> new Item(new Item.Properties().food(new FoodProperties.Builder().nutrition(4).saturationModifier(3.2f).build()))); - public static final Supplier COOKED_RICE = registerWithCreateTab("cooked_rice", () -> new Item(new Item.Properties().food(new FoodProperties.Builder().nutrition(4).saturationModifier(4f).build()))); + public static final Supplier COOKED_RICE = registerWithCreateTab("cooked_rice", () -> new Item(new Item.Properties().food(new FoodProperties.Builder().nutrition(4).usingConvertsTo(Items.BOWL).saturationModifier(4f).build()))); + public static final Supplier EGG_FRIED_RICE = registerWithCreateTab("egg_fried_rice", () -> new Item(new Item.Properties().food(new FoodProperties.Builder().nutrition(8).usingConvertsTo(Items.BOWL).saturationModifier(7.2f).build()))); private static Supplier registerWithCreateTab(String item_name, Supplier itemSupplier) { Supplier item = ITEMS.register(item_name, itemSupplier); diff --git a/src/main/resources/assets/lingshi/models/item/pot_lid.json b/src/main/resources/assets/lingshi/models/item/pot_lid.json index c986365..c79b891 100644 --- a/src/main/resources/assets/lingshi/models/item/pot_lid.json +++ b/src/main/resources/assets/lingshi/models/item/pot_lid.json @@ -109,7 +109,8 @@ "scale": [0.5, 0.5, 0.5] }, "gui": { - "rotation": [87, 0, 0] + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] } } } \ No newline at end of file