summaryrefslogtreecommitdiffstats
path: root/src/Simulator/VanillaFluidSimulator.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-08-29 15:56:40 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-08-29 15:56:40 +0200
commit431b7ed0b7764db732e39802a40d94dfe9f2108b (patch)
treef3f5ab4a7b1f2838733004d8294e571b777e631f /src/Simulator/VanillaFluidSimulator.cpp
parentAdded new console command with cleanup (diff)
parentVanillaFluidSimulator: Fixed an invalid Y-coord query. (diff)
downloadcuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.gz
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.bz2
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.lz
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.xz
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.tar.zst
cuberite-431b7ed0b7764db732e39802a40d94dfe9f2108b.zip
Diffstat (limited to 'src/Simulator/VanillaFluidSimulator.cpp')
-rw-r--r--src/Simulator/VanillaFluidSimulator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Simulator/VanillaFluidSimulator.cpp b/src/Simulator/VanillaFluidSimulator.cpp
index 18d9b07e1..6df75eebb 100644
--- a/src/Simulator/VanillaFluidSimulator.cpp
+++ b/src/Simulator/VanillaFluidSimulator.cpp
@@ -98,7 +98,7 @@ int cVanillaFluidSimulator::CalculateFlowCost(cChunk * a_Chunk, int a_RelX, int
}
// Check if block below is passable
- if (!a_Chunk->UnboundedRelGetBlock(a_RelX, a_RelY - 1, a_RelZ, BlockType, BlockMeta))
+ if ((a_RelY > 0) && !a_Chunk->UnboundedRelGetBlock(a_RelX, a_RelY - 1, a_RelZ, BlockType, BlockMeta))
{
return Cost;
}