From 97bff0f95f2106f5be1225dec357b9eb6e435c63 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 22 Nov 2021 12:44:36 +0100 Subject: [PATCH] Other pipes are available - Moved fluid update fix from encased pipes to all pipes --- .../create/content/contraptions/fluids/FluidPropagator.java | 2 ++ .../content/contraptions/fluids/pipes/EncasedPipeBlock.java | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java index 3c872fa02..d577721b0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java @@ -125,6 +125,8 @@ public class FluidPropagator { BlockPos neighborPos, boolean isMoving) { if (world.isClientSide) return null; + // calling getblockstate() as otherBlock param seems to contain the block which was replaced + otherBlock = world.getBlockState(neighborPos).getBlock(); if (otherBlock instanceof FluidPipeBlock) return null; if (otherBlock instanceof AxisPipeBlock) diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/EncasedPipeBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/EncasedPipeBlock.java index 65afe2c4c..e668ab22c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/EncasedPipeBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/EncasedPipeBlock.java @@ -89,9 +89,7 @@ public class EncasedPipeBlock extends Block implements IWrenchable, ISpecialBloc public void neighborChanged(BlockState state, World world, BlockPos pos, Block otherBlock, BlockPos neighborPos, boolean isMoving) { DebugPacketSender.sendNeighborsUpdatePacket(world, pos); - // calling getblockstate() as otherBlock param seems to contain the block which was replaced - Direction d = FluidPropagator.validateNeighbourChange(state, world, pos, world.getBlockState(neighborPos) - .getBlock(), neighborPos, isMoving); + Direction d = FluidPropagator.validateNeighbourChange(state, world, pos, otherBlock, neighborPos, isMoving); if (d == null) return; if (!state.getValue(FACING_TO_PROPERTY_MAP.get(d)))