Safer check

This commit is contained in:
Ellpeck 2016-05-11 21:00:26 +02:00
parent 58e5af0814
commit 2fe50c71aa

View file

@ -92,7 +92,7 @@ public class TileEntityItemViewer extends TileEntityInventoryBase{
private boolean isWhitelisted(SpecificItemHandlerInfo handler, ItemStack stack){
boolean whitelisted = handler.relayInQuestion.isWhitelisted(stack);
TileEntityLaserRelayItem connected = this.getConnectedRelay();
if(!PosUtil.areSamePos(handler.relayInQuestion.getPos(), connected.getPos())){
if(connected != handler.relayInQuestion){
return whitelisted && connected.isWhitelisted(stack);
}
else{