From 95c44f4deff73023f5df1ec5d5911551dbdb334c Mon Sep 17 00:00:00 2001 From: Jeff Shipley Date: Tue, 15 Oct 2024 16:46:47 -0600 Subject: [PATCH 1/6] add recipes to empty teapots (hot or cold) close #47 --- .../recipes/food/cup_cocoa_cup_frothed.json} | 4 +- .../food/cup_cocoa_teapot_frothed.json | 35 ++++++++++++++++++ .../food/cup_frothed_teapot_frothed.json | 35 ++++++++++++++++++ .../food/cup_tea_black_cup_water_hot.json} | 4 +- .../food/cup_tea_black_teapot_hot.json} | 4 +- .../food/cup_tea_chai_teapot_frothed.json | 35 ++++++++++++++++++ .../food/cup_tea_chorus_cup_water_hot.json | 35 ++++++++++++++++++ .../food/cup_tea_chorus_teapot_hot.json} | 4 +- .../food/cup_tea_floral_cup_water_hot.json | 35 ++++++++++++++++++ .../food/cup_tea_floral_teapot_hot.json} | 4 +- .../food/cup_tea_green_cup_water_hot.json | 35 ++++++++++++++++++ .../food/cup_tea_green_teapot_hot.json} | 4 +- .../food/cup_water_hot_teapot_hot.json | 35 ++++++++++++++++++ .../recipes/misc/milk_bucket_from_teapot.json | 35 ++++++++++++++++++ .../misc/water_bucket_from_teapot.json | 35 ++++++++++++++++++ .../recipes/cup_cocoa_cup_frothed.json | 18 +++++++++ .../recipes/cup_cocoa_teapot_frothed.json} | 0 .../recipes/cup_frothed_teapot_frothed.json | 15 ++++++++ .../recipes/cup_tea_black_cup_water_hot.json | 18 +++++++++ .../recipes/cup_tea_black_teapot_hot.json} | 0 .../recipes/cup_tea_chai_teapot_frothed.json} | 0 .../recipes/cup_tea_chorus_cup_water_hot.json | 18 +++++++++ .../recipes/cup_tea_chorus_teapot_hot.json} | 0 .../recipes/cup_tea_floral_cup_water_hot.json | 18 +++++++++ .../recipes/cup_tea_floral_teapot_hot.json} | 0 .../recipes/cup_tea_green_cup_water_hot.json | 18 +++++++++ .../recipes/cup_tea_green_teapot_hot.json} | 0 .../recipes/cup_water_hot_teapot_hot.json | 15 ++++++++ .../recipes/milk_bucket_from_teapot.json | 15 ++++++++ .../recipes/water_bucket_from_teapot.json | 15 ++++++++ .../knightminer/simplytea/core/Config.java | 3 +- .../simplytea/core/Registration.java | 5 +++ .../simplytea/data/gen/RecipeGenerator.java | 20 +++++++++- .../knightminer/simplytea/item/CocoaItem.java | 6 ++- .../assets/simplytea/lang/en_us.json | 2 + .../simplytea/models/item/cup_frothed.json | 6 +++ .../simplytea/models/item/cup_water_hot.json | 6 +++ .../simplytea/textures/item/cup_milk.png | Bin 0 -> 385 bytes 38 files changed, 521 insertions(+), 16 deletions(-) rename src/generated/resources/data/{simplytea/advancements/recipes/food/cup_cocoa.json => minecraft/advancements/recipes/food/cup_cocoa_cup_frothed.json} (85%) create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_teapot_frothed.json create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/food/cup_frothed_teapot_frothed.json rename src/generated/resources/data/{simplytea/advancements/recipes/food/cup_tea_chai.json => minecraft/advancements/recipes/food/cup_tea_black_cup_water_hot.json} (84%) rename src/generated/resources/data/{simplytea/advancements/recipes/food/cup_tea_black.json => minecraft/advancements/recipes/food/cup_tea_black_teapot_hot.json} (84%) create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chai_teapot_frothed.json create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_cup_water_hot.json rename src/generated/resources/data/{simplytea/advancements/recipes/food/cup_tea_chorus.json => minecraft/advancements/recipes/food/cup_tea_chorus_teapot_hot.json} (84%) create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_cup_water_hot.json rename src/generated/resources/data/{simplytea/advancements/recipes/food/cup_tea_floral.json => minecraft/advancements/recipes/food/cup_tea_floral_teapot_hot.json} (84%) create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_cup_water_hot.json rename src/generated/resources/data/{simplytea/advancements/recipes/food/cup_tea_green.json => minecraft/advancements/recipes/food/cup_tea_green_teapot_hot.json} (84%) create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/food/cup_water_hot_teapot_hot.json create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/misc/milk_bucket_from_teapot.json create mode 100644 src/generated/resources/data/minecraft/advancements/recipes/misc/water_bucket_from_teapot.json create mode 100644 src/generated/resources/data/minecraft/recipes/cup_cocoa_cup_frothed.json rename src/generated/resources/data/{simplytea/recipes/cup_cocoa.json => minecraft/recipes/cup_cocoa_teapot_frothed.json} (100%) create mode 100644 src/generated/resources/data/minecraft/recipes/cup_frothed_teapot_frothed.json create mode 100644 src/generated/resources/data/minecraft/recipes/cup_tea_black_cup_water_hot.json rename src/generated/resources/data/{simplytea/recipes/cup_tea_black.json => minecraft/recipes/cup_tea_black_teapot_hot.json} (100%) rename src/generated/resources/data/{simplytea/recipes/cup_tea_chai.json => minecraft/recipes/cup_tea_chai_teapot_frothed.json} (100%) create mode 100644 src/generated/resources/data/minecraft/recipes/cup_tea_chorus_cup_water_hot.json rename src/generated/resources/data/{simplytea/recipes/cup_tea_chorus.json => minecraft/recipes/cup_tea_chorus_teapot_hot.json} (100%) create mode 100644 src/generated/resources/data/minecraft/recipes/cup_tea_floral_cup_water_hot.json rename src/generated/resources/data/{simplytea/recipes/cup_tea_floral.json => minecraft/recipes/cup_tea_floral_teapot_hot.json} (100%) create mode 100644 src/generated/resources/data/minecraft/recipes/cup_tea_green_cup_water_hot.json rename src/generated/resources/data/{simplytea/recipes/cup_tea_green.json => minecraft/recipes/cup_tea_green_teapot_hot.json} (100%) create mode 100644 src/generated/resources/data/minecraft/recipes/cup_water_hot_teapot_hot.json create mode 100644 src/generated/resources/data/minecraft/recipes/milk_bucket_from_teapot.json create mode 100644 src/generated/resources/data/minecraft/recipes/water_bucket_from_teapot.json create mode 100644 src/main/resources/assets/simplytea/models/item/cup_frothed.json create mode 100644 src/main/resources/assets/simplytea/models/item/cup_water_hot.json create mode 100644 src/main/resources/assets/simplytea/textures/item/cup_milk.png diff --git a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_cup_frothed.json similarity index 85% rename from src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa.json rename to src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_cup_frothed.json index a0fe24c..b38c5cf 100644 --- a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa.json +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_cup_frothed.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "simplytea:cup_cocoa" + "recipe": "minecraft:cup_cocoa_cup_frothed" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "simplytea:cup_cocoa" + "minecraft:cup_cocoa_cup_frothed" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_teapot_frothed.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_teapot_frothed.json new file mode 100644 index 0000000..411050c --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_teapot_frothed.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_bag": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:cocoa_beans" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:cup_cocoa_teapot_frothed" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_bag", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:cup_cocoa_teapot_frothed" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_frothed_teapot_frothed.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_frothed_teapot_frothed.json new file mode 100644 index 0000000..d5e1c23 --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_frothed_teapot_frothed.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_bag": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teapot_frothed" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:cup_frothed_teapot_frothed" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_bag", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:cup_frothed_teapot_frothed" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_cup_water_hot.json similarity index 84% rename from src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai.json rename to src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_cup_water_hot.json index fb8c1ad..26d6b76 100644 --- a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai.json +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_cup_water_hot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "simplytea:cup_tea_chai" + "recipe": "minecraft:cup_tea_black_cup_water_hot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "simplytea:cup_tea_chai" + "minecraft:cup_tea_black_cup_water_hot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_teapot_hot.json similarity index 84% rename from src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black.json rename to src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_teapot_hot.json index 712b2fa..b997dd8 100644 --- a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black.json +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_teapot_hot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "simplytea:cup_tea_black" + "recipe": "minecraft:cup_tea_black_teapot_hot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "simplytea:cup_tea_black" + "minecraft:cup_tea_black_teapot_hot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chai_teapot_frothed.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chai_teapot_frothed.json new file mode 100644 index 0000000..ea62764 --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chai_teapot_frothed.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_bag": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teabag_black" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:cup_tea_chai_teapot_frothed" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_bag", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:cup_tea_chai_teapot_frothed" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_cup_water_hot.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_cup_water_hot.json new file mode 100644 index 0000000..0aebd97 --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_cup_water_hot.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_bag": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teabag_chorus" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:cup_tea_chorus_cup_water_hot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_bag", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:cup_tea_chorus_cup_water_hot" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_teapot_hot.json similarity index 84% rename from src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus.json rename to src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_teapot_hot.json index 612d40e..af38c70 100644 --- a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus.json +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_teapot_hot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "simplytea:cup_tea_chorus" + "recipe": "minecraft:cup_tea_chorus_teapot_hot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "simplytea:cup_tea_chorus" + "minecraft:cup_tea_chorus_teapot_hot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_cup_water_hot.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_cup_water_hot.json new file mode 100644 index 0000000..5124abd --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_cup_water_hot.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_bag": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teabag_floral" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:cup_tea_floral_cup_water_hot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_bag", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:cup_tea_floral_cup_water_hot" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_teapot_hot.json similarity index 84% rename from src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral.json rename to src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_teapot_hot.json index 619af78..365c23d 100644 --- a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral.json +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_teapot_hot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "simplytea:cup_tea_floral" + "recipe": "minecraft:cup_tea_floral_teapot_hot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "simplytea:cup_tea_floral" + "minecraft:cup_tea_floral_teapot_hot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_cup_water_hot.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_cup_water_hot.json new file mode 100644 index 0000000..afff1db --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_cup_water_hot.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_bag": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teabag_green" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:cup_tea_green_cup_water_hot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_bag", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:cup_tea_green_cup_water_hot" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_teapot_hot.json similarity index 84% rename from src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green.json rename to src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_teapot_hot.json index 88bd7fe..0e3e775 100644 --- a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green.json +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_teapot_hot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "simplytea:cup_tea_green" + "recipe": "minecraft:cup_tea_green_teapot_hot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "simplytea:cup_tea_green" + "minecraft:cup_tea_green_teapot_hot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_water_hot_teapot_hot.json b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_water_hot_teapot_hot.json new file mode 100644 index 0000000..7796dae --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/food/cup_water_hot_teapot_hot.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_bag": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teapot_hot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:cup_water_hot_teapot_hot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_bag", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:cup_water_hot_teapot_hot" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/advancements/recipes/misc/milk_bucket_from_teapot.json b/src/generated/resources/data/minecraft/advancements/recipes/misc/milk_bucket_from_teapot.json new file mode 100644 index 0000000..804433e --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/misc/milk_bucket_from_teapot.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teapot_milk" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:milk_bucket_from_teapot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:milk_bucket_from_teapot" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/advancements/recipes/misc/water_bucket_from_teapot.json b/src/generated/resources/data/minecraft/advancements/recipes/misc/water_bucket_from_teapot.json new file mode 100644 index 0000000..56e974d --- /dev/null +++ b/src/generated/resources/data/minecraft/advancements/recipes/misc/water_bucket_from_teapot.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teapot_water" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "minecraft:water_bucket_from_teapot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "minecraft:water_bucket_from_teapot" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/recipes/cup_cocoa_cup_frothed.json b/src/generated/resources/data/minecraft/recipes/cup_cocoa_cup_frothed.json new file mode 100644 index 0000000..29714d4 --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/cup_cocoa_cup_frothed.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:cup" + }, + { + "item": "minecraft:cocoa_beans" + }, + { + "item": "simplytea:cup_frothed" + } + ], + "result": { + "item": "simplytea:cup_cocoa" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/recipes/cup_cocoa.json b/src/generated/resources/data/minecraft/recipes/cup_cocoa_teapot_frothed.json similarity index 100% rename from src/generated/resources/data/simplytea/recipes/cup_cocoa.json rename to src/generated/resources/data/minecraft/recipes/cup_cocoa_teapot_frothed.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_frothed_teapot_frothed.json b/src/generated/resources/data/minecraft/recipes/cup_frothed_teapot_frothed.json new file mode 100644 index 0000000..a7d19ae --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/cup_frothed_teapot_frothed.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:cup" + }, + { + "item": "simplytea:teapot_frothed" + } + ], + "result": { + "item": "simplytea:cup_frothed" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_black_cup_water_hot.json b/src/generated/resources/data/minecraft/recipes/cup_tea_black_cup_water_hot.json new file mode 100644 index 0000000..7e424ec --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/cup_tea_black_cup_water_hot.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:cup" + }, + { + "item": "simplytea:teabag_black" + }, + { + "item": "simplytea:cup_water_hot" + } + ], + "result": { + "item": "simplytea:cup_tea_black" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/recipes/cup_tea_black.json b/src/generated/resources/data/minecraft/recipes/cup_tea_black_teapot_hot.json similarity index 100% rename from src/generated/resources/data/simplytea/recipes/cup_tea_black.json rename to src/generated/resources/data/minecraft/recipes/cup_tea_black_teapot_hot.json diff --git a/src/generated/resources/data/simplytea/recipes/cup_tea_chai.json b/src/generated/resources/data/minecraft/recipes/cup_tea_chai_teapot_frothed.json similarity index 100% rename from src/generated/resources/data/simplytea/recipes/cup_tea_chai.json rename to src/generated/resources/data/minecraft/recipes/cup_tea_chai_teapot_frothed.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_chorus_cup_water_hot.json b/src/generated/resources/data/minecraft/recipes/cup_tea_chorus_cup_water_hot.json new file mode 100644 index 0000000..b89b6a3 --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/cup_tea_chorus_cup_water_hot.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:cup" + }, + { + "item": "simplytea:teabag_chorus" + }, + { + "item": "simplytea:cup_water_hot" + } + ], + "result": { + "item": "simplytea:cup_tea_chorus" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/recipes/cup_tea_chorus.json b/src/generated/resources/data/minecraft/recipes/cup_tea_chorus_teapot_hot.json similarity index 100% rename from src/generated/resources/data/simplytea/recipes/cup_tea_chorus.json rename to src/generated/resources/data/minecraft/recipes/cup_tea_chorus_teapot_hot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_floral_cup_water_hot.json b/src/generated/resources/data/minecraft/recipes/cup_tea_floral_cup_water_hot.json new file mode 100644 index 0000000..fa29320 --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/cup_tea_floral_cup_water_hot.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:cup" + }, + { + "item": "simplytea:teabag_floral" + }, + { + "item": "simplytea:cup_water_hot" + } + ], + "result": { + "item": "simplytea:cup_tea_floral" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/recipes/cup_tea_floral.json b/src/generated/resources/data/minecraft/recipes/cup_tea_floral_teapot_hot.json similarity index 100% rename from src/generated/resources/data/simplytea/recipes/cup_tea_floral.json rename to src/generated/resources/data/minecraft/recipes/cup_tea_floral_teapot_hot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_green_cup_water_hot.json b/src/generated/resources/data/minecraft/recipes/cup_tea_green_cup_water_hot.json new file mode 100644 index 0000000..a101189 --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/cup_tea_green_cup_water_hot.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:cup" + }, + { + "item": "simplytea:teabag_green" + }, + { + "item": "simplytea:cup_water_hot" + } + ], + "result": { + "item": "simplytea:cup_tea_green" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/recipes/cup_tea_green.json b/src/generated/resources/data/minecraft/recipes/cup_tea_green_teapot_hot.json similarity index 100% rename from src/generated/resources/data/simplytea/recipes/cup_tea_green.json rename to src/generated/resources/data/minecraft/recipes/cup_tea_green_teapot_hot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_water_hot_teapot_hot.json b/src/generated/resources/data/minecraft/recipes/cup_water_hot_teapot_hot.json new file mode 100644 index 0000000..c8b0845 --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/cup_water_hot_teapot_hot.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:cup" + }, + { + "item": "simplytea:teapot_hot" + } + ], + "result": { + "item": "simplytea:cup_water_hot" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/recipes/milk_bucket_from_teapot.json b/src/generated/resources/data/minecraft/recipes/milk_bucket_from_teapot.json new file mode 100644 index 0000000..aee6004 --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/milk_bucket_from_teapot.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:teapot_milk" + }, + { + "item": "minecraft:bucket" + } + ], + "result": { + "item": "minecraft:milk_bucket" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/recipes/water_bucket_from_teapot.json b/src/generated/resources/data/minecraft/recipes/water_bucket_from_teapot.json new file mode 100644 index 0000000..618c2a2 --- /dev/null +++ b/src/generated/resources/data/minecraft/recipes/water_bucket_from_teapot.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:teapot_water" + }, + { + "item": "minecraft:bucket" + } + ], + "result": { + "item": "minecraft:water_bucket" + } +} \ No newline at end of file diff --git a/src/main/java/knightminer/simplytea/core/Config.java b/src/main/java/knightminer/simplytea/core/Config.java index 82b6098..b657beb 100644 --- a/src/main/java/knightminer/simplytea/core/Config.java +++ b/src/main/java/knightminer/simplytea/core/Config.java @@ -14,7 +14,7 @@ public class Config { public static class Server { public TeaDrink black_tea, green_tea, floral_tea, chai_tea, chorus_tea, iced_tea; - public CocoaDrink cocoa; + public CocoaDrink cocoa, frothed_milk; public Teapot teapot; public Tree tree; public Server(Builder builder) { @@ -28,6 +28,7 @@ public Server(Builder builder) { chorus_tea = new TeaDrink("chorus", builder, TeaEffect.ENDERFALLING, 3, 0.9, 150, 1); iced_tea = new TeaDrink("iced", builder, TeaEffect.ABSORPTION, 3, 0.9, 90, 1); cocoa = new CocoaDrink(builder, 4, 0.6); + frothed_milk = new CocoaDrink(builder, 2, 0.4); builder.pop(); // other categories diff --git a/src/main/java/knightminer/simplytea/core/Registration.java b/src/main/java/knightminer/simplytea/core/Registration.java index 6963485..597da7f 100644 --- a/src/main/java/knightminer/simplytea/core/Registration.java +++ b/src/main/java/knightminer/simplytea/core/Registration.java @@ -37,6 +37,7 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.world.InteractionResult; import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.food.FoodProperties; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.CreativeModeTabs; @@ -128,7 +129,9 @@ public class Registration { public static Item cup_tea_chai; public static Item cup_tea_iced; public static Item cup_tea_chorus; + public static Item cup_water_hot; public static Item cup_cocoa; + public static Item cup_frothed; /* World Gen */ public static PlacementModifierType tree_gen_enabled; @@ -213,7 +216,9 @@ static void registerObjects(final RegisterEvent event) { cup_tea_chai = register(r, new TeaCupItem(props.food(Config.SERVER.chai_tea)), "cup_tea_chai"); cup_tea_iced = register(r, new TeaCupItem(props.food(Config.SERVER.iced_tea)), "cup_tea_iced"); cup_tea_chorus = register(r, new TeaCupItem(props.food(Config.SERVER.chorus_tea)), "cup_tea_chorus"); + cup_water_hot = register(r, new Item(props.food(new FoodProperties.Builder().alwaysEat().build())), "cup_water_hot"); cup_cocoa = register(r, new CocoaItem(props.food(Config.SERVER.cocoa)), "cup_cocoa"); + cup_frothed = register(r, new CocoaItem(props.food(Config.SERVER.cocoa)), "cup_frothed"); }); event.register(Registries.CREATIVE_MODE_TAB, r -> { diff --git a/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java b/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java index 07a8358..3e77df9 100644 --- a/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java +++ b/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java @@ -27,12 +27,14 @@ import static knightminer.simplytea.core.Registration.chorus_petal; import static knightminer.simplytea.core.Registration.cup; import static knightminer.simplytea.core.Registration.cup_cocoa; +import static knightminer.simplytea.core.Registration.cup_frothed; import static knightminer.simplytea.core.Registration.cup_tea_black; import static knightminer.simplytea.core.Registration.cup_tea_chai; import static knightminer.simplytea.core.Registration.cup_tea_chorus; import static knightminer.simplytea.core.Registration.cup_tea_floral; import static knightminer.simplytea.core.Registration.cup_tea_green; import static knightminer.simplytea.core.Registration.cup_tea_iced; +import static knightminer.simplytea.core.Registration.cup_water_hot; import static knightminer.simplytea.core.Registration.tea_fence; import static knightminer.simplytea.core.Registration.tea_fence_gate; import static knightminer.simplytea.core.Registration.tea_leaf; @@ -94,6 +96,18 @@ protected void buildRecipes(Consumer consumer) { boil(consumer, teapot_water, teapot_hot); boil(consumer, teapot_milk, teapot_frothed); + // empty teapots + ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, Items.WATER_BUCKET) + .requires(teapot_water) + .requires(Items.BUCKET) + .unlockedBy("has_item", has(teapot_water)) + .save(consumer, "water_bucket_from_teapot"); + ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, Items.MILK_BUCKET) + .requires(teapot_milk) + .requires(Items.BUCKET) + .unlockedBy("has_item", has(teapot_milk)) + .save(consumer, "milk_bucket_from_teapot"); + // teabags ShapedRecipeBuilder.shaped(RecipeCategory.MISC, teabag, 4) .pattern(" S").pattern("PP ").pattern("PP ") @@ -108,9 +122,12 @@ protected void buildRecipes(Consumer consumer) { addTeaWithBag(consumer, tea_leaf, teabag_green, cup_tea_green); addTeaWithBag(consumer, black_tea, teabag_black, cup_tea_black); addTeaWithBag(consumer, chorus_petal, teabag_chorus, cup_tea_chorus); + addTea(consumer, cup_water_hot, teapot_hot); + addTea(consumer, cup_frothed, teapot_frothed); // advanced tea addTea(consumer, cup_cocoa, Items.COCOA_BEANS, Items.COCOA_BEANS, teapot_frothed); + addTea(consumer, cup_cocoa, Items.COCOA_BEANS, cup_frothed); addHoney(consumer, RecipeCategory.FOOD, cup_cocoa, tea_stick, CocoaItem.CINNAMON_TAG); addTea(consumer, cup_tea_chai, teabag_black, tea_stick, teapot_frothed); addHoney(consumer, cup_tea_chai); @@ -155,7 +172,7 @@ private static void addTea(Consumer consumer, ItemLike filledCup builder.requires(ingredient); } builder.unlockedBy("has_bag", has(ingredients[0])); - builder.save(consumer); + builder.save(consumer, filledCup.toString() + "_" + ingredients[ingredients.length-1].toString()); } /** Creates a recipe to add honey to a tea */ @@ -190,6 +207,7 @@ private static void addTeaWithBag(Consumer consumer, ItemLike le .unlockedBy("has_leaf", has(leaf)) .save(consumer); addTea(consumer, filledCup, filledTeabag, teapot_hot); + addTea(consumer, filledCup, filledTeabag, cup_water_hot); addHoney(consumer, filledCup); } } diff --git a/src/main/java/knightminer/simplytea/item/CocoaItem.java b/src/main/java/knightminer/simplytea/item/CocoaItem.java index a4a11bb..c9cd4f3 100644 --- a/src/main/java/knightminer/simplytea/item/CocoaItem.java +++ b/src/main/java/knightminer/simplytea/item/CocoaItem.java @@ -1,6 +1,7 @@ package knightminer.simplytea.item; import knightminer.simplytea.core.Config; +import knightminer.simplytea.core.Registration; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextColor; import net.minecraft.world.effect.MobEffectInstance; @@ -29,16 +30,17 @@ public CocoaItem(Properties props) { @Override public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity living) { + boolean isMilk = stack.is(Registration.cup_frothed); if (this.isEdible()) { ItemStack result = getCraftingRemainingItem(stack); living.eat(worldIn, stack); - if (!worldIn.isClientSide && Config.SERVER.cocoa.clearsEffects()) { + if (!worldIn.isClientSide && (Config.SERVER.cocoa.clearsEffects() || isMilk)) { // logic basically copied from living entity, so we can choose which effects to remove Iterator itr = living.getActiveEffectsMap().values().iterator(); boolean hasCinnamon = hasHoney(stack, CINNAMON_TAG); while (itr.hasNext()) { MobEffectInstance effect = itr.next(); - if ((Config.SERVER.cocoa.clearsPositive() || !effect.getEffect().isBeneficial()) + if ((Config.SERVER.cocoa.clearsPositive() || !effect.getEffect().isBeneficial() || isMilk) && effect.isCurativeItem(MILK_BUCKET) && !MinecraftForge.EVENT_BUS.post(new MobEffectEvent.Remove(living, effect))) { living.onEffectRemoved(effect); itr.remove(); diff --git a/src/main/resources/assets/simplytea/lang/en_us.json b/src/main/resources/assets/simplytea/lang/en_us.json index cd37b3b..1fbc572 100644 --- a/src/main/resources/assets/simplytea/lang/en_us.json +++ b/src/main/resources/assets/simplytea/lang/en_us.json @@ -20,6 +20,7 @@ "item.simplytea.unfired_cup": "Unfired Tea Cup", "item.simplytea.cup": "Tea Cup", "item.simplytea.cup_water": "Cup of Water", + "item.simplytea.cup_water_hot": "Cup of Hot Water", "item.simplytea.cup_tea_green": "Cup of Green Tea", "item.simplytea.cup_tea_black": "Cup of Black Tea", "item.simplytea.cup_tea_floral": "Cup of Dandelion Tea", @@ -28,6 +29,7 @@ "item.simplytea.cup_tea_chamomile": "Cup of Chamomile Tea", "item.simplytea.cup_tea_chorus": "Cup of Chorus Tea", "item.simplytea.cup_cocoa": "Cup of Hot Chocolate", + "item.simplytea.cup_frothed": "Cup of Frothed Milk", "item.simplytea.cup.with_honey": "With Honey", "item.simplytea.cup.with_cinnamon": "With Cinnamon", diff --git a/src/main/resources/assets/simplytea/models/item/cup_frothed.json b/src/main/resources/assets/simplytea/models/item/cup_frothed.json new file mode 100644 index 0000000..4177d93 --- /dev/null +++ b/src/main/resources/assets/simplytea/models/item/cup_frothed.json @@ -0,0 +1,6 @@ +{ + "parent":"item/generated", + "textures": { + "layer0":"simplytea:item/cup_milk" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/simplytea/models/item/cup_water_hot.json b/src/main/resources/assets/simplytea/models/item/cup_water_hot.json new file mode 100644 index 0000000..260bb11 --- /dev/null +++ b/src/main/resources/assets/simplytea/models/item/cup_water_hot.json @@ -0,0 +1,6 @@ +{ + "parent":"item/generated", + "textures": { + "layer0":"simplytea:item/cup_water" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/simplytea/textures/item/cup_milk.png b/src/main/resources/assets/simplytea/textures/item/cup_milk.png new file mode 100644 index 0000000000000000000000000000000000000000..d8d2d4ac7bd45e93be2eace100ead7bf931f4e54 GIT binary patch literal 385 zcmV-{0e=38P)m_r{cW}qWimQtcj?26EzTcO72mHs}ZzDL^-z)99 zloIEcS2ay7v70GwHWv{D0bJKbQ4~m$_i80I$P9o&I(55CxVwMAczglJna5OoAdZg} z(1tkQU3ieE8fdTAnZoIQcP!tSM8(GF0w3xu1lFi{sg$bx#c{{;pzZv;x#xtMi_<)z%wp8 z%pdSjL+H?MwG^n+X)AG>rYh%vX`o}~6?9>3I4B9>Gt!kp#>?v)9-p3#&U|R0y%VBy f?P`m4?Qi!lj*OJid+5E{00000NkvXXu0mjf>P4uU literal 0 HcmV?d00001 From 2a46caaf0aff988a05b8db5a9e4b956c874996f7 Mon Sep 17 00:00:00 2001 From: Jeff Shipley Date: Thu, 17 Oct 2024 01:15:20 -0600 Subject: [PATCH 2/6] Fixed recipe namespaces, added missing recipes, and dropped bucket recipes --- .../recipes/misc/milk_bucket_from_teapot.json | 35 ------------------- .../misc/water_bucket_from_teapot.json | 35 ------------------- .../recipes/milk_bucket_from_teapot.json | 15 -------- .../recipes/water_bucket_from_teapot.json | 15 -------- .../recipes/food/cup_cocoa_from_cup.json} | 4 +-- .../recipes/food/cup_cocoa_from_teapot.json} | 4 +-- .../food/cup_frothed_from_teapot.json} | 4 +-- .../recipes/food/cup_tea_black_from_cup.json} | 4 +-- .../food/cup_tea_black_from_teapot.json} | 4 +-- .../recipes/food/cup_tea_chai_from_cup.json} | 4 +-- .../food/cup_tea_chai_from_teapot.json | 35 +++++++++++++++++++ .../food/cup_tea_chorus_from_cup.json} | 4 +-- .../food/cup_tea_chorus_from_teapot.json} | 4 +-- .../food/cup_tea_floral_from_cup.json} | 4 +-- .../food/cup_tea_floral_from_teapot.json} | 4 +-- .../recipes/food/cup_tea_green_from_cup.json} | 4 +-- .../food/cup_tea_green_from_teapot.json} | 4 +-- .../food/cup_water_hot_from_teapot.json} | 4 +-- .../recipes/cup_cocoa_from_cup.json} | 3 ++ .../recipes/cup_cocoa_from_teapot.json} | 0 .../recipes/cup_frothed_from_teapot.json} | 0 .../recipes/cup_tea_black_from_cup.json} | 0 .../recipes/cup_tea_black_from_teapot.json} | 0 .../recipes/cup_tea_chai_from_cup.json | 21 +++++++++++ .../recipes/cup_tea_chai_from_teapot.json} | 0 .../recipes/cup_tea_chorus_from_cup.json} | 0 .../recipes/cup_tea_chorus_from_teapot.json} | 0 .../recipes/cup_tea_floral_from_cup.json} | 0 .../recipes/cup_tea_floral_from_teapot.json} | 0 .../recipes/cup_tea_green_from_cup.json} | 0 .../recipes/cup_tea_green_from_teapot.json} | 0 .../recipes/cup_water_hot_from_teapot.json} | 0 .../simplytea/data/gen/RecipeGenerator.java | 31 ++++++---------- 33 files changed, 95 insertions(+), 147 deletions(-) delete mode 100644 src/generated/resources/data/minecraft/advancements/recipes/misc/milk_bucket_from_teapot.json delete mode 100644 src/generated/resources/data/minecraft/advancements/recipes/misc/water_bucket_from_teapot.json delete mode 100644 src/generated/resources/data/minecraft/recipes/milk_bucket_from_teapot.json delete mode 100644 src/generated/resources/data/minecraft/recipes/water_bucket_from_teapot.json rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_cocoa_cup_frothed.json => simplytea/advancements/recipes/food/cup_cocoa_from_cup.json} (85%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_cocoa_teapot_frothed.json => simplytea/advancements/recipes/food/cup_cocoa_from_teapot.json} (84%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_frothed_teapot_frothed.json => simplytea/advancements/recipes/food/cup_frothed_from_teapot.json} (84%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_black_teapot_hot.json => simplytea/advancements/recipes/food/cup_tea_black_from_cup.json} (84%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_chai_teapot_frothed.json => simplytea/advancements/recipes/food/cup_tea_black_from_teapot.json} (84%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_black_cup_water_hot.json => simplytea/advancements/recipes/food/cup_tea_chai_from_cup.json} (84%) create mode 100644 src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai_from_teapot.json rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_chorus_teapot_hot.json => simplytea/advancements/recipes/food/cup_tea_chorus_from_cup.json} (84%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_chorus_cup_water_hot.json => simplytea/advancements/recipes/food/cup_tea_chorus_from_teapot.json} (83%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_floral_teapot_hot.json => simplytea/advancements/recipes/food/cup_tea_floral_from_cup.json} (84%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_floral_cup_water_hot.json => simplytea/advancements/recipes/food/cup_tea_floral_from_teapot.json} (83%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_green_teapot_hot.json => simplytea/advancements/recipes/food/cup_tea_green_from_cup.json} (84%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_tea_green_cup_water_hot.json => simplytea/advancements/recipes/food/cup_tea_green_from_teapot.json} (84%) rename src/generated/resources/data/{minecraft/advancements/recipes/food/cup_water_hot_teapot_hot.json => simplytea/advancements/recipes/food/cup_water_hot_from_teapot.json} (84%) rename src/generated/resources/data/{minecraft/recipes/cup_cocoa_cup_frothed.json => simplytea/recipes/cup_cocoa_from_cup.json} (84%) rename src/generated/resources/data/{minecraft/recipes/cup_cocoa_teapot_frothed.json => simplytea/recipes/cup_cocoa_from_teapot.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_frothed_teapot_frothed.json => simplytea/recipes/cup_frothed_from_teapot.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_tea_black_cup_water_hot.json => simplytea/recipes/cup_tea_black_from_cup.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_tea_black_teapot_hot.json => simplytea/recipes/cup_tea_black_from_teapot.json} (100%) create mode 100644 src/generated/resources/data/simplytea/recipes/cup_tea_chai_from_cup.json rename src/generated/resources/data/{minecraft/recipes/cup_tea_chai_teapot_frothed.json => simplytea/recipes/cup_tea_chai_from_teapot.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_tea_chorus_cup_water_hot.json => simplytea/recipes/cup_tea_chorus_from_cup.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_tea_chorus_teapot_hot.json => simplytea/recipes/cup_tea_chorus_from_teapot.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_tea_floral_cup_water_hot.json => simplytea/recipes/cup_tea_floral_from_cup.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_tea_floral_teapot_hot.json => simplytea/recipes/cup_tea_floral_from_teapot.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_tea_green_cup_water_hot.json => simplytea/recipes/cup_tea_green_from_cup.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_tea_green_teapot_hot.json => simplytea/recipes/cup_tea_green_from_teapot.json} (100%) rename src/generated/resources/data/{minecraft/recipes/cup_water_hot_teapot_hot.json => simplytea/recipes/cup_water_hot_from_teapot.json} (100%) diff --git a/src/generated/resources/data/minecraft/advancements/recipes/misc/milk_bucket_from_teapot.json b/src/generated/resources/data/minecraft/advancements/recipes/misc/milk_bucket_from_teapot.json deleted file mode 100644 index 804433e..0000000 --- a/src/generated/resources/data/minecraft/advancements/recipes/misc/milk_bucket_from_teapot.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "simplytea:teapot_milk" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "minecraft:milk_bucket_from_teapot" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "minecraft:milk_bucket_from_teapot" - ] - }, - "sends_telemetry_event": false -} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/advancements/recipes/misc/water_bucket_from_teapot.json b/src/generated/resources/data/minecraft/advancements/recipes/misc/water_bucket_from_teapot.json deleted file mode 100644 index 56e974d..0000000 --- a/src/generated/resources/data/minecraft/advancements/recipes/misc/water_bucket_from_teapot.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_item": { - "conditions": { - "items": [ - { - "items": [ - "simplytea:teapot_water" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "minecraft:water_bucket_from_teapot" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_item", - "has_the_recipe" - ] - ], - "rewards": { - "recipes": [ - "minecraft:water_bucket_from_teapot" - ] - }, - "sends_telemetry_event": false -} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/recipes/milk_bucket_from_teapot.json b/src/generated/resources/data/minecraft/recipes/milk_bucket_from_teapot.json deleted file mode 100644 index aee6004..0000000 --- a/src/generated/resources/data/minecraft/recipes/milk_bucket_from_teapot.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "simplytea:teapot_milk" - }, - { - "item": "minecraft:bucket" - } - ], - "result": { - "item": "minecraft:milk_bucket" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/recipes/water_bucket_from_teapot.json b/src/generated/resources/data/minecraft/recipes/water_bucket_from_teapot.json deleted file mode 100644 index 618c2a2..0000000 --- a/src/generated/resources/data/minecraft/recipes/water_bucket_from_teapot.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "minecraft:crafting_shapeless", - "category": "misc", - "ingredients": [ - { - "item": "simplytea:teapot_water" - }, - { - "item": "minecraft:bucket" - } - ], - "result": { - "item": "minecraft:water_bucket" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_cup_frothed.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa_from_cup.json similarity index 85% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_cup_frothed.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa_from_cup.json index b38c5cf..f7fe67e 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_cup_frothed.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa_from_cup.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_cocoa_cup_frothed" + "recipe": "simplytea:cup_cocoa_from_cup" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_cocoa_cup_frothed" + "simplytea:cup_cocoa_from_cup" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_teapot_frothed.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa_from_teapot.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_teapot_frothed.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa_from_teapot.json index 411050c..69667dc 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_cocoa_teapot_frothed.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_cocoa_from_teapot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_cocoa_teapot_frothed" + "recipe": "simplytea:cup_cocoa_from_teapot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_cocoa_teapot_frothed" + "simplytea:cup_cocoa_from_teapot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_frothed_teapot_frothed.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_frothed_from_teapot.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_frothed_teapot_frothed.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_frothed_from_teapot.json index d5e1c23..9bda3fe 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_frothed_teapot_frothed.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_frothed_from_teapot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_frothed_teapot_frothed" + "recipe": "simplytea:cup_frothed_from_teapot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_frothed_teapot_frothed" + "simplytea:cup_frothed_from_teapot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_teapot_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black_from_cup.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_teapot_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black_from_cup.json index b997dd8..beff87d 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_teapot_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black_from_cup.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_black_teapot_hot" + "recipe": "simplytea:cup_tea_black_from_cup" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_black_teapot_hot" + "simplytea:cup_tea_black_from_cup" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chai_teapot_frothed.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black_from_teapot.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chai_teapot_frothed.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black_from_teapot.json index ea62764..d7676d9 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chai_teapot_frothed.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_black_from_teapot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_chai_teapot_frothed" + "recipe": "simplytea:cup_tea_black_from_teapot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_chai_teapot_frothed" + "simplytea:cup_tea_black_from_teapot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_cup_water_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai_from_cup.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_cup_water_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai_from_cup.json index 26d6b76..0ab5cd1 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_black_cup_water_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai_from_cup.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_black_cup_water_hot" + "recipe": "simplytea:cup_tea_chai_from_cup" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_black_cup_water_hot" + "simplytea:cup_tea_chai_from_cup" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai_from_teapot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai_from_teapot.json new file mode 100644 index 0000000..bdfa42f --- /dev/null +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chai_from_teapot.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_bag": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:teabag_black" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "simplytea:cup_tea_chai_from_teapot" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_bag", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "simplytea:cup_tea_chai_from_teapot" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_teapot_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus_from_cup.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_teapot_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus_from_cup.json index af38c70..1a09ede 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_teapot_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus_from_cup.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_chorus_teapot_hot" + "recipe": "simplytea:cup_tea_chorus_from_cup" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_chorus_teapot_hot" + "simplytea:cup_tea_chorus_from_cup" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_cup_water_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus_from_teapot.json similarity index 83% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_cup_water_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus_from_teapot.json index 0aebd97..8fcf0bc 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_chorus_cup_water_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_chorus_from_teapot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_chorus_cup_water_hot" + "recipe": "simplytea:cup_tea_chorus_from_teapot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_chorus_cup_water_hot" + "simplytea:cup_tea_chorus_from_teapot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_teapot_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral_from_cup.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_teapot_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral_from_cup.json index 365c23d..b36c5a8 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_teapot_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral_from_cup.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_floral_teapot_hot" + "recipe": "simplytea:cup_tea_floral_from_cup" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_floral_teapot_hot" + "simplytea:cup_tea_floral_from_cup" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_cup_water_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral_from_teapot.json similarity index 83% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_cup_water_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral_from_teapot.json index 5124abd..6de7fb1 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_floral_cup_water_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_floral_from_teapot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_floral_cup_water_hot" + "recipe": "simplytea:cup_tea_floral_from_teapot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_floral_cup_water_hot" + "simplytea:cup_tea_floral_from_teapot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_teapot_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green_from_cup.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_teapot_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green_from_cup.json index 0e3e775..ac85c06 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_teapot_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green_from_cup.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_green_teapot_hot" + "recipe": "simplytea:cup_tea_green_from_cup" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_green_teapot_hot" + "simplytea:cup_tea_green_from_cup" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_cup_water_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green_from_teapot.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_cup_water_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green_from_teapot.json index afff1db..52f42c9 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_tea_green_cup_water_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_tea_green_from_teapot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_tea_green_cup_water_hot" + "recipe": "simplytea:cup_tea_green_from_teapot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_tea_green_cup_water_hot" + "simplytea:cup_tea_green_from_teapot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_water_hot_teapot_hot.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_water_hot_from_teapot.json similarity index 84% rename from src/generated/resources/data/minecraft/advancements/recipes/food/cup_water_hot_teapot_hot.json rename to src/generated/resources/data/simplytea/advancements/recipes/food/cup_water_hot_from_teapot.json index 7796dae..fdffca5 100644 --- a/src/generated/resources/data/minecraft/advancements/recipes/food/cup_water_hot_teapot_hot.json +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_water_hot_from_teapot.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "minecraft:cup_water_hot_teapot_hot" + "recipe": "simplytea:cup_water_hot_from_teapot" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "minecraft:cup_water_hot_teapot_hot" + "simplytea:cup_water_hot_from_teapot" ] }, "sends_telemetry_event": false diff --git a/src/generated/resources/data/minecraft/recipes/cup_cocoa_cup_frothed.json b/src/generated/resources/data/simplytea/recipes/cup_cocoa_from_cup.json similarity index 84% rename from src/generated/resources/data/minecraft/recipes/cup_cocoa_cup_frothed.json rename to src/generated/resources/data/simplytea/recipes/cup_cocoa_from_cup.json index 29714d4..15272d6 100644 --- a/src/generated/resources/data/minecraft/recipes/cup_cocoa_cup_frothed.json +++ b/src/generated/resources/data/simplytea/recipes/cup_cocoa_from_cup.json @@ -8,6 +8,9 @@ { "item": "minecraft:cocoa_beans" }, + { + "item": "minecraft:cocoa_beans" + }, { "item": "simplytea:cup_frothed" } diff --git a/src/generated/resources/data/minecraft/recipes/cup_cocoa_teapot_frothed.json b/src/generated/resources/data/simplytea/recipes/cup_cocoa_from_teapot.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_cocoa_teapot_frothed.json rename to src/generated/resources/data/simplytea/recipes/cup_cocoa_from_teapot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_frothed_teapot_frothed.json b/src/generated/resources/data/simplytea/recipes/cup_frothed_from_teapot.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_frothed_teapot_frothed.json rename to src/generated/resources/data/simplytea/recipes/cup_frothed_from_teapot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_black_cup_water_hot.json b/src/generated/resources/data/simplytea/recipes/cup_tea_black_from_cup.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_black_cup_water_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_black_from_cup.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_black_teapot_hot.json b/src/generated/resources/data/simplytea/recipes/cup_tea_black_from_teapot.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_black_teapot_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_black_from_teapot.json diff --git a/src/generated/resources/data/simplytea/recipes/cup_tea_chai_from_cup.json b/src/generated/resources/data/simplytea/recipes/cup_tea_chai_from_cup.json new file mode 100644 index 0000000..678701d --- /dev/null +++ b/src/generated/resources/data/simplytea/recipes/cup_tea_chai_from_cup.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "simplytea:cup" + }, + { + "item": "simplytea:teabag_black" + }, + { + "item": "simplytea:tea_stick" + }, + { + "item": "simplytea:cup_frothed" + } + ], + "result": { + "item": "simplytea:cup_tea_chai" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_chai_teapot_frothed.json b/src/generated/resources/data/simplytea/recipes/cup_tea_chai_from_teapot.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_chai_teapot_frothed.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_chai_from_teapot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_chorus_cup_water_hot.json b/src/generated/resources/data/simplytea/recipes/cup_tea_chorus_from_cup.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_chorus_cup_water_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_chorus_from_cup.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_chorus_teapot_hot.json b/src/generated/resources/data/simplytea/recipes/cup_tea_chorus_from_teapot.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_chorus_teapot_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_chorus_from_teapot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_floral_cup_water_hot.json b/src/generated/resources/data/simplytea/recipes/cup_tea_floral_from_cup.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_floral_cup_water_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_floral_from_cup.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_floral_teapot_hot.json b/src/generated/resources/data/simplytea/recipes/cup_tea_floral_from_teapot.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_floral_teapot_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_floral_from_teapot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_green_cup_water_hot.json b/src/generated/resources/data/simplytea/recipes/cup_tea_green_from_cup.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_green_cup_water_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_green_from_cup.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_tea_green_teapot_hot.json b/src/generated/resources/data/simplytea/recipes/cup_tea_green_from_teapot.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_tea_green_teapot_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_tea_green_from_teapot.json diff --git a/src/generated/resources/data/minecraft/recipes/cup_water_hot_teapot_hot.json b/src/generated/resources/data/simplytea/recipes/cup_water_hot_from_teapot.json similarity index 100% rename from src/generated/resources/data/minecraft/recipes/cup_water_hot_teapot_hot.json rename to src/generated/resources/data/simplytea/recipes/cup_water_hot_from_teapot.json diff --git a/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java b/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java index 3e77df9..bc982ed 100644 --- a/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java +++ b/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java @@ -96,18 +96,6 @@ protected void buildRecipes(Consumer consumer) { boil(consumer, teapot_water, teapot_hot); boil(consumer, teapot_milk, teapot_frothed); - // empty teapots - ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, Items.WATER_BUCKET) - .requires(teapot_water) - .requires(Items.BUCKET) - .unlockedBy("has_item", has(teapot_water)) - .save(consumer, "water_bucket_from_teapot"); - ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, Items.MILK_BUCKET) - .requires(teapot_milk) - .requires(Items.BUCKET) - .unlockedBy("has_item", has(teapot_milk)) - .save(consumer, "milk_bucket_from_teapot"); - // teabags ShapedRecipeBuilder.shaped(RecipeCategory.MISC, teabag, 4) .pattern(" S").pattern("PP ").pattern("PP ") @@ -122,14 +110,15 @@ protected void buildRecipes(Consumer consumer) { addTeaWithBag(consumer, tea_leaf, teabag_green, cup_tea_green); addTeaWithBag(consumer, black_tea, teabag_black, cup_tea_black); addTeaWithBag(consumer, chorus_petal, teabag_chorus, cup_tea_chorus); - addTea(consumer, cup_water_hot, teapot_hot); - addTea(consumer, cup_frothed, teapot_frothed); + addTea(consumer, cup_water_hot, "teapot", teapot_hot); + addTea(consumer, cup_frothed, "teapot", teapot_frothed); // advanced tea - addTea(consumer, cup_cocoa, Items.COCOA_BEANS, Items.COCOA_BEANS, teapot_frothed); - addTea(consumer, cup_cocoa, Items.COCOA_BEANS, cup_frothed); + addTea(consumer, cup_cocoa, "teapot", Items.COCOA_BEANS, Items.COCOA_BEANS, teapot_frothed); + addTea(consumer, cup_cocoa, "cup", Items.COCOA_BEANS, Items.COCOA_BEANS, cup_frothed); addHoney(consumer, RecipeCategory.FOOD, cup_cocoa, tea_stick, CocoaItem.CINNAMON_TAG); - addTea(consumer, cup_tea_chai, teabag_black, tea_stick, teapot_frothed); + addTea(consumer, cup_tea_chai, "teapot", teabag_black, tea_stick, teapot_frothed); + addTea(consumer, cup_tea_chai, "cup", teabag_black, tea_stick, cup_frothed); addHoney(consumer, cup_tea_chai); ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, cup_tea_iced) .requires(cup) @@ -165,14 +154,14 @@ private static void boil(Consumer consumer, ItemLike cold, ItemL } /** Adds a recipe to pour tea */ - private static void addTea(Consumer consumer, ItemLike filledCup, ItemLike... ingredients) { + private static void addTea(Consumer consumer, ItemLike filledCup, String suffix, ItemLike... ingredients) { ShapelessRecipeBuilder builder = ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, filledCup); builder.requires(cup); for (ItemLike ingredient : ingredients) { builder.requires(ingredient); } builder.unlockedBy("has_bag", has(ingredients[0])); - builder.save(consumer, filledCup.toString() + "_" + ingredients[ingredients.length-1].toString()); + builder.save(consumer, suffix(filledCup, "_from_" + suffix).toString()); } /** Creates a recipe to add honey to a tea */ @@ -206,8 +195,8 @@ private static void addTeaWithBag(Consumer consumer, ItemLike le .requires(leaf) .unlockedBy("has_leaf", has(leaf)) .save(consumer); - addTea(consumer, filledCup, filledTeabag, teapot_hot); - addTea(consumer, filledCup, filledTeabag, cup_water_hot); + addTea(consumer, filledCup, "teapot", filledTeabag, teapot_hot); + addTea(consumer, filledCup, "cup", filledTeabag, cup_water_hot); addHoney(consumer, filledCup); } } From 8128e60ccc35a6f59100b56200c007115bfdf561 Mon Sep 17 00:00:00 2001 From: Jeff Shipley Date: Thu, 17 Oct 2024 01:38:25 -0600 Subject: [PATCH 3/6] Improve frothed milk config --- .../java/knightminer/simplytea/core/Config.java | 5 +++-- .../knightminer/simplytea/core/Registration.java | 4 ++-- .../simplytea/core/config/CocoaDrink.java | 4 ++-- .../java/knightminer/simplytea/item/CocoaItem.java | 13 +++++++------ 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/knightminer/simplytea/core/Config.java b/src/main/java/knightminer/simplytea/core/Config.java index b657beb..633fa02 100644 --- a/src/main/java/knightminer/simplytea/core/Config.java +++ b/src/main/java/knightminer/simplytea/core/Config.java @@ -1,6 +1,7 @@ package knightminer.simplytea.core; import knightminer.simplytea.core.config.CocoaDrink; +import knightminer.simplytea.core.config.CocoaDrink.ClearType; import knightminer.simplytea.core.config.TeaDrink; import knightminer.simplytea.core.config.TeaDrink.TeaEffect; import knightminer.simplytea.core.config.Teapot; @@ -27,8 +28,8 @@ public Server(Builder builder) { chai_tea = new TeaDrink("chai", builder, TeaEffect.INVIGORATED, 5, 0.6, 150, 1); chorus_tea = new TeaDrink("chorus", builder, TeaEffect.ENDERFALLING, 3, 0.9, 150, 1); iced_tea = new TeaDrink("iced", builder, TeaEffect.ABSORPTION, 3, 0.9, 90, 1); - cocoa = new CocoaDrink(builder, 4, 0.6); - frothed_milk = new CocoaDrink(builder, 2, 0.4); + cocoa = new CocoaDrink(builder, ClearType.NEGATIVE, 4, 0.6); + frothed_milk = new CocoaDrink(builder, ClearType.ALL, 1, 0.2); builder.pop(); // other categories diff --git a/src/main/java/knightminer/simplytea/core/Registration.java b/src/main/java/knightminer/simplytea/core/Registration.java index 597da7f..ec4c052 100644 --- a/src/main/java/knightminer/simplytea/core/Registration.java +++ b/src/main/java/knightminer/simplytea/core/Registration.java @@ -217,8 +217,8 @@ static void registerObjects(final RegisterEvent event) { cup_tea_iced = register(r, new TeaCupItem(props.food(Config.SERVER.iced_tea)), "cup_tea_iced"); cup_tea_chorus = register(r, new TeaCupItem(props.food(Config.SERVER.chorus_tea)), "cup_tea_chorus"); cup_water_hot = register(r, new Item(props.food(new FoodProperties.Builder().alwaysEat().build())), "cup_water_hot"); - cup_cocoa = register(r, new CocoaItem(props.food(Config.SERVER.cocoa)), "cup_cocoa"); - cup_frothed = register(r, new CocoaItem(props.food(Config.SERVER.cocoa)), "cup_frothed"); + cup_cocoa = register(r, new CocoaItem(props.food(Config.SERVER.cocoa), Config.SERVER.cocoa), "cup_cocoa"); + cup_frothed = register(r, new CocoaItem(props.food(Config.SERVER.frothed_milk), Config.SERVER.cocoa), "cup_frothed"); }); event.register(Registries.CREATIVE_MODE_TAB, r -> { diff --git a/src/main/java/knightminer/simplytea/core/config/CocoaDrink.java b/src/main/java/knightminer/simplytea/core/config/CocoaDrink.java index 90734c2..cd94c45 100644 --- a/src/main/java/knightminer/simplytea/core/config/CocoaDrink.java +++ b/src/main/java/knightminer/simplytea/core/config/CocoaDrink.java @@ -11,11 +11,11 @@ public class CocoaDrink extends Drink { * @param hunger Default hunger value * @param saturation Default saturation value */ - public CocoaDrink(ForgeConfigSpec.Builder builder, int hunger, double saturation) { + public CocoaDrink(ForgeConfigSpec.Builder builder, ClearType defaultClearEffects, int hunger, double saturation) { super("cocoa", builder, hunger, saturation); this.clear_effects = builder.comment("If ALL, drinking cocoa clears status effects like milk", "If NEGATIVE, clears only negative effects (default)", "If NONE, does not clear effects", "For all values, regular cocoa clears just the first effect, while cocoa with cinnamon clears all") .translation("simplytea.config.tea.clear_effects") - .defineEnum("clear_effects", ClearType.NEGATIVE); + .defineEnum("clear_effects", defaultClearEffects); builder.pop(); } diff --git a/src/main/java/knightminer/simplytea/item/CocoaItem.java b/src/main/java/knightminer/simplytea/item/CocoaItem.java index c9cd4f3..ff9e04e 100644 --- a/src/main/java/knightminer/simplytea/item/CocoaItem.java +++ b/src/main/java/knightminer/simplytea/item/CocoaItem.java @@ -1,7 +1,6 @@ package knightminer.simplytea.item; -import knightminer.simplytea.core.Config; -import knightminer.simplytea.core.Registration; +import knightminer.simplytea.core.config.CocoaDrink; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextColor; import net.minecraft.world.effect.MobEffectInstance; @@ -24,23 +23,25 @@ public class CocoaItem extends TeaCupItem { private static final ItemStack MILK_BUCKET = new ItemStack(Items.MILK_BUCKET); - public CocoaItem(Properties props) { + private final CocoaDrink drink; + + public CocoaItem(Properties props, CocoaDrink drink) { super(props); + this.drink = drink; } @Override public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity living) { - boolean isMilk = stack.is(Registration.cup_frothed); if (this.isEdible()) { ItemStack result = getCraftingRemainingItem(stack); living.eat(worldIn, stack); - if (!worldIn.isClientSide && (Config.SERVER.cocoa.clearsEffects() || isMilk)) { + if (!worldIn.isClientSide && drink.clearsEffects()) { // logic basically copied from living entity, so we can choose which effects to remove Iterator itr = living.getActiveEffectsMap().values().iterator(); boolean hasCinnamon = hasHoney(stack, CINNAMON_TAG); while (itr.hasNext()) { MobEffectInstance effect = itr.next(); - if ((Config.SERVER.cocoa.clearsPositive() || !effect.getEffect().isBeneficial() || isMilk) + if ((drink.clearsPositive() || !effect.getEffect().isBeneficial()) && effect.isCurativeItem(MILK_BUCKET) && !MinecraftForge.EVENT_BUS.post(new MobEffectEvent.Remove(living, effect))) { living.onEffectRemoved(effect); itr.remove(); From f9f37b58cd2f34ffef65a11904bd6e540dbcc42d Mon Sep 17 00:00:00 2001 From: Jeff Shipley Date: Fri, 18 Oct 2024 11:47:44 -0600 Subject: [PATCH 4/6] Add new config for frothed milk, and allow unheated teapots to be dumped --- .../simplytea/core/ClientEvents.java | 7 +++++++ .../knightminer/simplytea/core/Config.java | 4 ++-- .../simplytea/core/Registration.java | 16 ++++++++++++---- .../simplytea/core/config/CocoaDrink.java | 6 +++--- .../knightminer/simplytea/item/CocoaItem.java | 10 +++++----- .../knightminer/simplytea/item/TeapotItem.java | 17 +++++++++++++++++ .../simplytea/particles/milk_splash.json | 8 ++++++++ .../textures/particle/milk_splash_0.png | Bin 0 -> 127 bytes .../textures/particle/milk_splash_1.png | Bin 0 -> 121 bytes .../textures/particle/milk_splash_2.png | Bin 0 -> 97 bytes .../textures/particle/milk_splash_3.png | Bin 0 -> 107 bytes 11 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 src/main/resources/assets/simplytea/particles/milk_splash.json create mode 100644 src/main/resources/assets/simplytea/textures/particle/milk_splash_0.png create mode 100644 src/main/resources/assets/simplytea/textures/particle/milk_splash_1.png create mode 100644 src/main/resources/assets/simplytea/textures/particle/milk_splash_2.png create mode 100644 src/main/resources/assets/simplytea/textures/particle/milk_splash_3.png diff --git a/src/main/java/knightminer/simplytea/core/ClientEvents.java b/src/main/java/knightminer/simplytea/core/ClientEvents.java index 10f65da..5e6bf10 100644 --- a/src/main/java/knightminer/simplytea/core/ClientEvents.java +++ b/src/main/java/knightminer/simplytea/core/ClientEvents.java @@ -4,9 +4,11 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.world.level.FoliageColor; +import net.minecraft.client.particle.SplashParticle; import net.minecraft.client.renderer.BiomeColors; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.RegisterColorHandlersEvent; +import net.minecraftforge.client.event.RegisterParticleProvidersEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; @@ -24,6 +26,11 @@ public static void registerBlockColors(RegisterColorHandlersEvent.Block event) { }, Registration.tea_trunk); } + @SubscribeEvent + static void registerParticleFactories(RegisterParticleProvidersEvent event) { + event.registerSpriteSet(Registration.milk_splash, SplashParticle.Provider::new); + } + @SubscribeEvent public static void registerMisc(FMLClientSetupEvent event) { // set render types diff --git a/src/main/java/knightminer/simplytea/core/Config.java b/src/main/java/knightminer/simplytea/core/Config.java index 633fa02..c47d37c 100644 --- a/src/main/java/knightminer/simplytea/core/Config.java +++ b/src/main/java/knightminer/simplytea/core/Config.java @@ -28,8 +28,8 @@ public Server(Builder builder) { chai_tea = new TeaDrink("chai", builder, TeaEffect.INVIGORATED, 5, 0.6, 150, 1); chorus_tea = new TeaDrink("chorus", builder, TeaEffect.ENDERFALLING, 3, 0.9, 150, 1); iced_tea = new TeaDrink("iced", builder, TeaEffect.ABSORPTION, 3, 0.9, 90, 1); - cocoa = new CocoaDrink(builder, ClearType.NEGATIVE, 4, 0.6); - frothed_milk = new CocoaDrink(builder, ClearType.ALL, 1, 0.2); + cocoa = new CocoaDrink("cocoa", builder, ClearType.NEGATIVE, 4, 0.6); + frothed_milk = new CocoaDrink("frothed_milk", builder, ClearType.ALL, 1, 0.2); builder.pop(); // other categories diff --git a/src/main/java/knightminer/simplytea/core/Registration.java b/src/main/java/knightminer/simplytea/core/Registration.java index ec4c052..7100fa6 100644 --- a/src/main/java/knightminer/simplytea/core/Registration.java +++ b/src/main/java/knightminer/simplytea/core/Registration.java @@ -26,6 +26,7 @@ import knightminer.simplytea.worldgen.TreeGenEnabledPlacement; import net.minecraft.core.HolderLookup; import net.minecraft.core.cauldron.CauldronInteraction; +import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.core.registries.Registries; import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; @@ -133,6 +134,9 @@ public class Registration { public static Item cup_cocoa; public static Item cup_frothed; + /* Particles */ + public static SimpleParticleType milk_splash; + /* World Gen */ public static PlacementModifierType tree_gen_enabled; public static Feature tea_tree; @@ -202,8 +206,8 @@ static void registerObjects(final RegisterEvent event) { // filled teapots props.craftRemainder(teapot).stacksTo(1); - teapot_water = register(r, new TooltipItem(props), "teapot_water"); - teapot_milk = register(r, new TooltipItem(props), "teapot_milk"); + teapot_water = register(r, new TeapotItem(props), "teapot_water"); + teapot_milk = register(r, new TeapotItem(props), "teapot_milk"); props.setNoRepair().durability(4); teapot_hot = register(r, new HotTeapotItem(props), "teapot_hot"); teapot_frothed = register(r, new HotTeapotItem(props), "teapot_frothed"); @@ -217,8 +221,12 @@ static void registerObjects(final RegisterEvent event) { cup_tea_iced = register(r, new TeaCupItem(props.food(Config.SERVER.iced_tea)), "cup_tea_iced"); cup_tea_chorus = register(r, new TeaCupItem(props.food(Config.SERVER.chorus_tea)), "cup_tea_chorus"); cup_water_hot = register(r, new Item(props.food(new FoodProperties.Builder().alwaysEat().build())), "cup_water_hot"); - cup_cocoa = register(r, new CocoaItem(props.food(Config.SERVER.cocoa), Config.SERVER.cocoa), "cup_cocoa"); - cup_frothed = register(r, new CocoaItem(props.food(Config.SERVER.frothed_milk), Config.SERVER.cocoa), "cup_frothed"); + cup_cocoa = register(r, new CocoaItem(props.food(Config.SERVER.cocoa)), "cup_cocoa"); + cup_frothed = register(r, new CocoaItem(props.food(Config.SERVER.frothed_milk)), "cup_frothed"); + }); + + event.register(Registries.PARTICLE_TYPE, r -> { + milk_splash = register(r, new SimpleParticleType(false), "milk_splash"); }); event.register(Registries.CREATIVE_MODE_TAB, r -> { diff --git a/src/main/java/knightminer/simplytea/core/config/CocoaDrink.java b/src/main/java/knightminer/simplytea/core/config/CocoaDrink.java index cd94c45..875b8f7 100644 --- a/src/main/java/knightminer/simplytea/core/config/CocoaDrink.java +++ b/src/main/java/knightminer/simplytea/core/config/CocoaDrink.java @@ -11,9 +11,9 @@ public class CocoaDrink extends Drink { * @param hunger Default hunger value * @param saturation Default saturation value */ - public CocoaDrink(ForgeConfigSpec.Builder builder, ClearType defaultClearEffects, int hunger, double saturation) { - super("cocoa", builder, hunger, saturation); - this.clear_effects = builder.comment("If ALL, drinking cocoa clears status effects like milk", "If NEGATIVE, clears only negative effects (default)", "If NONE, does not clear effects", "For all values, regular cocoa clears just the first effect, while cocoa with cinnamon clears all") + public CocoaDrink(String name, ForgeConfigSpec.Builder builder, ClearType defaultClearEffects, int hunger, double saturation) { + super(name, builder, hunger, saturation); + this.clear_effects = builder.comment("If ALL, drinking clears status effects like milk", "If NEGATIVE, clears only negative effects (default)", "If NONE, does not clear effects", "For all values, regular cocoa or frothed milk clears just the first effect, while cocoa with cinnamon clears all") .translation("simplytea.config.tea.clear_effects") .defineEnum("clear_effects", defaultClearEffects); builder.pop(); diff --git a/src/main/java/knightminer/simplytea/item/CocoaItem.java b/src/main/java/knightminer/simplytea/item/CocoaItem.java index ff9e04e..d33b2c2 100644 --- a/src/main/java/knightminer/simplytea/item/CocoaItem.java +++ b/src/main/java/knightminer/simplytea/item/CocoaItem.java @@ -5,6 +5,7 @@ import net.minecraft.network.chat.TextColor; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.food.FoodProperties; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.TooltipFlag; @@ -23,11 +24,8 @@ public class CocoaItem extends TeaCupItem { private static final ItemStack MILK_BUCKET = new ItemStack(Items.MILK_BUCKET); - private final CocoaDrink drink; - - public CocoaItem(Properties props, CocoaDrink drink) { + public CocoaItem(Properties props) { super(props); - this.drink = drink; } @Override @@ -35,12 +33,14 @@ public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity li if (this.isEdible()) { ItemStack result = getCraftingRemainingItem(stack); living.eat(worldIn, stack); - if (!worldIn.isClientSide && drink.clearsEffects()) { + FoodProperties food = getFoodProperties(stack, living); + if (!worldIn.isClientSide && food instanceof CocoaDrink drink && drink.clearsEffects()) { // logic basically copied from living entity, so we can choose which effects to remove Iterator itr = living.getActiveEffectsMap().values().iterator(); boolean hasCinnamon = hasHoney(stack, CINNAMON_TAG); while (itr.hasNext()) { MobEffectInstance effect = itr.next(); + if ((drink.clearsPositive() || !effect.getEffect().isBeneficial()) && effect.isCurativeItem(MILK_BUCKET) && !MinecraftForge.EVENT_BUS.post(new MobEffectEvent.Remove(living, effect))) { living.onEffectRemoved(effect); diff --git a/src/main/java/knightminer/simplytea/item/TeapotItem.java b/src/main/java/knightminer/simplytea/item/TeapotItem.java index fecfb36..8ed52b3 100644 --- a/src/main/java/knightminer/simplytea/item/TeapotItem.java +++ b/src/main/java/knightminer/simplytea/item/TeapotItem.java @@ -4,12 +4,16 @@ import knightminer.simplytea.core.Registration; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.core.particles.SimpleParticleType; +import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvents; import net.minecraft.tags.FluidTags; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.Pose; import net.minecraft.world.entity.animal.Cow; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; @@ -37,6 +41,19 @@ public InteractionResultHolder use(Level world, Player player, Intera BlockPos pos = rayTrace.getBlockPos(); BlockState state = world.getBlockState(pos); + if (player.getPose() == Pose.CROUCHING && !stack.is(Registration.teapot) && rayTrace.getDirection() != Direction.DOWN) { + player.playSound(SoundEvents.BUCKET_EMPTY, 1.0f, 1.0f); + if (!world.isClientSide) { + for (int i = 0; i < 5; i++) { + SimpleParticleType particle = stack.is(Registration.teapot_milk) ? Registration.milk_splash : ParticleTypes.SPLASH; + ((ServerLevel)world).sendParticles(particle, (double)pos.getX() + world.random.nextDouble(), (double)pos.getY() + 1, (double)pos.getZ() + world.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); + } + } + // emptying a teapot will not create new empty teapots in creative mode if player already has an empty teapot + ItemStack emptyTeapot = ItemUtils.createFilledResult(stack, player, new ItemStack(Registration.teapot)); + return InteractionResultHolder.sidedSuccess(emptyTeapot, world.isClientSide); + } + // we use name for lookup to prevent default fluid conflicts Fluid fluid = state.getFluidState().getType(); if(fluid != Fluids.EMPTY) { diff --git a/src/main/resources/assets/simplytea/particles/milk_splash.json b/src/main/resources/assets/simplytea/particles/milk_splash.json new file mode 100644 index 0000000..1282f49 --- /dev/null +++ b/src/main/resources/assets/simplytea/particles/milk_splash.json @@ -0,0 +1,8 @@ +{ + "textures": [ + "simplytea:milk_splash_0", + "simplytea:milk_splash_1", + "simplytea:milk_splash_2", + "simplytea:milk_splash_3" + ] + } \ No newline at end of file diff --git a/src/main/resources/assets/simplytea/textures/particle/milk_splash_0.png b/src/main/resources/assets/simplytea/textures/particle/milk_splash_0.png new file mode 100644 index 0000000000000000000000000000000000000000..77d906204f7e587f949434a2131141b3d45ec8a6 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GGLLkg|>2BR0prE0r zi(`m{WO9N8UxVPY&gkv$|L(7RthIPg)2VvfSl=BM!aj^1K~Z5J{~u;Ae=teGl0jOJ VuTjp}?mbX5gQu&X%Q~loCIF&qB&YxY literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/simplytea/textures/particle/milk_splash_1.png b/src/main/resources/assets/simplytea/textures/particle/milk_splash_1.png new file mode 100644 index 0000000000000000000000000000000000000000..391712018d5697a5b3005c9c5a5ae7c1e17d95e9 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GGLLkg|>2BR0prE#= zi(`m{WO9N8UxVPY&gkv$|L(7RtTp5P>(|`EX$egm6DED)()yp6q#(txzmx0jF7ZiI Qf!Y{6UHx3vIVCg!0PxEsWB>pF literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/simplytea/textures/particle/milk_splash_2.png b/src/main/resources/assets/simplytea/textures/particle/milk_splash_2.png new file mode 100644 index 0000000000000000000000000000000000000000..9689ebe50d4c0801be8183041fe0fe1a2ed60111 GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GGLLkg|>2BR0prEj) qi(`m{WO9PUv2BR0prEX$ zi(`m{WO9N;*n?|ttN(AT?BG=U@$|L1gm5bx1E(KbNy$#ZEkK0~p00i_>zopr0NG6( A5&!@I literal 0 HcmV?d00001 From cffd959ddbf77524f8fa33b2ab996294e2c6399d Mon Sep 17 00:00:00 2001 From: Jeff Shipley Date: Fri, 18 Oct 2024 14:14:47 -0600 Subject: [PATCH 5/6] Add new simple class for cold teapots that supports dumping contents. --- .../simplytea/core/Registration.java | 5 ++- .../simplytea/item/ColdTeapotItem.java | 45 +++++++++++++++++++ .../simplytea/item/TeapotItem.java | 13 ------ 3 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 src/main/java/knightminer/simplytea/item/ColdTeapotItem.java diff --git a/src/main/java/knightminer/simplytea/core/Registration.java b/src/main/java/knightminer/simplytea/core/Registration.java index 7100fa6..5ed9c71 100644 --- a/src/main/java/knightminer/simplytea/core/Registration.java +++ b/src/main/java/knightminer/simplytea/core/Registration.java @@ -10,6 +10,7 @@ import knightminer.simplytea.data.gen.ShapelessHoneyRecipe; import knightminer.simplytea.data.gen.WorldgenGenerator; import knightminer.simplytea.item.CocoaItem; +import knightminer.simplytea.item.ColdTeapotItem; import knightminer.simplytea.item.HotTeapotItem; import knightminer.simplytea.item.TeaCupItem; import knightminer.simplytea.item.TeaStickItem; @@ -206,8 +207,8 @@ static void registerObjects(final RegisterEvent event) { // filled teapots props.craftRemainder(teapot).stacksTo(1); - teapot_water = register(r, new TeapotItem(props), "teapot_water"); - teapot_milk = register(r, new TeapotItem(props), "teapot_milk"); + teapot_water = register(r, new ColdTeapotItem(props), "teapot_water"); + teapot_milk = register(r, new ColdTeapotItem(props), "teapot_milk"); props.setNoRepair().durability(4); teapot_hot = register(r, new HotTeapotItem(props), "teapot_hot"); teapot_frothed = register(r, new HotTeapotItem(props), "teapot_frothed"); diff --git a/src/main/java/knightminer/simplytea/item/ColdTeapotItem.java b/src/main/java/knightminer/simplytea/item/ColdTeapotItem.java new file mode 100644 index 0000000..46622f9 --- /dev/null +++ b/src/main/java/knightminer/simplytea/item/ColdTeapotItem.java @@ -0,0 +1,45 @@ +package knightminer.simplytea.item; + +import knightminer.simplytea.core.Registration; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.core.particles.SimpleParticleType; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; + +public class ColdTeapotItem extends TooltipItem { + + public ColdTeapotItem(Properties props) { + super(props); + } + + @Override + public InteractionResult useOn(UseOnContext context) { + Level world = context.getLevel(); + Player player = context.getPlayer(); + ItemStack stack = context.getItemInHand(); + BlockPos pos = context.getClickedPos(); + if (player.isShiftKeyDown() && context.getClickedFace() != Direction.DOWN) { + player.playSound(SoundEvents.BUCKET_EMPTY, 1.0f, 1.0f); + if (!world.isClientSide) { + for (int i = 0; i < 5; i++) { + SimpleParticleType particle = stack.is(Registration.teapot_milk) ? Registration.milk_splash : ParticleTypes.SPLASH; + ((ServerLevel)world).sendParticles(particle, (double)pos.getX() + world.random.nextDouble(), (double)pos.getY() + 1, (double)pos.getZ() + world.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); + } + // emptying a teapot will not create new empty teapots in creative mode if player already has an empty teapot + ItemStack emptyTeapot = ItemUtils.createFilledResult(stack, player, new ItemStack(Registration.teapot)); + player.setItemInHand(context.getHand(), emptyTeapot); + + return InteractionResult.SUCCESS; + } + } + return InteractionResult.PASS; + } +} diff --git a/src/main/java/knightminer/simplytea/item/TeapotItem.java b/src/main/java/knightminer/simplytea/item/TeapotItem.java index 8ed52b3..8b334cb 100644 --- a/src/main/java/knightminer/simplytea/item/TeapotItem.java +++ b/src/main/java/knightminer/simplytea/item/TeapotItem.java @@ -41,19 +41,6 @@ public InteractionResultHolder use(Level world, Player player, Intera BlockPos pos = rayTrace.getBlockPos(); BlockState state = world.getBlockState(pos); - if (player.getPose() == Pose.CROUCHING && !stack.is(Registration.teapot) && rayTrace.getDirection() != Direction.DOWN) { - player.playSound(SoundEvents.BUCKET_EMPTY, 1.0f, 1.0f); - if (!world.isClientSide) { - for (int i = 0; i < 5; i++) { - SimpleParticleType particle = stack.is(Registration.teapot_milk) ? Registration.milk_splash : ParticleTypes.SPLASH; - ((ServerLevel)world).sendParticles(particle, (double)pos.getX() + world.random.nextDouble(), (double)pos.getY() + 1, (double)pos.getZ() + world.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); - } - } - // emptying a teapot will not create new empty teapots in creative mode if player already has an empty teapot - ItemStack emptyTeapot = ItemUtils.createFilledResult(stack, player, new ItemStack(Registration.teapot)); - return InteractionResultHolder.sidedSuccess(emptyTeapot, world.isClientSide); - } - // we use name for lookup to prevent default fluid conflicts Fluid fluid = state.getFluidState().getType(); if(fluid != Fluids.EMPTY) { From 522616d6959b8e8379ec1548a7fee46b31200949 Mon Sep 17 00:00:00 2001 From: Jeff Shipley Date: Thu, 31 Oct 2024 19:51:24 -0600 Subject: [PATCH 6/6] add frothed milk with cinnamon recipe --- .../food/cup_frothed_with_cinnamon.json | 35 +++++++++++++++++++ .../recipes/cup_frothed_with_cinnamon.json | 9 +++++ .../simplytea/data/gen/RecipeGenerator.java | 3 +- .../simplytea/item/TeapotItem.java | 2 -- 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 src/generated/resources/data/simplytea/advancements/recipes/food/cup_frothed_with_cinnamon.json create mode 100644 src/generated/resources/data/simplytea/recipes/cup_frothed_with_cinnamon.json diff --git a/src/generated/resources/data/simplytea/advancements/recipes/food/cup_frothed_with_cinnamon.json b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_frothed_with_cinnamon.json new file mode 100644 index 0000000..2658b07 --- /dev/null +++ b/src/generated/resources/data/simplytea/advancements/recipes/food/cup_frothed_with_cinnamon.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": [ + "simplytea:tea_stick" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "simplytea:cup_frothed_with_cinnamon" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "simplytea:cup_frothed_with_cinnamon" + ] + }, + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/simplytea/recipes/cup_frothed_with_cinnamon.json b/src/generated/resources/data/simplytea/recipes/cup_frothed_with_cinnamon.json new file mode 100644 index 0000000..73e3558 --- /dev/null +++ b/src/generated/resources/data/simplytea/recipes/cup_frothed_with_cinnamon.json @@ -0,0 +1,9 @@ +{ + "type": "simplytea:shapeless_honey", + "group": "simplytea:with_cinnamon", + "honey": { + "item": "simplytea:tea_stick" + }, + "tag": "with_cinnamon", + "tea": "simplytea:cup_frothed" +} \ No newline at end of file diff --git a/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java b/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java index bc982ed..6dc003e 100644 --- a/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java +++ b/src/main/java/knightminer/simplytea/data/gen/RecipeGenerator.java @@ -111,9 +111,10 @@ protected void buildRecipes(Consumer consumer) { addTeaWithBag(consumer, black_tea, teabag_black, cup_tea_black); addTeaWithBag(consumer, chorus_petal, teabag_chorus, cup_tea_chorus); addTea(consumer, cup_water_hot, "teapot", teapot_hot); - addTea(consumer, cup_frothed, "teapot", teapot_frothed); // advanced tea + addTea(consumer, cup_frothed, "teapot", teapot_frothed); + addHoney(consumer, RecipeCategory.FOOD, cup_frothed, tea_stick, CocoaItem.CINNAMON_TAG); addTea(consumer, cup_cocoa, "teapot", Items.COCOA_BEANS, Items.COCOA_BEANS, teapot_frothed); addTea(consumer, cup_cocoa, "cup", Items.COCOA_BEANS, Items.COCOA_BEANS, cup_frothed); addHoney(consumer, RecipeCategory.FOOD, cup_cocoa, tea_stick, CocoaItem.CINNAMON_TAG); diff --git a/src/main/java/knightminer/simplytea/item/TeapotItem.java b/src/main/java/knightminer/simplytea/item/TeapotItem.java index ac7532f..a4f3482 100644 --- a/src/main/java/knightminer/simplytea/item/TeapotItem.java +++ b/src/main/java/knightminer/simplytea/item/TeapotItem.java @@ -14,7 +14,6 @@ import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.Pose; import net.minecraft.world.entity.animal.Cow; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -28,7 +27,6 @@ import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.fluids.FluidActionResult; import net.minecraftforge.fluids.FluidUtil; -import net.minecraftforge.fluids.capability.IFluidHandler; import java.util.Optional;