From ba14be1782e91c419b7eecca15120ad315fdc179 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Thu, 8 Apr 2021 20:51:49 -0300 Subject: [PATCH] redo ugly packet hack --- .../aas/protocol/id47toid5/packets/PlayerPackets.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/viaversion/aas/protocol/id47toid5/packets/PlayerPackets.kt b/src/main/kotlin/com/viaversion/aas/protocol/id47toid5/packets/PlayerPackets.kt index 30d91d8..e9fe901 100644 --- a/src/main/kotlin/com/viaversion/aas/protocol/id47toid5/packets/PlayerPackets.kt +++ b/src/main/kotlin/com/viaversion/aas/protocol/id47toid5/packets/PlayerPackets.kt @@ -425,9 +425,9 @@ fun Protocol1_8To1_7_6.registerPlayerPackets() { packetWrapper.id = -1 val newPacketBuf = Unpooled.buffer() packetWrapper.writeToBuffer(newPacketBuf) - val newWrapper = PacketWrapper(0x17, null, packetWrapper.user()) + val newWrapper = PacketWrapper(0x17, newPacketBuf, packetWrapper.user()) newWrapper.passthrough(Type.STRING) - newWrapper.write(Type.SHORT_BYTE_ARRAY, readRemainingBytes(newPacketBuf)) + newWrapper.write(Type.SHORT, newPacketBuf.readableBytes().toShort()) newWrapper.sendToServer(Protocol1_8To1_7_6::class.java, true, true) } }