making use of the pollution tag

This commit is contained in:
Boblet 2024-03-12 16:32:54 +01:00
parent b38584862a
commit 7429327034
24 changed files with 75 additions and 206 deletions

View File

@ -7,11 +7,17 @@
* Removed cloud residue (looked horrible, allowed for weird dupes and made no sense overall)
* Bottlecap blocks now use a single block ID and metadata instead of using one ID per type. This change however will delete all existing bottlecap blocks in the world
* Removed the config option for silos (the option no longer works anyway since the new silos use the structure component system)
* Finally removed the deaerator
* Removed a few other minor things that won't be mentioned because nobody's gonna even notice their absence anyway
* Retextured the laser detonator to look more like the old detonator, but keeping the 3D model
* Bedrock ores can now be customized in creative mode. Using a drillbit sets the tier, a fluid container sets the borefluid requirement and any other item sets the resource.
* The texture used is random, and the color applied is based on the auto detect system. The system doesn't work with layered items, so the resulting color won't be the same as naturally generated bedrock ore. The bedrock ore item in particular will always result in a white ore, no matter the type
* The polluting fluid trait is now recognized by machines, which means that pollution amounts now depend on the fluid used, not the machine
* This means that flare stacks are now significantly less polluting, assuming natural gas is burned
* Flare stacks and barrels now also respect the spilling tag, which means that simply venting the gas may cause poison pollution
* Hydrogen doesn't have the polluting tag, so hydrogen burning generators won't create soot anymore
## Fixed
* WarTec should now be compatible again
* Fixed the "Hold shift for more info" line appearing on fluid info when shift is held, and disappearing otherwise
* Fixed the "Hold shift for more info" line appearing on fluid info when shift is held, and disappearing otherwise
* Fixed smokestacks being able to void any fluid under certain conditions

View File

@ -1019,9 +1019,6 @@ public class ModBlocks {
public static Block machine_electrolyser;
public static Block machine_deaerator;
public static final int guiID_machine_deaerator = 74;
public static Block machine_excavator;
public static Block machine_autosaw;
@ -2331,8 +2328,6 @@ public class ModBlocks {
anvil_osmiridium = new NTMAnvil(Material.iron, 8).setBlockName("anvil_osmiridium").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_osmiridium");
anvil_murky = new NTMAnvil(Material.iron, 1916169).setBlockName("anvil_murky").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_steel");
machine_deaerator = new MachineDeaerator(Material.iron).setBlockName("machine_deaerator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
machine_waste_drum = new WasteDrum(Material.iron).setBlockName("machine_waste_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":waste_drum");
machine_storage_drum = new StorageDrum(Material.iron).setBlockName("machine_storage_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_storage_drum");
@ -3359,7 +3354,6 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_solidifier, ItemBlockBase.class, machine_solidifier.getUnlocalizedName());
register(machine_compressor);
GameRegistry.registerBlock(machine_electrolyser, machine_electrolyser.getUnlocalizedName());
GameRegistry.registerBlock(machine_deaerator, machine_deaerator.getUnlocalizedName());
GameRegistry.registerBlock(machine_waste_drum, machine_waste_drum.getUnlocalizedName());
GameRegistry.registerBlock(machine_storage_drum, machine_storage_drum.getUnlocalizedName());
GameRegistry.registerBlock(machine_shredder, machine_shredder.getUnlocalizedName());

View File

@ -57,8 +57,6 @@ public class BlockCap extends BlockEnumMulti {
if(cap == EnumCapBlock.RAD) return ModItems.cap_rad;
if(cap == EnumCapBlock.KORL) return ModItems.cap_korl;
if(cap == EnumCapBlock.FRITZ) return ModItems.cap_fritz;
if(cap == EnumCapBlock.SUNSET) return ModItems.cap_sunset;
if(cap == EnumCapBlock.STAR) return ModItems.cap_star;
return null;
}
@ -66,6 +64,6 @@ public class BlockCap extends BlockEnumMulti {
@Override public int quantityDropped(Random rand) { return 128; }
public static enum EnumCapBlock {
NUKA, QUANTUM, SPARKLE, RAD, KORL, FRITZ, SUNSET, STAR;
NUKA, QUANTUM, SPARKLE, RAD, KORL, FRITZ
}
}

View File

@ -1,45 +0,0 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.tileentity.machine.TileEntityDeaerator;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class MachineDeaerator extends BlockDummyable {
public MachineDeaerator(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityDeaerator();
}
@Override
public int[] getDimensions() {
return new int[] {2, 0, 3, 4, 1, 1};
}
@Override
public int getOffset() {
return 4;
}
@Override
public int getRenderType() {
return 0;
}
@Override
public boolean isOpaqueCube() {
return true;
}
@Override
public boolean renderAsNormalBlock() {
return true;
}
}

View File

@ -90,7 +90,6 @@ public class ConsumableRecipes {
CraftingManager.addShapelessAuto(new ItemStack(ModItems.bottle2_fritz, 1), new Object[] { ModItems.bottle2_empty, Items.potionitem, Items.sugar, W.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.bottle2_korl_special, 1), new Object[] { ModItems.bottle2_empty, Items.potionitem, Items.sugar, CU.dust(), ST.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.bottle2_fritz_special, 1), new Object[] { ModItems.bottle2_empty, Items.potionitem, Items.sugar, W.dust(), TH232.dust() });
CraftingManager.addShapelessAuto(new ItemStack(ModItems.bottle2_sunset, 1), new Object[] { ModItems.bottle2_empty, Items.potionitem, Items.sugar, GOLD.dust() });
//Syringes
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_empty, 6), new Object[] { "P", "C", "B", 'B', Item.getItemFromBlock(Blocks.iron_bars), 'C', ModItems.cell_empty, 'P', IRON.plate() });

View File

@ -191,7 +191,6 @@ public class Fluids {
public static final FT_NoContainer NOCON = new FT_NoContainer();
public static final FT_NoID NOID = new FT_NoID();
public static final FT_Delicious DELICIOUS = new FT_Delicious();
public static final FT_Leaded LEADED = new FT_Leaded();
public static final FT_Unsiphonable UNSIPHONABLE = new FT_Unsiphonable();
/* Burns 4x dirtier than regular fuel */
@ -207,7 +206,7 @@ public class Fluids {
public static final FT_Polluting P_OIL = new FT_Polluting().burn(PollutionType.SOOT, SOOT_UNREFINED_OIL).release(PollutionType.POISON, POISON_OIL);
public static final FT_Polluting P_FUEL = new FT_Polluting().burn(PollutionType.SOOT, SOOT_REFINED_OIL).release(PollutionType.POISON, POISON_OIL);
public static final FT_Polluting P_FUEL_LEADED = new FT_Polluting().burn(PollutionType.SOOT, SOOT_REFINED_OIL).burn(PollutionType.HEAVYMETAL, LEAD_FUEL).release(PollutionType.POISON, POISON_OIL);
public static final FT_Polluting P_FUEL_LEADED = new FT_Polluting().burn(PollutionType.SOOT, SOOT_REFINED_OIL).burn(PollutionType.HEAVYMETAL, LEAD_FUEL).release(PollutionType.POISON, POISON_OIL).release(PollutionType.HEAVYMETAL, LEAD_FUEL);
public static final FT_Polluting P_GAS = new FT_Polluting().burn(PollutionType.SOOT, SOOT_GAS);
public static final FT_Polluting P_LIQUID_GAS = new FT_Polluting().burn(PollutionType.SOOT, SOOT_GAS * 2F);
@ -298,9 +297,9 @@ public class Fluids {
SALIENT = new FluidType("SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE).addTraits(DELICIOUS, LIQUID, VISCOUS);
XPJUICE = new FluidType("XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS);
ENDERJUICE = new FluidType("ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID);
PETROIL_LEADED = new FluidType("PETROIL_LEADED", 0x44413d, 1, 3, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2331F6)).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 450_000), LIQUID, LEADED, P_FUEL_LEADED);
GASOLINE_LEADED = new FluidType("GASOLINE_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2F775A)).addTraits(new FT_Flammable(400_000), new FT_Combustible(FuelGrade.HIGH, 1_500_000), LIQUID, LEADED, P_FUEL_LEADED);
COALGAS_LEADED = new FluidType("COALGAS_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x1E155F)).addTraits(new FT_Flammable(75_000), new FT_Combustible(FuelGrade.MEDIUM, 250_000), LIQUID, LEADED, P_FUEL_LEADED);
PETROIL_LEADED = new FluidType("PETROIL_LEADED", 0x44413d, 1, 3, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2331F6)).addTraits(new FT_Flammable(125_000), new FT_Combustible(FuelGrade.MEDIUM, 450_000), LIQUID, P_FUEL_LEADED);
GASOLINE_LEADED = new FluidType("GASOLINE_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x2F775A)).addTraits(new FT_Flammable(400_000), new FT_Combustible(FuelGrade.HIGH, 1_500_000), LIQUID, P_FUEL_LEADED);
COALGAS_LEADED = new FluidType("COALGAS_LEADED", 0x445772, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x1E155F)).addTraits(new FT_Flammable(75_000), new FT_Combustible(FuelGrade.MEDIUM, 250_000), LIQUID, P_FUEL_LEADED);
SULFURIC_ACID = new FluidType("SULFURIC_ACID", 0xB0AA64, 3, 0, 2, EnumSymbol.ACID).addTraits(new FT_Corrosive(50), LIQUID);
COOLANT_HOT = new FluidType("COOLANT_HOT", 0x99525E, 1, 0, 0, EnumSymbol.NONE).setTemp(600).addTraits(LIQUID);
MUG = new FluidType("MUG", 0x4B2D28, 0, 0, 0, EnumSymbol.NONE).addTraits(DELICIOUS, LIQUID);

View File

@ -9,6 +9,7 @@ import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.handler.pollution.PollutionHandler;
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.tank.FluidTank;
import net.minecraft.util.EnumChatFormatting;
@ -88,4 +89,16 @@ public class FT_Polluting extends FluidTrait {
}
}
}
public static void pollute(World world, int x, int y, int z, FluidType type, FluidReleaseType release, float mB) {
FT_Polluting trait = type.getTrait(FT_Polluting.class);
if(trait == null) return;
if(release == FluidReleaseType.VOID) return;
HashMap<PollutionType, Float> map = release == FluidReleaseType.BURN ? trait.burnMap : trait.releaseMap;
for(Entry<PollutionType, Float> entry : map.entrySet()) {
PollutionHandler.incrementPollution(world, x, y, z, entry.getKey(), entry.getValue() * mB);
}
}
}

View File

@ -39,7 +39,6 @@ public abstract class FluidTrait {
registerTrait("amat", FT_Amat.class);
registerTrait("leadcontainer", FT_LeadContainer.class);
registerTrait("delicious", FT_Delicious.class);
registerTrait("leaded", FT_Leaded.class);
registerTrait("noid", FT_NoID.class);
registerTrait("nocontainer", FT_NoContainer.class);
registerTrait("unsiphonable", FT_Unsiphonable.class);

View File

@ -55,12 +55,6 @@ public class FluidTraitSimple {
info.add(EnumChatFormatting.DARK_GREEN + "[Delicious]");
}
}
public static class FT_Leaded extends FluidTrait {
@Override public void addInfoHidden(List<String> info) {
info.add(EnumChatFormatting.BLUE + "[Leaded Fuel]");
}
}
public static class FT_Unsiphonable extends FluidTrait {
@Override public void addInfoHidden(List<String> info) {

View File

@ -963,8 +963,6 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.RAD)), new AStack[] { new ComparableStack(ModItems.cap_rad, 128) }, 10);
makeRecipe(new ComparableStack(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.FRITZ)), new AStack[] { new ComparableStack(ModItems.cap_fritz, 128) }, 10);
makeRecipe(new ComparableStack(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.KORL)), new AStack[] { new ComparableStack(ModItems.cap_korl, 128) }, 10);
makeRecipe(new ComparableStack(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.SUNSET)), new AStack[] { new ComparableStack(ModItems.cap_sunset, 128) }, 10);
makeRecipe(new ComparableStack(DictFrame.fromOne(ModBlocks.block_cap, EnumCapBlock.STAR)), new AStack[] { new ComparableStack(ModItems.cap_star, 128) }, 10);
if(!GeneralConfig.enable528) {
makeRecipe(new ComparableStack(ModBlocks.machine_hephaestus, 1), new AStack[] { new ComparableStack(ModItems.pipes_steel, 1), !exp ? new OreDictStack(STEEL.ingot(), 24) : new OreDictStack(STEEL.heavyComp(), 2), !exp ? new OreDictStack(CU.plate(), 24) : new OreDictStack(CU.heavyComp(), 2), new OreDictStack(NB.ingot(), 4), new OreDictStack(RUBBER.ingot(), 12), new ComparableStack(ModBlocks.glass_quartz, 16) }, 150);

View File

@ -1011,7 +1011,6 @@ public class ModItems {
public static Item bottle2_fritz;
public static Item bottle2_korl_special;
public static Item bottle2_fritz_special;
public static Item bottle2_sunset;
public static Item flask_empty;
public static Item flask_infusion;
public static Item chocolate_milk;
@ -1024,8 +1023,6 @@ public class ModItems {
public static Item cap_rad;
public static Item cap_korl;
public static Item cap_fritz;
public static Item cap_sunset;
public static Item cap_star;
public static Item ring_pull;
public static Item bdcl;
//public static Item canned_beef;
@ -3466,8 +3463,6 @@ public class ModItems {
cap_rad = new Item().setUnlocalizedName("cap_rad").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_rad");
cap_korl = new Item().setUnlocalizedName("cap_korl").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_korl");
cap_fritz = new Item().setUnlocalizedName("cap_fritz").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_fritz");
cap_sunset = new Item().setUnlocalizedName("cap_sunset").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_sunset");
cap_star = new Item().setUnlocalizedName("cap_star").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_star");
ring_pull = new Item().setUnlocalizedName("ring_pull").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":ring_pull");
can_empty = new Item().setUnlocalizedName("can_empty").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":can_empty");
@ -3491,7 +3486,6 @@ public class ModItems {
bottle2_fritz = new ItemEnergy().makeBottle(bottle2_empty, cap_fritz).setUnlocalizedName("bottle2_fritz").setContainerItem(ModItems.bottle2_empty).setTextureName(RefStrings.MODID + ":bottle2_fritz");
bottle2_korl_special = new ItemEnergy().makeBottle(bottle2_empty, cap_korl).setUnlocalizedName("bottle2_korl_special").setContainerItem(ModItems.bottle2_empty).setTextureName(RefStrings.MODID + ":bottle2_korl");
bottle2_fritz_special = new ItemEnergy().makeBottle(bottle2_empty, cap_fritz).setUnlocalizedName("bottle2_fritz_special").setContainerItem(ModItems.bottle2_empty).setTextureName(RefStrings.MODID + ":bottle2_fritz");
bottle2_sunset = new ItemEnergy().makeBottle(bottle2_empty, cap_sunset).setUnlocalizedName("bottle2_sunset").setContainerItem(ModItems.bottle2_empty).setTextureName(RefStrings.MODID + ":bottle2_sunset");
flask_infusion = new ItemFlask().setUnlocalizedName("flask_infusion").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":flask");
chocolate_milk = new ItemEnergy().setUnlocalizedName("chocolate_milk").setTextureName(RefStrings.MODID + ":chocolate_milk");
coffee = new ItemEnergy().setUnlocalizedName("coffee").setTextureName(RefStrings.MODID + ":coffee");
@ -7515,40 +7509,12 @@ public class ModItems {
GameRegistry.registerItem(bottle2_fritz, bottle2_fritz.getUnlocalizedName());
GameRegistry.registerItem(bottle2_korl_special, bottle2_korl_special.getUnlocalizedName());
GameRegistry.registerItem(bottle2_fritz_special, bottle2_fritz_special.getUnlocalizedName());
GameRegistry.registerItem(bottle2_sunset, bottle2_sunset.getUnlocalizedName());
GameRegistry.registerItem(bottle_opener, bottle_opener.getUnlocalizedName());
//Flasks
GameRegistry.registerItem(flask_infusion, flask_infusion.getUnlocalizedName());
//Canned Food
//GameRegistry.registerItem(canned_beef, canned_beef.getUnlocalizedName());
//GameRegistry.registerItem(canned_tuna, canned_tuna.getUnlocalizedName());
//GameRegistry.registerItem(canned_mystery, canned_mystery.getUnlocalizedName());
//GameRegistry.registerItem(canned_pashtet, canned_pashtet.getUnlocalizedName());
//GameRegistry.registerItem(canned_cheese, canned_cheese.getUnlocalizedName());
//GameRegistry.registerItem(canned_jizz, canned_jizz.getUnlocalizedName());
//GameRegistry.registerItem(canned_milk, canned_milk.getUnlocalizedName());
//GameRegistry.registerItem(canned_ass, canned_ass.getUnlocalizedName());
//GameRegistry.registerItem(canned_pizza, canned_pizza.getUnlocalizedName());
//GameRegistry.registerItem(canned_tube, canned_tube.getUnlocalizedName());
//GameRegistry.registerItem(canned_tomato, canned_tomato.getUnlocalizedName());
//GameRegistry.registerItem(canned_asbestos, canned_asbestos.getUnlocalizedName());
//GameRegistry.registerItem(canned_bhole, canned_bhole.getUnlocalizedName());
//GameRegistry.registerItem(canned_hotdogs, canned_hotdogs.getUnlocalizedName());
//GameRegistry.registerItem(canned_leftovers, canned_leftovers.getUnlocalizedName());
//GameRegistry.registerItem(canned_yogurt, canned_yogurt.getUnlocalizedName());
//GameRegistry.registerItem(canned_stew, canned_stew.getUnlocalizedName());
//GameRegistry.registerItem(canned_chinese, canned_chinese.getUnlocalizedName());
//GameRegistry.registerItem(canned_oil, canned_oil.getUnlocalizedName());
//GameRegistry.registerItem(canned_fist, canned_fist.getUnlocalizedName());
//GameRegistry.registerItem(canned_spam, canned_spam.getUnlocalizedName());
//GameRegistry.registerItem(canned_fried, canned_fried.getUnlocalizedName());
//GameRegistry.registerItem(canned_napalm, canned_napalm.getUnlocalizedName());
//GameRegistry.registerItem(canned_diesel, canned_diesel.getUnlocalizedName());
//GameRegistry.registerItem(canned_kerosene, canned_kerosene.getUnlocalizedName());
//GameRegistry.registerItem(canned_recursion, canned_recursion.getUnlocalizedName());
//GameRegistry.registerItem(canned_bark, canned_bark.getUnlocalizedName());
GameRegistry.registerItem(canned_conserve, canned_conserve.getUnlocalizedName());
//Money
@ -7558,8 +7524,6 @@ public class ModItems {
GameRegistry.registerItem(cap_rad, cap_rad.getUnlocalizedName());
GameRegistry.registerItem(cap_korl, cap_korl.getUnlocalizedName());
GameRegistry.registerItem(cap_fritz, cap_fritz.getUnlocalizedName());
GameRegistry.registerItem(cap_sunset, cap_sunset.getUnlocalizedName());
GameRegistry.registerItem(cap_star, cap_star.getUnlocalizedName());
GameRegistry.registerItem(ring_pull, ring_pull.getUnlocalizedName());
GameRegistry.registerItem(can_key, can_key.getUnlocalizedName());
GameRegistry.registerItem(coin_creeper, coin_creeper.getUnlocalizedName());

View File

@ -171,13 +171,6 @@ public class ItemEnergy extends Item {
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 120 * 20, 1));
ContaminationUtil.contaminate(player, HazardType.RADIATION, ContaminationType.RAD_BYPASS, 15.0F);
}
if(this == ModItems.bottle2_sunset) {
player.heal(6);
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 1));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 60 * 20, 2));
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 60 * 20, 2));
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 60 * 20, 2));
}
if(this == ModItems.coffee) {
player.heal(10);
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 60 * 20, 2));
@ -192,11 +185,7 @@ public class ItemEnergy extends Item {
if(!player.capabilities.isCreativeMode) {
if(this.cap != null) {
if(this == ModItems.bottle2_sunset && world.rand.nextInt(20) == 0)
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cap_star));
else
player.inventory.addItemStackToInventory(new ItemStack(this.cap));
player.inventory.addItemStackToInventory(new ItemStack(this.cap));
}
if(this.container != null) {
if(stack.stackSize <= 0) {
@ -317,20 +306,5 @@ public class ItemEnergy extends Item {
list.add("Tastes like radish and radiation.");
list.add("[Requires bottle opener]");
}
if(this == ModItems.bottle2_sunset) {
if(MainRegistry.polaroidID == 11) {
list.add("\"Authentic Sunset Juice\"");
list.add("");
list.add("This smells like fish.");
list.add("*sip*");
list.add("Yup, that's pretty disugsting.");
list.add("...");
list.add("...");
list.add("*sip*");
} else {
list.add("The eternal #2. Screw you, Bradberton!");
}
list.add("[Requires bottle opener]");
}
}
}

View File

@ -66,7 +66,6 @@ import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDispenser;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
@ -1237,6 +1236,10 @@ public class MainRegistry {
ignoreMappings.add("hbm:tile.block_cap_fritz");
ignoreMappings.add("hbm:tile.block_cap_sunset");
ignoreMappings.add("hbm:tile.block_cap_star");
ignoreMappings.add("hbm:tile.machine_deaerator");
ignoreMappings.add("hbm:item.bottle2_sunset");
ignoreMappings.add("hbm:item.cap_sunset");
ignoreMappings.add("hbm:item.cap_star");
/// REMAP ///
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);

View File

@ -128,9 +128,7 @@ public class ItemBobmazonPacket implements IMessage {
item == ModItems.cap_nuka ||
item == ModItems.cap_quantum ||
item == ModItems.cap_rad ||
item == ModItems.cap_sparkle ||
item == ModItems.cap_star ||
item == ModItems.cap_sunset)
item == ModItems.cap_sparkle)
count += stack.stackSize;
}
@ -157,9 +155,7 @@ public class ItemBobmazonPacket implements IMessage {
item == ModItems.cap_nuka ||
item == ModItems.cap_quantum ||
item == ModItems.cap_rad ||
item == ModItems.cap_sparkle ||
item == ModItems.cap_star ||
item == ModItems.cap_sunset) {
item == ModItems.cap_sparkle) {
int size = stack.stackSize;
for(int j = 0; j < size; j++) {

View File

@ -189,7 +189,6 @@ public class TileMappings {
put(TileEntityLantern.class, "tileentity_lantern_ordinary");
put(TileEntityLanternBehemoth.class, "tileentity_lantern_behemoth");
put(TileEntityStorageDrum.class, "tileentity_waste_storage_drum");
put(TileEntityDeaerator.class, "tileentity_deaerator");
put(TileEntityCableBaseNT.class, "tileentity_ohgod"); // what?
put(TileEntityCablePaintable.class, "tileentity_cable_paintable");
put(TileEntityCableGauge.class, "tileentity_cable_gauge");

View File

@ -85,6 +85,9 @@ public abstract class TileEntityChimneyBase extends TileEntityLoadedBase impleme
@Override
public long transferFluid(FluidType type, int pressure, long fluid) {
if(type != Fluids.SMOKE && type != Fluids.SMOKE_LEADED && type != Fluids.SMOKE_POISON) return fluid;
onTicks = 20;
if(cpaturesAsh()) ashTick += fluid;

View File

@ -1,21 +0,0 @@
package com.hbm.tileentity.machine;
import com.hbm.tileentity.TileEntityMachineBase;
public class TileEntityDeaerator extends TileEntityMachineBase {
public TileEntityDeaerator() {
super(0);
}
@Override
public String getName() {
return "container.deaerator";
}
@Override
public void updateEntity() {
}
}

View File

@ -1,13 +1,12 @@
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.inventory.container.ContainerOilburner;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.fluid.trait.FT_Flammable;
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Leaded;
import com.hbm.inventory.fluid.trait.FT_Polluting;
import com.hbm.inventory.fluid.trait.FluidTrait.FluidReleaseType;
import com.hbm.inventory.gui.GUIOilburner;
import com.hbm.lib.Library;
import com.hbm.tileentity.IGUIProvider;
@ -82,9 +81,8 @@ public class TileEntityHeaterOilburner extends TileEntityMachinePolluting implem
this.heatEnergy += heat * toBurn;
if(worldObj.getTotalWorldTime() % 20 == 0 && toBurn > 0) {
this.pollute(PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * burnRate * 0.5F);
if(tank.getTankType().hasTrait(FT_Leaded.class)) this.pollute(PollutionType.HEAVYMETAL, PollutionHandler.HEAVY_METAL_PER_SECOND * burnRate * 0.5F);
if(worldObj.getTotalWorldTime() % 5 == 0 && toBurn > 0) {
FT_Polluting.pollute(worldObj, xCoord, yCoord, zCoord, tank.getTankType(), FluidReleaseType.BURN, toBurn * 5);
}
shouldCool = false;

View File

@ -1,15 +1,14 @@
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;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.fluid.trait.FT_Combustible;
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Leaded;
import com.hbm.inventory.fluid.trait.FT_Polluting;
import com.hbm.inventory.fluid.trait.FluidTrait.FluidReleaseType;
import com.hbm.inventory.gui.GUICombustionEngine;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemPistons.EnumPistonType;
@ -86,10 +85,9 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
int toBurn = Math.min(fill, speed);
this.power += toBurn * (trait.getCombustionEnergy() / 10_000D) * eff;
fill -= toBurn;
if(worldObj.getTotalWorldTime() % 20 == 0) {
this.pollute(PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * setting * 0.1F);
if(tank.getTankType().hasTrait(FT_Leaded.class)) this.pollute(PollutionType.HEAVYMETAL, PollutionHandler.HEAVY_METAL_PER_SECOND * setting * 0.1F);
if(worldObj.getTotalWorldTime() % 5 == 0 && toBurn > 0) {
FT_Polluting.pollute(worldObj, xCoord, yCoord, zCoord, tank.getTankType(), FluidReleaseType.BURN, toBurn * 5);
}
if(toBurn > 0) {

View File

@ -6,8 +6,6 @@ import java.util.HashMap;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
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;
@ -16,8 +14,9 @@ import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.fluid.trait.FT_Combustible;
import com.hbm.inventory.fluid.trait.FT_Polluting;
import com.hbm.inventory.fluid.trait.FT_Combustible.FuelGrade;
import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Leaded;
import com.hbm.inventory.fluid.trait.FluidTrait.FluidReleaseType;
import com.hbm.inventory.gui.GUIMachineDiesel;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
@ -212,8 +211,9 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
if(tank.getFill() < 0)
tank.setFill(0);
this.pollute(PollutionType.SOOT, PollutionHandler.SOOT_PER_SECOND * 0.5F);
if(tank.getTankType().hasTrait(FT_Leaded.class)) this.pollute(PollutionType.HEAVYMETAL, PollutionHandler.HEAVY_METAL_PER_SECOND * 0.5F);
if(worldObj.getTotalWorldTime() % 5 == 0) {
FT_Polluting.pollute(worldObj, xCoord, yCoord, zCoord, tank.getTankType(), FluidReleaseType.BURN, 5F);
}
if(power + getHEFromFuel() <= powerCap) {
power += getHEFromFuel();

View File

@ -3,8 +3,6 @@ package com.hbm.tileentity.machine.oil;
import java.util.List;
import com.hbm.blocks.ModBlocks;
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.interfaces.IFluidContainer;
@ -14,9 +12,10 @@ import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.fluid.trait.FT_Flammable;
import com.hbm.inventory.fluid.trait.FT_Polluting;
import com.hbm.inventory.fluid.trait.FluidTrait.FluidReleaseType;
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;
@ -138,6 +137,10 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
if(worldObj.getTotalWorldTime() % 7 == 0)
this.worldObj.playSoundEffect(this.xCoord, this.yCoord + 11, this.zCoord, "random.fizz", getVolume(1.5F), 0.5F);
if(worldObj.getTotalWorldTime() % 5 == 0 && eject > 0) {
FT_Polluting.pollute(worldObj, xCoord, yCoord, zCoord, tank.getTankType(), FluidReleaseType.SPILL, eject * 5);
}
}
} else {
@ -171,9 +174,8 @@ public class TileEntityMachineGasFlare extends TileEntityMachineBase implements
if(worldObj.getTotalWorldTime() % 3 == 0)
this.worldObj.playSoundEffect(this.xCoord, this.yCoord + 11, this.zCoord, "hbm:weapon.flamethrowerShoot", getVolume(1.5F), 0.75F);
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);
if(worldObj.getTotalWorldTime() % 5 == 0 && eject > 0) {
FT_Polluting.pollute(worldObj, xCoord, yCoord, zCoord, tank.getTankType(), FluidReleaseType.BURN, eject * 5);
}
}
}

View File

@ -10,6 +10,8 @@ import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.fluid.trait.FT_Corrosive;
import com.hbm.inventory.fluid.trait.FT_Polluting;
import com.hbm.inventory.fluid.trait.FluidTrait.FluidReleaseType;
import com.hbm.inventory.gui.GUIBarrel;
import com.hbm.lib.Library;
import com.hbm.saveddata.TomSaveData;
@ -247,7 +249,10 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
}
if(b == ModBlocks.barrel_corroded ) {
if(worldObj.rand.nextInt(3) == 0) tank.setFill(tank.getFill() - 1);
if(worldObj.rand.nextInt(3) == 0) {
tank.setFill(tank.getFill() - 1);
FT_Polluting.pollute(worldObj, xCoord, yCoord, zCoord, tank.getTankType(), FluidReleaseType.SPILL, 1F);
}
if(worldObj.rand.nextInt(3 * 60 * 20) == 0) worldObj.func_147480_a(xCoord, yCoord, zCoord, false);
}

View File

@ -6,8 +6,6 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.extprop.HbmPlayerProps;
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;
@ -16,13 +14,9 @@ import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.OreDictStack;
import com.hbm.inventory.container.ContainerMachineFluidTank;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.trait.FT_Corrosive;
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.fluid.trait.*;
import com.hbm.inventory.fluid.trait.FluidTrait.FluidReleaseType;
import com.hbm.inventory.fluid.trait.FluidTraitSimple.*;
import com.hbm.inventory.gui.GUIMachineFluidTank;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
@ -210,9 +204,8 @@ 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);
if(worldObj.getTotalWorldTime() % 5 == 0) {
FT_Polluting.pollute(worldObj, xCoord, yCoord, zCoord, tank.getTankType(), FluidReleaseType.BURN, amount * 5);
}
} else if(type.hasTrait(FT_Gaseous.class) || type.hasTrait(FT_Gaseous_ART.class)) {
@ -227,6 +220,10 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
data.setInteger("color", tank.getTankType().getColor());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, xCoord + 0.5, yCoord + 1, zCoord + 0.5), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
}
if(worldObj.getTotalWorldTime() % 5 == 0 ) {
FT_Polluting.pollute(worldObj, xCoord, yCoord, zCoord, tank.getTankType(), FluidReleaseType.SPILL, amount * 5);
}
}
}

View File

@ -79,16 +79,12 @@ public class LootGenerator {
for(int i = -1; i <= 1; i++) {
for(int j = -1; j <= 1; j++) {
int r = world.rand.nextInt(3);
Item cap = r < 2 ? ModItems.cap_nuka : ModItems.cap_sunset;
int r = world.rand.nextInt(10);
Item cap = r < 9 ? ModItems.cap_nuka : ModItems.cap_quantum;
int count = world.rand.nextInt(5) + 3;
for(int k = 0; k < count; k++) {
if(cap == ModItems.cap_sunset && world.rand.nextInt(10) == 0)
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.cap_star, 1), i * 0.3125, k * 0.03125, j * 0.3125);
else
addItemWithDeviation(loot, world.rand, new ItemStack(cap, 4), i * 0.3125, k * 0.03125, j * 0.3125);
addItemWithDeviation(loot, world.rand, new ItemStack(cap, 4), i * 0.3125, k * 0.03125, j * 0.3125);
}
}
}