mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
fix pipe connections and tank hitbox (again)
This commit is contained in:
parent
c51e2abf48
commit
197834c36c
2 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable {
|
|||
}
|
||||
|
||||
public static boolean isTank(BlockState state, IBlockReader world, BlockPos pos, Direction blockFace) {
|
||||
return state.hasTileEntity() && world.getTileEntity(pos).getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, blockFace.getOpposite()) != null;
|
||||
return state.hasTileEntity() && world.getTileEntity(pos).getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, blockFace.getOpposite()).isPresent();
|
||||
}
|
||||
|
||||
// TODO: more generic pipe connection handling. Ideally without marker interface
|
||||
|
|
|
@ -101,10 +101,10 @@ public class FluidTankBlock extends Block {
|
|||
|
||||
public AxisAlignedBB getBodyShape(IBlockReader world, BlockPos pos) {
|
||||
return new AxisAlignedBB((isTankToDirection(world, pos, Direction.WEST) ? 0 : 1) / 16f,
|
||||
0.25f,
|
||||
0,
|
||||
(isTankToDirection(world, pos, Direction.NORTH) ? 0 : 1) / 16f,
|
||||
(isTankToDirection(world, pos, Direction.EAST) ? 16 : 15) / 16f,
|
||||
0.75f,
|
||||
1,
|
||||
(isTankToDirection(world, pos, Direction.SOUTH) ? 16 : 15) / 16f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue