redo ugly packet hack

This commit is contained in:
creeper123123321 2021-04-08 20:51:49 -03:00
parent 4ca4ea7323
commit ba14be1782

View File

@ -425,9 +425,9 @@ fun Protocol1_8To1_7_6.registerPlayerPackets() {
packetWrapper.id = -1 packetWrapper.id = -1
val newPacketBuf = Unpooled.buffer() val newPacketBuf = Unpooled.buffer()
packetWrapper.writeToBuffer(newPacketBuf) packetWrapper.writeToBuffer(newPacketBuf)
val newWrapper = PacketWrapper(0x17, null, packetWrapper.user()) val newWrapper = PacketWrapper(0x17, newPacketBuf, packetWrapper.user())
newWrapper.passthrough(Type.STRING) 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) newWrapper.sendToServer(Protocol1_8To1_7_6::class.java, true, true)
} }
} }