mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Made the Advanced ESD respect its whitelist again.
Yes, really.
This commit is contained in:
parent
12d1fe26cc
commit
5bac637c35
1 changed files with 14 additions and 17 deletions
|
@ -30,8 +30,6 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
|
||||||
|
|
||||||
public static final int PUT_FILTER_START = 13;
|
public static final int PUT_FILTER_START = 13;
|
||||||
public static final int PULL_FILTER_START = 1;
|
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 static final int OKAY_BUTTON_ID = 133;
|
||||||
public int sideToPut = -1;
|
public int sideToPut = -1;
|
||||||
public int slotToPutStart;
|
public int slotToPutStart;
|
||||||
|
@ -88,6 +86,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
|
||||||
IItemHandler cap = this.placeToPull.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side);
|
IItemHandler cap = this.placeToPull.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side);
|
||||||
if(cap != null){
|
if(cap != null){
|
||||||
for(int i = Math.max(this.slotToPullStart, 0); i < Math.min(this.slotToPullEnd, cap.getSlots()); i++){
|
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)){
|
if(WorldUtil.doItemInteraction(i, 0, this.placeToPull, this, side, null)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -95,10 +94,12 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean newPutting(){
|
private boolean newPutting(){
|
||||||
|
if(this.checkBothFilters(this.slots[0], true)){
|
||||||
for(EnumFacing side : EnumFacing.values()){
|
for(EnumFacing side : EnumFacing.values()){
|
||||||
if(this.placeToPut.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side)){
|
if(this.placeToPut.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side)){
|
||||||
IItemHandler cap = this.placeToPut.getCapability(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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,12 +311,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
|
||||||
* @return If the Item is filtered correctly
|
* @return If the Item is filtered correctly
|
||||||
*/
|
*/
|
||||||
private boolean checkBothFilters(ItemStack stack, boolean output){
|
private boolean checkBothFilters(ItemStack stack, boolean output){
|
||||||
if(!this.isAdvanced){
|
return !this.isAdvanced || (output ? this.rightFilter : this.leftFilter).check(stack, this.slots);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
return (output ? this.rightFilter : this.leftFilter).check(stack, this.slots);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue