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/Items/ItemBucket.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 'src/Items/ItemBucket.h')
-rw-r--r-- | src/Items/ItemBucket.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h index f5acb25b3..36caf667b 100644 --- a/src/Items/ItemBucket.h +++ b/src/Items/ItemBucket.h @@ -114,6 +114,8 @@ public: + + bool PlaceFluid( cWorld * a_World, cPlayer * a_Player, cBlockPluginInterface & a_PluginInterface, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_FluidBlock @@ -164,13 +166,7 @@ public: // Plugin disagrees with the washing-away return false; } - - cBlockHandler * Handler = BlockHandler(CurrentBlockType); - if (Handler->DoesDropOnUnsuitable()) - { - cChunkInterface ChunkInterface(a_World->GetChunkMap()); - Handler->DropBlock(ChunkInterface, *a_World, a_PluginInterface, a_Player, BlockPos.x, BlockPos.y, BlockPos.z); - } + a_World->DropBlockAsPickups(BlockPos, a_Player, nullptr); a_PluginInterface.CallHookPlayerBrokenBlock(*a_Player, BlockPos.x, BlockPos.y, BlockPos.z, EntryFace, CurrentBlockType, CurrentBlockMeta); } @@ -180,6 +176,8 @@ public: + + bool GetBlockFromTrace(cWorld * a_World, cPlayer * a_Player, Vector3i & a_BlockPos) { class cCallbacks : |