summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-04-27 17:33:45 +0200
committerGitHub <noreply@github.com>2018-04-27 17:33:45 +0200
commit319b30eec60ba3931a04bbc65a8c59d93823328b (patch)
tree1fe7ae1d9bb539a2ec6d37bf469e7a325d098d67 /src/Entities
parentRemoved unnecessary disconnect (#4200) (diff)
downloadcuberite-319b30eec60ba3931a04bbc65a8c59d93823328b.tar
cuberite-319b30eec60ba3931a04bbc65a8c59d93823328b.tar.gz
cuberite-319b30eec60ba3931a04bbc65a8c59d93823328b.tar.bz2
cuberite-319b30eec60ba3931a04bbc65a8c59d93823328b.tar.lz
cuberite-319b30eec60ba3931a04bbc65a8c59d93823328b.tar.xz
cuberite-319b30eec60ba3931a04bbc65a8c59d93823328b.tar.zst
cuberite-319b30eec60ba3931a04bbc65a8c59d93823328b.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Floater.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp
index 4dc64cf53..82213c668 100644
--- a/src/Entities/Floater.cpp
+++ b/src/Entities/Floater.cpp
@@ -147,6 +147,11 @@ void cFloater::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
}
}
+ }
+
+ // Check water at the top of floater otherwise it floats into the air above the water
+ if (IsBlockWater(m_World->GetBlock(POSX_TOINT, FloorC(GetPosY() + GetHeight()), POSZ_TOINT)))
+ {
SetSpeedY(0.7);
}