@Override public void updateEntity() { super.updateEntity(); if (syncTick == 0) { if (this.tracker == null) Notifier.notifyCustomMod( "EssentialCraft", "[WARNING][SEVERE]TileEntity " + this + " at pos " + this.xCoord + "," + this.yCoord + "," + this.zCoord + " tries to sync itself, but has no TileTracker attached to it! SEND THIS MESSAGE TO THE DEVELOPER OF THE MOD!"); else if (!this.worldObj.isRemote && this.tracker.tileNeedsSyncing()) { MiscUtils.sendPacketToAllAround( worldObj, getDescriptionPacket(), xCoord, yCoord, zCoord, this.worldObj.provider.dimensionId, 32); } syncTick = 60; } else --this.syncTick; if (requestSync && this.worldObj.isRemote) { requestSync = false; ECUtils.requestScheduledTileSync(this, EssentialCraftCore.proxy.getClientPlayer()); } if (++ticksSinceSync % 20 * 4 == 0) { worldObj.addBlockEvent( xCoord, yCoord, zCoord, this.worldObj.getBlock(this.xCoord, this.yCoord, this.zCoord), 1, numUsingPlayers); } prevLidAngle = lidAngle; float angleIncrement = 0.1F; if (numUsingPlayers > 0 && lidAngle == 0.0F) { worldObj.playSoundEffect( xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D, "random.chestopen", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F); } if (numUsingPlayers == 0 && lidAngle > 0.0F || numUsingPlayers > 0 && lidAngle < 1.0F) { float var8 = lidAngle; if (numUsingPlayers > 0) { lidAngle += angleIncrement; } else { lidAngle -= angleIncrement; } if (lidAngle > 1.0F) { lidAngle = 1.0F; } if (lidAngle < 0.5F && var8 >= 0.5F) { worldObj.playSoundEffect( xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F); } if (lidAngle < 0.0F) { lidAngle = 0.0F; } } }