Files
CatServer/patches/net/minecraft/network/play/client/CPacketCustomPayload.java.patch
2019-02-24 22:29:41 +08:00

15 lines
621 B
Diff

--- ../src-base/minecraft/net/minecraft/network/play/client/CPacketCustomPayload.java
+++ ../src-work/minecraft/net/minecraft/network/play/client/CPacketCustomPayload.java
@@ -47,7 +47,11 @@
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeString(this.channel);
+ synchronized(this.data) { //This may be access multiple times, from multiple threads, lets be safe.
+ this.data.markReaderIndex();
buf.writeBytes((ByteBuf)this.data);
+ this.data.resetReaderIndex();
+ }
}
public void processPacket(INetHandlerPlayServer handler)