summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol142.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-01 22:38:20 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-01 22:38:20 +0100
commit4cebaa99f88e25e039416354cf490fe98642af7e (patch)
tree40f8b0cc061e3ec55539e30754df3e3d1c17dd80 /source/Protocol/Protocol142.cpp
parentAdded Bats and Witches. (diff)
downloadcuberite-4cebaa99f88e25e039416354cf490fe98642af7e.tar
cuberite-4cebaa99f88e25e039416354cf490fe98642af7e.tar.gz
cuberite-4cebaa99f88e25e039416354cf490fe98642af7e.tar.bz2
cuberite-4cebaa99f88e25e039416354cf490fe98642af7e.tar.lz
cuberite-4cebaa99f88e25e039416354cf490fe98642af7e.tar.xz
cuberite-4cebaa99f88e25e039416354cf490fe98642af7e.tar.zst
cuberite-4cebaa99f88e25e039416354cf490fe98642af7e.zip
Diffstat (limited to '')
-rw-r--r--source/Protocol/Protocol142.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/Protocol/Protocol142.cpp b/source/Protocol/Protocol142.cpp
index b4b2b66c1..17501169d 100644
--- a/source/Protocol/Protocol142.cpp
+++ b/source/Protocol/Protocol142.cpp
@@ -91,10 +91,7 @@ void cProtocol142::SendPickupSpawn(const cPickup & a_Pickup)
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_PICKUP_SPAWN);
WriteInt (a_Pickup.GetUniqueID());
- WriteShort (a_Pickup.GetItem()->m_ItemType);
- WriteByte (a_Pickup.GetItem()->m_ItemCount);
- WriteShort (a_Pickup.GetItem()->m_ItemDamage);
- WriteShort (-1); //TODO: Implement item metadata
+ WriteItem (*(a_Pickup.GetItem()));
WriteVectorI((Vector3i)(a_Pickup.GetPosition() * 32));
WriteByte ((char)(a_Pickup.GetSpeed().x * 8));
WriteByte ((char)(a_Pickup.GetSpeed().y * 8));
@@ -123,11 +120,11 @@ void cProtocol142::SendSoundParticleEffect(int a_EffectID, int a_SrcX, int a_Src
-void cProtocol142::SendTimeUpdate(Int64 a_WorldTime)
+void cProtocol142::SendTimeUpdate(Int64 a_WorldAge, Int64 a_TimeOfDay)
{
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_UPDATE_TIME);
- WriteInt64(1);
- WriteInt64(a_WorldTime);
+ WriteInt64(a_WorldAge);
+ WriteInt64(a_TimeOfDay);
Flush();
} \ No newline at end of file