mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-06 00:49:09 +01:00
Switch these around to make the ESD automatically assign to things like chests again
Closes #471
This commit is contained in:
parent
33d1de7d16
commit
855a86a8f6
1 changed files with 14 additions and 18 deletions
|
@ -145,17 +145,15 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
|
|||
this.placeToPull = this.worldObj.getTileEntity(this.pos.offset(side));
|
||||
|
||||
if(this.slotToPullEnd <= 0 && this.placeToPull != null){
|
||||
if(this.placeToPull instanceof IInventory){
|
||||
this.slotToPullEnd = ((IInventory)this.placeToPull).getSizeInventory();
|
||||
}
|
||||
else{
|
||||
if(this.placeToPull.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)){
|
||||
IItemHandler cap = this.placeToPull.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
||||
if(cap != null){
|
||||
this.slotToPullEnd = cap.getSlots();
|
||||
}
|
||||
if(this.placeToPull.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)){
|
||||
IItemHandler cap = this.placeToPull.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
||||
if(cap != null){
|
||||
this.slotToPullEnd = cap.getSlots();
|
||||
}
|
||||
}
|
||||
else if(this.placeToPull instanceof IInventory){
|
||||
this.slotToPullEnd = ((IInventory)this.placeToPull).getSizeInventory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,17 +162,15 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
|
|||
this.placeToPut = this.worldObj.getTileEntity(this.pos.offset(side));
|
||||
|
||||
if(this.slotToPutEnd <= 0 && this.placeToPut != null){
|
||||
if(this.placeToPut instanceof IInventory){
|
||||
this.slotToPutEnd = ((IInventory)this.placeToPut).getSizeInventory();
|
||||
}
|
||||
else{
|
||||
if(this.placeToPut.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)){
|
||||
IItemHandler cap = this.placeToPut.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
||||
if(cap != null){
|
||||
this.slotToPutEnd = cap.getSlots();
|
||||
}
|
||||
if(this.placeToPut.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)){
|
||||
IItemHandler cap = this.placeToPut.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
||||
if(cap != null){
|
||||
this.slotToPutEnd = cap.getSlots();
|
||||
}
|
||||
}
|
||||
else if(this.placeToPut instanceof IInventory){
|
||||
this.slotToPutEnd = ((IInventory)this.placeToPut).getSizeInventory();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue