mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-08 19:12:14 +01:00
Defensive coding to prevent client chunk loading
This commit is contained in:
parent
2e3100be9a
commit
6b34eb453d
3 changed files with 4 additions and 4 deletions
|
@ -53,10 +53,10 @@ public class ArmPlacementPacket extends SimplePacketBase {
|
|||
if (player == null)
|
||||
return;
|
||||
World world = player.world;
|
||||
if (world == null)
|
||||
if (world == null || !world.isBlockPresent(pos))
|
||||
return;
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity == null || !(tileEntity instanceof ArmTileEntity))
|
||||
if (!(tileEntity instanceof ArmTileEntity))
|
||||
return;
|
||||
|
||||
ArmTileEntity arm = (ArmTileEntity) tileEntity;
|
||||
|
|
|
@ -52,7 +52,7 @@ public class ConfigureSchematicannonPacket extends SimplePacketBase {
|
|||
if (player == null)
|
||||
return;
|
||||
World world = player.world;
|
||||
if (world == null)
|
||||
if (world == null || !world.isBlockPresent(pos))
|
||||
return;
|
||||
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
|
|
|
@ -39,7 +39,7 @@ public abstract class TileEntityConfigurationPacket<TE extends SyncedTileEntity>
|
|||
return;
|
||||
World world = player.world;
|
||||
|
||||
if (world == null || world.getTileEntity(pos) == null)
|
||||
if (world == null || !world.isBlockPresent(pos))
|
||||
return;
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity instanceof SyncedTileEntity) {
|
||||
|
|
Loading…
Reference in a new issue