From ae7fcbc8ad0163d828c5e838fb1db7dc1d7b6a72 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Mon, 24 Jun 2019 17:14:01 -0300 Subject: [PATCH 1/4] trying to fix inconsistent types in block placement --- .../protocols/protocol1_9to1_8/packets/WorldPackets.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java index 9fcc90631..54398ad30 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java @@ -291,7 +291,7 @@ public class WorldPackets { wrapper.clearInputBuffer(); // First set this packet ID to Block placement wrapper.setId(0x08); - wrapper.write(Type.LONG, -1L); + wrapper.write(Type.POSITION, new Position((long) -1, (long) -1, (long) -1)); wrapper.write(Type.BYTE, (byte) 255); // Write item in hand Item item = Protocol1_9To1_8.getHandItem(wrapper.user()); @@ -315,9 +315,9 @@ public class WorldPackets { } wrapper.write(Type.ITEM, item); - wrapper.write(Type.BYTE, (byte) 0); - wrapper.write(Type.BYTE, (byte) 0); - wrapper.write(Type.BYTE, (byte) 0); + wrapper.write(Type.UNSIGNED_BYTE, (short) 0); + wrapper.write(Type.UNSIGNED_BYTE, (short) 0); + wrapper.write(Type.UNSIGNED_BYTE, (short) 0); } }); From a0e3d70a3f13f8e5dd6c6da7cf3a2aff9b6a973c Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Mon, 13 Apr 2020 14:01:28 -0300 Subject: [PATCH 2/4] unsigned byte --- .../protocols/protocol1_9to1_8/packets/WorldPackets.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java index 54398ad30..7631919eb 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java @@ -292,7 +292,7 @@ public class WorldPackets { // First set this packet ID to Block placement wrapper.setId(0x08); wrapper.write(Type.POSITION, new Position((long) -1, (long) -1, (long) -1)); - wrapper.write(Type.BYTE, (byte) 255); + wrapper.write(Type.UNSIGNED_BYTE, (byte) 255); // Write item in hand Item item = Protocol1_9To1_8.getHandItem(wrapper.user()); // Blocking patch From 99abe3994c470eb13f2ff3ccd408caddea1ff341 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Mon, 13 Apr 2020 14:33:00 -0300 Subject: [PATCH 3/4] use short --- .../protocols/protocol1_9to1_8/packets/WorldPackets.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java index 7631919eb..041a28353 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java @@ -292,7 +292,7 @@ public class WorldPackets { // First set this packet ID to Block placement wrapper.setId(0x08); wrapper.write(Type.POSITION, new Position((long) -1, (long) -1, (long) -1)); - wrapper.write(Type.UNSIGNED_BYTE, (byte) 255); + wrapper.write(Type.UNSIGNED_BYTE, (short) 255); // Write item in hand Item item = Protocol1_9To1_8.getHandItem(wrapper.user()); // Blocking patch From a91c72fb44a4c80e36c5467e7b7ea973b642c320 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Mon, 13 Apr 2020 14:42:48 -0300 Subject: [PATCH 4/4] position fix --- .../protocols/protocol1_9to1_8/packets/WorldPackets.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java index 041a28353..5685a0370 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/WorldPackets.java @@ -291,7 +291,7 @@ public class WorldPackets { wrapper.clearInputBuffer(); // First set this packet ID to Block placement wrapper.setId(0x08); - wrapper.write(Type.POSITION, new Position((long) -1, (long) -1, (long) -1)); + wrapper.write(Type.POSITION, new Position(-1, (short) -1, -1)); wrapper.write(Type.UNSIGNED_BYTE, (short) 255); // Write item in hand Item item = Protocol1_9To1_8.getHandItem(wrapper.user());