summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockCauldron.h5
-rw-r--r--src/Blocks/BlockGrass.h2
-rw-r--r--src/Blocks/BlockPluginInterface.h6
-rw-r--r--src/Blocks/BlockVines.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/src/Blocks/BlockCauldron.h b/src/Blocks/BlockCauldron.h
index cbd17a849..82247944c 100644
--- a/src/Blocks/BlockCauldron.h
+++ b/src/Blocks/BlockCauldron.h
@@ -156,8 +156,9 @@ private:
// Using cauldrons with blocks was added in 1.13 as part of shulker cleaning.
const auto ResendPosition = AddFaceDirection(a_BlockPos, a_BlockFace);
a_Player.GetClientHandle()->SendBlockChange(
- ResendPosition.x, ResendPosition.y, ResendPosition.z,
- a_ChunkInterface.GetBlock(ResendPosition), a_ChunkInterface.GetBlockMeta(ResendPosition)
+ ResendPosition,
+ a_ChunkInterface.GetBlock(ResendPosition),
+ a_ChunkInterface.GetBlockMeta(ResendPosition)
);
return true;
diff --git a/src/Blocks/BlockGrass.h b/src/Blocks/BlockGrass.h
index 8309a4bd5..09af250c3 100644
--- a/src/Blocks/BlockGrass.h
+++ b/src/Blocks/BlockGrass.h
@@ -161,7 +161,7 @@ private:
)
{
const auto AbsPos = Chunk->RelativeToAbsolute(a_RelPos);
- if (!cRoot::Get()->GetPluginManager()->CallHookBlockSpread(*Chunk->GetWorld(), AbsPos.x, AbsPos.y, AbsPos.z, ssGrassSpread))
+ if (!cRoot::Get()->GetPluginManager()->CallHookBlockSpread(*Chunk->GetWorld(), AbsPos, ssGrassSpread))
{
Chunk->FastSetBlock(a_RelPos, E_BLOCK_GRASS, 0);
}
diff --git a/src/Blocks/BlockPluginInterface.h b/src/Blocks/BlockPluginInterface.h
index 087e86412..0cf3ef0e3 100644
--- a/src/Blocks/BlockPluginInterface.h
+++ b/src/Blocks/BlockPluginInterface.h
@@ -29,9 +29,9 @@ class cBlockPluginInterface
public:
virtual ~cBlockPluginInterface() {}
- virtual bool CallHookBlockSpread(int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source) = 0;
- virtual bool CallHookPlayerBreakingBlock(cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
- virtual bool CallHookPlayerBrokenBlock(cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
+ virtual bool CallHookBlockSpread(Vector3i a_BlockPos, eSpreadSource a_Source) = 0;
+ virtual bool CallHookPlayerBreakingBlock(cPlayer & a_Player, Vector3i a_BlockPos, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
+ virtual bool CallHookPlayerBrokenBlock(cPlayer & a_Player, Vector3i a_BlockPos, eBlockFace a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0;
};
diff --git a/src/Blocks/BlockVines.h b/src/Blocks/BlockVines.h
index d6eccd552..0ab0441a8 100644
--- a/src/Blocks/BlockVines.h
+++ b/src/Blocks/BlockVines.h
@@ -210,7 +210,7 @@ private:
if (Block == E_BLOCK_AIR)
{
auto WorldPos = a_Chunk.RelativeToAbsolute(GrowPos);
- if (!a_PluginInterface.CallHookBlockSpread(WorldPos.x, WorldPos.y, WorldPos.z, ssVineSpread))
+ if (!a_PluginInterface.CallHookBlockSpread(WorldPos, ssVineSpread))
{
a_Chunk.UnboundedRelSetBlock(GrowPos, E_BLOCK_VINES, a_Chunk.GetMeta(a_RelPos));
}