From 197834c36cdd6adb7c4edc1c7c032d46a14e6f62 Mon Sep 17 00:00:00 2001 From: LordGrimmauld Date: Thu, 18 Jun 2020 07:57:20 +0200 Subject: [PATCH] fix pipe connections and tank hitbox (again) --- .../create/content/contraptions/fluids/FluidPipeBlock.java | 2 +- .../create/content/contraptions/fluids/FluidTankBlock.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPipeBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPipeBlock.java index 5df66aead..f3cc7c6de 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPipeBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPipeBlock.java @@ -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 diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankBlock.java index 9e665f575..822f86505 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidTankBlock.java @@ -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); }