fixed pipes reconnecting when they shouldn't

This commit is contained in:
Ellpeck 2020-04-20 16:20:33 +02:00
parent 871995e807
commit 9b28509542

View file

@ -147,8 +147,9 @@ public class PipeBlock extends ContainerBlock implements IPipeConnectable {
EnumProperty<ConnectionType> prop = DIRECTIONS.get(dir);
ConnectionType type = getConnectionType(world, pos, dir, state);
// don't reconnect on blocked faces
if (!type.isConnected() || curr.get(prop) != ConnectionType.BLOCKED)
state = state.with(prop, type);
if (type.isConnected() && curr.get(prop) == ConnectionType.BLOCKED)
type = ConnectionType.BLOCKED;
state = state.with(prop, type);
}
return state;
}