Skip to content

Commit 5085004

Browse files
committed
Fixed Items Vanishing
1 parent 2af247c commit 5085004

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/java/com/redcrafter07/ultrautilities/tileentity/CraftingStationTile.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,14 @@ public void craft() {
9999
recipe.ifPresent(iRecipe -> {
100100
ItemStack output = iRecipe.getRecipeOutput();
101101

102-
itemHandler.extractItem(0, 1, false);
103-
itemHandler.extractItem(1, 1, false);
104-
itemHandler.insertItem(2, output, false);
102+
// System.out.println(itemHandler.getStackInSlot(2).getCount());
103+
104+
if(itemHandler.getStackInSlot(2).getCount() < 1) {
105+
itemHandler.extractItem(0, 1, false);
106+
itemHandler.extractItem(1, 1, false);
107+
itemHandler.insertItem(2, output, false);
108+
}
109+
105110

106111
markDirty();
107112
});

0 commit comments

Comments
 (0)