From 6627ed2183671f861417ce663db5b03bfe501297 Mon Sep 17 00:00:00 2001 From: JoshieGemFinder <79513611+JoshieGemFinder@users.noreply.github.com> Date: Sat, 21 Jan 2023 11:51:48 +1000 Subject: [PATCH] Fix pulling current from non-adjacent blocks Swamp water would still have a current if it was flowing over an edge (seen (here)[https://youtu.be/YS22dYR6tjg]) and it was cut off from its source, this fixes that --- .../common/block/terrain/BlockSwampWater.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/thebetweenlands/common/block/terrain/BlockSwampWater.java b/src/main/java/thebetweenlands/common/block/terrain/BlockSwampWater.java index d89d155141..d639c3ba84 100644 --- a/src/main/java/thebetweenlands/common/block/terrain/BlockSwampWater.java +++ b/src/main/java/thebetweenlands/common/block/terrain/BlockSwampWater.java @@ -328,11 +328,7 @@ public void updateTick(World world, BlockPos pos, IBlockState state, Random rand if (!(state.getBlock() instanceof BlockSwampWater && ((BlockSwampWater) state.getBlock()).isUnderwaterBlock)) { // check adjacent block levels if non-source if (quantaRemaining < quantaPerBlock) { - if (world.getBlockState(pos.add(0, -densityDir, 0)).getBlock() == this || - world.getBlockState(pos.add(-1, -densityDir, 0)).getBlock() == this || - world.getBlockState(pos.add(1, -densityDir, 0)).getBlock() == this || - world.getBlockState(pos.add(0, -densityDir, -1)).getBlock() == this || - world.getBlockState(pos.add(0, -densityDir, 1)).getBlock() == this) { + if (world.getBlockState(pos.add(0, -densityDir, 0)).getBlock() == this) { expQuanta = quantaPerBlock - 1; } else { int maxQuanta = -100; @@ -561,4 +557,4 @@ public FluidStack drain(World world, BlockPos pos, boolean doDrain) { } return super.drain(world, pos, doDrain); } -} \ No newline at end of file +}