From 211ecb0633c9e20bf580cf6a26934c700e6e09d6 Mon Sep 17 00:00:00 2001 From: Justinas Launikonis <95593194+JustinasLa@users.noreply.github.com> Date: Sun, 1 Nov 2026 20:53:34 +0200 Subject: [PATCH] feat: grind sugar cane into sugar, ladle beetroot soup as Borscht, convert sweet berries - Milling stone: milling-recipes.yml can hold several recipes per stone. The first whose input matches the held stack loads, and its id is saved on the stone (`milling.recipe`; older stones fall back to the first recipe). New optional keys: category, origin, output-amount, input-name, input-display, output-display, refund. Defaults keep flour exactly as it was. - Sugar: 8 sugar cane grind into 8 sugar (sweetener_1, origin Sugar, the same food vanilla sugar becomes on pickup), with a pickup quality roll as for vanilla sugar. A broken loaded stone gives the cane back. New sugar_pile heap model. - Pot kinds: pot.yml `kinds` (SaladKind rules, a piece's category as its layer; seasonings and add-ons don't count) give a ladled soup its origin and name. Borscht = at least half beetroot pieces. - Sweet berries: pickup conversion to fruit_1 (origin Sweet Berries), model with a mouldy icon, "Sweet Berry Jam" in jam sandwiches; IA jam icons for Dev's juicer. Co-Authored-By: Claude Opus 5.5 --- .../contents/berries_cane_beet.yml | 30 + .../tfmc_cooking/models/item/bulk/sugar.json | 1108 +++++++++++++++++ .../item/intermediate/sweet_berries_jam.json | 6 + .../sweet_berries_jam_rotten.json | 6 + .../item/vanilla/sweet_berries_rotten.json | 6 + .../tfmc_cooking/textures/item/bulk/sugar.png | Bin 0 -> 255 bytes .../item/intermediate/sweet_berries_jam.png | Bin 0 -> 235 bytes .../intermediate/sweet_berries_jam_rotten.png | Bin 0 -> 253 bytes .../item/vanilla/sweet_berries_rotten.png | Bin 0 -> 230 bytes README.md | 1 + .../cooking/cooking/PotReference.java | 10 +- .../cooking/milling/MillingRecipe.java | 94 ++ .../cooking/milling/MillingRecipeLoader.java | 9 +- .../milling/MillingRecipeRegistry.java | 38 +- .../cooking/milling/MillingStoneDisplay.java | 32 +- .../cooking/milling/MillingStoneHandler.java | 91 +- .../cooking/milling/MillingStoneState.java | 12 + .../tfminecraft/cooking/pot/PotConfig.java | 33 +- .../tfminecraft/cooking/salad/SaladKind.java | 21 +- src/main/resources/conversions.yml | 1 + src/main/resources/milling-recipes.yml | 27 + src/main/resources/models.yml | 47 + src/main/resources/pot.yml | 11 + src/main/resources/sandwiches.yml | 1 + src/main/resources/types.yml | 2 + .../cooking/NamedSoupCoverageTest.java | 113 ++ .../milling/MillingStoneCoverageTest.java | 143 +++ 27 files changed, 1793 insertions(+), 49 deletions(-) create mode 100644 ItemsAdder/tfmc_cooking/contents/berries_cane_beet.yml create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/sugar.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/intermediate/sweet_berries_jam.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/intermediate/sweet_berries_jam_rotten.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/vanilla/sweet_berries_rotten.json create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/sugar.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/intermediate/sweet_berries_jam.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/intermediate/sweet_berries_jam_rotten.png create mode 100644 ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/vanilla/sweet_berries_rotten.png create mode 100644 src/test/java/net/tfminecraft/cooking/cooking/NamedSoupCoverageTest.java diff --git a/ItemsAdder/tfmc_cooking/contents/berries_cane_beet.yml b/ItemsAdder/tfmc_cooking/contents/berries_cane_beet.yml new file mode 100644 index 0000000..5bace9c --- /dev/null +++ b/ItemsAdder/tfmc_cooking/contents/berries_cane_beet.yml @@ -0,0 +1,30 @@ +# Sweet berries, sugar cane and beetroot (Cooking feat/berries-cane-beet). Made by +# scratch/new-foods/berries-cane-beet/bin/gen.py. Its juicer piles and salad bowl heap go with the juicer and salad +# bowl items, which are Dev-only. +info: + namespace: tfmc_cooking +items: + sweet_berries_rotten: + display_name: "Mouldy Sweet Berries" + resource: + material: APPLE + generate: false + model_path: item/vanilla/sweet_berries_rotten + sweet_berries_jam: + display_name: "Sweet Berry Jam" + resource: + material: PAPER + generate: false + model_path: item/intermediate/sweet_berries_jam + sweet_berries_jam_rotten: + display_name: "Mouldy Sweet Berry Jam" + resource: + material: PAPER + generate: false + model_path: item/intermediate/sweet_berries_jam_rotten + sugar_pile: + display_name: "Sugar (Milling Stone)" + resource: + material: PAPER + generate: false + model_path: item/bulk/sugar diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/sugar.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/sugar.json new file mode 100644 index 0000000..8c4ed13 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/bulk/sugar.json @@ -0,0 +1,1108 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "0": "tfmc_cooking:item/bulk/sugar", + "particle": "tfmc_cooking:item/bulk/sugar" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 1, + 16 + ], + "faces": { + "north": { + "uv": [ + 0, + 1, + 16, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 1, + 16, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 1, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 1, + 16, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 1, + 0.5, + 4 + ], + "to": [ + 14, + 1.5, + 6 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 0, + 0.5, + 0 + ] + }, + "faces": { + "north": { + "uv": [ + 2, + 1, + 15, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 10, + 1, + 12, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 1, + 1, + 14, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 4, + 1, + 6, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 1, + 4, + 14, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 1, + 10, + 14, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 3, + 0.5, + 2 + ], + "to": [ + 13, + 1.5, + 4 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 0, + 0.5, + -2 + ] + }, + "faces": { + "north": { + "uv": [ + 3, + 1, + 13, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 10, + 1, + 12, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 3, + 1, + 13, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 4, + 1, + 6, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 3, + 4, + 13, + 6 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 3, + 10, + 13, + 12 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 0.5, + 6 + ], + "to": [ + 12, + 1.5, + 13 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 0, + 0.5, + 4 + ] + }, + "faces": { + "north": { + "uv": [ + 4, + 1, + 14, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 7, + 1, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 2, + 1, + 12, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 2, + 1, + 9, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 2, + 2, + 12, + 9 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 7, + 12, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 12, + 0.5, + 6 + ], + "to": [ + 15, + 1.5, + 12 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 11, + 0.5, + 4 + ] + }, + "faces": { + "north": { + "uv": [ + 12, + 1, + 15, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 8, + 1, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 1, + 1, + 4, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 2, + 1, + 8, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 1, + 2, + 4, + 8 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 1, + 8, + 4, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 3, + 1, + 5.99 + ], + "to": [ + 13, + 2, + 10 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 3, + 0, + 6 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 10, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 10, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 10, + 4 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 0, + 10, + 4 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 8, + 1.5, + 7 + ], + "to": [ + 12, + 2.5, + 10.01 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 3, + 0.5, + 6 + ] + }, + "faces": { + "north": { + "uv": [ + 1, + 0, + 5, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 3, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 5, + 0, + 9, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 1, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 5, + 1, + 9, + 4 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 5, + 0, + 9, + 3 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 1.5, + 7 + ], + "to": [ + 8, + 2.5, + 11 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + -2, + 0.5, + 6 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 8, + 0, + 10, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 1, + 0, + 5, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 8, + 1, + 10, + 5 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 8, + 0, + 10, + 4 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5.99, + 2, + 6 + ], + "to": [ + 9, + 3, + 9 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + -2, + 1, + 6 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 2, + 0, + 5, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 8, + 0, + 11, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 3, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 8, + 0, + 11, + 3 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 8, + 2, + 11, + 5 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 1.5, + 5 + ], + "to": [ + 10, + 2.5, + 7 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 1, + 0.5, + 3 + ] + }, + "faces": { + "north": { + "uv": [ + 1, + 0, + 6, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 4, + 0, + 9, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 2, + 0, + 4, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 4, + 2, + 9, + 4 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 4, + 0, + 9, + 2 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 4, + 0.99, + 3.99 + ], + "to": [ + 11, + 2.01, + 6.01 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 2, + 0, + 3 + ] + }, + "faces": { + "north": { + "uv": [ + 1, + 0, + 8, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 1, + 0, + 3, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 2, + 0, + 9, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 1, + 0, + 3, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 2, + 1, + 9, + 3 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 1, + 9, + 3 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 6, + 1, + 3 + ], + "to": [ + 9, + 2, + 4.01 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 2, + 0, + 1 + ] + }, + "faces": { + "north": { + "uv": [ + 3, + 0, + 6, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 1, + 0, + 2, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 4, + 0, + 7, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 2, + 0, + 3, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 4, + 2, + 7, + 3 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 4, + 1, + 7, + 2 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 5, + 1, + 10 + ], + "to": [ + 12.01, + 2, + 12.01 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 3, + 0, + 9 + ] + }, + "faces": { + "north": { + "uv": [ + 1, + 0, + 8, + 1 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 1, + 0, + 3, + 1 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 2, + 0, + 9, + 1 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 1, + 0, + 3, + 1 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 2, + 1, + 9, + 3 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 1, + 9, + 3 + ], + "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/intermediate/sweet_berries_jam.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/intermediate/sweet_berries_jam.json new file mode 100644 index 0000000..e9d07b5 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/intermediate/sweet_berries_jam.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "tfmc_cooking:item/intermediate/sweet_berries_jam" + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/intermediate/sweet_berries_jam_rotten.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/intermediate/sweet_berries_jam_rotten.json new file mode 100644 index 0000000..a772624 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/intermediate/sweet_berries_jam_rotten.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "tfmc_cooking:item/intermediate/sweet_berries_jam_rotten" + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/vanilla/sweet_berries_rotten.json b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/vanilla/sweet_berries_rotten.json new file mode 100644 index 0000000..eea5f61 --- /dev/null +++ b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/models/item/vanilla/sweet_berries_rotten.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "tfmc_cooking:item/vanilla/sweet_berries_rotten" + } +} diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/sugar.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/bulk/sugar.png new file mode 100644 index 0000000000000000000000000000000000000000..0e1047489580e5a6d65207ece6ff53fe9154b7af GIT binary patch literal 255 zcmV7eNn73a>n8yB0#5O*2Vmy7hX0epdTw*V}#A_IOUe_x6he zLH5)6G7J#Tfb9SX_L*c~#Bb|G(c;hnSLK@l-4R6#4qO$`RX0wa0DZv~-S#TkJXFqV z(j0SVR;x02M4G!}>zit<|{Ln>}1CrFemxa{}SUQcF) z#*g_6o=ttX>i_qjnGJ>=y?vc#ERz1_;>v!;965IX*_JQ5@z41O?~YGjtR1Bbq?j)4 z2?%;sKfmqY|L1v23(R=7ueaeAV@_Pt*1&UON+652n;AzMg9lF5yujN zXF?LZmpFo)FEGpqPTVG(%HW~Ai~GW1#lfjAukQ7&Kf|s1!IRDSV>sfI*Lc ifbk~99|l*A}1CrFemxa{}SUQcF) z#*g_6o=ttX>i_qjnGJ>=y?vc#ERz1_;>v!;965IX*_JQ5@z41O?~YGjtR1Bbq?j(% z{QcMY|F8G%f6vQP8x1@5fBwN`kQZMmro*0;Y|4_-uy`6%L~zeUqlkxBwrKD;JJif! zbBTKSkG+-ggu)C)g~JIZ9?BlPj?4~SjuJ=M6BqF?WV)0w?ovDsj!y85}Sb4q9e0Nq?) AApigX literal 0 HcmV?d00001 diff --git a/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/vanilla/sweet_berries_rotten.png b/ItemsAdder/tfmc_cooking/resourcepack/assets/tfmc_cooking/textures/item/vanilla/sweet_berries_rotten.png new file mode 100644 index 0000000000000000000000000000000000000000..102628be6aff84f9c6a3b538e45dec49cfcb28ed GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ydu{YLn>~aow$*&$w9#7Ckyv_ zW0#|RTux3&xd+*AL z?Pq&5R9MKbwPW?3oVqA)#oK>xdet};+3aST&sE&0p*;60L+QS@=7~DKqP!~WZW)QG zH0=t%J3CE#h36NitTi5oToo>{$aQDdxz0Co>h