Fixed machines trying to input into themselves with tesla

This commit is contained in:
Ellpeck 2016-06-17 14:06:43 +02:00
parent 138a1af26c
commit d8406ab5fc

View file

@ -57,11 +57,8 @@ public final class TeslaUtil{
ITeslaProducer handlerFrom = null; ITeslaProducer handlerFrom = null;
for(int i = 0; i < 2; i++){ for(int i = 0; i < 2; i++){
if(handlerFrom == null){ if(handlerFrom == null && handlerTo == null){
handlerFrom = (i == 0 ? tile : otherTile).getCapability(teslaProducer, i == 0 ? side : side.getOpposite()); handlerFrom = (i == 0 ? tile : otherTile).getCapability(teslaProducer, i == 0 ? side : side.getOpposite());
}
if(handlerTo == null){
handlerTo = (i == 0 ? otherTile : tile).getCapability(teslaConsumer, i == 0 ? side.getOpposite() : side); handlerTo = (i == 0 ? otherTile : tile).getCapability(teslaConsumer, i == 0 ? side.getOpposite() : side);
} }
} }