diff --git a/src/main/java/snownee/lychee/block_crushing/BlockCrushingRecipe.java b/src/main/java/snownee/lychee/block_crushing/BlockCrushingRecipe.java index 2c07ef8a..e3dcbd9b 100644 --- a/src/main/java/snownee/lychee/block_crushing/BlockCrushingRecipe.java +++ b/src/main/java/snownee/lychee/block_crushing/BlockCrushingRecipe.java @@ -83,9 +83,7 @@ public boolean matchesFallingBlock(BlockState blockstate, CompoundTag nbt) { return false; } else { if (access.getNbt() != NbtPredicate.ANY) { - if (nbt == null || !access.getNbt().matches(nbt)) { - return false; - } + return nbt != null && access.getNbt().matches(nbt); } return true; } diff --git a/src/main/java/snownee/lychee/core/post/Hurt.java b/src/main/java/snownee/lychee/core/post/Hurt.java index 75a37846..6aaf47b9 100644 --- a/src/main/java/snownee/lychee/core/post/Hurt.java +++ b/src/main/java/snownee/lychee/core/post/Hurt.java @@ -58,7 +58,7 @@ public static class Type extends PostActionType { @Override public Hurt fromJson(JsonObject o) { - return new Hurt(MinMaxBounds.Doubles.fromJson(o.get("damage")), new ResourceLocation("generic")); + return new Hurt(MinMaxBounds.Doubles.fromJson(o.get("damage")), new ResourceLocation(o.get("source").getAsString())); } @Override diff --git a/src/main/java/snownee/lychee/core/post/If.java b/src/main/java/snownee/lychee/core/post/If.java index 220bc5c1..1897160e 100644 --- a/src/main/java/snownee/lychee/core/post/If.java +++ b/src/main/java/snownee/lychee/core/post/If.java @@ -107,7 +107,7 @@ public boolean preventSync() { public void validate(ILycheeRecipe recipe, ILycheeRecipe.NBTPatchContext patchContext) { Preconditions.checkArgument(!getConditions().isEmpty() || failureEntries.length == 0, "Failure entries must be empty when there is no condition"); for (PostAction action : getChildActions().toList()) { - Preconditions.checkArgument(action.getClass() != NBTPatch.class, "NBTPatch cannot be used in RandomSelect"); + Preconditions.checkArgument(action.getClass() != NBTPatch.class, "NBTPatch cannot be used in If"); action.validate(recipe, patchContext); } }