@Override public void updateEntity(World world, int x, int y, int z, int meta) { super.updateTileEntity(); this.getIOSidesDefault(world, x, y, z, meta); this.getPower(false); // ReikaJavaLibrary.pConsole((omega-MINSPEED)+":"+dur); timer.setCap(this.getOperationTime()); tempTimer.update(); if (tempTimer.checkCap()) this.updateTemperature(world, x, y, z, meta); if (!worldObj.isRemote) { int n = this.getNumberConsecutiveOperations(); for (int i = 0; i < n; i++) this.doOperation(n > 1); freezeTick = timer.getTick(); } sound.update(); if (omega > 0) { if (sound.checkCap()) SoundRegistry.FAN.playSoundAtBlock( world, x, y, z, RotaryAux.isMuffled(this) ? 0.1F : 0.4F, 0.6F); } }
@Override public void updateEntity(World world, int x, int y, int z, int meta) { if (!PowerTransferHelper.checkPowerFrom(this, ForgeDirection.DOWN) && !PowerTransferHelper.checkPowerFrom(this, ForgeDirection.UP)) { this.noInputMachine(); } if (power >= MINPOWER && torque >= MINTORQUE) { timer.setCap(Math.max(1, 20 - 2 * (int) ReikaMathLibrary.logbase(omega, 2))); timer.update(); Extraction e = this.getExtraction(world, x, y, z); if (e != null) { if (timer.checkCap() && e.canPerform(world, x, y, z)) { this.harvest(e, world, x, y, z); } } else { timer.reset(); } } }