fix pipe connections and tank hitbox (again)

This commit is contained in:
LordGrimmauld 2020-06-18 07:57:20 +02:00
parent c51e2abf48
commit 197834c36c
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ public class FluidPipeBlock extends SixWayBlock implements IWaterLoggable {
} }
public static boolean isTank(BlockState state, IBlockReader world, BlockPos pos, Direction blockFace) { 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 // TODO: more generic pipe connection handling. Ideally without marker interface

View file

@ -101,10 +101,10 @@ public class FluidTankBlock extends Block {
public AxisAlignedBB getBodyShape(IBlockReader world, BlockPos pos) { public AxisAlignedBB getBodyShape(IBlockReader world, BlockPos pos) {
return new AxisAlignedBB((isTankToDirection(world, pos, Direction.WEST) ? 0 : 1) / 16f, 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.NORTH) ? 0 : 1) / 16f,
(isTankToDirection(world, pos, Direction.EAST) ? 16 : 15) / 16f, (isTankToDirection(world, pos, Direction.EAST) ? 16 : 15) / 16f,
0.75f, 1,
(isTankToDirection(world, pos, Direction.SOUTH) ? 16 : 15) / 16f); (isTankToDirection(world, pos, Direction.SOUTH) ? 16 : 15) / 16f);
} }