mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Fix entity spawn messages not handling buffer correctly (#4524)
This commit is contained in:
1 parent
fc87d83d73
commit
e616990397
2 files changed
+4
-2
No files matched your search
+3
-1
@@ -60,7 +60,9 @@ public class EntitySpawnHandler extends SimpleChannelInboundHandler<FMLMessage.E
|
||||
{
|
||||
if (msg.getClass().equals(FMLMessage.EntitySpawnMessage.class))
|
||||
{
|
||||
spawnEntity((FMLMessage.EntitySpawnMessage)msg);
|
||||
FMLMessage.EntitySpawnMessage spawnMsg = (FMLMessage.EntitySpawnMessage) msg;
|
||||
spawnEntity(spawnMsg);
|
||||
spawnMsg.dataStream.release();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ public abstract class FMLMessage {
|
||||
speedScaledY = dat.readInt() / 8000D;
|
||||
speedScaledZ = dat.readInt() / 8000D;
|
||||
}
|
||||
this.dataStream = dat;
|
||||
this.dataStream = dat.retain();
|
||||
}
|
||||
}
|
||||
abstract void toBytes(ByteBuf buf);
|
||||
|
||||
Reference in new issue
Block a user