diff options
author | Mattes D <github@xoft.cz> | 2019-10-16 10:06:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-16 10:06:34 +0200 |
commit | 221cc4ec5cb6301743e947eaabed3fecedba796f (patch) | |
tree | 4e44c8bb7523e5d1d04468fc906ae24674c10abc /src/Blocks/BlockSponge.h | |
parent | Fixed crash in hopper while pulling items from blockentity above itself (#4412) (diff) | |
download | cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.gz cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.bz2 cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.lz cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.xz cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.zst cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockSponge.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Blocks/BlockSponge.h b/src/Blocks/BlockSponge.h index 24bc25388..7df5d69ff 100644 --- a/src/Blocks/BlockSponge.h +++ b/src/Blocks/BlockSponge.h @@ -10,9 +10,12 @@ class cBlockSpongeHandler : public cBlockHandler { + using super = cBlockHandler; + public: + cBlockSpongeHandler(BLOCKTYPE a_BlockType): - cBlockHandler(a_BlockType) + super(a_BlockType) { } @@ -20,13 +23,17 @@ public: - virtual void Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk) override + virtual void Check( + cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, + Vector3i a_RelPos, + cChunk & a_Chunk + ) override { - if (GetSoaked(Vector3i(a_RelX, a_RelY, a_RelZ), a_Chunk)) + if (GetSoaked(a_RelPos, a_Chunk)) { return; } - cBlockHandler::Check(a_ChunkInterface, a_PluginInterface, a_RelX, a_RelY, a_RelZ, a_Chunk); + super::Check(a_ChunkInterface, a_PluginInterface, a_RelPos, a_Chunk); } @@ -115,7 +122,7 @@ public: } Seeds.pop(); } - a_Chunk.SetBlock(a_Rel.x, a_Rel.y, a_Rel.z, E_BLOCK_SPONGE, E_META_SPONGE_WET); + a_Chunk.SetBlock(a_Rel, E_BLOCK_SPONGE, E_META_SPONGE_WET); return true; } |