mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 19:58:35 +01:00
made PipeBlock#getConnectionType not static
This commit is contained in:
parent
9f049e8b89
commit
f5443becf8
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue