mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 03:59:45 +00:00
Clean up bottler updateServerSide
This commit is contained in:
1 parent
1d6293c788
commit
f62745b233
1 file changed
+6
-13
@@ -109,27 +109,20 @@ public class TileBottler extends TilePowered implements ISidedInventory, ILiquid
|
||||
super.updateServerSide();
|
||||
|
||||
if (updateOnInterval(20)) {
|
||||
boolean movedStack = false;
|
||||
ItemStack leftProcessingStack = getStackInSlot(InventoryBottler.SLOT_EMPTYING_PROCESSING);
|
||||
ItemStack rightProcessingStack = getStackInSlot(InventoryBottler.SLOT_FILLING_PROCESSING);
|
||||
if(leftProcessingStack == null){
|
||||
if (leftProcessingStack == null) {
|
||||
ItemStack inputStack = getStackInSlot(InventoryBottler.SLOT_INPUT_FULL_CONTAINER);
|
||||
if(inputStack != null){
|
||||
leftProcessingStack = inputStack.copy();
|
||||
leftProcessingStack.stackSize = 1;
|
||||
if (inputStack != null) {
|
||||
leftProcessingStack = decrStackSize(InventoryBottler.SLOT_INPUT_FULL_CONTAINER, 1);
|
||||
setInventorySlotContents(InventoryBottler.SLOT_EMPTYING_PROCESSING, leftProcessingStack);
|
||||
decrStackSize(InventoryBottler.SLOT_INPUT_FULL_CONTAINER, 1);
|
||||
movedStack = true;
|
||||
}
|
||||
}
|
||||
if(rightProcessingStack == null){
|
||||
if (rightProcessingStack == null) {
|
||||
ItemStack inputStack = getStackInSlot(InventoryBottler.SLOT_INPUT_EMPTY_CONTAINER);
|
||||
if(inputStack != null){
|
||||
rightProcessingStack = inputStack.copy();
|
||||
rightProcessingStack.stackSize = 1;
|
||||
if (inputStack != null) {
|
||||
rightProcessingStack = decrStackSize(InventoryBottler.SLOT_INPUT_EMPTY_CONTAINER, 1);
|
||||
setInventorySlotContents(InventoryBottler.SLOT_FILLING_PROCESSING, rightProcessingStack);
|
||||
decrStackSize(InventoryBottler.SLOT_INPUT_EMPTY_CONTAINER, 1);
|
||||
movedStack = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user