From 86c8b91b356c69687ae1285b4486355244827e56 Mon Sep 17 00:00:00 2001 From: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com> Date: Sun, 31 Dec 2023 11:02:31 +0100 Subject: [PATCH] feat: Add Blender recipe, slight change to printer recipe --- .../fabric/datagen/ModRecipeProvider.java | 13 ++++++- .../blockstates/blender.json | 14 +++++++- .../recipes/decorations/blender.json | 35 +++++++++++++++++++ .../forbiddensmoothies/recipes/blender.json | 24 +++++++++++++ .../forbiddensmoothies/recipes/printer.json | 5 ++- .../ForbiddenSmoothies.java | 3 +- 6 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 shared/src/generated/resources/data/forbiddensmoothies/advancements/recipes/decorations/blender.json create mode 100644 shared/src/generated/resources/data/forbiddensmoothies/recipes/blender.json diff --git a/fabric/src/main/java/net/blay09/mods/forbiddensmoothies/fabric/datagen/ModRecipeProvider.java b/fabric/src/main/java/net/blay09/mods/forbiddensmoothies/fabric/datagen/ModRecipeProvider.java index 4a88690..851e078 100644 --- a/fabric/src/main/java/net/blay09/mods/forbiddensmoothies/fabric/datagen/ModRecipeProvider.java +++ b/fabric/src/main/java/net/blay09/mods/forbiddensmoothies/fabric/datagen/ModRecipeProvider.java @@ -21,13 +21,24 @@ public ModRecipeProvider(FabricDataOutput output) { public void buildRecipes(Consumer exporter) { ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, ModBlocks.printer) .pattern("ICI") - .pattern("ILI") + .pattern("GLG") .pattern("IRI") .define('C', Items.COPPER_INGOT) + .define('G', Items.GLASS_PANE) .define('I', Items.IRON_INGOT) .define('L', Items.LIGHTNING_ROD) .define('R', Items.REDSTONE) .unlockedBy("has_redstone", has(Items.REDSTONE)) .save(exporter); + + ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, ModBlocks.blender) + .pattern("III") + .pattern("GFG") + .pattern("III") + .define('G', Items.GLASS_PANE) + .define('I', Items.IRON_INGOT) + .define('F', Items.FLINT) + .unlockedBy("has_flint", has(Items.FLINT)) + .save(exporter); } } diff --git a/shared/src/generated/resources/assets/forbiddensmoothies/blockstates/blender.json b/shared/src/generated/resources/assets/forbiddensmoothies/blockstates/blender.json index e84e863..b3367f1 100644 --- a/shared/src/generated/resources/assets/forbiddensmoothies/blockstates/blender.json +++ b/shared/src/generated/resources/assets/forbiddensmoothies/blockstates/blender.json @@ -1,7 +1,19 @@ { "variants": { - "": { + "facing=east": { + "model": "forbiddensmoothies:block/blender", + "y": 90 + }, + "facing=north": { "model": "forbiddensmoothies:block/blender" + }, + "facing=south": { + "model": "forbiddensmoothies:block/blender", + "y": 180 + }, + "facing=west": { + "model": "forbiddensmoothies:block/blender", + "y": 270 } } } \ No newline at end of file diff --git a/shared/src/generated/resources/data/forbiddensmoothies/advancements/recipes/decorations/blender.json b/shared/src/generated/resources/data/forbiddensmoothies/advancements/recipes/decorations/blender.json new file mode 100644 index 0000000..fa6ea0c --- /dev/null +++ b/shared/src/generated/resources/data/forbiddensmoothies/advancements/recipes/decorations/blender.json @@ -0,0 +1,35 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_flint": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:flint" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "forbiddensmoothies:blender" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_flint", + "has_the_recipe" + ] + ], + "rewards": { + "recipes": [ + "forbiddensmoothies:blender" + ] + }, + "sends_telemetry_event": false +} \ No newline at end of file diff --git a/shared/src/generated/resources/data/forbiddensmoothies/recipes/blender.json b/shared/src/generated/resources/data/forbiddensmoothies/recipes/blender.json new file mode 100644 index 0000000..ae59858 --- /dev/null +++ b/shared/src/generated/resources/data/forbiddensmoothies/recipes/blender.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "F": { + "item": "minecraft:flint" + }, + "G": { + "item": "minecraft:glass_pane" + }, + "I": { + "item": "minecraft:iron_ingot" + } + }, + "pattern": [ + "III", + "GFG", + "III" + ], + "result": { + "item": "forbiddensmoothies:blender" + }, + "show_notification": true +} \ No newline at end of file diff --git a/shared/src/generated/resources/data/forbiddensmoothies/recipes/printer.json b/shared/src/generated/resources/data/forbiddensmoothies/recipes/printer.json index 88e2eb9..b15e320 100644 --- a/shared/src/generated/resources/data/forbiddensmoothies/recipes/printer.json +++ b/shared/src/generated/resources/data/forbiddensmoothies/recipes/printer.json @@ -5,6 +5,9 @@ "C": { "item": "minecraft:copper_ingot" }, + "G": { + "item": "minecraft:glass_pane" + }, "I": { "item": "minecraft:iron_ingot" }, @@ -17,7 +20,7 @@ }, "pattern": [ "ICI", - "ILI", + "GLG", "IRI" ], "result": { diff --git a/shared/src/main/java/net/blay09/mods/forbiddensmoothies/ForbiddenSmoothies.java b/shared/src/main/java/net/blay09/mods/forbiddensmoothies/ForbiddenSmoothies.java index cd96533..c69b06a 100644 --- a/shared/src/main/java/net/blay09/mods/forbiddensmoothies/ForbiddenSmoothies.java +++ b/shared/src/main/java/net/blay09/mods/forbiddensmoothies/ForbiddenSmoothies.java @@ -13,7 +13,8 @@ public class ForbiddenSmoothies { // TODO fancy in-world rendering - // TODO Blender + // TODO better textures for the models + // TODO Slightly different blender UI? public static final String MOD_ID = "forbiddensmoothies"; public static final Logger logger = LogManager.getLogger(MOD_ID);