@Override protected void updateTemperature(World world, int x, int y, int z) { super.updateTemperature(world, x, y, z); int Tamb = ReikaBiomeHelper.getBiomeTemp(world, x, z); int dT = temperature - Tamb; if (dT != 0 && ReikaWorldHelper.checkForAdjBlock(world, x, y, z, 0) != null) temperature -= (1 + dT / 32); if (dT > 0) { for (int i = 2; i < 6; i++) { ForgeDirection dir = dirs[i]; int dx = x + dir.offsetX; int dy = y + dir.offsetY; int dz = z + dir.offsetZ; int id = world.getBlockId(dx, dy, dz); int meta = world.getBlockMetadata(dx, dy, dz); if (id == ReactorTiles.COOLANT.getBlockID() && meta == ReactorTiles.COOLANT.getBlockMetadata()) { TileEntityWaterCell te = (TileEntityWaterCell) world.getBlockTileEntity(dx, dy, dz); if (te.getLiquidState().isWater() && temperature >= 100 && ReikaRandomHelper.doWithChance(40)) { te.setLiquidState(LiquidStates.EMPTY); temperature -= 20; } } if (id == this.getTileEntityBlockID() && meta == ReactorTiles.TEList[this.getIndex()].getBlockMetadata()) { TileEntityNuclearCore te = (TileEntityNuclearCore) world.getBlockTileEntity(dx, dy, dz); int dTemp = temperature - te.temperature; if (dTemp > 0) { temperature -= dTemp / 16; te.temperature += dTemp / 16; } } } } if (hydrogen > 0) hydrogen--; if (temperature >= 500) { ReactorAchievements.HOTCORE.triggerAchievement(this.getPlacer()); } if (temperature > this.getMaxTemperature()) { this.onMeltdown(world, x, y, z); ReactorAchievements.MELTDOWN.triggerAchievement(this.getPlacer()); } if (temperature > HYDROGEN) { hydrogen += 1; if (hydrogen > 200) { this.onMeltdown(world, x, y, z); } } }
@Override public void updateTemperature(World world, int x, int y, int z, int meta) { int Tamb = ReikaWorldHelper.getAmbientTemperatureAt(world, x, y, z); if (power > 0) { temperature += ReikaMathLibrary.logbase(power, 2); } if (temperature > Tamb) { temperature -= (temperature - Tamb) / 64; } else { temperature += (temperature - Tamb) / 64; } if (temperature - Tamb <= 64 && temperature > Tamb) temperature--; if (temperature > MAXTEMP) { temperature = MAXTEMP; this.overheat(world, x, y, z); } if (temperature > 50) { ForgeDirection side = ReikaWorldHelper.checkForAdjBlock(world, x, y, z, Blocks.snow); if (side != null) ReikaWorldHelper.changeAdjBlock(world, x, y, z, side, Blocks.air, 0); side = ReikaWorldHelper.checkForAdjBlock(world, x, y, z, Blocks.ice); if (side != null) ReikaWorldHelper.changeAdjBlock(world, x, y, z, side, Blocks.flowing_water, 0); } }
@Override public void updateTemperature(World world, int x, int y, int z, int meta) { int Tamb = ReikaWorldHelper.getAmbientTemperatureAt(world, x, y, z); if (ReikaWorldHelper.checkForAdjBlock(world, x, y, z, Blocks.snow) != null) Tamb -= 5; if (RotaryAux.isNextToWater(world, x, y, z)) Tamb -= 15; if (RotaryAux.isNextToIce(world, x, y, z)) Tamb -= 30; ItemStack cryo = GameRegistry.findItemStack(ModList.THERMALFOUNDATION.modLabel, "dustCryotheum", 1); if (ReikaItemHelper.matchStacks(ItemStacks.dryice, inv[1]) || (cryo != null && ReikaItemHelper.matchStacks(cryo, inv[1]))) { Tamb -= 40; if (temperature > Tamb + 4 || rand.nextInt(20) == 0) ReikaInventoryHelper.decrStack(1, inv); } int dT = Tamb - temperature; temperature += dT / 4; }