aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java')
-rw-r--r--src/main/java/me/shedaniel/rei/server/InputSlotCrafter.java11
1 files changed, 7 insertions, 4 deletions
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<C extends Inventory> 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<C extends Inventory> implements RecipeGridAligner<
return int_1;
}
+ public static class NotEnoughMaterialsException extends RuntimeException {
+ }
+
}