summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_11.cpp
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/Protocol/Protocol_1_11.cpp
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/Protocol/Protocol_1_11.cpp')
-rw-r--r--src/Protocol/Protocol_1_11.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Protocol/Protocol_1_11.cpp b/src/Protocol/Protocol_1_11.cpp
index 2ccc4483a..cde4b38e3 100644
--- a/src/Protocol/Protocol_1_11.cpp
+++ b/src/Protocol/Protocol_1_11.cpp
@@ -368,7 +368,7 @@ void cProtocol_1_11_0::SendEntityAnimation(const cEntity & a_Entity, const Entit
const auto Position = a_Entity.GetPosition();
// 1.11 dropped the automatic particle effect + sound on item break. Emulate at least some of it:
- SendSoundEffect("entity.item.break", Position.x, Position.y, Position.z, 1, 0.75f + ((a_Entity.GetUniqueID() * 23) % 32) / 64.f);
+ SendSoundEffect("entity.item.break", Position, 1, 0.75f + ((a_Entity.GetUniqueID() * 23) % 32) / 64.f);
break;
}
default: break;
@@ -588,8 +588,8 @@ cProtocol::Version cProtocol_1_11_0::GetProtocolVersion() const
void cProtocol_1_11_0::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
{
- int BlockX, BlockY, BlockZ;
- if (!a_ByteBuffer.ReadXYZPosition64(BlockX, BlockY, BlockZ))
+ Vector3i Position;
+ if (!a_ByteBuffer.ReadXYZPosition64(Position))
{
return;
}
@@ -600,7 +600,7 @@ void cProtocol_1_11_0::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, CursorY);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, CursorZ);
- m_Client->HandleRightClick(BlockX, BlockY, BlockZ, FaceIntToBlockFace(Face), FloorC(CursorX * 16), FloorC(CursorY * 16), FloorC(CursorZ * 16), Hand == 0);
+ m_Client->HandleRightClick(Position, FaceIntToBlockFace(Face), FloorC(CursorX * 16), FloorC(CursorY * 16), FloorC(CursorZ * 16), Hand == 0);
}