diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-09-29 22:43:42 +0200 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-09-29 22:43:42 +0200 |
commit | 17486c785331e809f5294fee40367b1590e0d36b (patch) | |
tree | 3104a260f3eac320a190af73a3dced00cb77bcfe /source/Protocol/Protocol125.cpp | |
parent | Fixed memory leaks in cWindow and cProtocolRecognizer (diff) | |
download | cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.gz cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.bz2 cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.lz cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.xz cuberite-17486c785331e809f5294fee40367b1590e0d36b.tar.zst cuberite-17486c785331e809f5294fee40367b1590e0d36b.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Protocol/Protocol125.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index 1f2edad63..bec6a19b6 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -46,7 +46,7 @@ enum PACKET_BLOCK_DIG = 0x0e,
PACKET_BLOCK_PLACE = 0x0f,
PACKET_SLOT_SELECTED = 0x10,
- PACKET_ADD_TO_INV = 0x11, // TODO: Sure this is not Use Bed??
+ PACKET_USE_BED = 0x11, // TODO: Sure this is not Use Bed??
PACKET_ANIMATION = 0x12,
PACKET_PACKET_ENTITY_ACTION = 0x13,
PACKET_PLAYER_SPAWN = 0x14,
@@ -778,6 +778,22 @@ void cProtocol125::SendWindowOpen(char a_WindowID, char a_WindowType, const AStr +void cProtocol125::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ )
+{
+ cCSLock Lock(m_CSPacket);
+ WriteByte(PACKET_USE_BED);
+ WriteInt (a_Entity.GetUniqueID());
+ WriteByte(0); // Unknown byte only 0 has been observed
+ WriteInt (a_BlockX);
+ WriteByte(a_BlockY);
+ WriteInt (a_BlockZ);
+ Flush();
+}
+
+
+
+
+
AString cProtocol125::GetAuthServerID(void)
{
// http://wiki.vg/wiki/index.php?title=Session&oldid=2262
@@ -985,7 +1001,7 @@ int cProtocol125::ParseEntityAction(void) {
HANDLE_PACKET_READ(ReadBEInt, int, EntityID);
HANDLE_PACKET_READ(ReadChar, char, ActionID);
- // TODO: m_Client->HandleEntityAction(...);
+ m_Client->HandleEntityAction(EntityID, ActionID);
return PARSE_OK;
}
|