mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Yea nevermind whoops
This commit is contained in:
parent
afcbc81d35
commit
2b40e12eae
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue