mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +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(){
|
public final void sendUpdate(){
|
||||||
NBTTagCompound compound = this.getSyncCompound();
|
if(!this.worldObj.isRemote){
|
||||||
if(compound != null){
|
NBTTagCompound compound = this.getSyncCompound();
|
||||||
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(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(){
|
public void updateEntity(){
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
|
|
||||||
if((this.isLeftWhitelist != this.lastLeftWhitelist || this.isRightWhitelist != this.lastRightWhitelist) && this.sendUpdateWithInterval()){
|
if(!this.worldObj.isRemote){
|
||||||
this.lastLeftWhitelist = this.isLeftWhitelist;
|
if((this.isLeftWhitelist != this.lastLeftWhitelist || this.isRightWhitelist != this.lastRightWhitelist) && this.sendUpdateWithInterval()){
|
||||||
this.lastRightWhitelist = this.isRightWhitelist;
|
this.lastLeftWhitelist = this.isLeftWhitelist;
|
||||||
|
this.lastRightWhitelist = this.isRightWhitelist;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue