From 660973371d78910bfcf1414e83977199c917f1b2 Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 8 Feb 2024 14:22:52 +0000 Subject: [PATCH] Fixed stripped zap logs and wood not dropping --- .../unicopia/compat/emi/Main.java | 7 +++---- .../unicopia/item/TransformCropsRecipe.java | 10 +++++++++- .../loot_tables/blocks/stripped_zap_log.json | 20 +++++++++++++++++++ .../loot_tables/blocks/stripped_zap_wood.json | 20 +++++++++++++++++++ 4 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/data/unicopia/loot_tables/blocks/stripped_zap_log.json create mode 100644 src/main/resources/data/unicopia/loot_tables/blocks/stripped_zap_wood.json diff --git a/src/main/java/com/minelittlepony/unicopia/compat/emi/Main.java b/src/main/java/com/minelittlepony/unicopia/compat/emi/Main.java index d4e5c9ed..9523cce2 100644 --- a/src/main/java/com/minelittlepony/unicopia/compat/emi/Main.java +++ b/src/main/java/com/minelittlepony/unicopia/compat/emi/Main.java @@ -27,7 +27,6 @@ import dev.emi.emi.api.render.EmiTexture; import dev.emi.emi.api.stack.Comparison; import dev.emi.emi.api.stack.EmiStack; import dev.emi.emi.recipe.EmiStonecuttingRecipe; -import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; @@ -121,11 +120,11 @@ public class Main implements EmiPlugin { GROWING_CATEGORY, recipe.getId(), new Schematic.Builder() - .fill(0, 0, 0, 6, 0, 6, Block.getBlockFromItem(recipe.getCatalyst().getItem()).getDefaultState()) + .fill(0, 0, 0, 6, 0, 6, recipe.getCatalystState()) .set(3, 0, 3, Blocks.FARMLAND.getDefaultState()) - .set(3, 1, 3, Block.getBlockFromItem(recipe.getTargetAsItem().getItem()).getDefaultState()) + .set(3, 1, 3, recipe.getTargetState()) .build(), - List.of(EmiStack.of(recipe.getTargetAsItem()), EmiStack.of(recipe.getCatalyst(), TransformCropsRecipe.AREA)), + List.of(EmiStack.of(recipe.getTarget()), EmiStack.of(recipe.getCatalyst(), TransformCropsRecipe.AREA)), EmiStack.of(recipe.getOutput()), Unicopia.id("textures/gui/ability/grow.png") )); diff --git a/src/main/java/com/minelittlepony/unicopia/item/TransformCropsRecipe.java b/src/main/java/com/minelittlepony/unicopia/item/TransformCropsRecipe.java index 284665ce..edc9924a 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/TransformCropsRecipe.java +++ b/src/main/java/com/minelittlepony/unicopia/item/TransformCropsRecipe.java @@ -48,7 +48,15 @@ public class TransformCropsRecipe implements Recipe