summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-10 13:29:08 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-10 13:29:08 +0100
commit25434f50f1426b37a8608b1f1f4ab5658c7e4516 (patch)
tree7b61eb1afbeed4877ac7d434125e031a844e42ee
parentRemoved the protocol restriction from default debugging settings.ini (diff)
downloadcuberite-25434f50f1426b37a8608b1f1f4ab5658c7e4516.tar
cuberite-25434f50f1426b37a8608b1f1f4ab5658c7e4516.tar.gz
cuberite-25434f50f1426b37a8608b1f1f4ab5658c7e4516.tar.bz2
cuberite-25434f50f1426b37a8608b1f1f4ab5658c7e4516.tar.lz
cuberite-25434f50f1426b37a8608b1f1f4ab5658c7e4516.tar.xz
cuberite-25434f50f1426b37a8608b1f1f4ab5658c7e4516.tar.zst
cuberite-25434f50f1426b37a8608b1f1f4ab5658c7e4516.zip
Diffstat (limited to '')
-rw-r--r--ProtoProxy/Connection.cpp16
-rw-r--r--ProtoProxy/ProtoProxy.txt5
2 files changed, 15 insertions, 6 deletions
diff --git a/ProtoProxy/Connection.cpp b/ProtoProxy/Connection.cpp
index 8b8c1c85e..3037f10cd 100644
--- a/ProtoProxy/Connection.cpp
+++ b/ProtoProxy/Connection.cpp
@@ -836,6 +836,7 @@ bool cConnection::HandleClientLocaleAndView(void)
HANDLE_CLIENT_PACKET_READ(ReadChar, char, ViewDistance);
HANDLE_CLIENT_PACKET_READ(ReadChar, char, ChatFlags);
HANDLE_CLIENT_PACKET_READ(ReadChar, char, Difficulty);
+ HANDLE_CLIENT_PACKET_READ(ReadChar, char, ShowCape);
Log("Received a PACKET_LOCALE_AND_VIEW from the client");
COPY_TO_SERVER();
return true;
@@ -1623,10 +1624,12 @@ bool cConnection::HandleServerSoundEffect(void)
HANDLE_SERVER_PACKET_READ(ReadByte, Byte, PosY);
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, PosZ);
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, Data);
+ HANDLE_SERVER_PACKET_READ(ReadByte, Byte, NoVolumeDecrease);
Log("Received a PACKET_SOUND_EFFECT from the server:");
Log(" EffectID = %d", EffectID);
Log(" Pos = {%d, %d, %d}", PosX, PosY, PosZ);
Log(" Data = %d", Data);
+ Log(" NoVolumeDecrease = %d", NoVolumeDecrease);
COPY_TO_CLIENT();
return true;
}
@@ -1764,9 +1767,11 @@ bool cConnection::HandleServerSpawnPainting(void)
bool cConnection::HandleServerSpawnPickup(void)
{
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, EntityID);
- HANDLE_SERVER_PACKET_READ(ReadBEShort, short, ItemType);
- HANDLE_SERVER_PACKET_READ(ReadChar, char, ItemCount);
- HANDLE_SERVER_PACKET_READ(ReadBEShort, short, ItemDamage);
+ AString ItemDesc;
+ if (!ParseSlot(m_ServerBuffer, ItemDesc))
+ {
+ return false;
+ }
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, PosX);
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, PosY);
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, PosZ);
@@ -1775,7 +1780,7 @@ bool cConnection::HandleServerSpawnPickup(void)
HANDLE_SERVER_PACKET_READ(ReadByte, Byte, Roll);
Log("Received a PACKET_SPAWN_PICKUP from the server:");
Log(" EntityID = %d", EntityID);
- Log(" Item = %d:%d * %d", ItemType, ItemDamage, ItemCount);
+ Log(" Item = %s", ItemDesc.c_str());
Log(" Pos = <%d, %d, %d> ~ {%d, %d, %d}", PosX, PosY, PosZ, PosX / 32, PosY / 32, PosZ / 32);
Log(" Angles = [%d, %d, %d]", Rotation, Pitch, Roll);
COPY_TO_CLIENT();
@@ -1788,7 +1793,8 @@ bool cConnection::HandleServerSpawnPickup(void)
bool cConnection::HandleServerTimeUpdate(void)
{
- HANDLE_SERVER_PACKET_READ(ReadBEInt64, Int64, Time);
+ HANDLE_SERVER_PACKET_READ(ReadBEInt64, Int64, WorldAge);
+ HANDLE_SERVER_PACKET_READ(ReadBEInt64, Int64, TimeOfDay);
Log("Received a PACKET_TIME_UPDATE from the server");
COPY_TO_CLIENT();
return true;
diff --git a/ProtoProxy/ProtoProxy.txt b/ProtoProxy/ProtoProxy.txt
index bbeab490f..b94ca153f 100644
--- a/ProtoProxy/ProtoProxy.txt
+++ b/ProtoProxy/ProtoProxy.txt
@@ -13,7 +13,10 @@ In order to catch the encryption parameters, the MC protocol needs to be underst
This project is currently Windows-only and I don't plan on making it multi-platform, although the effort needed for doing so should be minimal.
-The proxy only works on the localhost connection. It listens on port 25565 and expects the underlying MC server to run on port 25564.
+The proxy only works on the localhost connection. It listens on port 25564 and expects the underlying MC server to run on port 25565. Ports can be changed by cmdline args: ProtoProxy <listen-port> <server-port>.
+
+
+Currently the protocol version 47 (client 1.4.2) is the only one supported.