From 2b40e12eae55607dd0f16b730e488464bea245ce Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 7 Jul 2015 12:34:20 +0200 Subject: [PATCH] Yea nevermind whoops --- .../java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java | 2 +- .../ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java | 2 +- src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java index 4a074775a..a47c3b413 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java @@ -61,7 +61,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase{ } } else if(this.isPlacer && worldObj.getBlock(coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ()).isReplaceable(worldObj, coordsBlock.getX(), coordsBlock.getY(), coordsBlock.getZ())){ - int theSlot = WorldUtil.findFirstEmptySlot(this.slots); + int theSlot = WorldUtil.findFirstFilledSlot(this.slots); this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord, this.slots[theSlot])); if(this.slots[theSlot] != null && this.slots[theSlot].stackSize <= 0) this.slots[theSlot] = null; } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java index c85842376..1f0c2a7bc 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java @@ -73,7 +73,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase{ } else{ if(boundPosition.getWorld().getBlock(boundPosition.getX(), boundPosition.getY(), boundPosition.getZ()).isReplaceable(boundPosition.getWorld(), boundPosition.getX(), boundPosition.getY(), boundPosition.getZ())){ - int theSlot = WorldUtil.findFirstEmptySlot(this.slots); + int theSlot = WorldUtil.findFirstFilledSlot(this.slots); this.setInventorySlotContents(theSlot, WorldUtil.placeBlockAtSide(ForgeDirection.UNKNOWN, boundPosition.getWorld(), boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), this.slots[theSlot])); if(this.slots[theSlot] != null && this.slots[theSlot].stackSize <= 0) this.slots[theSlot] = null; } diff --git a/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java b/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java index 1e1a5cc77..b99df9478 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java @@ -200,7 +200,7 @@ public class WorldUtil{ return working >= stacks.size(); } - public static int findFirstEmptySlot(ItemStack[] slots){ + public static int findFirstFilledSlot(ItemStack[] slots){ for(int i = 0; i < slots.length; i++){ if(slots[i] != null){ return i;