From 1b71bba8dde93522c400afb7111bd72d4fe5993e Mon Sep 17 00:00:00 2001 From: Danielshe Date: Sun, 8 Sep 2019 17:51:58 +0800 Subject: Close #159 --- src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java') diff --git a/src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java b/src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java index c84f43388..c7eba25b1 100644 --- a/src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java +++ b/src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java @@ -62,11 +62,11 @@ public class InputSlotCrafter implements RecipeGridAligner< this.fillInputSlots(recipeFinder, ingredients, hasShift); } else { this.returnInputs(); - craftingContainer.sendContentUpdates(); - throw new NullPointerException(); + player.inventory.markDirty(); + throw new NotEnoughMaterialsException(); } - - craftingContainer.sendContentUpdates(); + + player.inventory.markDirty(); } } @@ -241,4 +241,7 @@ public class InputSlotCrafter implements RecipeGridAligner< return int_1; } + public static class NotEnoughMaterialsException extends RuntimeException { + } + } -- cgit