made PipeBlock#getConnectionType not static

This commit is contained in:
Ell 2020-08-28 00:33:34 +02:00
parent 9f049e8b89
commit f5443becf8

View file

@ -157,7 +157,7 @@ public class PipeBlock extends ContainerBlock implements IPipeConnectable {
for (Direction dir : Direction.values()) { for (Direction dir : Direction.values()) {
EnumProperty<ConnectionType> prop = DIRECTIONS.get(dir); EnumProperty<ConnectionType> prop = DIRECTIONS.get(dir);
ConnectionType type = getConnectionType(world, pos, dir, state); ConnectionType type = this.getConnectionType(world, pos, dir, state);
// don't reconnect on blocked faces // don't reconnect on blocked faces
if (type.isConnected() && curr.get(prop) == ConnectionType.BLOCKED) if (type.isConnected() && curr.get(prop) == ConnectionType.BLOCKED)
type = ConnectionType.BLOCKED; type = ConnectionType.BLOCKED;
@ -166,7 +166,7 @@ public class PipeBlock extends ContainerBlock implements IPipeConnectable {
return state; return state;
} }
protected static ConnectionType getConnectionType(World world, BlockPos pos, Direction direction, BlockState state) { protected ConnectionType getConnectionType(World world, BlockPos pos, Direction direction, BlockState state) {
BlockPos offset = pos.offset(direction); BlockPos offset = pos.offset(direction);
if (!world.isBlockLoaded(offset)) if (!world.isBlockLoaded(offset))
return ConnectionType.DISCONNECTED; return ConnectionType.DISCONNECTED;