mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
more pollution, igen defuckening part 4
This commit is contained in:
parent
dd8005f60f
commit
4cd26174fb
@ -23,10 +23,20 @@ public class ItemPollutionDetector extends Item {
|
||||
|
||||
PollutionData data = PollutionHandler.getPollutionData(world, (int) Math.floor(entity.posX), (int) Math.floor(entity.posY), (int) Math.floor(entity.posZ));
|
||||
if(data == null) data = new PollutionData();
|
||||
|
||||
float soot = data.pollution[PollutionType.SOOT.ordinal()];
|
||||
float poison = data.pollution[PollutionType.POISON.ordinal()];
|
||||
float heavymetal = data.pollution[PollutionType.HEAVYMETAL.ordinal()];
|
||||
float fallout = data.pollution[PollutionType.FALLOUT.ordinal()];
|
||||
|
||||
soot = ((int) soot * 100) / 100F;
|
||||
poison = ((int) poison * 100) / 100F;
|
||||
heavymetal = ((int) heavymetal * 100) / 100F;
|
||||
fallout = ((int) fallout * 100) / 100F;
|
||||
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Soot: " + data.pollution[PollutionType.SOOT.ordinal()]).color(EnumChatFormatting.YELLOW).flush(), 100, 2000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Poison: " + data.pollution[PollutionType.POISON.ordinal()]).color(EnumChatFormatting.YELLOW).flush(), 101, 2000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Heavy metal: " + data.pollution[PollutionType.HEAVYMETAL.ordinal()]).color(EnumChatFormatting.YELLOW).flush(), 102, 2000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Fallout: " + data.pollution[PollutionType.FALLOUT.ordinal()]).color(EnumChatFormatting.YELLOW).flush(), 103, 2000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Soot: " + soot).color(EnumChatFormatting.YELLOW).flush(), 100, 2000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Poison: " + poison).color(EnumChatFormatting.YELLOW).flush(), 101, 2000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Heavy metal: " + heavymetal).color(EnumChatFormatting.YELLOW).flush(), 102, 2000), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.start("Fallout: " + fallout).color(EnumChatFormatting.YELLOW).flush(), 103, 2000), (EntityPlayerMP) entity);
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,11 +64,11 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
public static int coalGenRate = 20;
|
||||
public static double rtgHeatMult = 0.15D;
|
||||
public static double waterPowerMult = 1.0D;
|
||||
public static double lubePowerMult = 1.0D;
|
||||
public static double heatExponent = 1.1D;
|
||||
public static double lubePowerMult = 1.5D;
|
||||
public static double heatExponent = 1.15D;
|
||||
public static int waterRate = 10;
|
||||
public static int lubeRate = 1;
|
||||
public static long fluidHeatDiv = 5_000L;
|
||||
public static long fluidHeatDiv = 1_000L;
|
||||
|
||||
@Override
|
||||
public String getConfigName() {
|
||||
@ -275,7 +275,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
|
||||
public int getPowerFromFuel(boolean con) {
|
||||
FluidType type = tanks[1].getTankType();
|
||||
return type.hasTrait(FT_Flammable.class) ? (int)(type.getTrait(FT_Flammable.class).getHeatEnergy() / (con ? 1000L : fluidHeatDiv)) : 0;
|
||||
return type.hasTrait(FT_Flammable.class) ? (int)(type.getTrait(FT_Flammable.class).getHeatEnergy() / (con ? 5000L : fluidHeatDiv)) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -15,6 +15,7 @@ import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Flammable;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Gaseous;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Gaseous_ART;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Leaded;
|
||||
import com.hbm.inventory.gui.GUIMachineGasFlare;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
@ -160,7 +161,10 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
|
||||
if(worldObj.getTotalWorldTime() % 3 == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord + 11, this.zCoord, "hbm:weapon.flamethrowerShoot", 1.5F, 0.75F);
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 5);
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 5);
|
||||
if(tank.getTankType().hasTrait(FT_Leaded.class)) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.HEAVYMETAL, PollutionHandler.HEAVY_METAL_PER_SECOND * 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,6 +203,10 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
for(Entity e : affected) e.setFire(5);
|
||||
Random rand = worldObj.rand;
|
||||
ParticleUtil.spawnGasFlame(worldObj, xCoord + rand.nextDouble(), yCoord + 1.5 + rand.nextDouble() * 3, zCoord + rand.nextDouble(), rand.nextGaussian() * 0.05, 0.1, rand.nextGaussian() * 0.05);
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 70);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,8 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
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.interfaces.IFluidSource;
|
||||
@ -18,6 +20,7 @@ import com.hbm.inventory.fluid.trait.FT_Flammable;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Amat;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Gaseous;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Gaseous_ART;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Leaded;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Liquid;
|
||||
import com.hbm.inventory.gui.GUIMachineFluidTank;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -179,6 +182,11 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
||||
Random rand = worldObj.rand;
|
||||
ParticleUtil.spawnGasFlame(worldObj, xCoord + rand.nextDouble(), yCoord + 0.5 + rand.nextDouble(), zCoord + rand.nextDouble(), rand.nextGaussian() * 0.2, 0.1, rand.nextGaussian() * 0.2);
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 50);
|
||||
if(type.hasTrait(FT_Leaded.class)) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.HEAVYMETAL, PollutionHandler.HEAVY_METAL_PER_SECOND * 50);
|
||||
}
|
||||
|
||||
} else if(type.hasTrait(FT_Gaseous.class) || type.hasTrait(FT_Gaseous_ART.class)) {
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 5 == 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user