Fix interface bug

This commit is contained in:
Raoul Van den Berge
2016-03-26 15:45:09 +01:00
parent 31ead233e1
commit b3ae29ed80

View File

@@ -29,7 +29,7 @@ public class TileInterface extends TileMachine implements ICompareSetting, ISide
@Override
public void updateMachine() {
if (ticks % 5 == 0) {
ItemStack slot = inventory.getStackInSlot(currentSlot);
ItemStack slot;
while ((slot = inventory.getStackInSlot(currentSlot)) == null) {
currentSlot++;
@@ -39,7 +39,7 @@ public class TileInterface extends TileMachine implements ICompareSetting, ISide
}
}
if (inventory.getStackInSlot(currentSlot) != null) {
if (slot != null) {
if (getController().push(slot)) {
inventory.setInventorySlotContents(currentSlot, null);
}