summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorx12xx12x <44411062+12xx12@users.noreply.github.com>2022-04-19 20:30:12 +0200
committerAlexander Harkness <me@bearbin.net>2022-04-20 09:41:02 +0200
commit5ea7675eca4fe50feed7fc4b871075f8c937d8b1 (patch)
tree440c01c9c6b783b27155c631273c60d32092c38f /src/Items
parentCheck height is within world for pistons and digging (#5396) (diff)
downloadcuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar
cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.gz
cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.bz2
cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.lz
cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.xz
cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.tar.zst
cuberite-5ea7675eca4fe50feed7fc4b871075f8c937d8b1.zip
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemBucket.h4
-rw-r--r--src/Items/ItemHandler.cpp2
-rw-r--r--src/Items/ItemPumpkin.h2
-rw-r--r--src/Items/ItemSign.h2
-rw-r--r--src/Items/ItemSlab.h4
5 files changed, 7 insertions, 7 deletions
diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h
index 639661b24..e7fa0fe38 100644
--- a/src/Items/ItemBucket.h
+++ b/src/Items/ItemBucket.h
@@ -165,13 +165,13 @@ public:
// Wash away anything that was there prior to placing:
if (cFluidSimulator::CanWashAway(CurrentBlockType))
{
- if (a_PluginInterface.CallHookPlayerBreakingBlock(*a_Player, BlockPos.x, BlockPos.y, BlockPos.z, EntryFace, CurrentBlockType, CurrentBlockMeta))
+ if (a_PluginInterface.CallHookPlayerBreakingBlock(*a_Player, BlockPos, EntryFace, CurrentBlockType, CurrentBlockMeta))
{
// Plugin disagrees with the washing-away
return false;
}
a_World->DropBlockAsPickups(BlockPos, a_Player, nullptr);
- a_PluginInterface.CallHookPlayerBrokenBlock(*a_Player, BlockPos.x, BlockPos.y, BlockPos.z, EntryFace, CurrentBlockType, CurrentBlockMeta);
+ a_PluginInterface.CallHookPlayerBrokenBlock(*a_Player, BlockPos, EntryFace, CurrentBlockType, CurrentBlockMeta);
}
// Place the actual fluid block:
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 73065bb14..67d4b2a43 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -1075,7 +1075,7 @@ void cItemHandler::OnPlayerPlace(cPlayer & a_Player, const cItem & a_HeldItem, c
{
// Tried to place a block into another?
// Happens when you place a block aiming at side of block with a torch on it or stem beside it.
- a_Player.SendBlocksAround(PlacePosition.x, PlacePosition.y, PlacePosition.z, 2);
+ a_Player.SendBlocksAround(PlacePosition, 2);
a_Player.GetInventory().SendEquippedSlot();
return;
}
diff --git a/src/Items/ItemPumpkin.h b/src/Items/ItemPumpkin.h
index d467cd94f..2effb4989 100644
--- a/src/Items/ItemPumpkin.h
+++ b/src/Items/ItemPumpkin.h
@@ -25,7 +25,7 @@ private:
if (TrySpawnGolem(a_Player, a_PlacePosition))
{
// The client thinks that they placed the pumpkin, let them know it's been replaced:
- a_Player.SendBlocksAround(a_PlacePosition.x, a_PlacePosition.y, a_PlacePosition.z);
+ a_Player.SendBlocksAround(a_PlacePosition);
return true;
}
diff --git a/src/Items/ItemSign.h b/src/Items/ItemSign.h
index 5d521bb3b..8cda673dd 100644
--- a/src/Items/ItemSign.h
+++ b/src/Items/ItemSign.h
@@ -55,7 +55,7 @@ private:
}
// After successfully placing the sign, open the sign editor for the player:
- a_Player.GetClientHandle()->SendEditSign(a_PlacePosition.x, a_PlacePosition.y, a_PlacePosition.z);
+ a_Player.GetClientHandle()->SendEditSign(a_PlacePosition);
return true;
}
diff --git a/src/Items/ItemSlab.h b/src/Items/ItemSlab.h
index 88dbef1e4..e0a405fe0 100644
--- a/src/Items/ItemSlab.h
+++ b/src/Items/ItemSlab.h
@@ -30,7 +30,7 @@ private:
return false;
}
- a_Player.SendBlocksAround(a_PlacePosition.x, a_PlacePosition.y, a_PlacePosition.z, 2); // (see below)
+ a_Player.SendBlocksAround(a_PlacePosition, 2); // (see below)
return true;
}
@@ -44,7 +44,7 @@ private:
direction of the clicked block face of a block ignoring build collision, rather than replacing said block.
Resend blocks to the client to fix the bug.
Ref.: https://forum.cuberite.org/thread-434-post-17388.html#pid17388 */
- a_Player.SendBlocksAround(a_PlacePosition.x, a_PlacePosition.y, a_PlacePosition.z, 2);
+ a_Player.SendBlocksAround(a_PlacePosition, 2);
return true;
}