made laser relays not try to input back into the thing they got energy from

This commit is contained in:
Ellpeck 2016-12-01 18:23:26 +01:00
parent 2cc5d02814
commit d8af7636ee
2 changed files with 12 additions and 0 deletions

View file

@ -123,7 +123,13 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements
TileEntity relayTile = this.worldObj.getTileEntity(relay);
if(relayTile instanceof TileEntityLaserRelayEnergy){
TileEntityLaserRelayEnergy theRelay = (TileEntityLaserRelayEnergy)relayTile;
int amount = theRelay.receiversAround.size();
if(theRelay == this && theRelay.receiversAround.containsKey(from)){
//So that the tile energy was gotten from isn't factored into the amount
amount--;
}
if(amount > 0){
relaysThatWork.add(theRelay);
totalReceiverAmount += amount;

View file

@ -117,7 +117,13 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay implements
TileEntity relayTile = this.worldObj.getTileEntity(relay);
if(relayTile instanceof TileEntityLaserRelayFluids){
TileEntityLaserRelayFluids theRelay = (TileEntityLaserRelayFluids)relayTile;
int amount = theRelay.receiversAround.size();
if(theRelay == this && theRelay.receiversAround.containsKey(from)){
//So that the tile energy was gotten from isn't factored into the amount
amount--;
}
if(amount > 0){
relaysThatWork.add(theRelay);
totalReceiverAmount += amount;