diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-01-12 05:46:01 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-01-12 05:46:01 +0100 |
commit | 43e684071933adef93040e8d4b830d5c6b71cf9a (patch) | |
tree | 014e5300feb1cdbbb8f24e4e42594eeb841f0be2 /source/Protocol | |
parent | Fixed rclk in doublechests (diff) | |
download | cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.gz cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.bz2 cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.lz cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.xz cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.tar.zst cuberite-43e684071933adef93040e8d4b830d5c6b71cf9a.zip |
Diffstat (limited to 'source/Protocol')
-rw-r--r-- | source/Protocol/Protocol125.cpp | 9 | ||||
-rw-r--r-- | source/Protocol/Protocol132.cpp | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index 0b5acc771..0bed151ed 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -978,8 +978,8 @@ int cProtocol125::ParseBlockDig(void) HANDLE_PACKET_READ(ReadBEInt, int, PosX);
HANDLE_PACKET_READ(ReadByte, Byte, PosY);
HANDLE_PACKET_READ(ReadBEInt, int, PosZ);
- HANDLE_PACKET_READ(ReadChar, char, Direction);
- m_Client->HandleBlockDig(PosX, PosY, PosZ, Direction, Status);
+ HANDLE_PACKET_READ(ReadChar, char, BlockFace);
+ m_Client->HandleLeftClick(PosX, PosY, PosZ, BlockFace, Status);
return PARSE_OK;
}
@@ -992,7 +992,7 @@ int cProtocol125::ParseBlockPlace(void) HANDLE_PACKET_READ(ReadBEInt, int, PosX);
HANDLE_PACKET_READ(ReadByte, Byte, PosY);
HANDLE_PACKET_READ(ReadBEInt, int, PosZ);
- HANDLE_PACKET_READ(ReadChar, char, Direction);
+ HANDLE_PACKET_READ(ReadChar, char, BlockFace);
cItem HeldItem;
int res = ParseItem(HeldItem);
@@ -1001,7 +1001,8 @@ int cProtocol125::ParseBlockPlace(void) return res;
}
- m_Client->HandleBlockPlace(PosX, PosY, PosZ, Direction, HeldItem);
+ // 1.2.5 didn't have any cursor position, so use 8, 8, 8, so that halfslabs and stairs work correctly and the special value is recognizable.
+ m_Client->HandleRightClick(PosX, PosY, PosZ, BlockFace, 8, 8, 8, HeldItem);
return PARSE_OK;
}
diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp index c6283b638..0c928bde1 100644 --- a/source/Protocol/Protocol132.cpp +++ b/source/Protocol/Protocol132.cpp @@ -484,7 +484,7 @@ int cProtocol132::ParseBlockPlace(void) HANDLE_PACKET_READ(ReadBEInt, int, PosX);
HANDLE_PACKET_READ(ReadByte, Byte, PosY);
HANDLE_PACKET_READ(ReadBEInt, int, PosZ);
- HANDLE_PACKET_READ(ReadChar, char, Direction);
+ HANDLE_PACKET_READ(ReadChar, char, BlockFace);
cItem HeldItem;
int res = ParseItem(HeldItem);
@@ -497,7 +497,7 @@ int cProtocol132::ParseBlockPlace(void) HANDLE_PACKET_READ(ReadChar, char, CursorY);
HANDLE_PACKET_READ(ReadChar, char, CursorZ);
- m_Client->HandleBlockPlace(PosX, PosY, PosZ, Direction, HeldItem);
+ m_Client->HandleRightClick(PosX, PosY, PosZ, BlockFace, CursorX, CursorY, CursorZ, HeldItem);
return PARSE_OK;
}
|