From 645dbb2dea6f11e205874c0cef7f31d688f6ca34 Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Thu, 31 Oct 2024 20:17:13 +0100 Subject: [PATCH] Move the cloche recipes behind a mod loaded condition --- .../.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f | 10 +++++----- .../actuallyadditions/recipe/compat/cloche_canola.json | 6 ++++++ .../actuallyadditions/recipe/compat/cloche_coffee.json | 6 ++++++ .../actuallyadditions/recipe/compat/cloche_flax.json | 6 ++++++ .../actuallyadditions/recipe/compat/cloche_rice.json | 6 ++++++ .../actuallyadditions/data/compat/ClocheRecipes.java | 10 ++++++---- 6 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/generated/resources/.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f b/src/generated/resources/.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f index 4d63a4b78..c0696f012 100644 --- a/src/generated/resources/.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f +++ b/src/generated/resources/.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f @@ -1,7 +1,7 @@ -// 1.21.1 2024-10-24T15:58:31.7869255 Misc Recipes -426ef39628bee0e5fa5478e8490b9661a302bc5b data/actuallyadditions/recipe/compat/cloche_canola.json -86384eda7472a193965aec7c58a1e97178bd901b data/actuallyadditions/recipe/compat/cloche_coffee.json -f60e89093717ab73b5ec4760a4a2a2502ad92b21 data/actuallyadditions/recipe/compat/cloche_flax.json -c2a9c355543d601b810a4ffc581bdeaf00077358 data/actuallyadditions/recipe/compat/cloche_rice.json +// 1.21.1 2024-10-31T20:16:27.2164769 Misc Recipes +f323dfc741cadd21229c3137c992a5e827415a33 data/actuallyadditions/recipe/compat/cloche_canola.json +08a866bbe37e01cf74c466944a0ce0c1c04aacb0 data/actuallyadditions/recipe/compat/cloche_coffee.json +061b7482517f3dae5f427e723e579dfc14c0b283 data/actuallyadditions/recipe/compat/cloche_flax.json +466e21e14118dfd3f6db2bff51ebd8cc359e6979 data/actuallyadditions/recipe/compat/cloche_rice.json 11e0dd08e85ab0f073a06a447be5e57949849180 data/actuallyadditions/recipe/fermenting/refined_canola.json 3b226a682d7de7ffff4b91818057c740b4e7bcd7 data/actuallyadditions/recipe/pressing/canola.json diff --git a/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_canola.json b/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_canola.json index b7d909df6..234ed5521 100644 --- a/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_canola.json +++ b/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_canola.json @@ -1,4 +1,10 @@ { + "neoforge:conditions": [ + { + "type": "neoforge:mod_loaded", + "modid": "immersiveengineering" + } + ], "type": "immersiveengineering:cloche", "input": { "item": "actuallyadditions:canola_seeds" diff --git a/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_coffee.json b/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_coffee.json index 522a2c67c..9ebe10140 100644 --- a/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_coffee.json +++ b/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_coffee.json @@ -1,4 +1,10 @@ { + "neoforge:conditions": [ + { + "type": "neoforge:mod_loaded", + "modid": "immersiveengineering" + } + ], "type": "immersiveengineering:cloche", "input": { "item": "actuallyadditions:coffee_beans" diff --git a/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_flax.json b/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_flax.json index c0832b0fd..9948646f4 100644 --- a/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_flax.json +++ b/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_flax.json @@ -1,4 +1,10 @@ { + "neoforge:conditions": [ + { + "type": "neoforge:mod_loaded", + "modid": "immersiveengineering" + } + ], "type": "immersiveengineering:cloche", "input": { "item": "actuallyadditions:flax_seeds" diff --git a/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_rice.json b/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_rice.json index b17119506..169064923 100644 --- a/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_rice.json +++ b/src/generated/resources/data/actuallyadditions/recipe/compat/cloche_rice.json @@ -1,4 +1,10 @@ { + "neoforge:conditions": [ + { + "type": "neoforge:mod_loaded", + "modid": "immersiveengineering" + } + ], "type": "immersiveengineering:cloche", "input": { "item": "actuallyadditions:rice_seeds" diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/compat/ClocheRecipes.java b/src/main/java/de/ellpeck/actuallyadditions/data/compat/ClocheRecipes.java index 45e9636e7..6c28246fc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/compat/ClocheRecipes.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/compat/ClocheRecipes.java @@ -9,9 +9,11 @@ import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; import net.minecraft.world.item.Items; +import net.neoforged.neoforge.common.conditions.ModLoadedCondition; public class ClocheRecipes { public static void buildRecipes(RecipeOutput output) { + RecipeOutput loadedOutput = output.withConditions(new ModLoadedCondition("immersiveengineering")); ClocheRecipeBuilder.builder() .output(ActuallyItems.CANOLA, 2) .output(ActuallyItems.CANOLA_SEEDS) @@ -19,7 +21,7 @@ public class ClocheRecipes { .soil(ItemTags.DIRT) .setTime(800) .setRender(new ClocheRenderFunctions.RenderFunctionCrop(ActuallyBlocks.CANOLA.get())) - .build(output, ResourceLocation.fromNamespaceAndPath(ActuallyAdditions.MODID, "compat/cloche_canola")); + .build(loadedOutput, ResourceLocation.fromNamespaceAndPath(ActuallyAdditions.MODID, "compat/cloche_canola")); ClocheRecipeBuilder.builder() .output(Items.STRING, 2) @@ -28,7 +30,7 @@ public class ClocheRecipes { .soil(ItemTags.DIRT) .setTime(800) .setRender(new ClocheRenderFunctions.RenderFunctionCrop(ActuallyBlocks.FLAX.get())) - .build(output, ResourceLocation.fromNamespaceAndPath(ActuallyAdditions.MODID, "compat/cloche_flax")); + .build(loadedOutput, ResourceLocation.fromNamespaceAndPath(ActuallyAdditions.MODID, "compat/cloche_flax")); ClocheRecipeBuilder.builder() .output(ActuallyItems.COFFEE_BEANS, 2) @@ -37,7 +39,7 @@ public class ClocheRecipes { .soil(ItemTags.DIRT) .setTime(800) .setRender(new ClocheRenderFunctions.RenderFunctionCrop(ActuallyBlocks.COFFEE.get())) - .build(output, ResourceLocation.fromNamespaceAndPath(ActuallyAdditions.MODID, "compat/cloche_coffee")); + .build(loadedOutput, ResourceLocation.fromNamespaceAndPath(ActuallyAdditions.MODID, "compat/cloche_coffee")); ClocheRecipeBuilder.builder() .output(ActuallyItems.RICE, 2) @@ -46,6 +48,6 @@ public class ClocheRecipes { .soil(ItemTags.DIRT) .setTime(800) .setRender(new ClocheRenderFunctions.RenderFunctionCrop(ActuallyBlocks.RICE.get())) - .build(output, ResourceLocation.fromNamespaceAndPath(ActuallyAdditions.MODID, "compat/cloche_rice")); + .build(loadedOutput, ResourceLocation.fromNamespaceAndPath(ActuallyAdditions.MODID, "compat/cloche_rice")); } }