mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
pollution stuff
This commit is contained in:
parent
4fb8eb9960
commit
1a9da01d74
@ -6,6 +6,7 @@
|
||||
* Chlorocalcite
|
||||
* A new bedrock ore, the powder can be heated in the combination furnace to make calcium and chlorine
|
||||
* Blocks for cadmium, TC and CD alloy
|
||||
* Machines now emit soot. Soot collects in units of 4x4 chunks, and spreads into neighboring regions. High levels of soot cause visible smog.
|
||||
|
||||
## Changed
|
||||
* Updated russian localization
|
||||
|
||||
@ -197,7 +197,8 @@ public class PollutionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
entry.getValue().pollution = newPollution;
|
||||
entry.getValue().pollution.clear();
|
||||
entry.getValue().pollution.putAll(newPollution);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,8 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.inventory.container.ContainerCrucible;
|
||||
import com.hbm.inventory.gui.GUICrucible;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
@ -169,6 +171,8 @@ public class TileEntityCrucible extends TileEntityMachineBase implements IGUIPro
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, xCoord + 0.5D + dir.offsetX * 1.875D, yCoord, zCoord + 0.5D + dir.offsetZ * 1.875D), new TargetPoint(worldObj.provider.dimensionId, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 50));
|
||||
|
||||
}
|
||||
|
||||
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND / 2F);
|
||||
}
|
||||
|
||||
/* pour recipe stack */
|
||||
@ -207,6 +211,8 @@ public class TileEntityCrucible extends TileEntityMachineBase implements IGUIPro
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, xCoord + 0.5D + dir.offsetX * 1.875D, yCoord, zCoord + 0.5D + dir.offsetZ * 1.875D), new TargetPoint(worldObj.provider.dimensionId, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 50));
|
||||
|
||||
}
|
||||
|
||||
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND / 2F);
|
||||
}
|
||||
|
||||
/* clean up stacks */
|
||||
|
||||
@ -2,6 +2,8 @@ package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.MachineDiFurnace;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.inventory.container.ContainerDiFurnace;
|
||||
import com.hbm.inventory.gui.GUIDiFurnace;
|
||||
import com.hbm.inventory.recipes.BlastFurnaceRecipes;
|
||||
@ -211,6 +213,8 @@ public class TileEntityDiFurnace extends TileEntityMachineBase implements IGUIPr
|
||||
if(fuel < 0) {
|
||||
fuel = 0;
|
||||
}
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * (extension ? 3 : 1));
|
||||
|
||||
} else {
|
||||
progress = 0;
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.module.ModuleBurnTime;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
@ -74,6 +76,7 @@ public abstract class TileEntityFireboxBase extends TileEntityMachineBase implem
|
||||
|
||||
if(this.heatEnergy < getMaxHeat()) {
|
||||
burnTime--;
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 3);
|
||||
}
|
||||
this.wasOn = true;
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.container.ContainerOilburner;
|
||||
@ -70,6 +72,8 @@ public class TileEntityHeaterOilburner extends TileEntityMachineBase implements
|
||||
int heat = (int)(type.getHeatEnergy() / 1000);
|
||||
|
||||
this.heatEnergy += heat * toBurn;
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * burnRate * 0.5F);
|
||||
|
||||
shouldCool = false;
|
||||
}
|
||||
|
||||
@ -5,6 +5,8 @@ import java.io.IOException;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.machine.MachineCoal;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
@ -290,6 +292,8 @@ public class TileEntityMachineCoal extends TileEntityLoadedBase implements ISide
|
||||
if(burnTime > 0) {
|
||||
burnTime--;
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND);
|
||||
|
||||
if(tank.getFill() > 0) {
|
||||
tank.setFill(tank.getFill() - 1);
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.container.ContainerCombustionEngine;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
@ -84,6 +86,8 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachineBase imp
|
||||
this.power += toBurn * (trait.getCombustionEnergy() / 10_000D) * eff;
|
||||
fill -= toBurn;
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * setting * 0.1F);
|
||||
|
||||
if(toBurn > 0) {
|
||||
wasOn = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user