mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Fixed packet security
This commit is contained in:
1 parent
1c90980d68
commit
7ae60615e2
57 files changed
+1149
-984
No files matched your search
@@ -112,19 +112,22 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
||||
@Override
|
||||
public void handlePacketData(ByteBuf dataStream)
|
||||
{
|
||||
facing = dataStream.readInt();
|
||||
redstone = dataStream.readBoolean();
|
||||
|
||||
if(clientFacing != facing)
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
|
||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
clientFacing = facing;
|
||||
}
|
||||
|
||||
for(ITileComponent component : components)
|
||||
{
|
||||
component.read(dataStream);
|
||||
facing = dataStream.readInt();
|
||||
redstone = dataStream.readBoolean();
|
||||
|
||||
if(clientFacing != facing)
|
||||
{
|
||||
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
|
||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
clientFacing = facing;
|
||||
}
|
||||
|
||||
for(ITileComponent component : components)
|
||||
{
|
||||
component.read(dataStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user