Reset S->C CustomPayload data after Write, allowing the same packet to be written multiple times. Closes #588
This commit is contained in:
parent
79b5c28d38
commit
1b80328d3f
1 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.java
|
||||
@@ -46,7 +46,11 @@
|
||||
public void func_148840_b(PacketBuffer p_148840_1_) throws IOException
|
||||
{
|
||||
p_148840_1_.func_180714_a(this.field_149172_a);
|
||||
+ synchronized(this) { //This may be access multiple times, from multiple threads, lets be safe.
|
||||
+ this.field_149171_b.markReaderIndex();
|
||||
p_148840_1_.writeBytes((ByteBuf)this.field_149171_b);
|
||||
+ this.field_149171_b.resetReaderIndex();
|
||||
+ }
|
||||
}
|
||||
|
||||
public void func_180734_a(INetHandlerPlayClient p_180734_1_)
|
Loading…
Reference in a new issue