From f21a6865a813b2e4a6621961979096a4f8399d64 Mon Sep 17 00:00:00 2001 From: Drefvelin <54400154+Drefvelin@users.noreply.github.com> Date: Thu, 24 Sep 2026 14:41:20 +0000 Subject: [PATCH] feat: let dough rise through three stages before it keeps its stars Unrisen dough sits three stars below its ingredients, rising dough one star below, and risen dough keeps the inherited stars. Mouldy dough uses a single model. Co-authored-by: Cursor --- .../tfmc_cooking/contents/categories.yml | 2 + .../tfmc_cooking/contents/intermediates.yml | 2 +- ItemsAdder/tfmc_cooking/contents/items.yml | 22 +- .../tfmc_cooking/models/item/bulk/dough.json | 96 -- .../models/item/bulk/dough_mouldy.json | 427 ++++++ .../models/item/bulk/dough_risen.json | 1360 +++++++++++++++++ .../models/item/bulk/dough_rising.json | 738 +++++++++ .../models/item/bulk/dough_rotten.json | 96 -- .../models/item/bulk/dough_unrisen.json | 349 +++++ .../tfmc_cooking/textures/item/bulk/dough.png | Bin 132 -> 0 bytes .../textures/item/bulk/dough_mouldy_main.png | Bin 0 -> 496 bytes .../textures/item/bulk/dough_mouldy_side.png | Bin 0 -> 238 bytes .../item/bulk/dough_mouldy_side_2.png | Bin 0 -> 216 bytes .../item/bulk/dough_mouldy_side_3.png | Bin 0 -> 334 bytes .../textures/item/bulk/dough_risen_main.png | Bin 0 -> 378 bytes .../textures/item/bulk/dough_risen_side_2.png | Bin 0 -> 204 bytes .../textures/item/bulk/dough_risen_side_3.png | Bin 0 -> 191 bytes .../textures/item/bulk/dough_rising_main.png | Bin 0 -> 378 bytes .../item/bulk/dough_rising_side_1.png | Bin 0 -> 206 bytes .../item/bulk/dough_rising_side_2.png | Bin 0 -> 204 bytes .../textures/item/bulk/dough_rotten.png | Bin 150 -> 0 bytes .../textures/item/bulk/dough_unrisen_main.png | Bin 0 -> 378 bytes .../item/bulk/dough_unrisen_side_1.png | Bin 0 -> 206 bytes .../item/bulk/dough_unrisen_side_2.png | Bin 0 -> 204 bytes .../cooking/baking/BakingTrayHandler.java | 2 +- .../cooking/baking/BakingTrayTransform.java | 6 +- .../tfminecraft/cooking/item/FoodItem.java | 9 +- .../cooking/item/tag/TagQuality.java | 23 + .../tfminecraft/cooking/item/tag/TagStep.java | 13 +- .../quality/CompositionQualityResolver.java | 7 +- .../cooking/utils/DisplayUtils.java | 10 + .../cooking/utils/DoughRising.java | 25 + .../cooking/utils/ItemBuilder.java | 6 +- src/main/resources/conversions.yml | 2 +- src/main/resources/models.yml | 34 +- src/main/resources/tags.yml | 19 +- src/main/resources/types.yml | 1 + .../cooking/item/RisingDoughTest.java | 104 ++ 38 files changed, 3138 insertions(+), 215 deletions(-) delete mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_mouldy.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_risen.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_rising.json delete mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_rotten.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_unrisen.json delete mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_mouldy_main.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_mouldy_side.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_mouldy_side_2.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_mouldy_side_3.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_risen_main.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_risen_side_2.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_risen_side_3.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_main.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_side_1.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_side_2.png delete mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rotten.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_main.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_side_1.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_side_2.png create mode 100644 src/main/java/net/tfminecraft/cooking/item/tag/TagQuality.java create mode 100644 src/main/java/net/tfminecraft/cooking/utils/DoughRising.java create mode 100644 src/test/java/net/tfminecraft/cooking/item/RisingDoughTest.java diff --git a/ItemsAdder/tfmc_cooking/contents/categories.yml b/ItemsAdder/tfmc_cooking/contents/categories.yml index cfc3498..687220e 100644 --- a/ItemsAdder/tfmc_cooking/contents/categories.yml +++ b/ItemsAdder/tfmc_cooking/contents/categories.yml @@ -287,6 +287,8 @@ categories: - tfmc_cooking:dough - tfmc_cooking:dough_rotten - tfmc_cooking:dough_model + - tfmc_cooking:dough_rising_model + - tfmc_cooking:dough_risen_model - tfmc_cooking:dough_rotten_model - tfmc_cooking:empty_cup - tfmc_cooking:cup_of_water diff --git a/ItemsAdder/tfmc_cooking/contents/intermediates.yml b/ItemsAdder/tfmc_cooking/contents/intermediates.yml index f345c6e..4b74aae 100644 --- a/ItemsAdder/tfmc_cooking/contents/intermediates.yml +++ b/ItemsAdder/tfmc_cooking/contents/intermediates.yml @@ -65,7 +65,7 @@ items: model_path: item/intermediate/dough dough_rotten: - display_name: "Dough Rotten" + display_name: "Mouldy Dough" resource: material: PAPER generate: false diff --git a/ItemsAdder/tfmc_cooking/contents/items.yml b/ItemsAdder/tfmc_cooking/contents/items.yml index e856b38..24f0b64 100644 --- a/ItemsAdder/tfmc_cooking/contents/items.yml +++ b/ItemsAdder/tfmc_cooking/contents/items.yml @@ -1343,18 +1343,32 @@ items: model_path: item/bulk/yeast_rotten dough_model: - display_name: "Dough (Bowl)" + display_name: "Unrisen Dough" resource: material: PAPER generate: false - model_path: item/bulk/dough + model_path: item/bulk/dough_unrisen + + dough_rising_model: + display_name: "Rising Dough" + resource: + material: PAPER + generate: false + model_path: item/bulk/dough_rising + + dough_risen_model: + display_name: "Risen Dough" + resource: + material: PAPER + generate: false + model_path: item/bulk/dough_risen dough_rotten_model: - display_name: "Dough Rotten (Bowl)" + display_name: "Mouldy Dough" resource: material: PAPER generate: false - model_path: item/bulk/dough_rotten + model_path: item/bulk/dough_mouldy wood_model: display_name: "Wood (Oven)" diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough.json deleted file mode 100644 index 54a3cea..0000000 --- a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "format_version": "1.21.11", - "credit": "Made with Blockbench", - "textures": { - "0": "tfmc_cooking:item/bulk/dough", - "particle": "tfmc_cooking:item/bulk/dough" - }, - "elements": [ - { - "from": [3, 0, 3], - "to": [9, 6, 9], - "rotation": {"angle": 0, "axis": "y", "origin": [3, 0, 3]}, - "faces": { - "north": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "south": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "down": {"uv": [0, 0, 6, 6], "texture": "#0"} - } - }, - { - "from": [6, 0, 9], - "to": [10, 4, 13], - "rotation": {"angle": 0, "axis": "y", "origin": [6, 0, 9]}, - "faces": { - "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "west": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "down": {"uv": [0, 0, 4, 4], "texture": "#0"} - } - }, - { - "from": [9, 0, 4], - "to": [12, 3, 7], - "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 4]}, - "faces": { - "north": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "east": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "south": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "west": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "up": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "down": {"uv": [0, 3, 3, 6], "texture": "#0"} - } - }, - { - "from": [11, 0, 9], - "to": [13, 2, 11], - "rotation": {"angle": 0, "axis": "y", "origin": [11, 0, 8]}, - "faces": { - "north": {"uv": [4, 4, 6, 6], "texture": "#0"}, - "east": {"uv": [3, 4, 5, 6], "texture": "#0"}, - "south": {"uv": [0, 4, 2, 6], "texture": "#0"}, - "west": {"uv": [1, 4, 3, 6], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "down": {"uv": [0, 2, 2, 4], "texture": "#0"} - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [50, 0, 0], - "translation": [0, 3.25, 1.75], - "scale": [0.5, 0.5, 0.5] - }, - "thirdperson_lefthand": { - "rotation": [50, 0, 0], - "translation": [0, 3.25, 1.75], - "scale": [0.5, 0.5, 0.5] - }, - "firstperson_righthand": { - "translation": [0, 5.75, 0], - "scale": [0.6, 0.6, 0.6] - }, - "firstperson_lefthand": { - "translation": [0, 5.75, 0], - "scale": [0.6, 0.6, 0.6] - }, - "ground": { - "translation": [0, 3.75, 0], - "scale": [0.5, 0.5, 0.5] - }, - "gui": { - "rotation": [29, -143, 0], - "translation": [0, 1.75, 0], - "scale": [0.5, 0.5, 0.5] - }, - "fixed": { - "rotation": [-90, 0, 0], - "translation": [0, 0, -14], - "scale": [1.8, 1.8, 1.8] - } - } -} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_mouldy.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_mouldy.json new file mode 100644 index 0000000..b43f17b --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_mouldy.json @@ -0,0 +1,427 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmc_cooking:item/bulk/dough_mouldy_main", + "1": "tfmc_cooking:item/bulk/dough_mouldy_side", + "2": "tfmc_cooking:item/bulk/dough_mouldy_side_2", + "3": "tfmc_cooking:item/bulk/dough_mouldy_side_3", + "particle": "tfmc_cooking:item/bulk/dough_mouldy_main" + }, + "elements": [ + { + "from": [ + 5, + 0, + 5 + ], + "to": [ + 11, + 1, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 6, + 0, + 12, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 6, + 2, + 12, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 4, + 12, + 6 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 6, + 12, + 8 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 6, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 6, + 6, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6.75, + 0, + 3 + ], + "to": [ + 10, + 1, + 5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8.375, + 0.5, + 4 + ] + }, + "faces": { + "north": { + "uv": [ + 3, + 0, + 6, + 1 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 3, + 2, + 5, + 3 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 3, + 1, + 6, + 2 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 3, + 3, + 5, + 4 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 2, + 3, + 4 + ], + "texture": "#1" + } + } + }, + { + "from": [ + 6, + 0, + 11 + ], + "to": [ + 10, + 1, + 12 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 1, + 6 + ], + "to": [ + 10, + 2, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 6, + 1, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 4, + 0, + 8, + 1 + ], + "texture": "#3" + }, + "east": { + "uv": [ + 4, + 1, + 8, + 2 + ], + "texture": "#3" + }, + "south": { + "uv": [ + 4, + 2, + 8, + 3 + ], + "texture": "#3" + }, + "west": { + "uv": [ + 4, + 3, + 8, + 4 + ], + "texture": "#3" + }, + "up": { + "uv": [ + 0, + 0, + 4, + 4 + ], + "texture": "#3" + }, + "down": { + "uv": [ + 0, + 4, + 4, + 8 + ], + "texture": "#3" + } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ + 50, + 0, + 0 + ], + "translation": [ + 0, + 3.25, + 1.75 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "thirdperson_lefthand": { + "rotation": [ + 50, + 0, + 0 + ], + "translation": [ + 0, + 3.25, + 1.75 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "firstperson_righthand": { + "translation": [ + 0, + 5.75, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "firstperson_lefthand": { + "translation": [ + 0, + 5.75, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "ground": { + "translation": [ + 0, + 3.75, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "gui": { + "rotation": [ + 29, + -143, + 0 + ], + "translation": [ + 0, + 1.75, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "fixed": { + "rotation": [ + -90, + 0, + 0 + ], + "translation": [ + 0, + 0, + -14 + ], + "scale": [ + 1.8, + 1.8, + 1.8 + ] + } + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_risen.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_risen.json new file mode 100644 index 0000000..5c35010 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_risen.json @@ -0,0 +1,1360 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmc_cooking:item/bulk/dough_risen_main", + "1": "tfmc_cooking:item/bulk/dough_risen_side_3", + "2": "tfmc_cooking:item/bulk/dough_risen_side_2", + "particle": "tfmc_cooking:item/bulk/dough_risen_main" + }, + "elements": [ + { + "from": [ + 5, + 0, + 5 + ], + "to": [ + 11, + 2, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 6, + 0, + 12, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 6, + 2, + 12, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 4, + 12, + 6 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 6, + 12, + 8 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 6, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 6, + 6, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6.75, + 0, + 3 + ], + "to": [ + 10, + 1, + 5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8.375, + 0.5, + 4 + ] + }, + "faces": { + "north": { + "uv": [ + 3, + 0, + 6, + 1 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 3, + 2, + 5, + 3 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 3, + 1, + 6, + 2 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 3, + 3, + 5, + 4 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 2, + 3, + 4 + ], + "texture": "#1" + } + } + }, + { + "from": [ + 6, + 0, + 11 + ], + "to": [ + 10, + 1, + 12 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 5, + 2, + 5 + ], + "to": [ + 11, + 4, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 2, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 6, + 0, + 12, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 6, + 2, + 12, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 4, + 12, + 6 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 6, + 12, + 8 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 6, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 6, + 6, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 4, + 5 + ], + "to": [ + 11, + 6, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 4, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 6, + 0, + 12, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 6, + 2, + 12, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 4, + 12, + 6 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 6, + 12, + 8 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 6, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 6, + 6, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6.75, + 1, + 3 + ], + "to": [ + 10, + 2, + 5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8.375, + 1.5, + 4 + ] + }, + "faces": { + "north": { + "uv": [ + 3, + 0, + 6, + 1 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 3, + 2, + 5, + 3 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 3, + 1, + 6, + 2 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 3, + 3, + 5, + 4 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 2, + 3, + 4 + ], + "texture": "#1" + } + } + }, + { + "from": [ + 6.75, + 1, + 3 + ], + "to": [ + 10, + 2, + 5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8.375, + 1.5, + 4 + ] + }, + "faces": { + "north": { + "uv": [ + 3, + 0, + 6, + 1 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 3, + 2, + 5, + 3 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 3, + 1, + 6, + 2 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 3, + 3, + 5, + 4 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 2, + 3, + 4 + ], + "texture": "#1" + } + } + }, + { + "from": [ + 6, + 1, + 11 + ], + "to": [ + 10, + 2, + 12 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 1, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 2, + 11 + ], + "to": [ + 10, + 3, + 12 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 2, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 0, + 12 + ], + "to": [ + 10, + 1, + 13 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 12 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 1, + 12 + ], + "to": [ + 10, + 2, + 13 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 1, + 12 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 4, + 0, + 6 + ], + "to": [ + 5, + 1, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 4.5, + 0.5, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "rotation": 90, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "rotation": 270, + "texture": "#2" + } + } + }, + { + "from": [ + 4, + 1, + 6 + ], + "to": [ + 5, + 2, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 4.5, + 1.5, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "rotation": 90, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "rotation": 270, + "texture": "#2" + } + } + }, + { + "from": [ + 4, + 0, + 6 + ], + "to": [ + 5, + 1, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 4.5, + 0.5, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "rotation": 90, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "rotation": 270, + "texture": "#2" + } + } + }, + { + "from": [ + 11, + 0, + 6 + ], + "to": [ + 12, + 1, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 11.5, + 0.5, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "rotation": 270, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "rotation": 90, + "texture": "#2" + } + } + }, + { + "from": [ + 11, + 1, + 6 + ], + "to": [ + 12, + 2, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 11.5, + 1.5, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "rotation": 270, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "rotation": 90, + "texture": "#2" + } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ + 50, + 0, + 0 + ], + "translation": [ + 0, + 3.25, + 1.75 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "thirdperson_lefthand": { + "rotation": [ + 50, + 0, + 0 + ], + "translation": [ + 0, + 3.25, + 1.75 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "firstperson_righthand": { + "translation": [ + 0, + 5.75, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "firstperson_lefthand": { + "translation": [ + 0, + 5.75, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "ground": { + "translation": [ + 0, + 3.75, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "gui": { + "rotation": [ + 29, + -143, + 0 + ], + "translation": [ + 0, + 1.75, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "fixed": { + "rotation": [ + -90, + 0, + 0 + ], + "translation": [ + 0, + 0, + -14 + ], + "scale": [ + 1.8, + 1.8, + 1.8 + ] + } + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_rising.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_rising.json new file mode 100644 index 0000000..bb93fec --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_rising.json @@ -0,0 +1,738 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmc_cooking:item/bulk/dough_rising_main", + "1": "tfmc_cooking:item/bulk/dough_rising_side_1", + "2": "tfmc_cooking:item/bulk/dough_rising_side_2", + "particle": "tfmc_cooking:item/bulk/dough_rising_main" + }, + "elements": [ + { + "from": [ + 5, + 0, + 5 + ], + "to": [ + 11, + 2, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 6, + 0, + 12, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 6, + 2, + 12, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 4, + 12, + 6 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 6, + 12, + 8 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 6, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 6, + 6, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 2, + 5 + ], + "to": [ + 11, + 4, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 2, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 6, + 0, + 12, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 6, + 2, + 12, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 4, + 12, + 6 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 6, + 12, + 8 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 6, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 6, + 6, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6.75, + 0, + 3 + ], + "to": [ + 10, + 1, + 5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8.375, + 0.5, + 4 + ] + }, + "faces": { + "north": { + "uv": [ + 3, + 0, + 6, + 1 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 3, + 2, + 5, + 3 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 3, + 1, + 6, + 2 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 3, + 3, + 5, + 4 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 2, + 3, + 4 + ], + "texture": "#1" + } + } + }, + { + "from": [ + 4, + 0, + 6 + ], + "to": [ + 5, + 1, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 4.5, + 0.5, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "rotation": 90, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "rotation": 270, + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 0, + 11 + ], + "to": [ + 10, + 1, + 12 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 1, + 11 + ], + "to": [ + 10, + 2, + 12 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 1, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 0, + 12 + ], + "to": [ + 10, + 1, + 13 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 12 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + }, + { + "from": [ + 11, + 0, + 6 + ], + "to": [ + 12, + 1, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 11.5, + 0.5, + 8 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "rotation": 270, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "rotation": 90, + "texture": "#2" + } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ + 50, + 0, + 0 + ], + "translation": [ + 0, + 3.25, + 1.75 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "thirdperson_lefthand": { + "rotation": [ + 50, + 0, + 0 + ], + "translation": [ + 0, + 3.25, + 1.75 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "firstperson_righthand": { + "translation": [ + 0, + 5.75, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "firstperson_lefthand": { + "translation": [ + 0, + 5.75, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "ground": { + "translation": [ + 0, + 3.75, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "gui": { + "rotation": [ + 29, + -143, + 0 + ], + "translation": [ + 0, + 1.75, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "fixed": { + "rotation": [ + -90, + 0, + 0 + ], + "translation": [ + 0, + 0, + -14 + ], + "scale": [ + 1.8, + 1.8, + 1.8 + ] + } + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_rotten.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_rotten.json deleted file mode 100644 index 273c234..0000000 --- a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_rotten.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "format_version": "1.21.11", - "credit": "Made with Blockbench", - "textures": { - "0": "tfmc_cooking:item/bulk/dough_rotten", - "particle": "tfmc_cooking:item/bulk/dough_rotten" - }, - "elements": [ - { - "from": [3, 0, 3], - "to": [9, 6, 9], - "rotation": {"angle": 0, "axis": "y", "origin": [3, 0, 3]}, - "faces": { - "north": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "east": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "south": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "west": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "up": {"uv": [0, 0, 6, 6], "texture": "#0"}, - "down": {"uv": [0, 0, 6, 6], "texture": "#0"} - } - }, - { - "from": [6, 0, 9], - "to": [10, 4, 13], - "rotation": {"angle": 0, "axis": "y", "origin": [6, 0, 9]}, - "faces": { - "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "west": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "up": {"uv": [0, 0, 4, 4], "texture": "#0"}, - "down": {"uv": [0, 0, 4, 4], "texture": "#0"} - } - }, - { - "from": [9, 0, 4], - "to": [12, 3, 7], - "rotation": {"angle": 0, "axis": "y", "origin": [9, 0, 4]}, - "faces": { - "north": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "east": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "south": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "west": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "up": {"uv": [3, 3, 6, 6], "texture": "#0"}, - "down": {"uv": [0, 3, 3, 6], "texture": "#0"} - } - }, - { - "from": [11, 0, 9], - "to": [13, 2, 11], - "rotation": {"angle": 0, "axis": "y", "origin": [11, 0, 8]}, - "faces": { - "north": {"uv": [4, 4, 6, 6], "texture": "#0"}, - "east": {"uv": [3, 4, 5, 6], "texture": "#0"}, - "south": {"uv": [0, 4, 2, 6], "texture": "#0"}, - "west": {"uv": [1, 4, 3, 6], "texture": "#0"}, - "up": {"uv": [0, 0, 2, 2], "texture": "#0"}, - "down": {"uv": [0, 2, 2, 4], "texture": "#0"} - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [50, 0, 0], - "translation": [0, 3.25, 1.75], - "scale": [0.5, 0.5, 0.5] - }, - "thirdperson_lefthand": { - "rotation": [50, 0, 0], - "translation": [0, 3.25, 1.75], - "scale": [0.5, 0.5, 0.5] - }, - "firstperson_righthand": { - "translation": [0, 5.75, 0], - "scale": [0.6, 0.6, 0.6] - }, - "firstperson_lefthand": { - "translation": [0, 5.75, 0], - "scale": [0.6, 0.6, 0.6] - }, - "ground": { - "translation": [0, 3.75, 0], - "scale": [0.5, 0.5, 0.5] - }, - "gui": { - "rotation": [29, -143, 0], - "translation": [0, 1.75, 0], - "scale": [0.5, 0.5, 0.5] - }, - "fixed": { - "rotation": [-90, 0, 0], - "translation": [0, 0, -14], - "scale": [1.8, 1.8, 1.8] - } - } -} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_unrisen.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_unrisen.json new file mode 100644 index 0000000..c2dd727 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/dough_unrisen.json @@ -0,0 +1,349 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmc_cooking:item/bulk/dough_unrisen_main", + "1": "tfmc_cooking:item/bulk/dough_unrisen_side_1", + "2": "tfmc_cooking:item/bulk/dough_unrisen_side_2", + "particle": "tfmc_cooking:item/bulk/dough_unrisen_main" + }, + "elements": [ + { + "from": [ + 5, + 0, + 5 + ], + "to": [ + 11, + 2, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 6, + 0, + 12, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 6, + 2, + 12, + 4 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 6, + 4, + 12, + 6 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 6, + 6, + 12, + 8 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 6, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 6, + 6, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6.75, + 0, + 3 + ], + "to": [ + 10, + 1, + 5 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8.375, + 0.5, + 4 + ] + }, + "faces": { + "north": { + "uv": [ + 3, + 0, + 6, + 1 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 3, + 2, + 5, + 3 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 3, + 1, + 6, + 2 + ], + "texture": "#1" + }, + "west": { + "uv": [ + 3, + 3, + 5, + 4 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 2, + 3, + 4 + ], + "texture": "#1" + } + } + }, + { + "from": [ + 6, + 0, + 11 + ], + "to": [ + 10, + 1, + 12 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 7, + 0, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 4, + 1, + 5 + ], + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 1, + 4, + 2 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 5, + 1 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 2, + 4, + 3 + ], + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 3, + 4, + 4 + ], + "texture": "#2" + } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ + 50, + 0, + 0 + ], + "translation": [ + 0, + 3.25, + 1.75 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "thirdperson_lefthand": { + "rotation": [ + 50, + 0, + 0 + ], + "translation": [ + 0, + 3.25, + 1.75 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "firstperson_righthand": { + "translation": [ + 0, + 5.75, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "firstperson_lefthand": { + "translation": [ + 0, + 5.75, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "ground": { + "translation": [ + 0, + 3.75, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "gui": { + "rotation": [ + 29, + -143, + 0 + ], + "translation": [ + 0, + 1.75, + 0 + ], + "scale": [ + 0.5, + 0.5, + 0.5 + ] + }, + "fixed": { + "rotation": [ + -90, + 0, + 0 + ], + "translation": [ + 0, + 0, + -14 + ], + "scale": [ + 1.8, + 1.8, + 1.8 + ] + } + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough.png deleted file mode 100644 index 88d38fab3019d48fe7b9730f70861c14716dbcdc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`-kvUwAr*1S7Ud;J|3ClE|NsBj zr*aa_KNQY5=rm;h`}UIaj=%(oT~>1#VvQr&6tY_qOG+&m&v2iZgTe~DWM4fp%E-~ diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_mouldy_main.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_mouldy_main.png new file mode 100644 index 0000000000000000000000000000000000000000..dc3bdcce09071acee49dba4e070b6ddeafff1c24 GIT binary patch literal 496 zcmVQ;A3)}JV{W3z-xqtTwwr%Tr8l;Pz z>c+AK#D~T@$SZD4U#1_=b?D39P6mpl8DvU;d!5)yQw#U0M~$Rs2DwpLU?qf5u~J4c9jd`l7PtA8L=NR?Ef|bOdM^pkl1=9_q{^MS#S!bIo@U=DW5F9E>7;0JM@cRJauUjho|Nf*se0RRC1 m|0gQ)q5uE@21!IgR09AyK${_lvc2R00000*FRs`zHC9SjwRVmdKI;Vst06H8{IsgCw literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_mouldy_side_3.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_mouldy_side_3.png new file mode 100644 index 0000000000000000000000000000000000000000..35266d3dba55832b043d3d36e3684a9ae6c01326 GIT binary patch literal 334 zcmV-U0kQsxP)Y$F%uqK2n!w@D}QXrknu-P5rep{iw&=}sJD)5IVczydK&oA%9?fxJh&nMYt<}=ER za(f33@ApLn>}xXXML>6;f@2=++S6FzmzderxY3ChYz~L)rvTvif3OAs0RR8B?Dw)kOCVE5(6_MJ1f7m6B0{*0V@j#2FgNDcj7+G60c^(=3`MB_XM0*LM! zL&^XmJOI4VSt&d~&t1)L#if+!i4Z!UVkbCsIiH4RiyYa<6y@U8#WpD}g1F8RQl&m& zDg~t!L=Uj24Hm?zE?#S{wT9>K!>E~SF7r8xqF7hZtNeO%Y%D8s8^V{X6_&FnFi*k` zv&|(jkc9SwPAnZ8V%6v-hsTi*yR)eZcuXUv0}j#@7Om3_Xh^GczCmj@1&_|IS^wmU z$-xDa$+@%Er&L3D!~2J`1p|WPOV;*x-DV3`=t^}{-8TRL0RR8*K@-gY000I_L_t&o Y01xPUA<0roLjV8(07*qoM6N<$f^|Ti(*OVf literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_risen_side_2.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_risen_side_2.png new file mode 100644 index 0000000000000000000000000000000000000000..7bb009c629d9ac64eb441e9ff2cc41eb652e73f8 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jh-%!Ar*{o0u1>a90X*fIi>0p zF8=5^C0!!7&{f|{b*t0bhm89kvJ1_9^u$l4=&stS+bL$7XV3L4(}?!_cy!}>rk+J+ zw=NvzSK&W&BGdmhSU2C~>GM+WtK!2^3-QboFyt=akR{0J{K6 AN&o-= literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_risen_side_3.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_risen_side_3.png new file mode 100644 index 0000000000000000000000000000000000000000..186cfc58aebafb1db297345a3f06eabcbb5ecf6b GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`C7v#hAr*{oCRlSd81S@R*4QV; ze(`E>1^fGVnlYm0A6=JDayt4b;f~do59a)n^c6Lp$K@t}7c!7PRoY;%)`3NE^HDu# zF3v^gn7^ei5}33}@K$1tRKlxAYj!BAeNUaZ%y#N^-D<0YYk4(3hRZQL$bWE%R}X0I k|NjqXhi?Qj*g*C(GfYud2O8}z4-{eWboFyt=akR{0KGRui2wiq literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_main.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_main.png new file mode 100644 index 0000000000000000000000000000000000000000..5b34234eda5428d2f7c947147ca3331b1b9efb17 GIT binary patch literal 378 zcmV-=0fqjFP)?Dw)kOCVE5(6_MJ1f7m6B0{*0V@j#2FgNDcj7+G60c^(=3`MB_XM0*LM! zL&^XmJOI4VSt&d~&t1)L#if+!i4Z!UVkbCsIiH4RiyYa<6y@U8#WpD}g1F8RQl&m& zDg~t!L=Uj24Hm?zE?#S{wT9>K!>E~SF7r8xqF7hZtNeO%Y%D8s8^V{X6_&FnFi*k` zv&|(jkc9SwPAnZ8V%6v-hsTi*yR)eZcuXUv0}j#@7Om3_Xh^GczCmj@1&_|IS^wmU z$-xDa$+@%Er&L3D!~2J`1p|WPOV;*x-DV3`=t^}{-8TRL0RR8*K@-gY000I_L_t&o Y01xPUA<0roLjV8(07*qoM6N<$f^|Ti(*OVf literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_side_1.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_side_1.png new file mode 100644 index 0000000000000000000000000000000000000000..13f3c52ac6dc9b8b7133c4657a61c22fbf8d5790 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`&7LlfAr*{o0<8HQ90Y22A6dUZ zAZmF5yZbeZ#^3-UR>A!frrvDHS+rs4A(i}3&%UP_)yQja-14+{pPoznQ>IzRzVB>& zc`Tt#)jj8W``gw@uPyw1Rh0U8UtdX_%We^PN@G2<<^r=ztXY4KS?2B*P?1#rXSU>; zy!Z-N*?-&&|M~ZQXclH*`2WA7eTf~=Icy;3Ff-U)Qdit(zI-N7gu&C*&t;ucLK6UF CWKBH) literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_side_2.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rising_side_2.png new file mode 100644 index 0000000000000000000000000000000000000000..7bb009c629d9ac64eb441e9ff2cc41eb652e73f8 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jh-%!Ar*{o0u1>a90X*fIi>0p zF8=5^C0!!7&{f|{b*t0bhm89kvJ1_9^u$l4=&stS+bL$7XV3L4(}?!_cy!}>rk+J+ zw=NvzSK&W&BGdmhSU2C~>GM+WtK!2^3-QboFyt=akR{0J{K6 AN&o-= literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rotten.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_rotten.png deleted file mode 100644 index 3b7d4214bbfd064cc64ae564bb36d25f112ab506..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`v7RoDAr*6y?`+=mW`Bo(eKUi- zJ~PLio&Q;UcDIxp8VN8)B+UB%H$5dG>CgEEi!=^@c=$M-Es0ThQ(6%N_YIL1X+b${ yyB{!z2wToN$hN2QyP#Zwf|-#mm)pS$j126RssZ12H7x~N#Ng@b=d#Wzp$Py4_%uxb diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_main.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_main.png new file mode 100644 index 0000000000000000000000000000000000000000..5b34234eda5428d2f7c947147ca3331b1b9efb17 GIT binary patch literal 378 zcmV-=0fqjFP)?Dw)kOCVE5(6_MJ1f7m6B0{*0V@j#2FgNDcj7+G60c^(=3`MB_XM0*LM! zL&^XmJOI4VSt&d~&t1)L#if+!i4Z!UVkbCsIiH4RiyYa<6y@U8#WpD}g1F8RQl&m& zDg~t!L=Uj24Hm?zE?#S{wT9>K!>E~SF7r8xqF7hZtNeO%Y%D8s8^V{X6_&FnFi*k` zv&|(jkc9SwPAnZ8V%6v-hsTi*yR)eZcuXUv0}j#@7Om3_Xh^GczCmj@1&_|IS^wmU z$-xDa$+@%Er&L3D!~2J`1p|WPOV;*x-DV3`=t^}{-8TRL0RR8*K@-gY000I_L_t&o Y01xPUA<0roLjV8(07*qoM6N<$f^|Ti(*OVf literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_side_1.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_side_1.png new file mode 100644 index 0000000000000000000000000000000000000000..13f3c52ac6dc9b8b7133c4657a61c22fbf8d5790 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`&7LlfAr*{o0<8HQ90Y22A6dUZ zAZmF5yZbeZ#^3-UR>A!frrvDHS+rs4A(i}3&%UP_)yQja-14+{pPoznQ>IzRzVB>& zc`Tt#)jj8W``gw@uPyw1Rh0U8UtdX_%We^PN@G2<<^r=ztXY4KS?2B*P?1#rXSU>; zy!Z-N*?-&&|M~ZQXclH*`2WA7eTf~=Icy;3Ff-U)Qdit(zI-N7gu&C*&t;ucLK6UF CWKBH) literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_side_2.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/dough_unrisen_side_2.png new file mode 100644 index 0000000000000000000000000000000000000000..7bb009c629d9ac64eb441e9ff2cc41eb652e73f8 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jh-%!Ar*{o0u1>a90X*fIi>0p zF8=5^C0!!7&{f|{b*t0bhm89kvJ1_9^u$l4=&stS+bL$7XV3L4(}?!_cy!}>rk+J+ zw=NvzSK&W&BGdmhSU2C~>GM+WtK!2^3-QboFyt=akR{0J{K6 AN&o-= literal 0 HcmV?d00001 diff --git a/src/main/java/net/tfminecraft/cooking/baking/BakingTrayHandler.java b/src/main/java/net/tfminecraft/cooking/baking/BakingTrayHandler.java index e462cbc..530aea6 100644 --- a/src/main/java/net/tfminecraft/cooking/baking/BakingTrayHandler.java +++ b/src/main/java/net/tfminecraft/cooking/baking/BakingTrayHandler.java @@ -100,7 +100,7 @@ private void handleFill(Furniture furniture, BakingTrayRecipe recipe, Player pla return; } - int quality = doughItem.getQualityMin(); + int quality = doughItem.getEffectiveQuality(); ItemStack loaf = ItemBuilder.buildComposedWithQuality(loafItem, quality); if (loaf == null || FoodItem.fromItem(loaf) == null) { event.setCancelled(true); diff --git a/src/main/java/net/tfminecraft/cooking/baking/BakingTrayTransform.java b/src/main/java/net/tfminecraft/cooking/baking/BakingTrayTransform.java index 8dd3927..12038bb 100644 --- a/src/main/java/net/tfminecraft/cooking/baking/BakingTrayTransform.java +++ b/src/main/java/net/tfminecraft/cooking/baking/BakingTrayTransform.java @@ -4,6 +4,7 @@ import net.tfminecraft.cooking.item.tag.TagTrack; import net.tfminecraft.cooking.loader.FoodLoader; import net.tfminecraft.cooking.loader.TrackLoader; +import net.tfminecraft.cooking.utils.DoughRising; public final class BakingTrayTransform { private static final String COOKED_TRACK = "cooked"; @@ -32,7 +33,8 @@ public static FoodItem doughToLoaf(FoodItem dough, BakingTrayFill fill) { loaf.setOrigin(dough.getOrigin()); } - loaf.setQualityRange(dough.getQualityMin(), dough.getQualityMax()); + int quality = dough.getEffectiveQuality(); + loaf.setQualityRange(quality, quality); loaf.setLineage(dough.getLineage()); @@ -41,7 +43,7 @@ public static FoodItem doughToLoaf(FoodItem dough, BakingTrayFill fill) { } for (TagTrack track : dough.getTagTracks()) { - if (COOKED_TRACK.equals(track.getId())) { + if (COOKED_TRACK.equals(track.getId()) || DoughRising.TRACK.equals(track.getId())) { continue; } loaf.addOrModifyTrack(new TagTrack(track)); diff --git a/src/main/java/net/tfminecraft/cooking/item/FoodItem.java b/src/main/java/net/tfminecraft/cooking/item/FoodItem.java index e31995d..44b6f07 100644 --- a/src/main/java/net/tfminecraft/cooking/item/FoodItem.java +++ b/src/main/java/net/tfminecraft/cooking/item/FoodItem.java @@ -12,8 +12,10 @@ import net.tfminecraft.cooking.item.model.FoodModel; import net.tfminecraft.cooking.item.model.ModelData; import net.tfminecraft.cooking.item.tag.AgeScale; +import net.tfminecraft.cooking.item.tag.TagQuality; import net.tfminecraft.cooking.item.tag.TagStep; import net.tfminecraft.cooking.item.tag.TagTrack; +import net.tfminecraft.cooking.utils.QualityUtils; import net.tfminecraft.cooking.loader.ModelLoader; import net.tfminecraft.cooking.loader.TrackLoader; import net.tfminecraft.cooking.utils.FoodParser; @@ -310,6 +312,11 @@ public String getTagLabel(String trackId, String stepId) { public int getQualityMin() { return qualityMin; } public int getQualityMax() { return qualityMax; } + + /** Inherited stars plus the active tag star offsets, clamped to 1–5. */ + public int getEffectiveQuality() { + return QualityUtils.clamp(qualityMin + TagQuality.stars(tags.values())); + } public void setQualityRange(int min, int max) { this.qualityMin = min; this.qualityMax = max; @@ -615,7 +622,7 @@ private double sauceFinal(int type) { } private double applyMultipliers(double base, int type) { - int stars = Math.max(1, getQualityMin()); + int stars = getEffectiveQuality(); double qualityMultiplier = type == 1 ? net.tfminecraft.cooking.quality.QualityConfig.nutritionMultiplier(stars) : 1.0 + (stars - 1) * 0.20; diff --git a/src/main/java/net/tfminecraft/cooking/item/tag/TagQuality.java b/src/main/java/net/tfminecraft/cooking/item/tag/TagQuality.java new file mode 100644 index 0000000..071118e --- /dev/null +++ b/src/main/java/net/tfminecraft/cooking/item/tag/TagQuality.java @@ -0,0 +1,23 @@ +package net.tfminecraft.cooking.item.tag; + +public final class TagQuality { + private TagQuality() {} + + /** Sum of star offsets on the active step of each track. */ + public static int stars(Iterable tracks) { + if (tracks == null) { + return 0; + } + int total = 0; + for (TagTrack track : tracks) { + if (track == null) { + continue; + } + TagStep step = track.getCurrentStep(); + if (step != null) { + total += step.getStars(); + } + } + return total; + } +} diff --git a/src/main/java/net/tfminecraft/cooking/item/tag/TagStep.java b/src/main/java/net/tfminecraft/cooking/item/tag/TagStep.java index 372b35f..ec8b77a 100644 --- a/src/main/java/net/tfminecraft/cooking/item/tag/TagStep.java +++ b/src/main/java/net/tfminecraft/cooking/item/tag/TagStep.java @@ -15,6 +15,7 @@ public class TagStep { private final double nutritionMultiplier; private final double qualityReduce; private final double craftQualityPct; + private final int stars; public TagStep(String key, ConfigurationSection config) { this( @@ -24,15 +25,21 @@ public TagStep(String key, ConfigurationSection config) { config.getDouble("food-mult", 1.0), config.getDouble("nutrition-mult", 1.0), config.getDouble("quality-reduce", 0.0), - config.getDouble("craft-quality-pct", 0.0)); + config.getDouble("craft-quality-pct", 0.0), + config.getInt("stars", 0)); } public TagStep(String key, String name, long requiredValue, double foodMultiplier, double nutritionMultiplier) { - this(key, name, requiredValue, foodMultiplier, nutritionMultiplier, 0.0, 0.0); + this(key, name, requiredValue, foodMultiplier, nutritionMultiplier, 0.0, 0.0, 0); } public TagStep(String key, String name, long requiredValue, double foodMultiplier, double nutritionMultiplier, double qualityReduce, double craftQualityPct) { + this(key, name, requiredValue, foodMultiplier, nutritionMultiplier, qualityReduce, craftQualityPct, 0); + } + + public TagStep(String key, String name, long requiredValue, double foodMultiplier, double nutritionMultiplier, + double qualityReduce, double craftQualityPct, int stars) { this.id = key; this.name = name != null ? name : "Tag"; try { @@ -45,6 +52,7 @@ public TagStep(String key, String name, long requiredValue, double foodMultiplie this.nutritionMultiplier = nutritionMultiplier; this.qualityReduce = qualityReduce; this.craftQualityPct = craftQualityPct; + this.stars = stars; } public Tag getTag() { @@ -66,5 +74,6 @@ public long getRequiredValue() { public double getNutritionMultiplier() { return nutritionMultiplier; } public double getQualityReduce() { return qualityReduce; } public double getCraftQualityPct() { return craftQualityPct; } + public int getStars() { return stars; } } diff --git a/src/main/java/net/tfminecraft/cooking/quality/CompositionQualityResolver.java b/src/main/java/net/tfminecraft/cooking/quality/CompositionQualityResolver.java index 01792e1..5ba22ba 100644 --- a/src/main/java/net/tfminecraft/cooking/quality/CompositionQualityResolver.java +++ b/src/main/java/net/tfminecraft/cooking/quality/CompositionQualityResolver.java @@ -13,6 +13,7 @@ import net.tfminecraft.cooking.item.IngredientLineage; import net.tfminecraft.cooking.item.tag.TagStep; import net.tfminecraft.cooking.item.tag.TagTrack; +import net.tfminecraft.cooking.utils.DoughRising; import net.tfminecraft.cooking.utils.QualityUtils; public final class CompositionQualityResolver { @@ -79,7 +80,7 @@ public static int resolveMainsQuality(List mains) { } int[] qualities = mains.stream() - .mapToInt(item -> QualityUtils.clamp(item.getQualityMin())) + .mapToInt(item -> item.getEffectiveQuality()) .toArray(); return QualityUtils.average(qualities); } @@ -94,7 +95,7 @@ public static Map resolveMainsFreshness(List mains) { for (FoodItem item : mains) { for (TagTrack track : item.getTagTracks()) { - if (!track.isAgeable()) { + if (!track.isAgeable() || DoughRising.TRACK.equals(track.getId())) { continue; } String id = track.getId(); @@ -121,7 +122,7 @@ public static int applyExtras(int baseline, List extras) { double gapDown = CompositionConfig.getGapDownChancePerStar(); for (FoodItem extra : extras) { - int extraStars = QualityUtils.clamp(extra.getQualityMin()); + int extraStars = extra.getEffectiveQuality(); int gap = extraStars - baseline; if (gap > 0) { diff --git a/src/main/java/net/tfminecraft/cooking/utils/DisplayUtils.java b/src/main/java/net/tfminecraft/cooking/utils/DisplayUtils.java index 5c79717..130c48f 100644 --- a/src/main/java/net/tfminecraft/cooking/utils/DisplayUtils.java +++ b/src/main/java/net/tfminecraft/cooking/utils/DisplayUtils.java @@ -9,6 +9,11 @@ public static String getDisplayString(String name, double foodMultiplier, double public static String getDisplayString(String name, double foodMultiplier, double nutritionMultiplier, double craftQualityPct) { + return getDisplayString(name, foodMultiplier, nutritionMultiplier, craftQualityPct, 0); + } + + public static String getDisplayString(String name, double foodMultiplier, double nutritionMultiplier, + double craftQualityPct, int stars) { StringBuilder extra = new StringBuilder(); // Food modifier @@ -37,6 +42,11 @@ public static String getDisplayString(String name, double foodMultiplier, double extra.append("§aCraft Quality +").append(pct).append('%'); } + if (stars != 0) { + if (extra.length() > 0) extra.append("§7, "); + extra.append(stars > 0 ? "§a" : "§c").append(String.format("%+d★", stars)); + } + // No modifiers → just return the name if (extra.length() == 0) { return name; diff --git a/src/main/java/net/tfminecraft/cooking/utils/DoughRising.java b/src/main/java/net/tfminecraft/cooking/utils/DoughRising.java new file mode 100644 index 0000000..53da2ab --- /dev/null +++ b/src/main/java/net/tfminecraft/cooking/utils/DoughRising.java @@ -0,0 +1,25 @@ +package net.tfminecraft.cooking.utils; + +import net.tfminecraft.cooking.item.FoodItem; +import net.tfminecraft.cooking.item.tag.TagTrack; +import net.tfminecraft.cooking.loader.TrackLoader; + +public final class DoughRising { + public static final String TRACK = "rising"; + + private DoughRising() {} + + /** New dough starts unrisen. A track already on the item is left as it is. */ + public static void ensureUnrisen(FoodItem dough) { + if (dough == null || dough.hasTagTrack(TRACK) || !"dough".equalsIgnoreCase(dough.getId())) { + return; + } + TagTrack template = TrackLoader.getByString(TRACK); + if (template == null) { + return; + } + TagTrack rising = new TagTrack(template); + rising.setValue(0); + dough.addOrModifyTrack(rising); + } +} diff --git a/src/main/java/net/tfminecraft/cooking/utils/ItemBuilder.java b/src/main/java/net/tfminecraft/cooking/utils/ItemBuilder.java index 64d425d..ae18046 100644 --- a/src/main/java/net/tfminecraft/cooking/utils/ItemBuilder.java +++ b/src/main/java/net/tfminecraft/cooking/utils/ItemBuilder.java @@ -76,6 +76,7 @@ private static ItemStack buildSingleWithQuality(FoodItem template, ItemStack bas FoodItem item = new FoodItem(template); item.setQualityRange(quality, quality); + DoughRising.ensureUnrisen(item); item.setAmount(1); @@ -286,7 +287,7 @@ static List buildLore(FoodItem item, Map indexMap) { return assembleLore( category, origin, - item.getQualityMin(), + item.getEffectiveQuality(), StringFormatter.formatHex("#d4ad77Nutrition §f" + item.getFinalNutrition()), StringFormatter.formatHex("#d4ad77Food §f" + item.getFinalFood()), item.getIngredients(), @@ -357,7 +358,8 @@ static List assembleLore( TagDisplayNames.resolve(tagLabels, t, step), step.getFoodMultiplier(), step.getNutritionMultiplier(), - step.getCraftQualityPct())); + step.getCraftQualityPct(), + step.getStars())); if (firstTag) { indexes.put("tags", lore.size() - 1); firstTag = false; diff --git a/src/main/resources/conversions.yml b/src/main/resources/conversions.yml index 1ebdf4c..7f3fa15 100644 --- a/src/main/resources/conversions.yml +++ b/src/main/resources/conversions.yml @@ -1,7 +1,7 @@ conversions: - v.wheat grain(type=wheat;origin=Wheat;tags=freshness.0) - ia.tfmc_cooking:yeast ingredient(type=yeast;origin=Yeast;tags=freshness.0) - - ia.tfmc_cooking:dough ingredient(type=dough;origin=Wheat;tags=freshness.0) + - ia.tfmc_cooking:dough ingredient(type=dough;origin=Wheat;tags=freshness.0:rising.0) - v.carrot vegetable(type=vegetable_1;origin=Carrot;tags=freshness.0) - v.potato vegetable(type=vegetable_1;origin=Potato;tags=freshness.0) - v.beetroot vegetable(type=vegetable_1;origin=Beetroot;tags=freshness.0) diff --git a/src/main/resources/models.yml b/src/main/resources/models.yml index 1a6d648..1112595 100644 --- a/src/main/resources/models.yml +++ b/src/main/resources/models.yml @@ -3116,12 +3116,36 @@ yeast: item: ia.tfmc_cooking:yeast_rotten_model dough: + unrisen: + weight: 30 + tags: + - unrisen + gui: + item: ia.tfmc_cooking:dough_model + display: + item: ia.tfmc_cooking:dough_model + rising: + weight: 20 + tags: + - rising + gui: + item: ia.tfmc_cooking:dough_rising_model + display: + item: ia.tfmc_cooking:dough_rising_model + risen: + weight: 10 + tags: + - risen + gui: + item: ia.tfmc_cooking:dough_risen_model + display: + item: ia.tfmc_cooking:dough_risen_model fresh: weight: 1 tags: - fresh gui: - item: ia.tfmc_cooking:dough + item: ia.tfmc_cooking:dough_model display: item: ia.tfmc_cooking:dough_model stale: @@ -3129,15 +3153,15 @@ dough: tags: - stale gui: - item: ia.tfmc_cooking:dough + item: ia.tfmc_cooking:dough_model display: item: ia.tfmc_cooking:dough_model - rotten: - weight: 1 + mouldy: + weight: 40 tags: - rotten gui: - item: ia.tfmc_cooking:dough_rotten + item: ia.tfmc_cooking:dough_rotten_model display: item: ia.tfmc_cooking:dough_rotten_model diff --git a/src/main/resources/tags.yml b/src/main/resources/tags.yml index bec505b..3b20377 100644 --- a/src/main/resources/tags.yml +++ b/src/main/resources/tags.yml @@ -1,6 +1,7 @@ #########Do not change these unless you know # craft-quality-pct: upward star-roll bonus when this step is active on an extra ingredient (e.g. 0.05 = +5% craft quality) +# stars: added to inherited quality while this step is active. Negative lowers the star rating. # Age values are seconds at age.freshness 1.0 (stale = 1 day, rotten = 3 days). # Per-type duration is types.yml age.freshness (higher = lasts longer). freshness: @@ -193,4 +194,20 @@ flavourful: name: "#d4a017Flavourful" value: 0 food-mult: 1.0 - nutrition-mult: 1.1 \ No newline at end of file + nutrition-mult: 1.1 + +# Dough proofing. Values are seconds at age.rising 1 (dough uses 1): rising after 5 minutes, risen after 15. +rising: + ageable: true + unrisen: + name: "#c4a574Unrisen" + value: 0 + stars: -3 + rising: + name: "#d4b483Rising" + value: 300 + stars: -1 + risen: + name: "#e6c98aRisen" + value: 900 + stars: 0 diff --git a/src/main/resources/types.yml b/src/main/resources/types.yml index f7755f8..f90043b 100644 --- a/src/main/resources/types.yml +++ b/src/main/resources/types.yml @@ -462,6 +462,7 @@ dough: nutrition: 4 age: freshness: 0.5 + rising: 1 tag-labels: freshness: rotten: "#8B7355Mouldy" diff --git a/src/test/java/net/tfminecraft/cooking/item/RisingDoughTest.java b/src/test/java/net/tfminecraft/cooking/item/RisingDoughTest.java new file mode 100644 index 0000000..4a08b92 --- /dev/null +++ b/src/test/java/net/tfminecraft/cooking/item/RisingDoughTest.java @@ -0,0 +1,104 @@ +package net.tfminecraft.cooking.item; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; + +import net.tfminecraft.cooking.baking.BakingTrayFill; +import net.tfminecraft.cooking.baking.BakingTrayTransform; +import net.tfminecraft.cooking.item.tag.TagQuality; +import net.tfminecraft.cooking.item.tag.TagStep; +import net.tfminecraft.cooking.item.tag.TagTrack; +import net.tfminecraft.cooking.loader.FoodLoader; +import net.tfminecraft.cooking.quality.CompositionConfig; +import net.tfminecraft.cooking.quality.CompositionQualityResolver; +import net.tfminecraft.cooking.quality.CompositionResult; +import net.tfminecraft.cooking.utils.DisplayUtils; + +class RisingDoughTest { + private static final String LOAF_ID = "rising_dough_loaf"; + + @AfterEach + void removeLoaf() { + FoodLoader.get().removeIf(item -> LOAF_ID.equals(item.getId())); + } + + @Test + void risingStepsRaiseQualityTowardInheritedStars() { + TagTrack rising = risingTrack(); + assertEquals("unrisen", rising.getCurrentStep().getId()); + assertEquals(-3, rising.getCurrentStep().getStars()); + + rising.forceSetValue(299); + assertEquals("unrisen", rising.getCurrentStep().getId()); + + rising.forceSetValue(300); + assertEquals("rising", rising.getCurrentStep().getId()); + assertEquals(-1, rising.getCurrentStep().getStars()); + + rising.forceSetValue(900); + assertEquals("risen", rising.getCurrentStep().getId()); + assertEquals(0, rising.getCurrentStep().getStars()); + assertEquals(0, TagQuality.stars(List.of(rising))); + assertTrue(DisplayUtils.getDisplayString("Unrisen", 1.0, 1.0, 0.0, -3).contains("-3★")); + assertTrue(DisplayUtils.getDisplayString("Rising", 1.0, 1.0, 0.0, -1).contains("-1★")); + } + + @Test + void loafKeepsTheStarsFromTheCurrentRiseAndDropsTheTrack() { + FoodLoader.get().add(new FoodItem(LOAF_ID, "Loaf", true)); + + FoodItem dough = new FoodItem("dough", "Dough", true); + dough.setQualityRange(5, 5); + dough.addOrModifyTrack(risingTrack()); + assertEquals(2, dough.getEffectiveQuality()); + + FoodItem loaf = BakingTrayTransform.doughToLoaf( + dough, new BakingTrayFill("dough", "dough", 1, LOAF_ID, "", "grain")); + assertEquals(2, loaf.getQualityMin()); + assertEquals(2, loaf.getEffectiveQuality()); + assertNull(loaf.getTagTrack("rising")); + + dough.getTagTrack("rising").forceSetValue(300); + assertEquals(4, dough.getEffectiveQuality()); + + dough.getTagTrack("rising").forceSetValue(900); + assertEquals(5, dough.getEffectiveQuality()); + FoodItem risenLoaf = BakingTrayTransform.doughToLoaf( + dough, new BakingTrayFill("dough", "dough", 1, LOAF_ID, "", "grain")); + assertEquals(5, risenLoaf.getQualityMin()); + assertNull(risenLoaf.getTagTrack("rising")); + } + + @Test + void composedFoodInheritsTheRisePenaltyWithoutTheRisingTrack() { + CompositionConfig.apply(false, Set.of(), null, Set.of(), Map.of(), false, 0, 0, false); + try { + FoodItem dough = new FoodItem("dough", "Dough", true); + dough.setCategory("grain"); + dough.setQualityRange(5, 5); + dough.addOrModifyTrack(risingTrack()); + + CompositionResult result = CompositionQualityResolver.compose(null, List.of(dough), null); + assertEquals(2, result.getFinalQuality()); + assertFalse(result.getFreshnessTracks().containsKey("rising")); + } finally { + CompositionConfig.apply(true, Set.of(), null, Set.of(), Map.of(), true, 0.12, 0.15, true); + } + } + + private static TagTrack risingTrack() { + return new TagTrack("rising", true, List.of( + new TagStep("unrisen", "Unrisen", 0, 1.0, 1.0, 0.0, 0.0, -3), + new TagStep("rising", "Rising", 300, 1.0, 1.0, 0.0, 0.0, -1), + new TagStep("risen", "Risen", 900, 1.0, 1.0, 0.0, 0.0, 0))); + } +}