From 15950ab9a64097c00d0373c06617c87c29f04643 Mon Sep 17 00:00:00 2001 From: Chikorita Lover Date: Sat, 7 Sep 2024 11:14:43 -0500 Subject: [PATCH] Update recipes Updated recipes for Farmer Delight's compatibility --- .../23ea077d1d6c303dee4db4b707eb3883dc4bc6bb | 2 +- .../c189bb4c92920ea572e0709157481155fe15e5dc | 12 +++--- .../f97ece2f3a543d4dbc8c984a7bcdf2d64b8f7bed | 2 +- .../coffee_berry_crate.json | 4 +- ...es.json => coffee_berries_from_crate.json} | 4 +- ...es.json => coffee_berries_from_crate.json} | 0 .../recipe/coffee_berry_crate.json | 2 +- .../data/CaffeinatedRecipeProvider.java | 12 +++--- .../registry/CaffeinatedItems.java | 11 +++++ .../recipes/cooking/coffee_bottle.json | 40 ++++++++++++++++++ .../recipe/cooking/coffee_bottle.json | 42 +++++++++++-------- .../recipe/cutting/coffee_berries.json | 41 +++++++++++------- 12 files changed, 119 insertions(+), 53 deletions(-) rename src/main/generated/data/caffeinated/advancement/recipes/{decorations => building_blocks}/coffee_berry_crate.json (87%) rename src/main/generated/data/caffeinated/advancement/recipes/food/{coffee_berries.json => coffee_berries_from_crate.json} (86%) rename src/main/generated/data/caffeinated/recipe/{coffee_berries.json => coffee_berries_from_crate.json} (100%) create mode 100644 src/main/resources/data/caffeinated/advancement/recipes/cooking/coffee_bottle.json diff --git a/src/main/generated/.cache/23ea077d1d6c303dee4db4b707eb3883dc4bc6bb b/src/main/generated/.cache/23ea077d1d6c303dee4db4b707eb3883dc4bc6bb index 866d4a9..0ebb969 100644 --- a/src/main/generated/.cache/23ea077d1d6c303dee4db4b707eb3883dc4bc6bb +++ b/src/main/generated/.cache/23ea077d1d6c303dee4db4b707eb3883dc4bc6bb @@ -1,4 +1,4 @@ -// 1.21 2024-08-31T12:40:46.0618963 Caffeinated/Block Loot Tables +// 1.21 2024-09-03T13:13:28.1272989 Caffeinated/Block Loot Tables 548d115eeb79b74d3fbe03951bdc179110ed6f8a data\caffeinated\loot_table\blocks\ground_coffee_cauldron.json 8b8e67a4f2fbd3f51a69d1359cceb2704429f4c3 data\caffeinated\loot_table\blocks\coffee_berry_crate.json d481f7802dfc0e83cd271518b47e73b256a24d2f data\caffeinated\loot_table\blocks\flowering_coffee_shrub.json diff --git a/src/main/generated/.cache/c189bb4c92920ea572e0709157481155fe15e5dc b/src/main/generated/.cache/c189bb4c92920ea572e0709157481155fe15e5dc index aa0a449..41f9d10 100644 --- a/src/main/generated/.cache/c189bb4c92920ea572e0709157481155fe15e5dc +++ b/src/main/generated/.cache/c189bb4c92920ea572e0709157481155fe15e5dc @@ -1,21 +1,21 @@ -// 1.21 2024-08-31T12:40:46.0642817 Caffeinated/Recipes -bc56b1de573d33d57411984e3b1a021270bb9719 data\caffeinated\recipe\coffee_berry_crate.json +// 1.21 2024-09-03T13:13:28.1282986 Caffeinated/Recipes +5dc445d11ac1091b47d0393e020f2644f701cd29 data\caffeinated\recipe\coffee_berry_crate.json 97e68d175c7717e19fbfce0ae98005eecb936cdf data\caffeinated\recipe\ground_coffee_from_block.json c53cb3ecd5aefc2402fa20a47249530bfe406917 data\caffeinated\advancement\recipes\misc\coffee_beans_from_coffee_berries.json 716ff4f0b5a0c7cba8f79624ca38943fa61f0dbe data\caffeinated\recipe\coffee_bean_block.json c7380b07538b219d6c28d1ab96ed76850e2bf79c data\caffeinated\advancement\recipes\misc\ground_coffee_from_block.json +cbb4ddb0117ce716f60cead7b91aab12d73d3a13 data\caffeinated\advancement\recipes\food\coffee_berries_from_crate.json 9e061efc3626a119413e61ca86a53990ab4f8a8a data\caffeinated\advancement\recipes\misc\ground_coffee_from_coffee_beans.json -b8e94b6ab3e5b643e335a6036992426d7e3ed11c data\caffeinated\advancement\recipes\building_blocks\coffee_bean_block.json 5fd485c95e8541afbd5c36cbb898fc212dab1049 data\caffeinated\recipe\coffee_beans_from_block.json +b8e94b6ab3e5b643e335a6036992426d7e3ed11c data\caffeinated\advancement\recipes\building_blocks\coffee_bean_block.json +31f69cf23ef6a168c6d98a8fef731d470bcbb187 data\caffeinated\recipe\coffee_berries_from_crate.json 502b882af91d38778cbf774342f9a865f9420474 data\caffeinated\recipe\ground_coffee_block.json e6061a3a68f93067a4057874be4ca45d0c759b01 data\caffeinated\recipe\java_banner_pattern.json -f1258bcc7fbf71701ecbdce075c9ac0d21afab91 data\caffeinated\advancement\recipes\decorations\coffee_berry_crate.json 32683e175792178cf8a7630890b33f7327dc0f3e data\caffeinated\recipe\coffee_beans_from_coffee_berries.json de06447040bc87e767e2afd307bdf559a780865a data\caffeinated\advancement\recipes\misc\coffee_beans_from_block.json +514280f7d04586c23693c1dae8cf30241a810a24 data\caffeinated\advancement\recipes\building_blocks\coffee_berry_crate.json 51cbbbc43481615db699ce0878398bb475466f96 data\caffeinated\advancement\recipes\building_blocks\ground_coffee_block.json -31f69cf23ef6a168c6d98a8fef731d470bcbb187 data\caffeinated\recipe\coffee_berries.json 081e951942029c81b7edec2c02074e4b47d00d3d data\caffeinated\recipe\ground_coffee_from_coffee_beans.json f241d014283983a15799cf435d7be5c883b1f112 data\caffeinated\recipe\tiramisu.json 28fbe891feaa35e46b5015bbcd4693e28b79ab4c data\caffeinated\advancement\recipes\food\tiramisu.json -d9e05f57073c3e404c58a204f07503f392f4d2fe data\caffeinated\advancement\recipes\food\coffee_berries.json ea5881f924bd7cef6e6da660f1fd92cdf3e2584a data\caffeinated\advancement\recipes\misc\java_banner_pattern.json diff --git a/src/main/generated/.cache/f97ece2f3a543d4dbc8c984a7bcdf2d64b8f7bed b/src/main/generated/.cache/f97ece2f3a543d4dbc8c984a7bcdf2d64b8f7bed index 66eff0d..44da736 100644 --- a/src/main/generated/.cache/f97ece2f3a543d4dbc8c984a7bcdf2d64b8f7bed +++ b/src/main/generated/.cache/f97ece2f3a543d4dbc8c984a7bcdf2d64b8f7bed @@ -1,4 +1,4 @@ -// 1.21 2024-08-31T12:40:46.0589212 Caffeinated/Model Definitions +// 1.21 2024-09-03T13:13:28.1242109 Caffeinated/Model Definitions da4528a3cfafc1ab21e5814b64029c10ec357178 assets\caffeinated\blockstates\ground_coffee_block.json 26f35f3a03b0d53578efd2c555721b08353d75f0 assets\caffeinated\blockstates\coffee_cauldron.json b1a481861132973fe035c9b9ce7613e15938034c assets\caffeinated\models\block\coffee_berry_crate.json diff --git a/src/main/generated/data/caffeinated/advancement/recipes/decorations/coffee_berry_crate.json b/src/main/generated/data/caffeinated/advancement/recipes/building_blocks/coffee_berry_crate.json similarity index 87% rename from src/main/generated/data/caffeinated/advancement/recipes/decorations/coffee_berry_crate.json rename to src/main/generated/data/caffeinated/advancement/recipes/building_blocks/coffee_berry_crate.json index f270a75..d5c9334 100644 --- a/src/main/generated/data/caffeinated/advancement/recipes/decorations/coffee_berry_crate.json +++ b/src/main/generated/data/caffeinated/advancement/recipes/building_blocks/coffee_berry_crate.json @@ -21,7 +21,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:coffee_berry_crate" + "recipe": "caffeinated:coffee_berry_crate" }, "trigger": "minecraft:recipe_unlocked" } @@ -34,7 +34,7 @@ ], "rewards": { "recipes": [ - "minecraft:coffee_berry_crate" + "caffeinated:coffee_berry_crate" ] } } \ No newline at end of file diff --git a/src/main/generated/data/caffeinated/advancement/recipes/food/coffee_berries.json b/src/main/generated/data/caffeinated/advancement/recipes/food/coffee_berries_from_crate.json similarity index 86% rename from src/main/generated/data/caffeinated/advancement/recipes/food/coffee_berries.json rename to src/main/generated/data/caffeinated/advancement/recipes/food/coffee_berries_from_crate.json index 5648f3b..c23ec84 100644 --- a/src/main/generated/data/caffeinated/advancement/recipes/food/coffee_berries.json +++ b/src/main/generated/data/caffeinated/advancement/recipes/food/coffee_berries_from_crate.json @@ -21,7 +21,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:coffee_berries" + "recipe": "caffeinated:coffee_berries_from_crate" }, "trigger": "minecraft:recipe_unlocked" } @@ -34,7 +34,7 @@ ], "rewards": { "recipes": [ - "minecraft:coffee_berries" + "caffeinated:coffee_berries_from_crate" ] } } \ No newline at end of file diff --git a/src/main/generated/data/caffeinated/recipe/coffee_berries.json b/src/main/generated/data/caffeinated/recipe/coffee_berries_from_crate.json similarity index 100% rename from src/main/generated/data/caffeinated/recipe/coffee_berries.json rename to src/main/generated/data/caffeinated/recipe/coffee_berries_from_crate.json diff --git a/src/main/generated/data/caffeinated/recipe/coffee_berry_crate.json b/src/main/generated/data/caffeinated/recipe/coffee_berry_crate.json index 28adc52..0d02a83 100644 --- a/src/main/generated/data/caffeinated/recipe/coffee_berry_crate.json +++ b/src/main/generated/data/caffeinated/recipe/coffee_berry_crate.json @@ -8,7 +8,7 @@ } ], "type": "minecraft:crafting_shaped", - "category": "misc", + "category": "building", "key": { "#": { "item": "caffeinated:coffee_berries" diff --git a/src/main/java/net/chikorita_lover/caffeinated/data/CaffeinatedRecipeProvider.java b/src/main/java/net/chikorita_lover/caffeinated/data/CaffeinatedRecipeProvider.java index c7ce6f7..a9da5f6 100644 --- a/src/main/java/net/chikorita_lover/caffeinated/data/CaffeinatedRecipeProvider.java +++ b/src/main/java/net/chikorita_lover/caffeinated/data/CaffeinatedRecipeProvider.java @@ -22,18 +22,18 @@ public CaffeinatedRecipeProvider(FabricDataOutput output, CompletableFuture { + final String farmersDelight = "farmersdelight"; + if (Registries.ITEM_GROUP.getId(group).equals(Identifier.of(farmersDelight, farmersDelight))) { + for (ItemStack stack : entries.getDisplayStacks()) { + if (Registries.ITEM.getId(stack.getItem()).equals(Identifier.of(farmersDelight, "carrot_crate"))) { + entries.addBefore(stack, CaffeinatedBlocks.COFFEE_BERRY_CRATE); + break; + } + } + } + }); } } diff --git a/src/main/resources/data/caffeinated/advancement/recipes/cooking/coffee_bottle.json b/src/main/resources/data/caffeinated/advancement/recipes/cooking/coffee_bottle.json new file mode 100644 index 0000000..4cbcd9b --- /dev/null +++ b/src/main/resources/data/caffeinated/advancement/recipes/cooking/coffee_bottle.json @@ -0,0 +1,40 @@ +{ + "fabric:load_conditions": [ + { + "condition": "fabric:all_mods_loaded", + "values": [ + "farmersdelight" + ] + } + ], + "parent": "minecraft:recipes/root", + "criteria": { + "has_ground_coffee": { + "conditions": { + "items": [ + { + "items": "caffeinated:ground_coffee" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "caffeinated:cooking/coffee_bottle" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_ground_coffee" + ] + ], + "rewards": { + "recipes": [ + "caffeinated:cooking/coffee_bottle" + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/caffeinated/recipe/cooking/coffee_bottle.json b/src/main/resources/data/caffeinated/recipe/cooking/coffee_bottle.json index 004dedc..bb1b83e 100644 --- a/src/main/resources/data/caffeinated/recipe/cooking/coffee_bottle.json +++ b/src/main/resources/data/caffeinated/recipe/cooking/coffee_bottle.json @@ -1,20 +1,26 @@ { - "type": "farmersdelight:cooking", - "container": { - "count": 1, - "id": "minecraft:glass_bottle" - }, - "cookingtime": 200, - "experience": 1.0, - "ingredients": [ - { - "count": 1, - "id": "caffeinated:ground_coffee" - } - ], - "recipe_book_tab": "drinks", - "result": { - "count": 1, - "id": "caffeinated:coffee_bottle" - } + "fabric:load_conditions": [ + { + "condition": "fabric:all_mods_loaded", + "values": [ + "farmersdelight" + ] + } + ], + "type": "farmersdelight:cooking", + "container": { + "count": 1, + "id": "minecraft:glass_bottle" + }, + "experience": 1.0, + "ingredients": [ + { + "item": "caffeinated:ground_coffee" + } + ], + "recipe_book_tab": "drinks", + "result": { + "count": 1, + "id": "caffeinated:coffee_bottle" + } } \ No newline at end of file diff --git a/src/main/resources/data/caffeinated/recipe/cutting/coffee_berries.json b/src/main/resources/data/caffeinated/recipe/cutting/coffee_berries.json index e0da5cd..b5c0f82 100644 --- a/src/main/resources/data/caffeinated/recipe/cutting/coffee_berries.json +++ b/src/main/resources/data/caffeinated/recipe/cutting/coffee_berries.json @@ -1,18 +1,27 @@ { - "type": "farmersdelight:cutting", - "ingredients": [ - { - "count": 1, - "id": "caffeinated:coffee_berries" - } - ], - "result": [ - { - "count": 2, - "id": "caffeinated:coffee_beans" - } - ], - "tool": { - "tag": "c:tools/knives" - } + "fabric:load_conditions": [ + { + "condition": "fabric:all_mods_loaded", + "values": [ + "farmersdelight" + ] + } + ], + "type": "farmersdelight:cutting", + "ingredients": [ + { + "item": "caffeinated:coffee_berries" + } + ], + "result": [ + { + "item": { + "count": 2, + "id": "caffeinated:coffee_beans" + } + } + ], + "tool": { + "tag": "c:tools/knife" + } } \ No newline at end of file