Validate TE of packet (#126)

* Validate TE of packet

* Remove outdated script
This commit is contained in:
miozune authored and GitHub committed 2023-07-03 11:33:32 +09:00
1 parent 5fdd24293a
commit 1717d38632
58 files changed
+268 -157

No files matched your search

@@ -14,6 +14,7 @@ import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import crazypants.enderio.machine.hypercube.TileHyperCube.IoMode;
import crazypants.enderio.machine.hypercube.TileHyperCube.SubChannel;
import crazypants.enderio.network.PacketUtil;
import io.netty.buffer.ByteBuf;
public class PacketClientState implements IMessage, IMessageHandler<PacketClientState, IMessage> {
@@ -88,6 +89,7 @@ public class PacketClientState implements IMessage, IMessageHandler<PacketClient
public IMessage onMessage(PacketClientState message, MessageContext ctx) {
EntityPlayer player = ctx.getServerHandler().playerEntity;
TileEntity te = player.worldObj.getTileEntity(message.x, message.y, message.z);
if (PacketUtil.isInvalidPacketForGui(ctx, te, getClass())) return null;
if (te instanceof TileHyperCube) {
TileHyperCube hc = (TileHyperCube) te;