diff --git a/ItemsAdder/tfmc_cooking/contents/categories.yml b/ItemsAdder/tfmc_cooking/contents/categories.yml index 6238fc4..4987b03 100644 --- a/ItemsAdder/tfmc_cooking/contents/categories.yml +++ b/ItemsAdder/tfmc_cooking/contents/categories.yml @@ -361,3 +361,9 @@ categories: - tfmc_cooking:octopus_burnt - tfmc_cooking:octopus_boiled - tfmc_cooking:octopus_rotten + - tfmc_cooking:grilled_octopus + - tfmc_cooking:jellyfish_strips_raw + - tfmc_cooking:jellyfish_strips_cooked + - tfmc_cooking:jellyfish_strips_boiled + - tfmc_cooking:jellyfish_strips_burnt + - tfmc_cooking:jellyfish_strips_rotten diff --git a/ItemsAdder/tfmc_cooking/contents/ingredients.yml b/ItemsAdder/tfmc_cooking/contents/ingredients.yml index 2b9c11f..dcfdee2 100644 --- a/ItemsAdder/tfmc_cooking/contents/ingredients.yml +++ b/ItemsAdder/tfmc_cooking/contents/ingredients.yml @@ -280,6 +280,42 @@ items: material: APPLE generate: false model_path: item/ingredients/seafood/octopus_boiled + grilled_octopus: + display_name: "Grilled Octopus" + resource: + material: APPLE + generate: false + model_path: item/ingredients/seafood/grilled_octopus + jellyfish_strips_raw: + display_name: "Jellyfish Strips Raw" + resource: + material: APPLE + generate: false + model_path: item/ingredients/seafood/jellyfish_strips_raw + jellyfish_strips_cooked: + display_name: "Jellyfish Strips Cooked" + resource: + material: APPLE + generate: false + model_path: item/ingredients/seafood/jellyfish_strips_cooked + jellyfish_strips_boiled: + display_name: "Jellyfish Strips Boiled" + resource: + material: APPLE + generate: false + model_path: item/ingredients/seafood/jellyfish_strips_boiled + jellyfish_strips_burnt: + display_name: "Jellyfish Strips Burnt" + resource: + material: APPLE + generate: false + model_path: item/ingredients/seafood/jellyfish_strips_burnt + jellyfish_strips_rotten: + display_name: "Jellyfish Strips Rotten" + resource: + material: APPLE + generate: false + model_path: item/ingredients/seafood/jellyfish_strips_rotten red_meat_steak_boiled: display_name: "Red Meat Steak boiled" resource: diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/grilled_octopus.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/grilled_octopus.json new file mode 100644 index 0000000..b0d1aa3 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/grilled_octopus.json @@ -0,0 +1,20 @@ +{ + "format_version": "26.3", + "credit": "TFMC grilled octopus: octopus_cooked.json with a grilled texture (octopus-jellyfish bin/gen.py)", + "textures": {"0": "tfmc_cooking:item/ingredients/seafood/grilled_octopus", "particle": "tfmc_cooking:item/ingredients/seafood/grilled_octopus"}, + "elements": [ + {"from": [12, 0, 7], "to": [15, 2, 9], "rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 7]}, "faces": {"north": {"uv": [0, 4, 7, 10], "texture": "#0"}, "east": {"uv": [0, 1, 3, 4], "texture": "#0"}, "south": {"uv": [6, 10, 11, 13], "texture": "#0"}, "west": {"uv": [0, 1, 3, 4], "texture": "#0"}, "up": {"uv": [0, 10, 5, 13], "texture": "#0"}, "down": {"uv": [0, 10, 5, 13], "texture": "#0"}}}, + {"from": [7, 0, 6.75], "to": [12, 2.25, 9.25], "rotation": {"angle": 0, "axis": "y", "origin": [10, 0, 7]}, "faces": {"north": {"uv": [0, 4.5, 12, 9.75], "texture": "#0"}, "east": {"uv": [0, 1, 2.5, 3.25], "texture": "#0"}, "south": {"uv": [6, 10, 11, 12.25], "texture": "#0"}, "west": {"uv": [0, 1, 2.5, 3.25], "texture": "#0"}, "up": {"uv": [0, 10, 5, 12.5], "texture": "#0"}, "down": {"uv": [0, 10, 5, 12.5], "texture": "#0"}}}, + {"from": [4, 0, 5.75], "to": [7, 2.5, 8.25], "rotation": {"angle": 0, "axis": "y", "origin": [5, 0, 6]}, "faces": {"north": {"uv": [0, 4, 7, 10], "texture": "#0"}, "east": {"uv": [0, 1, 3, 4], "texture": "#0"}, "south": {"uv": [6, 10, 11, 13], "texture": "#0"}, "west": {"uv": [0, 1, 3, 4], "texture": "#0"}, "up": {"uv": [0, 10, 5, 13], "texture": "#0"}, "down": {"uv": [0, 10, 5, 13], "texture": "#0"}}}, + {"from": [1, 0, 4.5], "to": [4, 2.75, 7.5], "rotation": {"angle": 0, "axis": "y", "origin": [2, 0, 5]}, "faces": {"north": {"uv": [0, 4, 7, 10], "texture": "#0"}, "east": {"uv": [0, 1, 3, 4], "texture": "#0"}, "south": {"uv": [6, 10, 11, 13], "texture": "#0"}, "west": {"uv": [4, 0, 8, 4], "texture": "#0"}, "up": {"uv": [0, 10, 5, 13], "texture": "#0"}, "down": {"uv": [0, 10, 5, 13], "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": [2, 2, 2]} + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_boiled.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_boiled.json new file mode 100644 index 0000000..98a5f18 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_boiled.json @@ -0,0 +1,22 @@ +{ + "credit": "TFMC jellyfish strips (octopus-jellyfish bin/gen.py)", + "textures": {"0": "tfmc_cooking:item/ingredients/seafood/jellyfish_boiled", "particle": "tfmc_cooking:item/ingredients/seafood/jellyfish_boiled"}, + "elements": [ + {"from": [3.0, 0.0, 5.6], "to": [12.0, 0.6, 7.0], "faces": {"north": {"uv": [4, 3, 7, 4], "texture": "#0"}, "south": {"uv": [4, 3, 7, 4], "texture": "#0"}, "east": {"uv": [4, 3, 5, 4], "texture": "#0"}, "west": {"uv": [4, 3, 5, 4], "texture": "#0"}, "up": {"uv": [0, 0, 3, 1], "texture": "#0"}, "down": {"uv": [0, 0, 3, 1], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [7.5, 0.0, 6.3]}}, + {"from": [4.0, 0.0, 8.4], "to": [13.0, 0.6, 9.8], "faces": {"north": {"uv": [0, 1, 3, 2], "texture": "#0"}, "south": {"uv": [0, 1, 3, 2], "texture": "#0"}, "east": {"uv": [0, 1, 1, 2], "texture": "#0"}, "west": {"uv": [0, 1, 1, 2], "texture": "#0"}, "up": {"uv": [4, 1, 7, 2], "texture": "#0"}, "down": {"uv": [4, 1, 7, 2], "texture": "#0"}}, "rotation": {"angle": -22.5, "axis": "y", "origin": [8.5, 0.0, 9.1]}}, + {"from": [5.0, 0.0, 3.6], "to": [12.0, 0.6, 4.9], "faces": {"north": {"uv": [4, 4, 7, 5], "texture": "#0"}, "south": {"uv": [4, 4, 7, 5], "texture": "#0"}, "east": {"uv": [4, 4, 5, 5], "texture": "#0"}, "west": {"uv": [4, 4, 5, 5], "texture": "#0"}, "up": {"uv": [0, 4, 3, 5], "texture": "#0"}, "down": {"uv": [0, 4, 3, 5], "texture": "#0"}}}, + {"from": [4.5, 0.0, 10.4], "to": [12.5, 0.6, 11.7], "faces": {"north": {"uv": [0, 3, 3, 4], "texture": "#0"}, "south": {"uv": [0, 3, 3, 4], "texture": "#0"}, "east": {"uv": [0, 3, 1, 4], "texture": "#0"}, "west": {"uv": [0, 3, 1, 4], "texture": "#0"}, "up": {"uv": [4, 3, 7, 4], "texture": "#0"}, "down": {"uv": [4, 3, 7, 4], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [8.5, 0.0, 11.05]}}, + {"from": [3.5, 0.6, 6.9], "to": [11.5, 1.2, 8.2], "faces": {"north": {"uv": [0, 0, 3, 1], "texture": "#0"}, "south": {"uv": [0, 0, 3, 1], "texture": "#0"}, "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, "up": {"uv": [0, 1, 3, 2], "texture": "#0"}, "down": {"uv": [0, 1, 3, 2], "texture": "#0"}}, "rotation": {"angle": -45, "axis": "y", "origin": [7.5, 0.6, 7.55]}}, + {"from": [6.0, 0.6, 6.4], "to": [12.5, 1.2, 7.7], "faces": {"north": {"uv": [4, 1, 7, 2], "texture": "#0"}, "south": {"uv": [4, 1, 7, 2], "texture": "#0"}, "east": {"uv": [4, 1, 5, 2], "texture": "#0"}, "west": {"uv": [4, 1, 5, 2], "texture": "#0"}, "up": {"uv": [4, 4, 7, 5], "texture": "#0"}, "down": {"uv": [4, 4, 7, 5], "texture": "#0"}}, "rotation": {"angle": 45, "axis": "y", "origin": [9.25, 0.6, 7.05]}}, + {"from": [5.5, 1.2, 8.0], "to": [12.5, 1.8, 9.2], "faces": {"north": {"uv": [0, 4, 3, 5], "texture": "#0"}, "south": {"uv": [0, 4, 3, 5], "texture": "#0"}, "east": {"uv": [0, 4, 1, 5], "texture": "#0"}, "west": {"uv": [0, 4, 1, 5], "texture": "#0"}, "up": {"uv": [0, 3, 3, 4], "texture": "#0"}, "down": {"uv": [0, 3, 3, 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": [2, 2, 2]} + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_burnt.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_burnt.json new file mode 100644 index 0000000..05708de --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_burnt.json @@ -0,0 +1,22 @@ +{ + "credit": "TFMC jellyfish strips (octopus-jellyfish bin/gen.py)", + "textures": {"0": "tfmc_cooking:item/ingredients/seafood/jellyfish_burnt", "particle": "tfmc_cooking:item/ingredients/seafood/jellyfish_burnt"}, + "elements": [ + {"from": [3.0, 0.0, 5.6], "to": [12.0, 0.6, 7.0], "faces": {"north": {"uv": [4, 3, 7, 4], "texture": "#0"}, "south": {"uv": [4, 3, 7, 4], "texture": "#0"}, "east": {"uv": [4, 3, 5, 4], "texture": "#0"}, "west": {"uv": [4, 3, 5, 4], "texture": "#0"}, "up": {"uv": [0, 0, 3, 1], "texture": "#0"}, "down": {"uv": [0, 0, 3, 1], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [7.5, 0.0, 6.3]}}, + {"from": [4.0, 0.0, 8.4], "to": [13.0, 0.6, 9.8], "faces": {"north": {"uv": [0, 1, 3, 2], "texture": "#0"}, "south": {"uv": [0, 1, 3, 2], "texture": "#0"}, "east": {"uv": [0, 1, 1, 2], "texture": "#0"}, "west": {"uv": [0, 1, 1, 2], "texture": "#0"}, "up": {"uv": [4, 1, 7, 2], "texture": "#0"}, "down": {"uv": [4, 1, 7, 2], "texture": "#0"}}, "rotation": {"angle": -22.5, "axis": "y", "origin": [8.5, 0.0, 9.1]}}, + {"from": [5.0, 0.0, 3.6], "to": [12.0, 0.6, 4.9], "faces": {"north": {"uv": [4, 4, 7, 5], "texture": "#0"}, "south": {"uv": [4, 4, 7, 5], "texture": "#0"}, "east": {"uv": [4, 4, 5, 5], "texture": "#0"}, "west": {"uv": [4, 4, 5, 5], "texture": "#0"}, "up": {"uv": [0, 4, 3, 5], "texture": "#0"}, "down": {"uv": [0, 4, 3, 5], "texture": "#0"}}}, + {"from": [4.5, 0.0, 10.4], "to": [12.5, 0.6, 11.7], "faces": {"north": {"uv": [0, 3, 3, 4], "texture": "#0"}, "south": {"uv": [0, 3, 3, 4], "texture": "#0"}, "east": {"uv": [0, 3, 1, 4], "texture": "#0"}, "west": {"uv": [0, 3, 1, 4], "texture": "#0"}, "up": {"uv": [4, 3, 7, 4], "texture": "#0"}, "down": {"uv": [4, 3, 7, 4], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [8.5, 0.0, 11.05]}}, + {"from": [3.5, 0.6, 6.9], "to": [11.5, 1.2, 8.2], "faces": {"north": {"uv": [0, 0, 3, 1], "texture": "#0"}, "south": {"uv": [0, 0, 3, 1], "texture": "#0"}, "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, "up": {"uv": [0, 1, 3, 2], "texture": "#0"}, "down": {"uv": [0, 1, 3, 2], "texture": "#0"}}, "rotation": {"angle": -45, "axis": "y", "origin": [7.5, 0.6, 7.55]}}, + {"from": [6.0, 0.6, 6.4], "to": [12.5, 1.2, 7.7], "faces": {"north": {"uv": [4, 1, 7, 2], "texture": "#0"}, "south": {"uv": [4, 1, 7, 2], "texture": "#0"}, "east": {"uv": [4, 1, 5, 2], "texture": "#0"}, "west": {"uv": [4, 1, 5, 2], "texture": "#0"}, "up": {"uv": [4, 4, 7, 5], "texture": "#0"}, "down": {"uv": [4, 4, 7, 5], "texture": "#0"}}, "rotation": {"angle": 45, "axis": "y", "origin": [9.25, 0.6, 7.05]}}, + {"from": [5.5, 1.2, 8.0], "to": [12.5, 1.8, 9.2], "faces": {"north": {"uv": [0, 4, 3, 5], "texture": "#0"}, "south": {"uv": [0, 4, 3, 5], "texture": "#0"}, "east": {"uv": [0, 4, 1, 5], "texture": "#0"}, "west": {"uv": [0, 4, 1, 5], "texture": "#0"}, "up": {"uv": [0, 3, 3, 4], "texture": "#0"}, "down": {"uv": [0, 3, 3, 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": [2, 2, 2]} + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_cooked.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_cooked.json new file mode 100644 index 0000000..67da686 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_cooked.json @@ -0,0 +1,22 @@ +{ + "credit": "TFMC jellyfish strips (octopus-jellyfish bin/gen.py)", + "textures": {"0": "tfmc_cooking:item/ingredients/seafood/jellyfish_cooked", "particle": "tfmc_cooking:item/ingredients/seafood/jellyfish_cooked"}, + "elements": [ + {"from": [3.0, 0.0, 5.6], "to": [12.0, 0.6, 7.0], "faces": {"north": {"uv": [4, 3, 7, 4], "texture": "#0"}, "south": {"uv": [4, 3, 7, 4], "texture": "#0"}, "east": {"uv": [4, 3, 5, 4], "texture": "#0"}, "west": {"uv": [4, 3, 5, 4], "texture": "#0"}, "up": {"uv": [0, 0, 3, 1], "texture": "#0"}, "down": {"uv": [0, 0, 3, 1], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [7.5, 0.0, 6.3]}}, + {"from": [4.0, 0.0, 8.4], "to": [13.0, 0.6, 9.8], "faces": {"north": {"uv": [0, 1, 3, 2], "texture": "#0"}, "south": {"uv": [0, 1, 3, 2], "texture": "#0"}, "east": {"uv": [0, 1, 1, 2], "texture": "#0"}, "west": {"uv": [0, 1, 1, 2], "texture": "#0"}, "up": {"uv": [4, 1, 7, 2], "texture": "#0"}, "down": {"uv": [4, 1, 7, 2], "texture": "#0"}}, "rotation": {"angle": -22.5, "axis": "y", "origin": [8.5, 0.0, 9.1]}}, + {"from": [5.0, 0.0, 3.6], "to": [12.0, 0.6, 4.9], "faces": {"north": {"uv": [4, 4, 7, 5], "texture": "#0"}, "south": {"uv": [4, 4, 7, 5], "texture": "#0"}, "east": {"uv": [4, 4, 5, 5], "texture": "#0"}, "west": {"uv": [4, 4, 5, 5], "texture": "#0"}, "up": {"uv": [0, 4, 3, 5], "texture": "#0"}, "down": {"uv": [0, 4, 3, 5], "texture": "#0"}}}, + {"from": [4.5, 0.0, 10.4], "to": [12.5, 0.6, 11.7], "faces": {"north": {"uv": [0, 3, 3, 4], "texture": "#0"}, "south": {"uv": [0, 3, 3, 4], "texture": "#0"}, "east": {"uv": [0, 3, 1, 4], "texture": "#0"}, "west": {"uv": [0, 3, 1, 4], "texture": "#0"}, "up": {"uv": [4, 3, 7, 4], "texture": "#0"}, "down": {"uv": [4, 3, 7, 4], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [8.5, 0.0, 11.05]}}, + {"from": [3.5, 0.6, 6.9], "to": [11.5, 1.2, 8.2], "faces": {"north": {"uv": [0, 0, 3, 1], "texture": "#0"}, "south": {"uv": [0, 0, 3, 1], "texture": "#0"}, "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, "up": {"uv": [0, 1, 3, 2], "texture": "#0"}, "down": {"uv": [0, 1, 3, 2], "texture": "#0"}}, "rotation": {"angle": -45, "axis": "y", "origin": [7.5, 0.6, 7.55]}}, + {"from": [6.0, 0.6, 6.4], "to": [12.5, 1.2, 7.7], "faces": {"north": {"uv": [4, 1, 7, 2], "texture": "#0"}, "south": {"uv": [4, 1, 7, 2], "texture": "#0"}, "east": {"uv": [4, 1, 5, 2], "texture": "#0"}, "west": {"uv": [4, 1, 5, 2], "texture": "#0"}, "up": {"uv": [4, 4, 7, 5], "texture": "#0"}, "down": {"uv": [4, 4, 7, 5], "texture": "#0"}}, "rotation": {"angle": 45, "axis": "y", "origin": [9.25, 0.6, 7.05]}}, + {"from": [5.5, 1.2, 8.0], "to": [12.5, 1.8, 9.2], "faces": {"north": {"uv": [0, 4, 3, 5], "texture": "#0"}, "south": {"uv": [0, 4, 3, 5], "texture": "#0"}, "east": {"uv": [0, 4, 1, 5], "texture": "#0"}, "west": {"uv": [0, 4, 1, 5], "texture": "#0"}, "up": {"uv": [0, 3, 3, 4], "texture": "#0"}, "down": {"uv": [0, 3, 3, 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": [2, 2, 2]} + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_raw.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_raw.json new file mode 100644 index 0000000..066c851 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_raw.json @@ -0,0 +1,22 @@ +{ + "credit": "TFMC jellyfish strips (octopus-jellyfish bin/gen.py)", + "textures": {"0": "tfmc_cooking:item/ingredients/seafood/jellyfish_raw", "particle": "tfmc_cooking:item/ingredients/seafood/jellyfish_raw"}, + "elements": [ + {"from": [3.0, 0.0, 5.6], "to": [12.0, 0.6, 7.0], "faces": {"north": {"uv": [4, 3, 7, 4], "texture": "#0"}, "south": {"uv": [4, 3, 7, 4], "texture": "#0"}, "east": {"uv": [4, 3, 5, 4], "texture": "#0"}, "west": {"uv": [4, 3, 5, 4], "texture": "#0"}, "up": {"uv": [0, 0, 3, 1], "texture": "#0"}, "down": {"uv": [0, 0, 3, 1], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [7.5, 0.0, 6.3]}}, + {"from": [4.0, 0.0, 8.4], "to": [13.0, 0.6, 9.8], "faces": {"north": {"uv": [0, 1, 3, 2], "texture": "#0"}, "south": {"uv": [0, 1, 3, 2], "texture": "#0"}, "east": {"uv": [0, 1, 1, 2], "texture": "#0"}, "west": {"uv": [0, 1, 1, 2], "texture": "#0"}, "up": {"uv": [4, 1, 7, 2], "texture": "#0"}, "down": {"uv": [4, 1, 7, 2], "texture": "#0"}}, "rotation": {"angle": -22.5, "axis": "y", "origin": [8.5, 0.0, 9.1]}}, + {"from": [5.0, 0.0, 3.6], "to": [12.0, 0.6, 4.9], "faces": {"north": {"uv": [4, 4, 7, 5], "texture": "#0"}, "south": {"uv": [4, 4, 7, 5], "texture": "#0"}, "east": {"uv": [4, 4, 5, 5], "texture": "#0"}, "west": {"uv": [4, 4, 5, 5], "texture": "#0"}, "up": {"uv": [0, 4, 3, 5], "texture": "#0"}, "down": {"uv": [0, 4, 3, 5], "texture": "#0"}}}, + {"from": [4.5, 0.0, 10.4], "to": [12.5, 0.6, 11.7], "faces": {"north": {"uv": [0, 3, 3, 4], "texture": "#0"}, "south": {"uv": [0, 3, 3, 4], "texture": "#0"}, "east": {"uv": [0, 3, 1, 4], "texture": "#0"}, "west": {"uv": [0, 3, 1, 4], "texture": "#0"}, "up": {"uv": [4, 3, 7, 4], "texture": "#0"}, "down": {"uv": [4, 3, 7, 4], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [8.5, 0.0, 11.05]}}, + {"from": [3.5, 0.6, 6.9], "to": [11.5, 1.2, 8.2], "faces": {"north": {"uv": [0, 0, 3, 1], "texture": "#0"}, "south": {"uv": [0, 0, 3, 1], "texture": "#0"}, "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, "up": {"uv": [0, 1, 3, 2], "texture": "#0"}, "down": {"uv": [0, 1, 3, 2], "texture": "#0"}}, "rotation": {"angle": -45, "axis": "y", "origin": [7.5, 0.6, 7.55]}}, + {"from": [6.0, 0.6, 6.4], "to": [12.5, 1.2, 7.7], "faces": {"north": {"uv": [4, 1, 7, 2], "texture": "#0"}, "south": {"uv": [4, 1, 7, 2], "texture": "#0"}, "east": {"uv": [4, 1, 5, 2], "texture": "#0"}, "west": {"uv": [4, 1, 5, 2], "texture": "#0"}, "up": {"uv": [4, 4, 7, 5], "texture": "#0"}, "down": {"uv": [4, 4, 7, 5], "texture": "#0"}}, "rotation": {"angle": 45, "axis": "y", "origin": [9.25, 0.6, 7.05]}}, + {"from": [5.5, 1.2, 8.0], "to": [12.5, 1.8, 9.2], "faces": {"north": {"uv": [0, 4, 3, 5], "texture": "#0"}, "south": {"uv": [0, 4, 3, 5], "texture": "#0"}, "east": {"uv": [0, 4, 1, 5], "texture": "#0"}, "west": {"uv": [0, 4, 1, 5], "texture": "#0"}, "up": {"uv": [0, 3, 3, 4], "texture": "#0"}, "down": {"uv": [0, 3, 3, 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": [2, 2, 2]} + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_rotten.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_rotten.json new file mode 100644 index 0000000..640941e --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/ingredients/seafood/jellyfish_strips_rotten.json @@ -0,0 +1,22 @@ +{ + "credit": "TFMC jellyfish strips (octopus-jellyfish bin/gen.py)", + "textures": {"0": "tfmc_cooking:item/ingredients/seafood/jellyfish_rotten", "particle": "tfmc_cooking:item/ingredients/seafood/jellyfish_rotten"}, + "elements": [ + {"from": [3.0, 0.0, 5.6], "to": [12.0, 0.6, 7.0], "faces": {"north": {"uv": [4, 3, 7, 4], "texture": "#0"}, "south": {"uv": [4, 3, 7, 4], "texture": "#0"}, "east": {"uv": [4, 3, 5, 4], "texture": "#0"}, "west": {"uv": [4, 3, 5, 4], "texture": "#0"}, "up": {"uv": [0, 0, 3, 1], "texture": "#0"}, "down": {"uv": [0, 0, 3, 1], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [7.5, 0.0, 6.3]}}, + {"from": [4.0, 0.0, 8.4], "to": [13.0, 0.6, 9.8], "faces": {"north": {"uv": [0, 1, 3, 2], "texture": "#0"}, "south": {"uv": [0, 1, 3, 2], "texture": "#0"}, "east": {"uv": [0, 1, 1, 2], "texture": "#0"}, "west": {"uv": [0, 1, 1, 2], "texture": "#0"}, "up": {"uv": [4, 1, 7, 2], "texture": "#0"}, "down": {"uv": [4, 1, 7, 2], "texture": "#0"}}, "rotation": {"angle": -22.5, "axis": "y", "origin": [8.5, 0.0, 9.1]}}, + {"from": [5.0, 0.0, 3.6], "to": [12.0, 0.6, 4.9], "faces": {"north": {"uv": [4, 4, 7, 5], "texture": "#0"}, "south": {"uv": [4, 4, 7, 5], "texture": "#0"}, "east": {"uv": [4, 4, 5, 5], "texture": "#0"}, "west": {"uv": [4, 4, 5, 5], "texture": "#0"}, "up": {"uv": [0, 4, 3, 5], "texture": "#0"}, "down": {"uv": [0, 4, 3, 5], "texture": "#0"}}}, + {"from": [4.5, 0.0, 10.4], "to": [12.5, 0.6, 11.7], "faces": {"north": {"uv": [0, 3, 3, 4], "texture": "#0"}, "south": {"uv": [0, 3, 3, 4], "texture": "#0"}, "east": {"uv": [0, 3, 1, 4], "texture": "#0"}, "west": {"uv": [0, 3, 1, 4], "texture": "#0"}, "up": {"uv": [4, 3, 7, 4], "texture": "#0"}, "down": {"uv": [4, 3, 7, 4], "texture": "#0"}}, "rotation": {"angle": 22.5, "axis": "y", "origin": [8.5, 0.0, 11.05]}}, + {"from": [3.5, 0.6, 6.9], "to": [11.5, 1.2, 8.2], "faces": {"north": {"uv": [0, 0, 3, 1], "texture": "#0"}, "south": {"uv": [0, 0, 3, 1], "texture": "#0"}, "east": {"uv": [0, 0, 1, 1], "texture": "#0"}, "west": {"uv": [0, 0, 1, 1], "texture": "#0"}, "up": {"uv": [0, 1, 3, 2], "texture": "#0"}, "down": {"uv": [0, 1, 3, 2], "texture": "#0"}}, "rotation": {"angle": -45, "axis": "y", "origin": [7.5, 0.6, 7.55]}}, + {"from": [6.0, 0.6, 6.4], "to": [12.5, 1.2, 7.7], "faces": {"north": {"uv": [4, 1, 7, 2], "texture": "#0"}, "south": {"uv": [4, 1, 7, 2], "texture": "#0"}, "east": {"uv": [4, 1, 5, 2], "texture": "#0"}, "west": {"uv": [4, 1, 5, 2], "texture": "#0"}, "up": {"uv": [4, 4, 7, 5], "texture": "#0"}, "down": {"uv": [4, 4, 7, 5], "texture": "#0"}}, "rotation": {"angle": 45, "axis": "y", "origin": [9.25, 0.6, 7.05]}}, + {"from": [5.5, 1.2, 8.0], "to": [12.5, 1.8, 9.2], "faces": {"north": {"uv": [0, 4, 3, 5], "texture": "#0"}, "south": {"uv": [0, 4, 3, 5], "texture": "#0"}, "east": {"uv": [0, 4, 1, 5], "texture": "#0"}, "west": {"uv": [0, 4, 1, 5], "texture": "#0"}, "up": {"uv": [0, 3, 3, 4], "texture": "#0"}, "down": {"uv": [0, 3, 3, 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": [2, 2, 2]} + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/ingredients/seafood/grilled_octopus.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/ingredients/seafood/grilled_octopus.png new file mode 100644 index 0000000..a127c58 Binary files /dev/null and b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/ingredients/seafood/grilled_octopus.png differ diff --git a/README.md b/README.md index 6678a06..af10fc9 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Cooking makes food an interactive part of everyday life. Players grow and gather - **Pumpkin** — a pie of nothing but cut or chopped pumpkin bakes into a Pumpkin Pie (`pies.yml` kinds), and a soup that is at least half pumpkin is ladled as Pumpkin Soup (`pot.yml` kinds). - **Rice** — harvested rice boils in the soup pot into boiled rice (a pot option can name an `output` too, as the pan's can). Boiled rice fries into fried rice in the frying pan, and taken out it stirs in the other fried pieces beside it: a fried egg, cut vegetables, mushrooms, meat or fish, which name it (Egg Fried Rice) and add their food (`frying-pan.yml` stir-ins). Two boiled rice, a cup of milk and a sweetener make rice pudding in an empty pot (`pot.yml`), and a boiled rice and a raw fish filet roll into two pieces of sushi named for the fish on the cutting board (Salmon Sushi): a `combine` recipe takes one of each input whatever their origins (`crafting-stations.yml`). - **Mushrooms and hidden poison** — grilled mushrooms go into sandwiches and salads, raw or grilled ones onto pizzas and into pies, and raw ones boil into soup; in a dish both kinds are just "Mushroom". Each red mushroom poisons the dish a step further (Tainted, Poisoned, Deadly: less and less nutrition, the same food, and nausea, then poison, then weakness for whoever eats it). In a dish of 3 stars or more with its red mushrooms grilled (or its own bake cooked, its soup boiled) the poison is hidden: the lore shows no tag and the Food and Nutrition it would have without it, but eating applies it. Any dish bonus can count an origin and hide its tag this way (`count: origin`, `hide-at-stars`, `hide-tags`, `hide-dish-tags` in the dishes' `bonuses`; `tags.yml` poison). Any tag step can make the eater ill with `effects` (`"poison 10 1"`: effect, seconds, level), hidden or not. +- **Octopus, jellyfish and seafood soups** — octopus and jellyfish come from warm-water catches cut on the cutting board like fish. Octopus grilled in the frying pan becomes Grilled Octopus; jellyfish cubes cut again on the board become Jellyfish Strips (raw, fried or boiled as the cubes were), and both go into salads. Boiled seafood mashed in the pot with a potato makes a Seafood Chowder, with other vegetables or another seafood a Seafood Stew (`kinds` in `pot.yml`). - **Serving and sharing** — plate dishes, ladle soup into bowls, and carve foods into portions for the table. - **Quality and freshness** — ingredient quality and composition influence finished dishes, while aging and food tags carry preparation history through the kitchen. - **Farming and husbandry** — crop fertility and harvest quality sit alongside animal care, breeding, genetics, and produce collection. diff --git a/src/main/resources/crafting-stations.yml b/src/main/resources/crafting-stations.yml index a4584a8..2c92fd9 100644 --- a/src/main/resources/crafting-stations.yml +++ b/src/main/resources/crafting-stations.yml @@ -73,6 +73,15 @@ cutting_board: inputs: - c.seafood(type=seafood_whole) output: seafood(type=seafood_fish_filet;origin={origin};tags=freshness.0) + # Jellyfish cubes cut into strips for a salad, each stack where it lies. They stay raw, fried or boiled, keep + # their age and hold what the cubes did. + slice_jellyfish: + ratio: 1 + inherit: true + share-food: true + inputs: + - c.seafood(type=seafood_jellyfish) + output: seafood(type=jellyfish_strips;origin={origin}) # A boiled rice and a raw fish filet roll into two pieces of sushi, named for the fish: Salmon Sushi. sushi: combine: true diff --git a/src/main/resources/models.yml b/src/main/resources/models.yml index 86392d3..6ec93ef 100644 --- a/src/main/resources/models.yml +++ b/src/main/resources/models.yml @@ -3552,6 +3552,82 @@ seafood_octopus: display: item: ia.tfmc_cooking:octopus_rotten +# Grilled octopus (types.yml grilled_octopus): its own grilled look; burnt and rotten look like octopus gone that way. +grilled_octopus: + cooked: + weight: 1 + gui: + item: ia.tfmc_cooking:grilled_octopus + display: + item: ia.tfmc_cooking:grilled_octopus + burnt: + weight: 2 + tags: + - burnt + gui: + item: ia.tfmc_cooking:octopus_burnt + display: + item: ia.tfmc_cooking:octopus_burnt + rotten: + weight: 3 + tags: + - rotten + gui: + item: ia.tfmc_cooking:octopus_rotten + display: + item: ia.tfmc_cooking:octopus_rotten + +# Jellyfish strips (types.yml jellyfish_strips): thin strips with the cubes' textures, raw, fried, boiled, burnt, rotten. +jellyfish_strips: + fresh: + weight: 1 + tags: + - fresh + gui: + item: ia.tfmc_cooking:jellyfish_strips_raw + display: + item: ia.tfmc_cooking:jellyfish_strips_raw + stale: + weight: 1 + tags: + - stale + gui: + item: ia.tfmc_cooking:jellyfish_strips_raw + display: + item: ia.tfmc_cooking:jellyfish_strips_raw + cooked: + weight: 2 + tags: + - cooked + gui: + item: ia.tfmc_cooking:jellyfish_strips_cooked + display: + item: ia.tfmc_cooking:jellyfish_strips_cooked + burnt: + weight: 2 + tags: + - burnt + gui: + item: ia.tfmc_cooking:jellyfish_strips_burnt + display: + item: ia.tfmc_cooking:jellyfish_strips_burnt + boiled: + weight: 2 + tags: + - boiled + gui: + item: ia.tfmc_cooking:jellyfish_strips_boiled + display: + item: ia.tfmc_cooking:jellyfish_strips_boiled + rotten: + weight: 3 + tags: + - rotten + gui: + item: ia.tfmc_cooking:jellyfish_strips_rotten + display: + item: ia.tfmc_cooking:jellyfish_strips_rotten + egg: raw: weight: 1 diff --git a/src/main/resources/pot.yml b/src/main/resources/pot.yml index 3eec938..aea9264 100644 --- a/src/main/resources/pot.yml +++ b/src/main/resources/pot.yml @@ -85,6 +85,18 @@ kinds: Pumpkin: name: Pumpkin Soup mostly: Pumpkin + # Boiled seafood (fish filets, octopus, jellyfish) with a potato, and other vegetables or mushrooms if you like. + Seafood Chowder: + name: Seafood Chowder + layers: [seafood] + only: [seafood, vegetable] + any-origin: [Potato] + # Seafood with other vegetables, or two kinds of seafood. One seafood alone stays an "Octopus Soup". + Seafood Stew: + name: Seafood Stew + layers: [seafood] + only: [seafood, vegetable] + min-origins: 2 # Tags a soup earns from what's in the pot when it's ladled, written like sandwiches.yml's bonuses. The pot has no # layers, so only count: origin applies, over everything in it (pieces, extras and stock). diff --git a/src/main/resources/salads.yml b/src/main/resources/salads.yml index 0be798a..3dac948 100644 --- a/src/main/resources/salads.yml +++ b/src/main/resources/salads.yml @@ -109,6 +109,22 @@ ingredients: - rotten ia.tfmc_cooking:salad_bowl_mushroom_rotten - burnt ia.tfmc_cooking:salad_bowl_mushroom_burnt - ia.tfmc_cooking:salad_bowl_mushroom + seafood: + # Grilled octopus (frying pan) and jellyfish strips (cutting board), both Jellyfish whatever their colour. + types: + - grilled_octopus + - jellyfish_strips + name: "{origin}" + names: + blue jellyfish: Jellyfish + pink jellyfish: Jellyfish + # Rounds of grilled tentacle; thin translucent strips of jellyfish, raw, fried or boiled as they were cut. + models: + - rotten ia.tfmc_cooking:salad_bowl_{type}_rotten + - burnt ia.tfmc_cooking:salad_bowl_{type}_burnt + - boiled ia.tfmc_cooking:salad_bowl_{type}_boiled + - cooked ia.tfmc_cooking:salad_bowl_{type}_cooked + - ia.tfmc_cooking:salad_bowl_{type}_raw # What goes in unseen and doesn't name the salad. # once only one food of this extra per salad (one dressing) # returns-bottle the player keeps the empty glass bottle diff --git a/src/main/resources/types.yml b/src/main/resources/types.yml index e242da7..a32fdc9 100644 --- a/src/main/resources/types.yml +++ b/src/main/resources/types.yml @@ -703,11 +703,13 @@ seafood_octopus: food: 11 nutrition: 7 mashable: true + # Grilled in the frying pan it becomes grilled octopus (and burns as that); boiled in the pot it stays octopus. cooking-options: frying_pan: tag: 1 time: 15 burn: 30 + output: seafood(type=grilled_octopus) pot: tag: 3 time: 15 @@ -720,6 +722,35 @@ seafood_octopus: stale: "#c3db81Stale" rotten: "#8B7355Rotten" +###Grilled octopus: what octopus becomes in the frying pan; keeps its origin (Octopus). Salads take it (salads.yml). +grilled_octopus: + name: "#c8642aGrilled {inherit}" + model: grilled_octopus + food: 11 + nutrition: 7 + age: + warmth: 450 + freshness: 9.33 + tag-labels: + freshness: + stale: "#c3db81Stale" + rotten: "#8B7355Rotten" + +###Jellyfish strips: jellyfish cubes cut into strips on the cutting board (crafting-stations.yml slice_jellyfish). They +# stay as raw, fried or boiled as the cubes were; boiled (blanched) is how jellyfish goes into a salad (salads.yml). +jellyfish_strips: + name: "#87cefa{inherit} Strips" + model: jellyfish_strips + food: 9 + nutrition: 5 + age: + warmth: 450 + freshness: 9.33 + tag-labels: + freshness: + stale: "#c3db81Stale" + rotten: "#8B7355Rotten" + butter: name: "#f5f5f5{prefixes}Butter" model: butter diff --git a/src/test/java/net/tfminecraft/cooking/cooking/SeafoodSoupCoverageTest.java b/src/test/java/net/tfminecraft/cooking/cooking/SeafoodSoupCoverageTest.java new file mode 100644 index 0000000..002e378 --- /dev/null +++ b/src/test/java/net/tfminecraft/cooking/cooking/SeafoodSoupCoverageTest.java @@ -0,0 +1,95 @@ +package net.tfminecraft.cooking.cooking; + +import static org.junit.jupiter.api.Assertions.*; + +import java.io.File; +import java.nio.file.Path; + +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import net.tfminecraft.cooking.enums.Method; +import net.tfminecraft.cooking.item.FoodItem; +import net.tfminecraft.cooking.loader.TrackLoader; +import net.tfminecraft.cooking.pot.PotConfig; + +/** + * The shipped pot.yml kinds: boiled seafood mashed with a potato is a Seafood Chowder, with other vegetables or another + * seafood a Seafood Stew. One seafood alone, or seafood with meat, is still named by its pieces. Salt doesn't count. + */ +class SeafoodSoupCoverageTest { + CookingReferencesTest.Environment env; + PotReference pot; + @TempDir Path directory; + + @BeforeEach void open() { + env = new CookingReferencesTest.Environment(); + new PotConfig().load(new File("src/main/resources/pot.yml")); + pot = new PotReference(env.furniture, Method.POT); + } + + @AfterEach void close() { + new PotConfig().load(directory.resolve("missing.yml").toFile()); + env.close(); + } + + /** Mashed pieces in the pot ("Origin/category"), and a salt. Returns the ladled soup's name. */ + @SuppressWarnings("deprecation") + String ladle(String... pieces) { + int slot = 1; + for (String entry : pieces) { + String[] parts = entry.split("/"); + FoodItem piece = env.food("piece", parts[1], parts[0], Method.POT); + piece.getTagTrack("cooked").forceSetValue(3); + piece.addOrModifyTrack(TrackLoader.getByString("mashed")); + pot.slots.put("input_" + slot, piece); + env.place("input_" + slot, env.stack(piece, Material.COD, 1)); + slot++; + } + FoodItem salt = env.food("salt", "salt", "Salt"); + pot.slots.put("extra_salt", salt); + env.place("extra_salt", env.stack(salt, Material.SUGAR, 1)); + env.player.getInventory().setItemInMainHand(new ItemStack(Material.PAPER)); + pot.interact(env.interaction()); + return org.bukkit.ChatColor.stripColor(env.player.getInventory().getItemInMainHand().getItemMeta().getDisplayName()); + } + + @Test + void octopusAndPotatoMakeASeafoodChowder() { + assertEquals("Seafood Chowder", ladle("Octopus/seafood", "Potato/vegetable")); + assertEquals("Seafood Chowder", env.lastBuilt.getOrigin()); + } + + @Test + void fishWithPotatoOnionAndAMushroomIsStillAChowder() { + assertEquals("Seafood Chowder", ladle("Tuna/seafood", "Potato/vegetable", "Onion/vegetable", "Brown Mushroom/vegetable")); + } + + @Test + void seafoodWithOtherVegetablesOrAnotherSeafoodIsAStew() { + assertEquals("Seafood Stew", ladle("Octopus/seafood", "Carrot/vegetable")); + } + + @Test + void twoSeafoodsAreAStew() { + assertEquals("Seafood Stew", ladle("Blue Jellyfish/seafood", "Pink Jellyfish/seafood")); + } + + @Test + void oneSeafoodAloneIsStillNamedByIt() { + String name = ladle("Octopus/seafood", "Octopus/seafood"); + assertEquals("Mixed", env.lastBuilt.getOrigin()); + assertTrue(name.endsWith("Soup") && name.contains("Octopus"), name); + } + + @Test + void seafoodWithMeatIsNoSeafoodDish() { + String name = ladle("Octopus/seafood", "Pork/meat", "Potato/vegetable"); + assertEquals("Mixed", env.lastBuilt.getOrigin()); + assertTrue(name.endsWith("Soup"), name); + } +} diff --git a/src/test/java/net/tfminecraft/cooking/item/OctopusJellyfishAssetsTest.java b/src/test/java/net/tfminecraft/cooking/item/OctopusJellyfishAssetsTest.java new file mode 100644 index 0000000..25faaf6 --- /dev/null +++ b/src/test/java/net/tfminecraft/cooking/item/OctopusJellyfishAssetsTest.java @@ -0,0 +1,54 @@ +package net.tfminecraft.cooking.item; + +import static org.junit.jupiter.api.Assertions.*; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; + +import org.bukkit.configuration.file.YamlConfiguration; +import org.junit.jupiter.api.Test; + +/** + * Grilled octopus and jellyfish strips as shipped: the frying pan turns octopus into grilled octopus, the cutting + * board cuts jellyfish cubes into strips, and every look models.yml names is an ItemsAdder item with its model. + */ +class OctopusJellyfishAssetsTest { + static final String PACK = "ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/"; + + @Test + void thePanGrillsOctopusAndTheBoardCutsJellyfishIntoStrips() { + YamlConfiguration types = YamlConfiguration.loadConfiguration(new File("src/main/resources/types.yml")); + assertEquals("seafood(type=grilled_octopus)", types.getString("seafood_octopus.cooking-options.frying_pan.output")); + assertNull(types.getString("seafood_octopus.cooking-options.pot.output"), "boiled octopus stays octopus"); + assertEquals("grilled_octopus", types.getString("grilled_octopus.model")); + assertEquals("jellyfish_strips", types.getString("jellyfish_strips.model")); + + YamlConfiguration stations = YamlConfiguration.loadConfiguration(new File("src/main/resources/crafting-stations.yml")); + String recipe = "cutting_board.recipes.slice_jellyfish."; + assertEquals(List.of("c.seafood(type=seafood_jellyfish)"), stations.getStringList(recipe + "inputs")); + assertEquals("seafood(type=jellyfish_strips;origin={origin})", stations.getString(recipe + "output")); + assertTrue(stations.getBoolean(recipe + "inherit")); + assertTrue(stations.getBoolean(recipe + "share-food")); + } + + @Test + void everyLookIsAnItemWithItsModelAndTexture() throws Exception { + YamlConfiguration models = YamlConfiguration.loadConfiguration(new File("src/main/resources/models.yml")); + String items = Files.readString(Path.of("ItemsAdder/tfmc_cooking/contents/ingredients.yml")); + String categories = Files.readString(Path.of("ItemsAdder/tfmc_cooking/contents/categories.yml")); + for (String type : List.of("grilled_octopus", "jellyfish_strips")) { + for (String state : models.getConfigurationSection(type).getKeys(false)) { + String item = models.getString(type + "." + state + ".gui.item"); + assertEquals(item, models.getString(type + "." + state + ".display.item")); + String id = item.substring("ia.tfmc_cooking:".length()); + assertTrue(items.contains("\n " + id + ":\n"), id); + assertTrue(categories.contains("tfmc_cooking:" + id + "\n"), id); + assertTrue(Files.exists(Path.of(PACK + "models/item/ingredients/seafood/" + id + ".json")), id); + } + } + assertEquals("ia.tfmc_cooking:jellyfish_strips_boiled", models.getString("jellyfish_strips.boiled.gui.item")); + assertTrue(Files.exists(Path.of(PACK + "textures/item/ingredients/seafood/grilled_octopus.png"))); + } +} diff --git a/src/test/java/net/tfminecraft/cooking/salad/SeafoodSaladTest.java b/src/test/java/net/tfminecraft/cooking/salad/SeafoodSaladTest.java new file mode 100644 index 0000000..8533b01 --- /dev/null +++ b/src/test/java/net/tfminecraft/cooking/salad/SeafoodSaladTest.java @@ -0,0 +1,82 @@ +package net.tfminecraft.cooking.salad; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import net.tfminecraft.cooking.crafting.CraftingStationCoverageTest.Environment; +import net.tfminecraft.cooking.item.FoodItem; +import net.tfminecraft.cooking.loader.NamingLoader; +import net.tfminecraft.cooking.sandwich.SandwichLayer; +import net.tfminecraft.cooking.utils.ItemBuilder; +import net.tfminecraft.cooking.utils.NameComposer; + +/** The shipped salads.yml takes grilled octopus and jellyfish strips; any jellyfish is just "Jellyfish" in the name. */ +class SeafoodSaladTest { + Environment env; + FoodItem built; + @TempDir Path directory; + + @BeforeEach void open() { + env = new Environment(); + new NamingLoader().load(new File("src/main/resources/naming.yml")); + new SaladConfig().load(new File("src/main/resources/salads.yml")); + env.builder.when(() -> ItemBuilder.buildComposedWithQuality(any(), anyInt())).thenAnswer(inv -> { + built = inv.getArgument(0); + return env.stack(built, Material.BOWL, 1); + }); + } + + @AfterEach void close() throws Exception { + new SaladConfig().load(directory.resolve("missing.yml").toFile()); + Path empty = directory.resolve("naming.yml"); + Files.writeString(empty, ""); + new NamingLoader().load(empty.toFile()); + env.close(); + } + + FoodItem food(String type, String origin) { + FoodItem food = env.food(type, origin); + food.setCategory("seafood"); + return food; + } + + @Test + void grilledOctopusAndJellyfishStripsAreSeafoodIngredients() { + SandwichLayer octopus = SaladConfig.ingredientFor(food("grilled_octopus", "Octopus")); + assertEquals("seafood", octopus.getId()); + assertEquals("Octopus", octopus.fillerName(food("grilled_octopus", "Octopus"))); + assertEquals("Jellyfish", octopus.fillerName(food("jellyfish_strips", "Blue Jellyfish"))); + assertEquals("Jellyfish", octopus.fillerName(food("jellyfish_strips", "Pink Jellyfish"))); + // Raw octopus and jellyfish cubes aren't salad ingredients: grill the one and cut the other into strips. + assertNull(SaladConfig.ingredientFor(food("seafood_octopus", "Octopus"))); + assertNull(SaladConfig.ingredientFor(food("seafood_jellyfish", "Blue Jellyfish"))); + } + + @Test + void aSaladOfOctopusJellyfishAndTomatoIsNamedByThem() { + List in = new ArrayList<>(); + in.add(env.stack(food("grilled_octopus", "Octopus"), Material.PAPER, 1)); + in.add(env.stack(food("jellyfish_strips", "Pink Jellyfish"), Material.PAPER, 1)); + FoodItem tomato = env.food("vegetable_chopped_2", "Tomato"); + tomato.setCategory("garnish"); + in.add(env.stack(tomato, Material.PAPER, 1)); + assertNotNull(SaladItems.build(env.player, in, List.of())); + assertEquals("Mixed", built.getOrigin()); + assertEquals("Octopus, Jellyfish and Tomato Salad", + NameComposer.compose(built, "{prefixes}{fillers}Salad", Map.of())); + } +}