mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 07:19:56 +03:00
15 lines
621 B
Diff
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)
|