Made the Advanced ESD respect its whitelist again.

Yes, really.
This commit is contained in:
Ellpeck 2016-07-23 22:29:00 +02:00
parent 12d1fe26cc
commit 5bac637c35

View file

@ -30,8 +30,6 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
public static final int PUT_FILTER_START = 13;
public static final int PULL_FILTER_START = 1;
public static final int WHITELIST_PULL_BUTTON_ID = 87;
public static final int WHITELIST_PUT_BUTTON_ID = 88;
public static final int OKAY_BUTTON_ID = 133;
public int sideToPut = -1;
public int slotToPutStart;
@ -88,6 +86,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
IItemHandler cap = this.placeToPull.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side);
if(cap != null){
for(int i = Math.max(this.slotToPullStart, 0); i < Math.min(this.slotToPullEnd, cap.getSlots()); i++){
if(this.checkBothFilters(cap.getStackInSlot(i), false)){
if(WorldUtil.doItemInteraction(i, 0, this.placeToPull, this, side, null)){
return true;
}
@ -95,10 +94,12 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
}
}
}
}
return false;
}
private boolean newPutting(){
if(this.checkBothFilters(this.slots[0], true)){
for(EnumFacing side : EnumFacing.values()){
if(this.placeToPut.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side)){
IItemHandler cap = this.placeToPut.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side);
@ -111,6 +112,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
}
}
}
}
return false;
}
@ -309,12 +311,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
* @return If the Item is filtered correctly
*/
private boolean checkBothFilters(ItemStack stack, boolean output){
if(!this.isAdvanced){
return true;
}
else{
return (output ? this.rightFilter : this.leftFilter).check(stack, this.slots);
}
return !this.isAdvanced || (output ? this.rightFilter : this.leftFilter).check(stack, this.slots);
}
/**