mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Fixed a massive console spam issue of Whitelisted Item Laser Relays trying to sync client->client
This commit is contained in:
parent
dcd41a016a
commit
41027a07c2
2 changed files with 10 additions and 6 deletions
|
@ -176,9 +176,11 @@ public abstract class TileEntityBase extends TileEntity implements ITickable{
|
|||
}
|
||||
|
||||
public final void sendUpdate(){
|
||||
NBTTagCompound compound = this.getSyncCompound();
|
||||
if(compound != null){
|
||||
PacketHandler.theNetwork.sendToAllAround(new PacketUpdateTileEntity(compound, this.getPos()), new NetworkRegistry.TargetPoint(this.worldObj.provider.getDimension(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), 64));
|
||||
if(!this.worldObj.isRemote){
|
||||
NBTTagCompound compound = this.getSyncCompound();
|
||||
if(compound != null){
|
||||
PacketHandler.theNetwork.sendToAllAround(new PacketUpdateTileEntity(compound, this.getPos()), new NetworkRegistry.TargetPoint(this.worldObj.provider.getDimension(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), 64));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -356,9 +356,11 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
|
|||
public void updateEntity(){
|
||||
super.updateEntity();
|
||||
|
||||
if((this.isLeftWhitelist != this.lastLeftWhitelist || this.isRightWhitelist != this.lastRightWhitelist) && this.sendUpdateWithInterval()){
|
||||
this.lastLeftWhitelist = this.isLeftWhitelist;
|
||||
this.lastRightWhitelist = this.isRightWhitelist;
|
||||
if(!this.worldObj.isRemote){
|
||||
if((this.isLeftWhitelist != this.lastLeftWhitelist || this.isRightWhitelist != this.lastRightWhitelist) && this.sendUpdateWithInterval()){
|
||||
this.lastLeftWhitelist = this.isLeftWhitelist;
|
||||
this.lastRightWhitelist = this.isRightWhitelist;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue