Fixed laser relays sometimes not properly dealing with sides

Closes #164
This commit is contained in:
Ellpeck 2016-07-24 02:17:23 +02:00
parent 5bac637c35
commit c61785e307

View file

@ -97,7 +97,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements
int lowestCap = Math.min(theRelay.getEnergyCap(), this.getEnergyCap());
for(Map.Entry<EnumFacing, IEnergyReceiver> receiver : theRelay.receiversAround.entrySet()){
if(receiver != null && receiver.getKey() != null && receiver.getValue() != null){
if(receiver.getKey() != from){
if(theRelay != this || receiver.getKey() != from){
if(receiver.getValue().canConnectEnergy(receiver.getKey().getOpposite())){
//Transfer the energy (with the energy loss!)
int theoreticalReceived = receiver.getValue().receiveEnergy(receiver.getKey().getOpposite(), Math.min(maxTransfer, lowestCap)-transmitted, true);