diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index dfd0f17b8..a721efc73 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -32,6 +32,8 @@ hbmfluid.lightoil=Leichtöl hbmfluid.petroleum=Petroleumgas hbmfluid.acid=Wasserstoffperoxid hbmfluid.watz=Giftiger Schlamm +hbmfluid.biogas=Biogas +hbmfluid.biofuel=Biodiesel chem.TEST=Test chem.FP_HEAVYOIL=Schwerölverarbeitung @@ -55,6 +57,24 @@ chem.DESH=Deshherstellung chem.PEROXIDE=Wasserstoffperoxidherstellung chem.CIRCUIT_4=Überstaktete Schaltkreisherstellung chem.CIRCUIT_5=Leistungsstarke Schaltkreisherstellung +chem.SF_OIL=Rohölverfestigung +chem.SF_HEAVYOIL=Schwerölverfestigung +chem.SF_SMEAR=Industrieölverfestigung +chem.SF_HEATINGOIL=Heizölverfestigung +chem.SF_RECLAIMED=Verfestigung von wiederaufbereitetem Industrieöl +chem.SF_PETROIL=Gemischverfestigung +chem.SF_LUBRICANT=Schmiermittelverfestigung +chem.SF_NAPHTHA=Mitteldestillatsverfestigung +chem.SF_DIESEL=Dieselverfestigung +chem.SF_LIGHTOIL=Leichtölverfestigung +chem.SF_KEROSENE=Kerosinverfestigung +chem.SF_GAS=Erdgasverfestigung +chem.SF_PETROLEUM=Petroleumgasverfestigung +chem.POLYMER=Polymersynthese +chem.DEUTERIUM=Deuteriumextrahierung +chem.STEAM=WWasser kochen +chem.UF6=Uranhexafluoritproduktion +chem.PUF6=Plutoniumhexafluoritproduktion item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core item.record.ss.desc=Valve - Sector Sweep @@ -582,6 +602,9 @@ item.upgrade_power_3.name=Blaues Maschinenupgrade Mk.III item.upgrade_fortune_1.name=Lila Maschinenupgrade Mk.I item.upgrade_fortune_2.name=Lila Maschinenupgrade Mk.II item.upgrade_fortune_3.name=Lila Maschinenupgrade Mk.III +item.upgrade_afterburn_1.name=Pinkes Maschinenupgrade Mk.I +item.upgrade_afterburn_2.name=Pinkes Maschinenupgrade Mk.II +item.upgrade_afterburn_3.name=Pinkes Maschinenupgrade Mk.III item.fusion_core.name=Fusionskern item.energy_core.name=Selbstgebauter Energiekern @@ -613,6 +636,7 @@ item.magnet_dee.name=Duantenmagnete item.magnet_circular.name=Flachmagnet item.cyclotron_tower.name=Zyklotronenturm item.plate_dalekanium.name=Wütendes Metall +item.biomass.name=Biomasse item.cell_empty.name=Leere Zelle item.cell_uf6.name=Uranhexafluorit-Zelle @@ -1252,6 +1276,7 @@ item.pellet_coolant.name=Kühlcluster item.linker.name=Telelinker item.oil_detector.name=Ölvorkommen-Detektor +item.geiger_counter.name=Geigerzähler item.thermo_element.name=Thermoelektrisches Element item.limiter.name=Generator-Limiter diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 3780e664d..716f2f5a4 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -32,6 +32,8 @@ hbmfluid.lightoil=Light Oil hbmfluid.petroleum=Petroleum Gas hbmfluid.acid=Hydrogen Peroxide hbmfluid.watz=Poisonous Mud +hbmfluid.biogas=Biogas +hbmfluid.biofuel=Biofuel chem.TEST=Test chem.FP_HEAVYOIL=Heavy Oil Processing @@ -55,6 +57,24 @@ chem.DESH=Desh Production chem.PEROXIDE=Hydrogen Peroxide Production chem.CIRCUIT_4=Overclocked Circuit Production chem.CIRCUIT_5=High Performance Circuit Production +chem.SF_OIL=Crude Oil Solidification +chem.SF_HEAVYOIL=Heavy Oil Solidification +chem.SF_SMEAR=Industrial Oil Solidification +chem.SF_HEATINGOIL=Heating Oil Solidification +chem.SF_RECLAIMED=Reclaimed Oil Solidification +chem.SF_PETROIL=Petroil Solidification +chem.SF_LUBRICANT=Lubricant Solidification +chem.SF_NAPHTHA=Naphtha Solidification +chem.SF_DIESEL=Diesel Solidification +chem.SF_LIGHTOIL=Light Oil Solidification +chem.SF_KEROSENE=Kerosene Solidification +chem.SF_GAS=Natural Gas Solidification +chem.SF_PETROLEUM=Petroleum Gas Solidification +chem.POLYMER=Polymer Synthesis +chem.DEUTERIUM=Deuterium Extraction +chem.STEAM=Water Boiling +chem.UF6=Uranium Hexafluoride Production +chem.PUF6=Plutonium Hexafluoride Production item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core item.record.ss.desc=Valve - Sector Sweep @@ -582,6 +602,9 @@ item.upgrade_power_3.name=Blue Machine Upgrade Mk.III item.upgrade_fortune_1.name=Purple Machine Upgrade Mk.I item.upgrade_fortune_2.name=Purple Machine Upgrade Mk.II item.upgrade_fortune_3.name=Purple Machine Upgrade Mk.III +item.upgrade_afterburn_1.name=Pink Machine Upgrade Mk.I +item.upgrade_afterburn_2.name=Pink Machine Upgrade Mk.II +item.upgrade_afterburn_3.name=Pink Machine Upgrade Mk.III item.fusion_core.name=Fusion Core item.energy_core.name=Makeshift Energy Core @@ -613,6 +636,7 @@ item.magnet_dee.name=Dee Magnets item.magnet_circular.name=Flat Magnet item.cyclotron_tower.name=Cyclotron Tower item.plate_dalekanium.name=Angry Metal +item.biomass.name=Biomass item.cell_empty.name=Empty Cell item.cell_uf6.name=Uranium Hexafluorite Cell @@ -1252,6 +1276,7 @@ item.pellet_coolant.name=Coolant Cluster item.linker.name=Telelinker item.oil_detector.name=Oil Reservoir Detector +item.geiger_counter.name=Geiger Counter item.thermo_element.name=Thermoelectric Element item.limiter.name=Generator Limiter diff --git a/assets/hbm/sounds.json b/assets/hbm/sounds.json index e72bde972..63be6959f 100644 --- a/assets/hbm/sounds.json +++ b/assets/hbm/sounds.json @@ -14,7 +14,13 @@ "block.turbofanOperate": {"category": "block", "sounds": [{"name": "block/turbofanOperate", "stream": false}]}, "item.techBleep": {"category": "player", "sounds": [{"name": "tool/techBleep", "stream": false}]}, - "item.techBoop": {"category": "player", "sounds": [{"name": "tool/techBoop", "stream": false}]}, + "item.techBoop": {"category": "player", "sounds": [{"name": "tool/techBoop", "stream": false}]}, + "item.geiger1": {"category": "player", "sounds": [{"name": "tool/geiger1", "stream": false}]}, + "item.geiger2": {"category": "player", "sounds": [{"name": "tool/geiger2", "stream": false}]}, + "item.geiger3": {"category": "player", "sounds": [{"name": "tool/geiger3", "stream": false}]}, + "item.geiger4": {"category": "player", "sounds": [{"name": "tool/geiger4", "stream": false}]}, + "item.geiger5": {"category": "player", "sounds": [{"name": "tool/geiger5", "stream": false}]}, + "item.geiger6": {"category": "player", "sounds": [{"name": "tool/geiger6", "stream": false}]}, "music.recordLambdaCore": {"category": "record", "sounds": [{"name": "music/recordLambdaCore", "stream": true}]}, "music.recordSectorSweep": {"category": "record", "sounds": [{"name": "music/recordSectorSweep", "stream": true}]}, diff --git a/assets/hbm/sounds/tool/geiger1.ogg b/assets/hbm/sounds/tool/geiger1.ogg new file mode 100644 index 000000000..8b72d9e3d Binary files /dev/null and b/assets/hbm/sounds/tool/geiger1.ogg differ diff --git a/assets/hbm/sounds/tool/geiger2.ogg b/assets/hbm/sounds/tool/geiger2.ogg new file mode 100644 index 000000000..7a2c38927 Binary files /dev/null and b/assets/hbm/sounds/tool/geiger2.ogg differ diff --git a/assets/hbm/sounds/tool/geiger3.ogg b/assets/hbm/sounds/tool/geiger3.ogg new file mode 100644 index 000000000..2b5e52670 Binary files /dev/null and b/assets/hbm/sounds/tool/geiger3.ogg differ diff --git a/assets/hbm/sounds/tool/geiger4.ogg b/assets/hbm/sounds/tool/geiger4.ogg new file mode 100644 index 000000000..1d3000b07 Binary files /dev/null and b/assets/hbm/sounds/tool/geiger4.ogg differ diff --git a/assets/hbm/sounds/tool/geiger5.ogg b/assets/hbm/sounds/tool/geiger5.ogg new file mode 100644 index 000000000..6a3b2fa5c Binary files /dev/null and b/assets/hbm/sounds/tool/geiger5.ogg differ diff --git a/assets/hbm/sounds/tool/geiger6.ogg b/assets/hbm/sounds/tool/geiger6.ogg new file mode 100644 index 000000000..0690b42c0 Binary files /dev/null and b/assets/hbm/sounds/tool/geiger6.ogg differ diff --git a/assets/hbm/textures/blocks/machine_gas_furnace_fron_on.png b/assets/hbm/textures/blocks/machine_gas_furnace_fron_on.png new file mode 100644 index 000000000..6763f77a4 Binary files /dev/null and b/assets/hbm/textures/blocks/machine_gas_furnace_fron_on.png differ diff --git a/assets/hbm/textures/blocks/machine_gas_furnace_front_off.png b/assets/hbm/textures/blocks/machine_gas_furnace_front_off.png new file mode 100644 index 000000000..18dcd258c Binary files /dev/null and b/assets/hbm/textures/blocks/machine_gas_furnace_front_off.png differ diff --git a/assets/hbm/textures/gui/GUICoal.png b/assets/hbm/textures/gui/GUICoal.png index ccecfe45e..0fbef7260 100644 Binary files a/assets/hbm/textures/gui/GUICoal.png and b/assets/hbm/textures/gui/GUICoal.png differ diff --git a/assets/hbm/textures/gui/gui_gasFlare.png b/assets/hbm/textures/gui/gui_gasFlare.png index 9d5e9d2e6..dad01e24a 100644 Binary files a/assets/hbm/textures/gui/gui_gasFlare.png and b/assets/hbm/textures/gui/gui_gasFlare.png differ diff --git a/assets/hbm/textures/gui/gui_generator.png b/assets/hbm/textures/gui/gui_generator.png index 993c88ed6..134511414 100644 Binary files a/assets/hbm/textures/gui/gui_generator.png and b/assets/hbm/textures/gui/gui_generator.png differ diff --git a/assets/hbm/textures/gui/gui_reactor_multiblock.png b/assets/hbm/textures/gui/gui_reactor_multiblock.png index 16ab6af98..f6975e534 100644 Binary files a/assets/hbm/textures/gui/gui_reactor_multiblock.png and b/assets/hbm/textures/gui/gui_reactor_multiblock.png differ diff --git a/assets/hbm/textures/gui/gui_refinery.png b/assets/hbm/textures/gui/gui_refinery.png index 86aff4829..fd4ced3ab 100644 Binary files a/assets/hbm/textures/gui/gui_refinery.png and b/assets/hbm/textures/gui/gui_refinery.png differ diff --git a/assets/hbm/textures/gui/gui_well_large.png b/assets/hbm/textures/gui/gui_well_large.png index 1126b54a3..2f20900af 100644 Binary files a/assets/hbm/textures/gui/gui_well_large.png and b/assets/hbm/textures/gui/gui_well_large.png differ diff --git a/assets/hbm/textures/items/biomass.png b/assets/hbm/textures/items/biomass.png new file mode 100755 index 000000000..f1ee5f5e3 Binary files /dev/null and b/assets/hbm/textures/items/biomass.png differ diff --git a/assets/hbm/textures/items/biomass_alt.png b/assets/hbm/textures/items/biomass_alt.png new file mode 100755 index 000000000..3e0eee5eb Binary files /dev/null and b/assets/hbm/textures/items/biomass_alt.png differ diff --git a/assets/hbm/textures/items/canister_biofuel.png b/assets/hbm/textures/items/canister_biofuel.png new file mode 100644 index 000000000..d53fe1be1 Binary files /dev/null and b/assets/hbm/textures/items/canister_biofuel.png differ diff --git a/assets/hbm/textures/items/centrifuge_element.png b/assets/hbm/textures/items/centrifuge_element.png index 4e0460a14..7a4a24dcc 100644 Binary files a/assets/hbm/textures/items/centrifuge_element.png and b/assets/hbm/textures/items/centrifuge_element.png differ diff --git a/assets/hbm/textures/items/gas_bio.png b/assets/hbm/textures/items/gas_bio.png new file mode 100644 index 000000000..83ddfc3fc Binary files /dev/null and b/assets/hbm/textures/items/gas_bio.png differ diff --git a/assets/hbm/textures/items/warhead_mirv.png b/assets/hbm/textures/items/warhead_mirv.png index 466952c7c..9c01939b8 100644 Binary files a/assets/hbm/textures/items/warhead_mirv.png and b/assets/hbm/textures/items/warhead_mirv.png differ diff --git a/assets/hbm/textures/items/warhead_mirvlet.png b/assets/hbm/textures/items/warhead_mirvlet.png index b7f6b1f20..7630682da 100644 Binary files a/assets/hbm/textures/items/warhead_mirvlet.png and b/assets/hbm/textures/items/warhead_mirvlet.png differ diff --git a/assets/hbm/textures/items/warhead_nuclear.png b/assets/hbm/textures/items/warhead_nuclear.png index b80e8097b..617344c6f 100644 Binary files a/assets/hbm/textures/items/warhead_nuclear.png and b/assets/hbm/textures/items/warhead_nuclear.png differ diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index e9c8d1ce7..7bde8ab1a 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -370,6 +370,9 @@ public class ModBlocks { public static Block machine_turbofan; public static final int guiID_machine_turbofan = 52; + public static Block machine_inserter; + public static final int guiID_machine_inserter = 53; + public static Block turret_light; public static Block turret_heavy; public static Block turret_rocket; @@ -706,6 +709,7 @@ public class ModBlocks { machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":machine_chemplant"); machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank"); machine_turbofan = new MachineTurbofan(Material.iron).setBlockName("machine_turbofan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":machine_turbofan"); + machine_inserter = new MachineInserter(Material.iron).setBlockName("machine_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":inserter_side"); machine_schrabidium_transmutator = new MachineSchrabidiumTransmutator(Material.iron).setBlockName("machine_schrabidium_transmutator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock); @@ -993,6 +997,9 @@ public class ModBlocks { GameRegistry.registerBlock(factory_advanced_conductor, factory_advanced_conductor.getUnlocalizedName()); GameRegistry.registerBlock(factory_advanced_core, factory_advanced_core.getUnlocalizedName()); + //The Fluid Inserter + GameRegistry.registerBlock(machine_inserter, machine_inserter.getUnlocalizedName()); + //Multiblock Generators GameRegistry.registerBlock(reactor_element, reactor_element.getUnlocalizedName()); GameRegistry.registerBlock(reactor_control, reactor_control.getUnlocalizedName()); diff --git a/com/hbm/blocks/generic/BlockOre.java b/com/hbm/blocks/generic/BlockOre.java index 437aa34a5..058511c97 100644 --- a/com/hbm/blocks/generic/BlockOre.java +++ b/com/hbm/blocks/generic/BlockOre.java @@ -149,8 +149,9 @@ public class BlockOre extends Block { if(!p_149724_1_.isRemote) p_149724_1_.spawnEntityInWorld(creep); } else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 60 * 20, 2)); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 30 * 20, 0)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 30 * 20, 2)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 5 * 20, 0)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.confusion.id, 15 * 20, 0)); entity.attackEntityFrom(ModDamageSource.radiation, 0.5F); } } @@ -186,9 +187,10 @@ public class BlockOre extends Block { if(!p_149724_1_.isRemote) p_149724_1_.spawnEntityInWorld(creep); } else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 10 * 60 * 20, 4)); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 4 * 60 * 20, 2)); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 3 * 60 * 20, 2)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 60 * 20, 2)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 30 * 20, 1)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 10 * 20, 0)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.confusion.id, 20 * 20, 0)); entity.attackEntityFrom(ModDamageSource.radiation, 2.5F); } } @@ -216,7 +218,7 @@ public class BlockOre extends Block { if(!p_149724_1_.isRemote) p_149724_1_.spawnEntityInWorld(creep); } else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 30 * 20, 1)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 5 * 20, 1)); } } } diff --git a/com/hbm/blocks/machine/MachineInserter.java b/com/hbm/blocks/machine/MachineInserter.java new file mode 100644 index 000000000..0881ea7ce --- /dev/null +++ b/com/hbm/blocks/machine/MachineInserter.java @@ -0,0 +1,36 @@ +package com.hbm.blocks.machine; + +import com.hbm.blocks.ModBlocks; +import com.hbm.lib.RefStrings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; + +public class MachineInserter extends Block { + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + + public MachineInserter(Material p_i45394_1_) { + super(p_i45394_1_); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + + this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":inserter_top"); + this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":inserter_side"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metadata) { + return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon); + } + +} diff --git a/com/hbm/entity/logic/EntityNukeExplosionAdvanced.java b/com/hbm/entity/logic/EntityNukeExplosionAdvanced.java index 91e92ce55..c61c9608e 100644 --- a/com/hbm/entity/logic/EntityNukeExplosionAdvanced.java +++ b/com/hbm/entity/logic/EntityNukeExplosionAdvanced.java @@ -11,26 +11,88 @@ import com.hbm.explosion.ExplosionNukeGeneric; public class EntityNukeExplosionAdvanced extends Entity { - public int age = 0; + //public int age = 0; public int destructionRange = 0; - public ExplosionNukeAdvanced exp; - public ExplosionNukeAdvanced wst; - public ExplosionNukeAdvanced vap; - public ExplosionFleija expl; + //public ExplosionNukeAdvanced exp; + //public ExplosionNukeAdvanced wst; + //public ExplosionNukeAdvanced vap; + //public ExplosionFleija expl; public int speed = 1; public float coefficient = 1; public float coefficient2 = 1; - public boolean did = false; - public boolean did2 = false; + //public boolean did = false; + //public boolean did2 = false; public boolean waste = true; + @Override + protected void readEntityFromNBT(NBTTagCompound nbt) { + /*age = nbt.getInteger("age"); + destructionRange = nbt.getInteger("destructionRange"); + speed = nbt.getInteger("speed"); + coefficient = nbt.getFloat("coefficient"); + coefficient2 = nbt.getFloat("coefficient2"); + did = nbt.getBoolean("did"); + did2 = nbt.getBoolean("did2"); + waste = nbt.getBoolean("waste");*/ + + /*if(this.waste) + { + exp = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, 0); + exp.readFromNbt(nbt, "exp_"); + wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.8), this.coefficient, 2); + wst.readFromNbt(nbt, "wst_"); + vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1); + vap.readFromNbt(nbt, "vap_"); + } else { + expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, this.coefficient2); + expl.readFromNbt(nbt, "expl_"); + } + + this.did = true; + + System.out.println(posX); + System.out.println(posY); + System.out.println(posZ); + System.out.println(age); + System.out.println(destructionRange); + System.out.println(speed); + System.out.println(coefficient); + System.out.println(coefficient2); + System.out.println(did); + System.out.println(did2); + System.out.println(waste);*/ + + } + + @Override + protected void writeEntityToNBT(NBTTagCompound nbt) { + /*nbt.setInteger("age", age); + nbt.setInteger("destructionRange", destructionRange); + nbt.setInteger("speed", speed); + nbt.setFloat("coefficient", coefficient); + nbt.setFloat("coefficient2", coefficient2); + nbt.setBoolean("did", did); + nbt.setBoolean("did2", did2); + nbt.setBoolean("waste", waste);*/ + + /*if(exp != null) + exp.saveToNbt(nbt, "exp_"); + if(wst != null) + wst.saveToNbt(nbt, "wst_"); + if(vap != null) + vap.saveToNbt(nbt, "vap_"); + if(expl != null) + expl.saveToNbt(nbt, "expl_");*/ + + } + public EntityNukeExplosionAdvanced(World p_i1582_1_) { super(p_i1582_1_); } - @Override - public void onUpdate() { - super.onUpdate(); + //@Override + //public void onUpdate() { + /*super.onUpdate(); if(!this.did) { @@ -46,7 +108,7 @@ public class EntityNukeExplosionAdvanced extends Entity { this.did = true; } - speed = 160; + speed = 5; boolean flag = false; boolean flag2 = false; @@ -60,7 +122,8 @@ public class EntityNukeExplosionAdvanced extends Entity { flag3 = vap.update(); if(flag3) { - this.setDead(); + //this.setDead(); + //System.out.println("DIED!!!"); } } else { if(expl.update()) { @@ -87,22 +150,12 @@ public class EntityNukeExplosionAdvanced extends Entity { } } - age++; - } + age++;*/ + //} @Override protected void entityInit() { } - @Override - protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { - - } - - @Override - protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { - - } - } \ No newline at end of file diff --git a/com/hbm/entity/missile/EntityMissileBaseAdvanced.java b/com/hbm/entity/missile/EntityMissileBaseAdvanced.java index 1c4e1c19a..3fde19e41 100644 --- a/com/hbm/entity/missile/EntityMissileBaseAdvanced.java +++ b/com/hbm/entity/missile/EntityMissileBaseAdvanced.java @@ -5,6 +5,7 @@ import com.hbm.entity.particle.EntitySmokeFX; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; @@ -21,7 +22,7 @@ public abstract class EntityMissileBaseAdvanced extends Entity { double decelY; double accelXZ; boolean isCluster = false; - float health = 50; + float health = 10; public EntityMissileBaseAdvanced(World p_i1582_1_) { super(p_i1582_1_); @@ -34,22 +35,25 @@ public abstract class EntityMissileBaseAdvanced extends Entity { public boolean attackEntityFrom(DamageSource p_70097_1_, float f) { - if (this.isEntityInvulnerable()) + if (!this.worldObj.isRemote && !this.isDead) { - return false; + if (this.isEntityInvulnerable()) + { + return false; + } + else + { + this.setBeenAttacked(); + health -= f; + + if(health <= 0) { + } + + return true; + } } else { - this.setBeenAttacked(); - health -= f; - - if(health <= 0) { - if(!worldObj.isRemote) - worldObj.createExplosion(this, posX, posY, posZ, 15, true); - - this.setDead(); - } - return true; } } diff --git a/com/hbm/explosion/ExplosionFleija.java b/com/hbm/explosion/ExplosionFleija.java index 0f990e40f..3ad81f5e2 100644 --- a/com/hbm/explosion/ExplosionFleija.java +++ b/com/hbm/explosion/ExplosionFleija.java @@ -3,6 +3,7 @@ package com.hbm.explosion; import com.hbm.blocks.generic.DecoBlockAlt; import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class ExplosionFleija @@ -23,6 +24,40 @@ public class ExplosionFleija public float explosionCoefficient = 1.0F; public float explosionCoefficient2 = 1.0F; + public void saveToNbt(NBTTagCompound nbt, String name) { + nbt.setInteger(name + "posX", posX); + nbt.setInteger(name + "posY", posY); + nbt.setInteger(name + "posZ", posZ); + nbt.setInteger(name + "lastposX", lastposX); + nbt.setInteger(name + "lastposZ", lastposZ); + nbt.setInteger(name + "radius", radius); + nbt.setInteger(name + "radius2", radius2); + nbt.setInteger(name + "n", n); + nbt.setInteger(name + "nlimit", nlimit); + nbt.setInteger(name + "shell", shell); + nbt.setInteger(name + "leg", leg); + nbt.setInteger(name + "element", element); + nbt.setFloat(name + "explosionCoefficient", explosionCoefficient); + nbt.setFloat(name + "explosionCoefficient2", explosionCoefficient2); + } + + public void readFromNbt(NBTTagCompound nbt, String name) { + posX = nbt.getInteger(name + "posX"); + posY = nbt.getInteger(name + "posY"); + posZ = nbt.getInteger(name + "posZ"); + lastposX = nbt.getInteger(name + "lastposX"); + lastposZ = nbt.getInteger(name + "lastposZ"); + radius = nbt.getInteger(name + "radius"); + radius2 = nbt.getInteger(name + "radius2"); + n = nbt.getInteger(name + "n"); + nlimit = nbt.getInteger(name + "nlimit"); + shell = nbt.getInteger(name + "shell"); + leg = nbt.getInteger(name + "leg"); + element = nbt.getInteger(name + "element"); + explosionCoefficient = nbt.getFloat(name + "explosionCoefficient"); + explosionCoefficient2 = nbt.getFloat(name + "explosionCoefficient2"); + } + public ExplosionFleija(int x, int y, int z, World world, int rad, float coefficient, float coefficient2) { this.posX = x; diff --git a/com/hbm/explosion/ExplosionNukeAdvanced.java b/com/hbm/explosion/ExplosionNukeAdvanced.java index cfef4262f..399bd10bf 100644 --- a/com/hbm/explosion/ExplosionNukeAdvanced.java +++ b/com/hbm/explosion/ExplosionNukeAdvanced.java @@ -1,5 +1,6 @@ package com.hbm.explosion; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class ExplosionNukeAdvanced @@ -20,6 +21,40 @@ public class ExplosionNukeAdvanced public float explosionCoefficient = 1.0F; public int type = 0; + public void saveToNbt(NBTTagCompound nbt, String name) { + nbt.setInteger(name + "posX", posX); + nbt.setInteger(name + "posY", posY); + nbt.setInteger(name + "posZ", posZ); + nbt.setInteger(name + "lastposX", lastposX); + nbt.setInteger(name + "lastposZ", lastposZ); + nbt.setInteger(name + "radius", radius); + nbt.setInteger(name + "radius2", radius2); + nbt.setInteger(name + "n", n); + nbt.setInteger(name + "nlimit", nlimit); + nbt.setInteger(name + "shell", shell); + nbt.setInteger(name + "leg", leg); + nbt.setInteger(name + "element", element); + nbt.setFloat(name + "explosionCoefficient", explosionCoefficient); + nbt.setInteger(name + "type", type); + } + + public void readFromNbt(NBTTagCompound nbt, String name) { + posX = nbt.getInteger(name + "posX"); + posY = nbt.getInteger(name + "posY"); + posZ = nbt.getInteger(name + "posZ"); + lastposX = nbt.getInteger(name + "lastposX"); + lastposZ = nbt.getInteger(name + "lastposZ"); + radius = nbt.getInteger(name + "radius"); + radius2 = nbt.getInteger(name + "radius2"); + n = nbt.getInteger(name + "n"); + nlimit = nbt.getInteger(name + "nlimit"); + shell = nbt.getInteger(name + "shell"); + leg = nbt.getInteger(name + "leg"); + element = nbt.getInteger(name + "element"); + explosionCoefficient = nbt.getFloat(name + "explosionCoefficient"); + type = nbt.getInteger(name + "type"); + } + public ExplosionNukeAdvanced(int x, int y, int z, World world, int rad, float coefficient, int typ) { this.posX = x; diff --git a/com/hbm/handler/FluidTypeHandler.java b/com/hbm/handler/FluidTypeHandler.java index b202a73fc..bfd9c57d7 100644 --- a/com/hbm/handler/FluidTypeHandler.java +++ b/com/hbm/handler/FluidTypeHandler.java @@ -36,6 +36,9 @@ public class FluidTypeHandler { GAS (0xfffeed, 16776941, 13, 1, "hbmfluid.gas"), PETROLEUM (0x7cb7c9, 8173513, 7, 2, "hbmfluid.petroleum"), + BIOGAS (0xbfd37c, 12571516, 12, 2, "hbmfluid.biogas"), + BIOFUEL (0xeef274, 15659636, 13, 2, "hbmfluid.biofuel"), + UF6 (0xD1CEBE, 13749950, 14, 1, "hbmfluid.uf6"), PUF6 (0x4C4C4C, 5000268, 15, 1, "hbmfluid.puf6"), diff --git a/com/hbm/inventory/MachineRecipes.java b/com/hbm/inventory/MachineRecipes.java index 4a54e9507..6769135c8 100644 --- a/com/hbm/inventory/MachineRecipes.java +++ b/com/hbm/inventory/MachineRecipes.java @@ -2052,7 +2052,7 @@ public class MachineRecipes { list.add(new ItemStack(ModItems.circuit_gold, 3)); break; case RT_GENERATOR: - list.add(new ItemStack(ModItems.rtg_unit, 6)); + list.add(new ItemStack(ModItems.rtg_unit, 5)); list.add(new ItemStack(ModItems.plate_steel, 8)); list.add(new ItemStack(ModItems.wire_red_copper, 4)); break; @@ -2446,6 +2446,207 @@ public class MachineRecipes { list.add(new ItemStack(ModItems.plate_titanium, 10)); list.add(new ItemStack(ModItems.plate_steel, 14)); break; + case MISSILE_HE_3: + list.add(new ItemStack(ModItems.warhead_generic_large, 1)); + list.add(new ItemStack(ModItems.fuel_tank_large, 1)); + list.add(new ItemStack(ModItems.thruster_large, 1)); + list.add(new ItemStack(ModItems.plate_titanium, 14)); + list.add(new ItemStack(ModItems.plate_steel, 20)); + list.add(new ItemStack(ModItems.plate_aluminium, 12)); + break; + case MISSILE_FIRE_3: + list.add(new ItemStack(ModItems.warhead_incendiary_large, 1)); + list.add(new ItemStack(ModItems.fuel_tank_large, 1)); + list.add(new ItemStack(ModItems.thruster_large, 1)); + list.add(new ItemStack(ModItems.plate_titanium, 14)); + list.add(new ItemStack(ModItems.plate_steel, 20)); + list.add(new ItemStack(ModItems.plate_aluminium, 12)); + break; + case MISSILE_CLUSTER_3: + list.add(new ItemStack(ModItems.warhead_cluster_large, 1)); + list.add(new ItemStack(ModItems.fuel_tank_large, 1)); + list.add(new ItemStack(ModItems.thruster_large, 1)); + list.add(new ItemStack(ModItems.plate_titanium, 14)); + list.add(new ItemStack(ModItems.plate_steel, 20)); + list.add(new ItemStack(ModItems.plate_aluminium, 12)); + break; + case MISSILE_BUSTER_3: + list.add(new ItemStack(ModItems.warhead_buster_large, 1)); + list.add(new ItemStack(ModItems.fuel_tank_large, 1)); + list.add(new ItemStack(ModItems.thruster_large, 1)); + list.add(new ItemStack(ModItems.plate_titanium, 14)); + list.add(new ItemStack(ModItems.plate_steel, 20)); + list.add(new ItemStack(ModItems.plate_aluminium, 12)); + break; + case MISSILE_NUCLEAR: + list.add(new ItemStack(ModItems.warhead_nuclear, 1)); + list.add(new ItemStack(ModItems.fuel_tank_large, 1)); + list.add(new ItemStack(ModItems.thruster_large, 1)); + list.add(new ItemStack(ModItems.plate_titanium, 20)); + list.add(new ItemStack(ModItems.plate_steel, 24)); + list.add(new ItemStack(ModItems.plate_aluminium, 16)); + break; + case MISSILE_MIRV: + list.add(new ItemStack(ModItems.warhead_mirv, 1)); + list.add(new ItemStack(ModItems.fuel_tank_large, 1)); + list.add(new ItemStack(ModItems.thruster_large, 1)); + list.add(new ItemStack(ModItems.plate_titanium, 20)); + list.add(new ItemStack(ModItems.plate_steel, 24)); + list.add(new ItemStack(ModItems.plate_aluminium, 16)); + break; + case MISSILE_ENDO: + list.add(new ItemStack(ModItems.warhead_thermo_endo, 1)); + list.add(new ItemStack(ModItems.fuel_tank_large, 1)); + list.add(new ItemStack(ModItems.thruster_large, 1)); + list.add(new ItemStack(ModItems.plate_titanium, 14)); + list.add(new ItemStack(ModItems.plate_steel, 20)); + list.add(new ItemStack(ModItems.plate_aluminium, 12)); + break; + case MISSILE_EXO: + list.add(new ItemStack(ModItems.warhead_thermo_exo, 1)); + list.add(new ItemStack(ModItems.fuel_tank_large, 1)); + list.add(new ItemStack(ModItems.thruster_large, 1)); + list.add(new ItemStack(ModItems.plate_titanium, 14)); + list.add(new ItemStack(ModItems.plate_steel, 20)); + list.add(new ItemStack(ModItems.plate_aluminium, 12)); + break; + case DEFAB: + list.add(new ItemStack(ModItems.ingot_steel, 2)); + list.add(new ItemStack(ModItems.plate_iron, 5)); + list.add(new ItemStack(Items.diamond, 1)); + list.add(new ItemStack(ModItems.plate_dalekanium, 3)); + break; + case LASER_BUCKSHOT: + list.add(new ItemStack(ModItems.powder_power, 1)); + list.add(new ItemStack(ModItems.powder_lead, 1)); + break; + case ROCKET: + list.add(new ItemStack(ModItems.plate_steel, 1)); + list.add(new ItemStack(ModItems.plate_iron, 5)); + list.add(new ItemStack(Blocks.tnt, 1)); + break; + case MINI_NUKE: + list.add(new ItemStack(ModItems.plate_steel, 3)); + list.add(new ItemStack(ModItems.plate_iron, 1)); + list.add(new ItemStack(ModItems.nugget_pu239, 3)); + break; + case MINI_MIRV: + list.add(new ItemStack(ModItems.plate_steel, 20)); + list.add(new ItemStack(ModItems.plate_iron, 10)); + list.add(new ItemStack(ModItems.nugget_pu239, 3)); + break; + case DARK_PLUG: + list.add(new ItemStack(ModItems.plate_steel, 2)); + list.add(new ItemStack(Items.redstone, 1)); + list.add(new ItemStack(Items.glowstone_dust, 1)); + break; + case COMBINE_BALL: + list.add(new ItemStack(ModItems.plate_combine_steel, 4)); + list.add(new ItemStack(Items.redstone, 7)); + list.add(new ItemStack(ModItems.powder_power, 3)); + break; + case GREANADE_ENHANCED: + list.add(new ItemStack(ModItems.plate_iron, 4)); + list.add(new ItemStack(ModItems.plate_steel, 2)); + list.add(new ItemStack(ModItems.wire_red_copper, 2)); + list.add(new ItemStack(Blocks.tnt, 1)); + break; + case GRENADE_FLAME: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_SHRAPNEL: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENAGE_CLUSTER: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GREANADE_FLARE: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_LIGHTNING: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_IMPULSE: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_PLASMA: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_TAU: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_SCHRABIDIUM: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_MK2: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_ASCHRAB: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_NUKE: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_ZOMG: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GRENADE_BLACK_HOLE: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case POWER_FIST: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GADGET_PROPELLANT: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GADGET_WIRING: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case GADGET_CORE: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case BOY_SHIELDING: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case BOY_TARGET: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case BOY_BULLET: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case BOY_PRPELLANT: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case BOY_IGNITER: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case MAN_PROPELLANT: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case MAN_IGNITER: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case MAN_CORE: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case MIKE_TANK: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case MIKE_DEUT: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case MIKE_COOLER: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case FLEIIJA_IGNITER: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case FLEIJA_CORE: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; + case FLEIJA_PROPELLANT: + list.add(new ItemStack(ModItems.plate_iron, 1)); + break; default: list.add(new ItemStack(Items.stick)); break; @@ -2793,10 +2994,10 @@ public class MachineRecipes { output = new ItemStack(ModBlocks.machine_refinery, 1); break; case CHEMPLANT: - output = new ItemStack(ModBlocks.machine_refinery, 1); + output = new ItemStack(ModBlocks.machine_chemplant, 1); break; case TANK: - output = new ItemStack(ModBlocks.machine_refinery, 1); + output = new ItemStack(ModBlocks.machine_fluidtank, 1); break; case MINER: output = new ItemStack(ModBlocks.machine_drill, 1); @@ -2942,6 +3143,150 @@ public class MachineRecipes { case MISSILE_BUSTER_2: output = new ItemStack(ModItems.missile_buster_strong, 1); break; + case MISSILE_HE_3: + output = new ItemStack(Items.stick, 1); + break; + case MISSILE_FIRE_3: + output = new ItemStack(Items.stick, 1); + break; + case MISSILE_CLUSTER_3: + output = new ItemStack(Items.stick, 1); + break; + case MISSILE_BUSTER_3: + output = new ItemStack(Items.stick, 1); + break; + case MISSILE_NUCLEAR: + output = new ItemStack(Items.stick, 1); + break; + case MISSILE_MIRV: + output = new ItemStack(Items.stick, 1); + break; + case MISSILE_ENDO: + output = new ItemStack(Items.stick, 1); + break; + case MISSILE_EXO: + output = new ItemStack(Items.stick, 1); + break; + case DEFAB: + output = new ItemStack(Items.stick, 1); + break; + case LASER_BUCKSHOT: + output = new ItemStack(Items.stick, 1); + break; + case ROCKET: + output = new ItemStack(Items.stick, 1); + break; + case MINI_NUKE: + output = new ItemStack(Items.stick, 1); + break; + case MINI_MIRV: + output = new ItemStack(Items.stick, 1); + break; + case DARK_PLUG: + output = new ItemStack(Items.stick, 1); + break; + case COMBINE_BALL: + output = new ItemStack(Items.stick, 1); + break; + case GREANADE_ENHANCED: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_FLAME: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_SHRAPNEL: + output = new ItemStack(Items.stick, 1); + break; + case GRENAGE_CLUSTER: + output = new ItemStack(Items.stick, 1); + break; + case GREANADE_FLARE: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_LIGHTNING: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_IMPULSE: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_PLASMA: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_TAU: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_SCHRABIDIUM: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_MK2: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_ASCHRAB: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_NUKE: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_ZOMG: + output = new ItemStack(Items.stick, 1); + break; + case GRENADE_BLACK_HOLE: + output = new ItemStack(Items.stick, 1); + break; + case POWER_FIST: + output = new ItemStack(Items.stick, 1); + break; + case GADGET_PROPELLANT: + output = new ItemStack(Items.stick, 1); + break; + case GADGET_WIRING: + output = new ItemStack(Items.stick, 1); + break; + case GADGET_CORE: + output = new ItemStack(Items.stick, 1); + break; + case BOY_SHIELDING: + output = new ItemStack(Items.stick, 1); + break; + case BOY_TARGET: + output = new ItemStack(Items.stick, 1); + break; + case BOY_BULLET: + output = new ItemStack(Items.stick, 1); + break; + case BOY_PRPELLANT: + output = new ItemStack(Items.stick, 1); + break; + case BOY_IGNITER: + output = new ItemStack(Items.stick, 1); + break; + case MAN_PROPELLANT: + output = new ItemStack(Items.stick, 1); + break; + case MAN_IGNITER: + output = new ItemStack(Items.stick, 1); + break; + case MAN_CORE: + output = new ItemStack(Items.stick, 1); + break; + case MIKE_TANK: + output = new ItemStack(Items.stick, 1); + break; + case MIKE_DEUT: + output = new ItemStack(Items.stick, 1); + break; + case MIKE_COOLER: + output = new ItemStack(Items.stick, 1); + break; + case FLEIIJA_IGNITER: + output = new ItemStack(Items.stick, 1); + break; + case FLEIJA_CORE: + output = new ItemStack(Items.stick, 1); + break; + case FLEIJA_PROPELLANT: + output = new ItemStack(Items.stick, 1); + break; default: output = new ItemStack(Items.stick, 1); break; @@ -3102,6 +3447,16 @@ public class MachineRecipes { list.add(new ItemStack(ModItems.powder_diamond, 4)); list.add(new ItemStack(ModItems.powder_power, 1)); break; + case POLYMER: + list.add(new ItemStack(Items.coal, 2)); + list.add(new ItemStack(ModItems.fluorite, 1)); + break; + case DEUTERIUM: + list.add(new ItemStack(ModItems.sulfur, 1)); + break; + case BP_BIOGAS: + list.add(new ItemStack(ModItems.biomass, 16)); + break; default: break; } @@ -3199,6 +3554,57 @@ public class MachineRecipes { input[0] = new FluidStack(800, FluidType.ACID); input[1] = new FluidStack(400, FluidType.PETROLEUM); break; + case SF_OIL: + input[0] = new FluidStack(350, FluidType.OIL); + break; + case SF_HEAVYOIL: + input[0] = new FluidStack(250, FluidType.HEAVYOIL); + break; + case SF_SMEAR: + input[0] = new FluidStack(200, FluidType.SMEAR); + break; + case SF_HEATINGOIL: + input[0] = new FluidStack(100, FluidType.HEATINGOIL); + break; + case SF_RECLAIMED: + input[0] = new FluidStack(200, FluidType.RECLAIMED); + break; + case SF_PETROIL: + input[0] = new FluidStack(250, FluidType.PETROIL); + break; + case SF_LUBRICANT: + input[0] = new FluidStack(250, FluidType.LUBRICANT); + break; + case SF_NAPHTHA: + input[0] = new FluidStack(300, FluidType.NAPHTHA); + break; + case SF_DIESEL: + input[0] = new FluidStack(400, FluidType.DIESEL); + break; + case SF_LIGHTOIL: + input[0] = new FluidStack(450, FluidType.LIGHTOIL); + break; + case SF_KEROSENE: + input[0] = new FluidStack(550, FluidType.KEROSENE); + break; + case SF_GAS: + input[0] = new FluidStack(750, FluidType.GAS); + break; + case SF_PETROLEUM: + input[0] = new FluidStack(600, FluidType.PETROLEUM); + break; + case POLYMER: + input[0] = new FluidStack(600, FluidType.PETROLEUM); + break; + case DEUTERIUM: + input[0] = new FluidStack(4000, FluidType.WATER); + break; + case STEAM: + input[0] = new FluidStack(1000, FluidType.WATER); + break; + case BP_BIOFUEL: + input[0] = new FluidStack(1000, FluidType.BIOGAS); + break; default: break; } @@ -3233,6 +3639,61 @@ public class MachineRecipes { case CIRCUIT_5: output[0] = new ItemStack(ModItems.circuit_schrabidium, 1); break; + case SF_OIL: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_HEAVYOIL: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_SMEAR: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_HEATINGOIL: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_RECLAIMED: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_PETROIL: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_LUBRICANT: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_NAPHTHA: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_DIESEL: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_LIGHTOIL: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_KEROSENE: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_GAS: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case SF_PETROLEUM: + output[0] = new ItemStack(ModItems.solid_fuel, 1); + output[1] = new ItemStack(ModItems.solid_fuel, 1); + break; + case POLYMER: + output[0] = new ItemStack(ModItems.ingot_polymer, 1); + break; default: break; } @@ -3306,6 +3767,18 @@ public class MachineRecipes { case PEROXIDE: input[0] = new FluidStack(800, FluidType.ACID); break; + case DEUTERIUM: + input[0] = new FluidStack(500, FluidType.DEUTERIUM); + break; + case STEAM: + input[0] = new FluidStack(1000, FluidType.DEUTERIUM); + break; + case BP_BIOGAS: + input[0] = new FluidStack(1000, FluidType.BIOGAS); + break; + case BP_BIOFUEL: + input[0] = new FluidStack(500, FluidType.BIOFUEL); + break; default: break; } diff --git a/com/hbm/inventory/container/ContainerReactorMultiblock.java b/com/hbm/inventory/container/ContainerReactorMultiblock.java index e6db04395..2c35f5922 100644 --- a/com/hbm/inventory/container/ContainerReactorMultiblock.java +++ b/com/hbm/inventory/container/ContainerReactorMultiblock.java @@ -13,8 +13,6 @@ public class ContainerReactorMultiblock extends Container { private TileEntityReactorMultiblock diFurnace; - private int water; - private int cool; private int power; private int heat; @@ -52,14 +50,18 @@ public class ContainerReactorMultiblock extends Container { this.addSlotToContainer(new Slot(tedf, 27, 116, 90)); this.addSlotToContainer(new Slot(tedf, 28, 134, 90)); this.addSlotToContainer(new Slot(tedf, 29, 152, 90)); - //Water - this.addSlotToContainer(new Slot(tedf, 30, 8, 90)); - //Coolant - this.addSlotToContainer(new Slot(tedf, 31, 26, 90)); + //Water In + this.addSlotToContainer(new Slot(tedf, 30, 8, 90 - 18)); + //Water Out + this.addSlotToContainer(new Slot(tedf, 31, 8, 90)); + //Coolant In + this.addSlotToContainer(new Slot(tedf, 32, 26, 90 - 18)); + //Coolant Out + this.addSlotToContainer(new Slot(tedf, 33, 26, 90)); //Batteries - this.addSlotToContainer(new Slot(tedf, 32, 44, 90)); + this.addSlotToContainer(new Slot(tedf, 34, 44, 90)); //Fuse - this.addSlotToContainer(new Slot(tedf, 33, 8, 108)); + this.addSlotToContainer(new Slot(tedf, 35, 8, 108)); for(int i = 0; i < 3; i++) { @@ -78,10 +80,8 @@ public class ContainerReactorMultiblock extends Container { @Override public void addCraftingToCrafters(ICrafting crafting) { super.addCraftingToCrafters(crafting); - crafting.sendProgressBarUpdate(this, 0, this.diFurnace.water); - crafting.sendProgressBarUpdate(this, 1, this.diFurnace.cool); - crafting.sendProgressBarUpdate(this, 2, this.diFurnace.power); - crafting.sendProgressBarUpdate(this, 3, this.diFurnace.heat); + crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power); + crafting.sendProgressBarUpdate(this, 1, this.diFurnace.heat); } @Override @@ -130,29 +130,18 @@ public class ContainerReactorMultiblock extends Container { { ICrafting par1 = (ICrafting)this.crafters.get(i); - if(this.water != this.diFurnace.water) - { - par1.sendProgressBarUpdate(this, 0, this.diFurnace.water); - } - - if(this.cool != this.diFurnace.cool) - { - par1.sendProgressBarUpdate(this, 1, this.diFurnace.cool); - } if(this.power != this.diFurnace.power) { - par1.sendProgressBarUpdate(this, 2, this.diFurnace.power); + par1.sendProgressBarUpdate(this, 0, this.diFurnace.power); } if(this.heat != this.diFurnace.heat) { - par1.sendProgressBarUpdate(this, 3, this.diFurnace.heat); + par1.sendProgressBarUpdate(this, 1, this.diFurnace.heat); } } - this.water = this.diFurnace.water; - this.cool = this.diFurnace.cool; this.power = this.diFurnace.power; this.heat = this.diFurnace.heat; } @@ -160,18 +149,10 @@ public class ContainerReactorMultiblock extends Container { @Override public void updateProgressBar(int i, int j) { if(i == 0) - { - diFurnace.water = j; - } - if(i == 1) - { - diFurnace.cool = j; - } - if(i == 2) { diFurnace.power = j; } - if(i == 3) + if(i == 1) { diFurnace.heat = j; } diff --git a/com/hbm/inventory/gui/GUIReactorMultiblock.java b/com/hbm/inventory/gui/GUIReactorMultiblock.java index e39fd3cf1..049ad49af 100644 --- a/com/hbm/inventory/gui/GUIReactorMultiblock.java +++ b/com/hbm/inventory/gui/GUIReactorMultiblock.java @@ -2,6 +2,7 @@ package com.hbm.inventory.gui; import org.lwjgl.opengl.GL11; +import com.hbm.inventory.FluidTank; import com.hbm.inventory.container.ContainerReactorMultiblock; import com.hbm.lib.RefStrings; import com.hbm.tileentity.machine.TileEntityReactorMultiblock; @@ -12,7 +13,7 @@ import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; -public class GUIReactorMultiblock extends GuiContainer { +public class GUIReactorMultiblock extends GuiFluidContainer { private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_reactor_multiblock.png"); private TileEntityReactorMultiblock diFurnace; @@ -25,6 +26,14 @@ public class GUIReactorMultiblock extends GuiContainer { this.ySize = 222; } + @Override + public void drawScreen(int mouseX, int mouseY, float f) { + super.drawScreen(mouseX, mouseY, f); + + diFurnace.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 70 - 52, 16, 52); + diFurnace.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 70 - 52, 16, 52); + } + @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); @@ -39,16 +48,15 @@ public class GUIReactorMultiblock extends GuiContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - int i = diFurnace.getWaterScaled(70); - drawTexturedModalRect(guiLeft + 8, guiTop + 88 - i, 176, 70 - i, 16, i); - - int j = diFurnace.getCoolantScaled(70); - drawTexturedModalRect(guiLeft + 26, guiTop + 88 - j, 192, 70 - j, 16, j); - int k = diFurnace.getPowerScaled(70); drawTexturedModalRect(guiLeft + 44, guiTop + 88 - k, 208, 70 - k, 16, k); int l = diFurnace.getHeatScaled(142); - drawTexturedModalRect(guiLeft + 26, guiTop + 108, 0, 222, l, 16); + drawTexturedModalRect(guiLeft + 26, guiTop + 108, 0, 222, l, 16); + + Minecraft.getMinecraft().getTextureManager().bindTexture(FluidTank.fluidTextures); + + diFurnace.tanks[0].renderTank(this, guiLeft + 8, guiTop + 70, diFurnace.tanks[0].getTankType().textureX() * FluidTank.x, diFurnace.tanks[0].getTankType().textureY() * FluidTank.y, 16, 52); + diFurnace.tanks[1].renderTank(this, guiLeft + 26, guiTop + 70, diFurnace.tanks[1].getTankType().textureX() * FluidTank.x, diFurnace.tanks[1].getTankType().textureY() * FluidTank.y, 16, 52); } } diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 99cd0d8b3..381f11adb 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -207,6 +207,8 @@ public class ModItems { public static Item fragment_lanthanium; public static Item fragment_actinium; + public static Item biomass; + public static Item coil_copper; public static Item coil_copper_torus; public static Item coil_tungsten; @@ -536,6 +538,7 @@ public class ModItems { public static Item designator_range; public static Item linker; public static Item oil_detector; + public static Item geiger_counter; public static Item template_folder; public static Item assembly_template; @@ -1190,6 +1193,8 @@ public class ModItems { fragment_cerium = new Item().setUnlocalizedName("fragment_cerium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fragment_cerium"); fragment_lanthanium = new Item().setUnlocalizedName("fragment_lanthanium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fragment_lanthanium"); fragment_actinium = new Item().setUnlocalizedName("fragment_actinium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":fragment_actinium"); + + biomass = new Item().setUnlocalizedName("biomass").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":biomass"); coil_copper = new Item().setUnlocalizedName("coil_copper").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":coil_copper"); coil_copper_torus = new Item().setUnlocalizedName("coil_copper_torus").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":coil_copper_torus"); @@ -1743,6 +1748,7 @@ public class ModItems { linker = new ItemTeleLink().setUnlocalizedName("linker").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":linker"); oil_detector = new ItemOilDetector().setUnlocalizedName("oil_detector").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":oil_detector"); turret_control = new ItemTurretControl().setUnlocalizedName("turret_control").setFull3D().setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":turret_control"); + geiger_counter = new ItemGeigerCounter().setUnlocalizedName("geiger_counter").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":geiger_counter"); template_folder = new ItemTemplateFolder().setUnlocalizedName("template_folder").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":template_folder"); assembly_template = new ItemAssemblyTemplate().setUnlocalizedName("assembly_template").setMaxStackSize(1).setCreativeTab(MainRegistry.tabMachine).setTextureName(RefStrings.MODID + ":assembly_template"); @@ -2118,6 +2124,9 @@ public class ModItems { GameRegistry.registerItem(fragment_cerium, fragment_cerium.getUnlocalizedName()); GameRegistry.registerItem(fragment_lanthanium, fragment_lanthanium.getUnlocalizedName()); GameRegistry.registerItem(fragment_actinium, fragment_actinium.getUnlocalizedName()); + + //Things that look like rotten flesh but aren't + GameRegistry.registerItem(biomass, biomass.getUnlocalizedName()); //Nuggets GameRegistry.registerItem(nugget_uranium, nugget_uranium.getUnlocalizedName()); @@ -2566,6 +2575,7 @@ public class ModItems { GameRegistry.registerItem(turret_control, turret_control.getUnlocalizedName()); GameRegistry.registerItem(linker, linker.getUnlocalizedName()); GameRegistry.registerItem(oil_detector, oil_detector.getUnlocalizedName()); + GameRegistry.registerItem(geiger_counter, geiger_counter.getUnlocalizedName()); //Missiles GameRegistry.registerItem(missile_generic, missile_generic.getUnlocalizedName()); diff --git a/com/hbm/items/special/ItemCustomLore.java b/com/hbm/items/special/ItemCustomLore.java index 4f87955f6..537628b35 100644 --- a/com/hbm/items/special/ItemCustomLore.java +++ b/com/hbm/items/special/ItemCustomLore.java @@ -535,21 +535,21 @@ public class ItemCustomLore extends ItemRadioactive { { list.add("Afterburner Upgrade"); list.add("Turbofan:"); - list.add("XXXXXXX"); + list.add("Production x2 / Consumption x2.5"); } if(this == ModItems.upgrade_afterburn_2) { list.add("Afterburner Upgrade"); list.add("Turbofan:"); - list.add("XXXXXXX"); + list.add("Production x3 / Consumption x5"); } if(this == ModItems.upgrade_afterburn_3) { list.add("Afterburner Upgrade"); list.add("Turbofan:"); - list.add("XXXXXXX"); + list.add("Production x4 / Consumption x7.5"); } } diff --git a/com/hbm/items/tool/ItemAssemblyTemplate.java b/com/hbm/items/tool/ItemAssemblyTemplate.java index 6eb9a9ec4..e83e0927a 100644 --- a/com/hbm/items/tool/ItemAssemblyTemplate.java +++ b/com/hbm/items/tool/ItemAssemblyTemplate.java @@ -16,27 +16,211 @@ public class ItemAssemblyTemplate extends Item { public enum EnumAssemblyTemplate { - TEST, MIXED_PLATE, HAZMAT_CLOTH, ASBESTOS_CLOTH, COAL_FILTER, CENTRIFUGE_ELEMENT, CENTRIFUGE_TOWER, - DEE_MAGNET, FLAT_MAGNET, CYCLOTRON_TOWER, REACTOR_CORE, RTG_UNIT, HEAT_UNIT, GRAVITY_UNIT, - TITANIUM_DRILL, TELEPAD, TELEKIT, GEASS_REACTOR, GENERATOR_FRONT, WT1_GENERIC, WT2_GENERIC, - WT3_GENERIC, WT1_FIRE, WT2_FIRE, WT3_FIRE, WT1_CLUSTER, WT2_CLUSTER, WT3_CLUSTER, WT1_BUSTER, - WT2_BUSTER, WT3_BUSTER, W_NUCLEAR, W_MIRVLET, W_MIRV, W_ENDOTHERMIC, W_EXOTHERMIC, T1_TANK, T2_TANK, - T3_TANK, T1_THRUSTER, T2_THRUSTER, T3_THRUSTER, CHOPPER_HEAD, CHOPPER_GUN, CHOPPER_BODY, - CHOPPER_TAIL, CHOPPER_WING, CHOPPER_BLADES, CIRCUIT_2, CIRCUIT_3, RTG_PELLET, WEAK_PELLET, - FUSION_PELLET, CLUSTER_PELLETS, GUN_PELLETS, AUSTRALIUM_MACHINE, MAGNETRON, W_SP, W_SHE, W_SME, - W_SLE, W_B, W_N, W_L, W_A, UPGRADE_TEMPLATE, UPGRADE_RED_I, UPGRADE_RED_II, UPGRADE_RED_III, - UPGRADE_GREEN_I, UPGRADE_GREEN_II, UPGRADE_GREEN_III, UPGRADE_BLUE_I, UPGRADE_BLUE_II, - UPGRADE_BLUE_III, UPGRADE_PURPLE_I, UPGRADE_PURPLE_II, UPGRADE_PURPLE_III, FUSE, REDCOIL_CAPACITOR, - TITANIUM_FILTER, LITHIUM_BOX, BERYLLIUM_BOX, COAL_BOX, COPPER_BOX, PLUTONIUM_BOX, THERMO_ELEMENT, - LIMITER, ANGRY_METAL, CMB_TILE, CMB_BRICKS, HATCH_FRAME, HATCH_CONTROLLER, CENTRIFUGE, - BREEDING_REACTOR, RTG_FURNACE, DIESEL_GENERATOR, NUCLEAR_GENERATOR, INDUSTRIAL_GENERATOR, CYCLOTRON, - RT_GENERATOR, BATTERY, HE_TO_RF, RF_TO_HE, SHREDDER, DERRICK, FLARE_STACK, - REFINERY, CHEMPLANT, TANK, MINER, SCHRABTRANS, CMB_FURNACE, FA_HULL, FA_HATCH, FA_CORE, FA_PORT, - LR_ELEMENT, LR_HATCH, LR_PORT, LR_CORE, LF_MAGNET, LF_CENTER, LF_MOTOR, LF_HEATER, LF_HATCH, LF_CORE, - LW_ELEMENT, LW_CONTROL, LW_COOLER, LW_STRUTURE, LW_HATCH, LW_PORT, LW_CORE, FW_MAGNET, FW_COMPUTER, - FW_CORE, GADGET, LITTLE_BOY, FAT_MAN, IVY_MIKE, TSAR_BOMB, PROTOTYPE, FLEIJA, CUSTOM_NUKE, BOMB_LEV, - BOMB_ENDO, BOMB_EXO, LAUNCH_PAD, HUNTER_CHOPPER, MISSILE_HE_1, MISSILE_FIRE_1, MISSILE_CLUSTER_1, - MISSILE_BUSTER_1, MISSILE_HE_2, MISSILE_FIRE_2, MISSILE_CLUSTER_2, MISSILE_BUSTER_2; + TEST, + MIXED_PLATE, + HAZMAT_CLOTH, + ASBESTOS_CLOTH, + COAL_FILTER, + CENTRIFUGE_ELEMENT, + CENTRIFUGE_TOWER, + DEE_MAGNET, + FLAT_MAGNET, + CYCLOTRON_TOWER, + REACTOR_CORE, + RTG_UNIT, + HEAT_UNIT, + GRAVITY_UNIT, + TITANIUM_DRILL, + TELEPAD, TELEKIT, + GEASS_REACTOR, + GENERATOR_FRONT, + WT1_GENERIC, + WT2_GENERIC, + WT3_GENERIC, + WT1_FIRE, + WT2_FIRE, + WT3_FIRE, + WT1_CLUSTER, + WT2_CLUSTER, + WT3_CLUSTER, + WT1_BUSTER, + WT2_BUSTER, + WT3_BUSTER, + W_NUCLEAR, + W_MIRVLET, + W_MIRV, + W_ENDOTHERMIC, + W_EXOTHERMIC, + T1_TANK, + T2_TANK, + T3_TANK, + T1_THRUSTER, + T2_THRUSTER, + T3_THRUSTER, + CHOPPER_HEAD, + CHOPPER_GUN, + CHOPPER_BODY, + CHOPPER_TAIL, + CHOPPER_WING, + CHOPPER_BLADES, + CIRCUIT_2, + CIRCUIT_3, + RTG_PELLET, + WEAK_PELLET, + FUSION_PELLET, + CLUSTER_PELLETS, + GUN_PELLETS, + AUSTRALIUM_MACHINE, + MAGNETRON, + W_SP, + W_SHE, + W_SME, + W_SLE, + W_B, + W_N, + W_L, + W_A, + UPGRADE_TEMPLATE, + UPGRADE_RED_I, + UPGRADE_RED_II, + UPGRADE_RED_III, + UPGRADE_GREEN_I, + UPGRADE_GREEN_II, + UPGRADE_GREEN_III, + UPGRADE_BLUE_I, + UPGRADE_BLUE_II, + UPGRADE_BLUE_III, + UPGRADE_PURPLE_I, + UPGRADE_PURPLE_II, + UPGRADE_PURPLE_III, + FUSE, + REDCOIL_CAPACITOR, + TITANIUM_FILTER, + LITHIUM_BOX, + BERYLLIUM_BOX, + COAL_BOX, + COPPER_BOX, + PLUTONIUM_BOX, + THERMO_ELEMENT, + LIMITER, + ANGRY_METAL, + CMB_TILE, + CMB_BRICKS, + HATCH_FRAME, + HATCH_CONTROLLER, + CENTRIFUGE, + BREEDING_REACTOR, + RTG_FURNACE, + DIESEL_GENERATOR, + NUCLEAR_GENERATOR, + INDUSTRIAL_GENERATOR, + CYCLOTRON, + RT_GENERATOR, + BATTERY, + HE_TO_RF, + RF_TO_HE, + SHREDDER, + DERRICK, + FLARE_STACK, + REFINERY, + CHEMPLANT, + TANK, + MINER, + SCHRABTRANS, + CMB_FURNACE, + FA_HULL, + FA_HATCH, + FA_CORE, + FA_PORT, + LR_ELEMENT, + LR_HATCH, + LR_PORT, + LR_CORE, + LF_MAGNET, + LF_CENTER, + LF_MOTOR, + LF_HEATER, + LF_HATCH, + LF_CORE, + LW_ELEMENT, + LW_CONTROL, + LW_COOLER, + LW_STRUTURE, + LW_HATCH, + LW_PORT, + LW_CORE, + FW_MAGNET, + FW_COMPUTER, + FW_CORE, + GADGET, + LITTLE_BOY, + FAT_MAN, + IVY_MIKE, + TSAR_BOMB, + PROTOTYPE, + FLEIJA, + CUSTOM_NUKE, + BOMB_LEV, + BOMB_ENDO, + BOMB_EXO, + LAUNCH_PAD, + HUNTER_CHOPPER, + MISSILE_HE_1, + MISSILE_FIRE_1, + MISSILE_CLUSTER_1, + MISSILE_BUSTER_1, + MISSILE_HE_2, + MISSILE_FIRE_2, + MISSILE_CLUSTER_2, + MISSILE_BUSTER_2, + MISSILE_HE_3, + MISSILE_FIRE_3, + MISSILE_CLUSTER_3, + MISSILE_BUSTER_3, + MISSILE_NUCLEAR, + MISSILE_MIRV, + MISSILE_ENDO, + MISSILE_EXO, + DEFAB, + LASER_BUCKSHOT, + ROCKET, + MINI_NUKE, + MINI_MIRV, + DARK_PLUG, + COMBINE_BALL, + GREANADE_ENHANCED, + GRENADE_FLAME, + GRENADE_SHRAPNEL, + GRENAGE_CLUSTER, + GREANADE_FLARE, + GRENADE_LIGHTNING, + GRENADE_IMPULSE, + GRENADE_PLASMA, + GRENADE_TAU, + GRENADE_SCHRABIDIUM, + GRENADE_MK2, + GRENADE_ASCHRAB, + GRENADE_NUKE, + GRENADE_ZOMG, + GRENADE_BLACK_HOLE, + POWER_FIST, + GADGET_PROPELLANT, + GADGET_WIRING, + GADGET_CORE, + BOY_SHIELDING, + BOY_TARGET, + BOY_BULLET, + BOY_PRPELLANT, + BOY_IGNITER, + MAN_PROPELLANT, + MAN_IGNITER, + MAN_CORE, + MIKE_TANK, + MIKE_DEUT, + MIKE_COOLER, + FLEIIJA_IGNITER, + FLEIJA_CORE, + FLEIJA_PROPELLANT; //private final int value; //private EnumAssemblyTemplate(int value) { @@ -411,6 +595,102 @@ public class ItemAssemblyTemplate extends Item { return 250; case MISSILE_BUSTER_2: return 250; + case MISSILE_HE_3: + return 350; + case MISSILE_FIRE_3: + return 350; + case MISSILE_CLUSTER_3: + return 350; + case MISSILE_BUSTER_3: + return 350; + case MISSILE_NUCLEAR: + return 500; + case MISSILE_MIRV: + return 600; + case MISSILE_ENDO: + return 350; + case MISSILE_EXO: + return 350; + case DEFAB: + return 200; + case LASER_BUCKSHOT: + return 50; + case ROCKET: + return 30; + case MINI_NUKE: + return 40; + case MINI_MIRV: + return 100; + case DARK_PLUG: + return 50; + case COMBINE_BALL: + return 200; + case GREANADE_ENHANCED: + return 150; + case GRENADE_FLAME: + return 150; + case GRENADE_SHRAPNEL: + return 150; + case GRENAGE_CLUSTER: + return 200; + case GREANADE_FLARE: + return 100; + case GRENADE_LIGHTNING: + return 200; + case GRENADE_IMPULSE: + return 300; + case GRENADE_PLASMA: + return 300; + case GRENADE_TAU: + return 300; + case GRENADE_SCHRABIDIUM: + return 300; + case GRENADE_MK2: + return 150; + case GRENADE_ASCHRAB: + return 300; + case GRENADE_NUKE: + return 200; + case GRENADE_ZOMG: + return 300; + case GRENADE_BLACK_HOLE: + return 500; + case POWER_FIST: + return 600; + case GADGET_PROPELLANT: + return 200; + case GADGET_WIRING: + return 100; + case GADGET_CORE: + return 200; + case BOY_SHIELDING: + return 150; + case BOY_TARGET: + return 200; + case BOY_BULLET: + return 100; + case BOY_PRPELLANT: + return 100; + case BOY_IGNITER: + return 150; + case MAN_PROPELLANT: + return 200; + case MAN_IGNITER: + return 150; + case MAN_CORE: + return 250; + case MIKE_TANK: + return 300; + case MIKE_DEUT: + return 200; + case MIKE_COOLER: + return 200; + case FLEIIJA_IGNITER: + return 300; + case FLEIJA_CORE: + return 500; + case FLEIJA_PROPELLANT: + return 400; default: return 100; } diff --git a/com/hbm/items/tool/ItemChemistryTemplate.java b/com/hbm/items/tool/ItemChemistryTemplate.java index bccdecf22..408e1c86b 100644 --- a/com/hbm/items/tool/ItemChemistryTemplate.java +++ b/com/hbm/items/tool/ItemChemistryTemplate.java @@ -22,11 +22,51 @@ public class ItemChemistryTemplate extends Item { //FR - Fuel Reprocessing //FC - Fuel Cracking //CC - Coal Cracking + //SF - Solid Fuel Production + //BP - Biofuel Production - TEST, FP_HEAVYOIL, FP_SMEAR, FP_NAPHTHA, FP_LIGHTOIL, FR_REOIL, FR_PETROIL, - FC_I_NAPHTHA, FC_GAS_PETROLEUM, FC_DIESEL_KEROSENE, FC_KEROSENE_PETROLEUM, CC_OIL, - CC_I, CC_HEATING, CC_HEAVY, CC_NAPHTHA, ASPHALT, COOLANT, DESH, PEROXIDE, CIRCUIT_4, - CIRCUIT_5; + TEST, + FP_HEAVYOIL, + FP_SMEAR, + FP_NAPHTHA, + FP_LIGHTOIL, + FR_REOIL, + FR_PETROIL, + FC_I_NAPHTHA, + FC_GAS_PETROLEUM, + FC_DIESEL_KEROSENE, + FC_KEROSENE_PETROLEUM, + CC_OIL, + CC_I, + CC_HEATING, + CC_HEAVY, + CC_NAPHTHA, + SF_OIL, + SF_HEAVYOIL, + SF_SMEAR, + SF_HEATINGOIL, + SF_RECLAIMED, + SF_PETROIL, + SF_LUBRICANT, + SF_NAPHTHA, + SF_DIESEL, + SF_LIGHTOIL, + SF_KEROSENE, + SF_GAS, + SF_PETROLEUM, + BP_BIOGAS, + BP_BIOFUEL, + ASPHALT, + COOLANT, + DESH, + PEROXIDE, + CIRCUIT_4, + CIRCUIT_5, + POLYMER, + DEUTERIUM, + STEAM, + UF6, + PUF6; public static EnumChemistryTemplate getEnum(int i) { if(i < EnumChemistryTemplate.values().length) @@ -122,6 +162,42 @@ public class ItemChemistryTemplate extends Item { return 200; case CIRCUIT_5: return 250; + case SF_OIL: + return 20; + case SF_HEAVYOIL: + return 20; + case SF_SMEAR: + return 20; + case SF_HEATINGOIL: + return 20; + case SF_RECLAIMED: + return 20; + case SF_PETROIL: + return 20; + case SF_LUBRICANT: + return 20; + case SF_NAPHTHA: + return 20; + case SF_DIESEL: + return 20; + case SF_LIGHTOIL: + return 20; + case SF_KEROSENE: + return 20; + case SF_GAS: + return 20; + case SF_PETROLEUM: + return 20; + case POLYMER: + return 100; + case DEUTERIUM: + return 200; + case STEAM: + return 20; + case BP_BIOGAS: + return 200; + case BP_BIOFUEL: + return 300; default: return 100; } diff --git a/com/hbm/items/tool/ItemGeigerCounter.java b/com/hbm/items/tool/ItemGeigerCounter.java new file mode 100644 index 000000000..a690bee8c --- /dev/null +++ b/com/hbm/items/tool/ItemGeigerCounter.java @@ -0,0 +1,136 @@ +package com.hbm.items.tool; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import com.hbm.blocks.ModBlocks; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; +import scala.Int; + +public class ItemGeigerCounter extends Item { + + Random rand = new Random(); + + @Override + public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean bool) { + + setInt(stack, getInt(stack, "timer") + 1, "timer"); + if(getInt(stack, "timer") == 10) { + setInt(stack, 0, "timer"); + setInt(stack, check(world, (int)entity.posX, (int)entity.posY, (int)entity.posZ, 15), "ticker"); + } + + int x = getInt(stack, "ticker"); + + if(getInt(stack, "timer") % 5 == 0) { + if(x > 0) { + List list = new ArrayList(); + + if(x < 30) + list.add(1); + if(x > 10 && x < 40) + list.add(2); + if(x > 30 && x < 60) + list.add(3); + if(x > 50 && x < 80) + list.add(4); + if(x > 70 && x < 100) + list.add(5); + if(x > 90) + list.add(6); + + world.playSoundAtEntity(entity, "hbm:item.geiger" + list.get(rand.nextInt(list.size())), 1.0F, 1.0F); + } else if(rand.nextInt(50) == 0) { + world.playSoundAtEntity(entity, "hbm:item.geiger"+ (1 + rand.nextInt(1)), 1.0F, 1.0F); + } + } + } + + static void setInt(ItemStack stack, int i, String name) { + if(!stack.hasTagCompound()) + stack.stackTagCompound = new NBTTagCompound(); + + stack.stackTagCompound.setInteger(name, i); + } + + static int getInt(ItemStack stack, String name) { + if(stack.hasTagCompound()) + return stack.stackTagCompound.getInteger(name); + + return 0; + } + + public static int check(World world, int x, int y, int z, int radius) { + int rads = 0; + int r = radius; + int r2 = r * r; + int r22 = r2 / 2; + for (int xx = -r; xx < r; xx++) { + int X = xx + x; + int XX = xx * xx; + for (int yy = -r; yy < r; yy++) { + int Y = yy + y; + int YY = XX + yy * yy; + for (int zz = -r; zz < r; zz++) { + int Z = zz + z; + int ZZ = YY + zz * zz; + if(ZZ < r22 / 3) { + rads += getRad(world.getBlock(X, Y, Z), 3); + } else if(ZZ < r22 / 3 * 2) { + rads += getRad(world.getBlock(X, Y, Z), 2); + } else if(ZZ < r22) { + rads += getRad(world.getBlock(X, Y, Z), 1); + } + } + } + } + + return rads; + } + + //level 1: farthest, 3: nearest + public static int getRad(Block b, int level) { + int i = 0; + + if(b == ModBlocks.waste_trinitite) { + i = 3; + } + if(b == ModBlocks.waste_trinitite_red) { + i = 3; + } + if(b == ModBlocks.ore_uranium) { + i = 2; + } + if(b == ModBlocks.ore_nether_plutonium) { + i = 15; + } + if(b == ModBlocks.block_trinitite) { + i = 20; + } + if(b == ModBlocks.block_waste) { + i = 25; + } + if(b == ModBlocks.waste_earth) { + i = 2; + } + if(b == ModBlocks.waste_mycelium) { + i = 7; + } + if(b == ModBlocks.block_uranium) { + i = 10; + } + if(b == ModBlocks.yellow_barrel) { + i = 30; + } + + return i * level; + } + +} diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 725f1af78..0b15f12a8 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -35,6 +35,7 @@ import com.hbm.entity.grenade.EntityGrenadeStrong; import com.hbm.entity.grenade.EntityGrenadeTau; import com.hbm.entity.grenade.EntityGrenadeZOMG; import com.hbm.entity.item.EntityMinecartTest; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.entity.missile.EntityBombletSelena; import com.hbm.entity.missile.EntityBombletTheta; import com.hbm.entity.missile.EntityMIRV; @@ -435,6 +436,8 @@ public class ClientProxy extends ServerProxy RenderingRegistry.registerEntityRenderingHandler(EntityMinerBeam.class, new RenderBeam3()); RenderingRegistry.registerEntityRenderingHandler(EntitySparkBeam.class, new RenderBeam4()); RenderingRegistry.registerEntityRenderingHandler(EntityLN2.class, new RenderLN2(ModItems.energy_ball)); + + RenderingRegistry.registerEntityRenderingHandler(EntityNukeExplosionAdvanced.class, new RenderSnowball(ModItems.energy_ball)); RenderingRegistry.registerEntityRenderingHandler(EntityMinecartTest.class, new RenderMinecartTest()); diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index 45faf1d53..60274a054 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -349,6 +349,20 @@ public class CraftingManager { GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nuclear_waste, 8), new Object[] { ModItems.rod_dual_schrabidium_fuel_depleted }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nuclear_waste, 16), new Object[] { ModItems.rod_quad_schrabidium_fuel_depleted }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { Items.melon, Items.melon, Items.melon, Items.melon, Items.melon, Items.melon, Items.melon }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { Items.apple, Items.apple, Items.apple, Items.apple, Items.apple, Items.apple, Items.apple, Items.apple, Items.apple }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { Items.rotten_flesh, Items.rotten_flesh, Items.rotten_flesh, Items.rotten_flesh, Items.rotten_flesh, Items.rotten_flesh, Items.rotten_flesh }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { Items.carrot, Items.carrot, Items.carrot, Items.carrot, Items.carrot, Items.carrot, Items.carrot, Items.carrot, Items.carrot }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { Items.potato, Items.potato, Items.potato, Items.potato, Items.potato, Items.potato, Items.potato, Items.potato, Items.potato }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { Items.poisonous_potato, Items.poisonous_potato, Items.poisonous_potato, Items.poisonous_potato, Items.poisonous_potato, Items.poisonous_potato, Items.poisonous_potato, Items.poisonous_potato, Items.poisonous_potato }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { Items.potato, Items.potato, Items.potato, Items.potato, Items.potato, Items.potato, Items.potato, Items.potato, Items.potato }); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { "treeSapling", "treeSapling", "treeSapling", "treeSapling", "treeSapling", "treeSapling", "treeSapling" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { "treeLeaves", "treeLeaves", "treeLeaves", "treeLeaves", "treeLeaves" })); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 8), new Object[] { Blocks.pumpkin, Blocks.pumpkin, Blocks.pumpkin, Blocks.pumpkin, Blocks.pumpkin, Blocks.pumpkin }); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.biomass, 6), new Object[] { "logWood", "logWood", "logWood" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.biomass, 4), new Object[] { "plankWood", "plankWood", "plankWood", "plankWood", "plankWood", "plankWood", "plankWood", "plankWood", "plankWood" })); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.biomass, 8), new Object[] { Blocks.hay_block, Blocks.hay_block }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.part_lithium), new Object[] { "P", "D", "P", 'P', "plateSteel", 'D', "dustLithium" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.part_beryllium), new Object[] { "P", "D", "P", 'P', "plateSteel", 'D', "dustBeryllium" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.part_carbon), new Object[] { "P", "D", "P", 'P', "plateSteel", 'D', "dustCoal" })); diff --git a/com/hbm/tileentity/deco/TileEntityYellowBarrel.java b/com/hbm/tileentity/deco/TileEntityYellowBarrel.java index e66ae93d5..22a1001dd 100644 --- a/com/hbm/tileentity/deco/TileEntityYellowBarrel.java +++ b/com/hbm/tileentity/deco/TileEntityYellowBarrel.java @@ -5,6 +5,7 @@ import java.util.List; import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.lib.Library; +import com.hbm.lib.ModDamageSource; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -85,9 +86,11 @@ public class TileEntityYellowBarrel extends TileEntity { this.worldObj.spawnEntityInWorld(creep); } else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 2 * 60 * 20, 2)); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.getId(), 20, 4)); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 1 * 60 * 20, 1)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 60 * 20, 1)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.getId(), 20, 0)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30 * 20, 1)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.confusion.id, 30 * 20, 0)); + entity.attackEntityFrom(ModDamageSource.radiation, 2.5F); } } } diff --git a/com/hbm/tileentity/machine/TileEntityMachineDiesel.java b/com/hbm/tileentity/machine/TileEntityMachineDiesel.java index c417400d8..a82b9b1f2 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineDiesel.java +++ b/com/hbm/tileentity/machine/TileEntityMachineDiesel.java @@ -232,12 +232,7 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento } public boolean hasAcceptableFuel() { - FluidType type = tank.getTankType(); - if(type.name().equals(FluidType.DIESEL.name())) - return true; - if(type.name().equals(FluidType.PETROIL.name())) - return true; - return false; + return getHEFromFuel() > 0; } public int getHEFromFuel() { @@ -246,6 +241,8 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento return 250; if(type.name().equals(FluidType.PETROIL.name())) return 150; + if(type.name().equals(FluidType.BIOFUEL.name())) + return 200; return 0; } diff --git a/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java b/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java index 3aa55ebbe..c81e4a3e7 100644 --- a/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java +++ b/com/hbm/tileentity/machine/TileEntityReactorMultiblock.java @@ -10,9 +10,12 @@ import com.hbm.blocks.machine.MachineGenerator; import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.explosion.ExplosionParticle; +import com.hbm.handler.FluidTypeHandler.FluidType; import com.hbm.interfaces.IConsumer; +import com.hbm.interfaces.IFluidContainer; import com.hbm.interfaces.IReactor; import com.hbm.interfaces.ISource; +import com.hbm.inventory.FluidTank; import com.hbm.items.ModItems; import com.hbm.items.special.ItemFuelRod; import com.hbm.lib.Library; @@ -35,12 +38,8 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; -public class TileEntityReactorMultiblock extends TileEntity implements ISidedInventory, IReactor, ISource { +public class TileEntityReactorMultiblock extends TileEntity implements ISidedInventory, ISource, IFluidContainer { - public int water; - public final static int waterMax = 10000000; - public int cool; - public final static int coolMax = 10000000; public int heat; public final static int heatMax = 1000000; public int power; @@ -48,13 +47,17 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv private ItemStack slots[]; public int age = 0; public List list = new ArrayList(); + public FluidTank[] tanks; public boolean isLoaded = false; private String customName; public TileEntityReactorMultiblock() { - slots = new ItemStack[34]; + slots = new ItemStack[36]; + tanks = new FluidTank[2]; + tanks[0] = new FluidTank(FluidType.WATER, 128000, 0); + tanks[1] = new FluidTank(FluidType.COOLANT, 64000, 1); } @Override public int getSizeInventory() { @@ -169,8 +172,8 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); - water = nbt.getInteger("water"); - cool = nbt.getInteger("cool"); + tanks[0].readFromNBT(nbt, "water"); + tanks[1].readFromNBT(nbt, "coolant"); power = nbt.getInteger("power"); heat = nbt.getInteger("heat"); @@ -190,8 +193,8 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setInteger("water", water); - nbt.setInteger("cool", cool); + tanks[0].writeToNBT(nbt, "water"); + tanks[1].writeToNBT(nbt, "coolant"); nbt.setInteger("power", power); nbt.setInteger("heat", heat); NBTTagList list = new NBTTagList(); @@ -222,83 +225,13 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv if(age == 9 || age == 19) ffgeuaInit(); - //if(!worldObj.isRemote) + if(!worldObj.isRemote) { - if(slots[30] != null && slots[30].getItem() == Items.water_bucket && this.water + 250000 <= waterMax) - { - this.slots[30].stackSize--; - this.water += 250000; - if(this.slots[30].stackSize == 0) - { - this.slots[30] = this.slots[30].getItem().getContainerItem(this.slots[30]); - } - } - if(slots[30] != null && slots[30].getItem() == ModItems.rod_water && this.water + 250000 <= waterMax) - { - this.slots[30].stackSize--; - this.water += 250000; - if(this.slots[30].stackSize == 0) - { - this.slots[30] = this.slots[30].getItem().getContainerItem(this.slots[30]); - } - } - if(slots[30] != null && slots[30].getItem() == ModItems.rod_dual_water && this.water + 500000 <= waterMax) - { - this.slots[30].stackSize--; - this.water += 500000; - if(this.slots[30].stackSize == 0) - { - this.slots[30] = this.slots[30].getItem().getContainerItem(this.slots[30]); - } - } - if(slots[30] != null && slots[30].getItem() == ModItems.rod_quad_water && this.water + 1000000 <= waterMax) - { - this.slots[30].stackSize--; - this.water += 1000000; - if(this.slots[30].stackSize == 0) - { - this.slots[30] = this.slots[30].getItem().getContainerItem(this.slots[30]); - } - } - if(slots[30] != null && slots[30].getItem() == ModItems.inf_water) - { - this.water = waterMax; - } + tanks[0].loadTank(30, 31, slots); + tanks[1].loadTank(32, 33, slots); - if(slots[31] != null && slots[31].getItem() == ModItems.rod_coolant && this.cool + 250000 <= coolMax) - { - this.slots[31].stackSize--; - this.cool += 250000; - if(this.slots[31].stackSize == 0) - { - this.slots[31] = this.slots[31].getItem().getContainerItem(this.slots[31]); - } - } - - if(slots[31] != null && slots[31].getItem() == ModItems.rod_dual_coolant && this.cool + 500000 <= coolMax) - { - this.slots[31].stackSize--; - this.cool += 500000; - if(this.slots[31].stackSize == 0) - { - this.slots[31] = this.slots[31].getItem().getContainerItem(this.slots[31]); - } - } - - if(slots[31] != null && slots[31].getItem() == ModItems.rod_quad_coolant && this.cool + 1000000 <= coolMax) - { - this.slots[31].stackSize--; - this.cool += 1000000; - if(this.slots[31].stackSize == 0) - { - this.slots[31] = this.slots[31].getItem().getContainerItem(this.slots[31]); - } - } - - if(slots[31] != null && slots[31].getItem() == ModItems.inf_coolant) - { - this.cool = coolMax; - } + for(int i = 0; i < 2; i++) + tanks[i].updateTank(xCoord, yCoord, zCoord); if(hasFuse()) @@ -493,19 +426,19 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv ((slots[28] != null && !(slots[28].getItem() instanceof ItemFuelRod)) || slots[28] == null) && ((slots[29] != null && !(slots[29].getItem() instanceof ItemFuelRod)) || slots[29] == null)) { - if(this.heat - 10 >= 0 && this.cool - 10 >= 0) + if(this.heat - 10 >= 0 && tanks[1].getFill() - 2 >= 0) { this.heat -= 10; - this.cool -= 2; + this.tanks[1].setFill(tanks[1].getFill() - 2); } - if(this.heat < 10 && this.cool != 0) + if(this.heat < 10 && heat != 0 && this.tanks[1].getFill() != 0) { this.heat--; - this.cool--; + this.tanks[1].setFill(tanks[1].getFill() - 1); } - if(this.heat != 0 && this.cool == 0) + if(this.heat != 0 && this.tanks[1].getFill() == 0) { this.heat--; } @@ -589,7 +522,6 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv } - @Override public boolean isStructureValid(World world) { if(world.getBlock(this.xCoord, this.yCoord, this.zCoord) == ModBlocks.reactor_computer && world.getBlock(this.xCoord, this.yCoord + 1, this.zCoord) == ModBlocks.reactor_conductor && @@ -628,7 +560,6 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv return false; } - @Override public boolean isCoatingValid(World world) { if(world.getBlock(this.xCoord - 1, this.yCoord + 2, this.zCoord - 1)== ModBlocks.brick_concrete && world.getBlock(this.xCoord + 1, this.yCoord + 2, this.zCoord + 1)== ModBlocks.brick_concrete && @@ -689,47 +620,34 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv return false; } - @Override - public int getWaterScaled(int i) { - return (water * i) / waterMax; - } - - @Override - public int getCoolantScaled(int i) { - return (cool * i) / coolMax; - } - - @Override public int getPowerScaled(int i) { return (power * i) / maxPower; } - @Override public int getHeatScaled(int i) { return (heat * i) / heatMax; } - @Override public boolean hasFuse() { return slots[33] != null && (slots[33].getItem() == ModItems.fuse || slots[33].getItem() == ModItems.screwdriver); } - + public void attemptPower(int i) { - if(this.water - i >= 0) + if(this.tanks[0].getFill() - i >= 0) { this.power += i; - this.water -= i; + this.tanks[0].setFill(tanks[0].getFill() - i); } } - + public void attemptHeat(int i) { Random rand = new Random(); - int j = rand.nextInt(i); + int j = rand.nextInt(i + 1); - if(this.cool - j >= 0) + if(this.tanks[1].getFill() - j >= 0) { - this.cool -= j; + this.tanks[1].setFill(tanks[1].getFill() - j); } else { this.heat += i; } @@ -793,4 +711,16 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv public void clearList() { this.list.clear(); } + + @Override + public void setFillstate(int fill, int index) { + if(index < 2 && tanks[index] != null) + tanks[index].setFill(fill); + } + + @Override + public void setType(FluidType type, int index) { + if(index < 2 && tanks[index] != null) + tanks[index].setTankType(type); + } }