summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_8.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-10-21 18:56:09 +0200
committerAlexander Harkness <me@bearbin.net>2017-10-21 18:56:09 +0200
commit0bacda32692729e4b9743f91d92cd329e198d73a (patch)
tree6d5780aafb44679125145f3bc255a200a840c3c2 /src/Protocol/Protocol_1_8.cpp
parentFixed some small passive mob issues (#4057) (diff)
downloadcuberite-0bacda32692729e4b9743f91d92cd329e198d73a.tar
cuberite-0bacda32692729e4b9743f91d92cd329e198d73a.tar.gz
cuberite-0bacda32692729e4b9743f91d92cd329e198d73a.tar.bz2
cuberite-0bacda32692729e4b9743f91d92cd329e198d73a.tar.lz
cuberite-0bacda32692729e4b9743f91d92cd329e198d73a.tar.xz
cuberite-0bacda32692729e4b9743f91d92cd329e198d73a.tar.zst
cuberite-0bacda32692729e4b9743f91d92cd329e198d73a.zip
Diffstat (limited to 'src/Protocol/Protocol_1_8.cpp')
-rw-r--r--src/Protocol/Protocol_1_8.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index c384f85b9..e7f197d3d 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -39,6 +39,7 @@ Implements the 1.8 protocol classes:
#include "../Mobs/IncludeAllMonsters.h"
#include "../UI/Window.h"
+#include "../UI/HorseWindow.h"
#include "../BlockEntities/BeaconEntity.h"
#include "../BlockEntities/CommandBlockEntity.h"
@@ -1678,7 +1679,8 @@ void cProtocol_1_8_0::SendWindowOpen(const cWindow & a_Window)
if (a_Window.GetWindowType() == cWindow::wtAnimalChest)
{
- Pkt.WriteBEInt32(0); // TODO: The animal's EntityID
+ UInt32 HorseID = static_cast<const cHorseWindow &>(a_Window).GetHorseID();
+ Pkt.WriteBEInt32(static_cast<Int32>(HorseID));
}
}
@@ -2428,6 +2430,7 @@ void cProtocol_1_8_0::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer)
case 2: m_Client->HandleEntityLeaveBed(PlayerID); break; // Leave Bed
case 3: m_Client->HandleEntitySprinting(PlayerID, true); break; // Start sprinting
case 4: m_Client->HandleEntitySprinting(PlayerID, false); break; // Stop sprinting
+ case 6: m_Client->HandleOpenHorseInventory(PlayerID); break; // Open horse inventory
}
}