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(){
|
||||||
|
if(!this.worldObj.isRemote){
|
||||||
NBTTagCompound compound = this.getSyncCompound();
|
NBTTagCompound compound = this.getSyncCompound();
|
||||||
if(compound != null){
|
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));
|
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,12 +356,14 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
|
||||||
public void updateEntity(){
|
public void updateEntity(){
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
|
|
||||||
|
if(!this.worldObj.isRemote){
|
||||||
if((this.isLeftWhitelist != this.lastLeftWhitelist || this.isRightWhitelist != this.lastRightWhitelist) && this.sendUpdateWithInterval()){
|
if((this.isLeftWhitelist != this.lastLeftWhitelist || this.isRightWhitelist != this.lastRightWhitelist) && this.sendUpdateWithInterval()){
|
||||||
this.lastLeftWhitelist = this.isLeftWhitelist;
|
this.lastLeftWhitelist = this.isLeftWhitelist;
|
||||||
this.lastRightWhitelist = this.isRightWhitelist;
|
this.lastRightWhitelist = this.isRightWhitelist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements IEnergyReceiver{
|
public static class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements IEnergyReceiver{
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue