diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index c27e9ba55..8d71dd252 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -310,6 +310,7 @@ item.nuke_electric_kit.name=Kit des Elektronikingenieurs item.prototype_kit.name=Prototyp Kit item.missile_kit.name=Raketen Kit item.t45_kit.name=T45-Powerrüstungskit +item.euphemium_kit.name=Euphemium Kit tile.waste_earth.name=Totes Gras tile.waste_trinitite.name=Trinititerz @@ -409,9 +410,14 @@ item.plate_gold.name=Goldplatte item.syringe_empty.name=Leere Spritze item.syringe_antidote.name=Gegenmittel +item.syringe_poison.name=Giftspritze item.syringe_awesome.name=AWESOME item.syringe_metal_empty.name=Metallspritze item.syringe_metal_stimpak.name=Stimpak +item.syringe_metal_medx.name=Med-X +item.syringe_metal_psycho.name=Psycho + +item.stealth_boy.name=Mobile Tarnkappe entity.hbm.entity_bullet.name=Patrone entity.hbm.entity_rocket.name=Rakete diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 1b9dc5dfd..acd0bfaaa 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -310,6 +310,7 @@ item.nuke_electric_kit.name=Electronic Engineer's Kit item.prototype_kit.name=Prototype Kit item.missile_kit.name=Missile Kit item.t45_kit.name=T45 Power Armor Kit +item.euphemium_kit.name=Euphemium Kit tile.waste_earth.name=Dead Grass @@ -410,9 +411,14 @@ item.plate_gold.name=Gold Plate item.syringe_empty.name=Empty Syringe item.syringe_antidote.name=Antidote +item.syringe_poison.name=Poisnous Injection item.syringe_awesome.name=AWESOME item.syringe_metal_empty.name=Metal Syringe item.syringe_metal_stimpak.name=Stimpak +item.syringe_metal_medx.name=Med-X +item.syringe_metal_psycho.name=Psycho + +item.stealth_boy.name=Stealth Device entity.hbm.entity_bullet.name=Bullet entity.hbm.entity_rocket.name=Rocket diff --git a/assets/hbm/textures/blocks/block_reinforced_alloy.png b/assets/hbm/textures/blocks/block_reinforced_alloy.png new file mode 100644 index 000000000..95ddf654f Binary files /dev/null and b/assets/hbm/textures/blocks/block_reinforced_alloy.png differ diff --git a/assets/hbm/textures/blocks/code.png b/assets/hbm/textures/blocks/code.png new file mode 100644 index 000000000..0dca6241d Binary files /dev/null and b/assets/hbm/textures/blocks/code.png differ diff --git a/assets/hbm/textures/blocks/factory_advanced_core.png b/assets/hbm/textures/blocks/factory_advanced_core.png new file mode 100644 index 000000000..3f08426b6 Binary files /dev/null and b/assets/hbm/textures/blocks/factory_advanced_core.png differ diff --git a/assets/hbm/textures/blocks/factory_advanced_furnace.png b/assets/hbm/textures/blocks/factory_advanced_furnace.png new file mode 100644 index 000000000..32e5140d6 Binary files /dev/null and b/assets/hbm/textures/blocks/factory_advanced_furnace.png differ diff --git a/assets/hbm/textures/blocks/factory_advanced_hull.png b/assets/hbm/textures/blocks/factory_advanced_hull.png new file mode 100644 index 000000000..85af5d0d6 Binary files /dev/null and b/assets/hbm/textures/blocks/factory_advanced_hull.png differ diff --git a/assets/hbm/textures/blocks/factory_titanium_core.png b/assets/hbm/textures/blocks/factory_titanium_core.png new file mode 100644 index 000000000..8806d7c0e Binary files /dev/null and b/assets/hbm/textures/blocks/factory_titanium_core.png differ diff --git a/assets/hbm/textures/blocks/factory_titanium_furnace.png b/assets/hbm/textures/blocks/factory_titanium_furnace.png new file mode 100644 index 000000000..8b0678e5a Binary files /dev/null and b/assets/hbm/textures/blocks/factory_titanium_furnace.png differ diff --git a/assets/hbm/textures/blocks/factory_titanium_hull.png b/assets/hbm/textures/blocks/factory_titanium_hull.png new file mode 100644 index 000000000..f254b6dd6 Binary files /dev/null and b/assets/hbm/textures/blocks/factory_titanium_hull.png differ diff --git a/assets/hbm/textures/gui/factory_titanium.png b/assets/hbm/textures/gui/factory_titanium.png new file mode 100644 index 000000000..d48f42792 Binary files /dev/null and b/assets/hbm/textures/gui/factory_titanium.png differ diff --git a/assets/hbm/textures/items/code.png b/assets/hbm/textures/items/code.png new file mode 100644 index 000000000..0dca6241d Binary files /dev/null and b/assets/hbm/textures/items/code.png differ diff --git a/assets/hbm/textures/items/fuel_tank_large.png b/assets/hbm/textures/items/fuel_tank_large.png index e2d074b15..f643d11fc 100644 Binary files a/assets/hbm/textures/items/fuel_tank_large.png and b/assets/hbm/textures/items/fuel_tank_large.png differ diff --git a/assets/hbm/textures/items/fuel_tank_medium.png b/assets/hbm/textures/items/fuel_tank_medium.png index 95cc181e4..b47f324e0 100644 Binary files a/assets/hbm/textures/items/fuel_tank_medium.png and b/assets/hbm/textures/items/fuel_tank_medium.png differ diff --git a/assets/hbm/textures/items/fuel_tank_small.png b/assets/hbm/textures/items/fuel_tank_small.png index 4a6110cfb..2b0f3a17d 100644 Binary files a/assets/hbm/textures/items/fuel_tank_small.png and b/assets/hbm/textures/items/fuel_tank_small.png differ diff --git a/assets/hbm/textures/items/stealth_boy.png b/assets/hbm/textures/items/stealth_boy.png new file mode 100644 index 000000000..58e2c3d6d Binary files /dev/null and b/assets/hbm/textures/items/stealth_boy.png differ diff --git a/assets/hbm/textures/items/syringe_metal_medx.png b/assets/hbm/textures/items/syringe_metal_medx.png new file mode 100644 index 000000000..5a9de1f41 Binary files /dev/null and b/assets/hbm/textures/items/syringe_metal_medx.png differ diff --git a/assets/hbm/textures/items/syringe_metal_psycho.png b/assets/hbm/textures/items/syringe_metal_psycho.png new file mode 100644 index 000000000..bc1667419 Binary files /dev/null and b/assets/hbm/textures/items/syringe_metal_psycho.png differ diff --git a/assets/hbm/textures/items/syringe_poison.png b/assets/hbm/textures/items/syringe_poison.png new file mode 100644 index 000000000..ffbae5ba0 Binary files /dev/null and b/assets/hbm/textures/items/syringe_poison.png differ diff --git a/assets/hbm/textures/items/thruster_large.png b/assets/hbm/textures/items/thruster_large.png index 6d5267ee7..ee64287d3 100644 Binary files a/assets/hbm/textures/items/thruster_large.png and b/assets/hbm/textures/items/thruster_large.png differ diff --git a/assets/hbm/textures/items/thruster_medium.png b/assets/hbm/textures/items/thruster_medium.png index 3af950484..b480e5999 100644 Binary files a/assets/hbm/textures/items/thruster_medium.png and b/assets/hbm/textures/items/thruster_medium.png differ diff --git a/assets/hbm/textures/items/thruster_small.png b/assets/hbm/textures/items/thruster_small.png index 7560d4fcf..30c695f30 100644 Binary files a/assets/hbm/textures/items/thruster_small.png and b/assets/hbm/textures/items/thruster_small.png differ diff --git a/assets/hbm/textures/items/warhead_buster_large.png b/assets/hbm/textures/items/warhead_buster_large.png index 705e70a86..f4d6c8429 100644 Binary files a/assets/hbm/textures/items/warhead_buster_large.png and b/assets/hbm/textures/items/warhead_buster_large.png differ diff --git a/assets/hbm/textures/items/warhead_buster_medium.png b/assets/hbm/textures/items/warhead_buster_medium.png index 9bf590918..e9fada741 100644 Binary files a/assets/hbm/textures/items/warhead_buster_medium.png and b/assets/hbm/textures/items/warhead_buster_medium.png differ diff --git a/assets/hbm/textures/items/warhead_buster_small.png b/assets/hbm/textures/items/warhead_buster_small.png index fb8d2badc..4b85efdc7 100644 Binary files a/assets/hbm/textures/items/warhead_buster_small.png and b/assets/hbm/textures/items/warhead_buster_small.png differ diff --git a/assets/hbm/textures/items/warhead_cluster_large.png b/assets/hbm/textures/items/warhead_cluster_large.png index 705e70a86..1f5bff87e 100644 Binary files a/assets/hbm/textures/items/warhead_cluster_large.png and b/assets/hbm/textures/items/warhead_cluster_large.png differ diff --git a/assets/hbm/textures/items/warhead_cluster_medium.png b/assets/hbm/textures/items/warhead_cluster_medium.png index 9bf590918..40e1110ea 100644 Binary files a/assets/hbm/textures/items/warhead_cluster_medium.png and b/assets/hbm/textures/items/warhead_cluster_medium.png differ diff --git a/assets/hbm/textures/items/warhead_cluster_small.png b/assets/hbm/textures/items/warhead_cluster_small.png index fb8d2badc..40ac78e98 100644 Binary files a/assets/hbm/textures/items/warhead_cluster_small.png and b/assets/hbm/textures/items/warhead_cluster_small.png differ diff --git a/assets/hbm/textures/items/warhead_generic_large.png b/assets/hbm/textures/items/warhead_generic_large.png index 705e70a86..f6c7e8efc 100644 Binary files a/assets/hbm/textures/items/warhead_generic_large.png and b/assets/hbm/textures/items/warhead_generic_large.png differ diff --git a/assets/hbm/textures/items/warhead_generic_medium.png b/assets/hbm/textures/items/warhead_generic_medium.png index 9bf590918..9b55f5686 100644 Binary files a/assets/hbm/textures/items/warhead_generic_medium.png and b/assets/hbm/textures/items/warhead_generic_medium.png differ diff --git a/assets/hbm/textures/items/warhead_generic_small.png b/assets/hbm/textures/items/warhead_generic_small.png index fb8d2badc..59c8c6470 100644 Binary files a/assets/hbm/textures/items/warhead_generic_small.png and b/assets/hbm/textures/items/warhead_generic_small.png differ diff --git a/assets/hbm/textures/items/warhead_incendiary_large.png b/assets/hbm/textures/items/warhead_incendiary_large.png index 705e70a86..119390541 100644 Binary files a/assets/hbm/textures/items/warhead_incendiary_large.png and b/assets/hbm/textures/items/warhead_incendiary_large.png differ diff --git a/assets/hbm/textures/items/warhead_incendiary_medium.png b/assets/hbm/textures/items/warhead_incendiary_medium.png index 9bf590918..e85afe8ec 100644 Binary files a/assets/hbm/textures/items/warhead_incendiary_medium.png and b/assets/hbm/textures/items/warhead_incendiary_medium.png differ diff --git a/assets/hbm/textures/items/warhead_incendiary_small.png b/assets/hbm/textures/items/warhead_incendiary_small.png index fb8d2badc..80e9fc11d 100644 Binary files a/assets/hbm/textures/items/warhead_incendiary_small.png and b/assets/hbm/textures/items/warhead_incendiary_small.png differ diff --git a/assets/hbm/textures/items/warhead_mirv.png b/assets/hbm/textures/items/warhead_mirv.png index 24a425030..466952c7c 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 24a425030..b7f6b1f20 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 24a425030..b80e8097b 100644 Binary files a/assets/hbm/textures/items/warhead_nuclear.png and b/assets/hbm/textures/items/warhead_nuclear.png differ diff --git a/assets/hbm/textures/items/warhead_thermo_endo.png b/assets/hbm/textures/items/warhead_thermo_endo.png index 24a425030..e519298dc 100644 Binary files a/assets/hbm/textures/items/warhead_thermo_endo.png and b/assets/hbm/textures/items/warhead_thermo_endo.png differ diff --git a/assets/hbm/textures/items/warhead_thermo_exo.png b/assets/hbm/textures/items/warhead_thermo_exo.png index 24a425030..b452b4c44 100644 Binary files a/assets/hbm/textures/items/warhead_thermo_exo.png and b/assets/hbm/textures/items/warhead_thermo_exo.png differ diff --git a/assets/hbm/textures/models/GasMask.png b/assets/hbm/textures/models/GasMask.png index c1c866ec4..076a52020 100644 Binary files a/assets/hbm/textures/models/GasMask.png and b/assets/hbm/textures/models/GasMask.png differ diff --git a/com/hbm/blocks/DecoBlockAlt.java b/com/hbm/blocks/DecoBlockAlt.java index 6a5f209c4..39ee567e5 100644 --- a/com/hbm/blocks/DecoBlockAlt.java +++ b/com/hbm/blocks/DecoBlockAlt.java @@ -3,6 +3,8 @@ package com.hbm.blocks; import java.util.Random; import com.hbm.items.ModItems; +import com.hbm.lib.RefStrings; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; @@ -26,7 +28,8 @@ public class DecoBlockAlt extends BlockContainer { @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconRegister) { - this.blockIcon = iconRegister.registerIcon("stone"); + //this.blockIcon = iconRegister.registerIcon("stone"); + this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":code"); } @Override diff --git a/com/hbm/blocks/FactoryHatch.java b/com/hbm/blocks/FactoryHatch.java new file mode 100644 index 000000000..41736f3c1 --- /dev/null +++ b/com/hbm/blocks/FactoryHatch.java @@ -0,0 +1,127 @@ +package com.hbm.blocks; + +import java.util.Random; + +import com.hbm.lib.RefStrings; +import com.hbm.main.MainRegistry; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +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.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class FactoryHatch extends Block { + + @SideOnly(Side.CLIENT) + private IIcon iconFront; + + protected FactoryHatch(Material p_i45394_1_) { + super(p_i45394_1_); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + this.iconFront = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.factory_titanium_furnace ? ":factory_titanium_furnace" : ":factory_advanced_furnace")); + this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.factory_titanium_furnace ? ":factory_titanium_hull" : ":factory_advanced_hull")); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metadata) { + return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) + { + return Item.getItemFromBlock(this); + } + + @Override + public void onBlockAdded(World world, int x, int y, int z) { + super.onBlockAdded(world, x, y, z); + //this.setDefaultDirection(world, x, y, z); + } + + private void setDefaultDirection(World world, int x, int y, int z) { + if(!world.isRemote) + { + Block block1 = world.getBlock(x, y, z - 1); + Block block2 = world.getBlock(x, y, z + 1); + Block block3 = world.getBlock(x - 1, y, z); + Block block4 = world.getBlock(x + 1, y, z); + + byte b0 = 3; + + if(block1.func_149730_j() && !block2.func_149730_j()) + { + b0 = 3; + } + if(block2.func_149730_j() && !block1.func_149730_j()) + { + b0 = 2; + } + if(block3.func_149730_j() && !block4.func_149730_j()) + { + b0 = 5; + } + if(block4.func_149730_j() && !block3.func_149730_j()) + { + b0 = 4; + } + + world.setBlockMetadataWithNotify(x, y, z, b0, 2); + } + } + + @Override + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + + if(i == 0) + { + world.setBlockMetadataWithNotify(x, y, z, 2, 2); + } + if(i == 1) + { + world.setBlockMetadataWithNotify(x, y, z, 5, 2); + } + if(i == 2) + { + world.setBlockMetadataWithNotify(x, y, z, 3, 2); + } + if(i == 3) + { + world.setBlockMetadataWithNotify(x, y, z, 4, 2); + } + } + + /*@Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + if(world.isRemote) + { + return true; + } else if(!player.isSneaking()) + { + TileEntityNukeFurnace entity = (TileEntityNukeFurnace) world.getTileEntity(x, y, z); + if(entity != null) + { + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_nuke_furnace, world, x, y, z); + } + return true; + } else { + return false; + } + }*/ + +} diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index b747cd8c1..eead5aea2 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -172,6 +172,14 @@ public class ModBlocks { public static Block bomb_multi_large; public static final int guiID_bomb_multi_large = 18; + public static Block factory_titanium_hull; + public static Block factory_titanium_furnace; + public static Block factory_titanium_core; + + public static Block factory_advanced_hull; + public static Block factory_advanced_furnace; + public static Block factory_advanced_core; + public static Block launch_pad; public static Block launch_pad_generic; public static Block launch_pad_incendiary; @@ -327,8 +335,15 @@ public class ModBlocks { machine_coal_off = new MachineCoal(false).setBlockName("machine_coal_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock); machine_coal_on = new MachineCoal(true).setBlockName("machine_coal_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F); - + red_wire_coated = new WireCoated(Material.iron).setBlockName("red_wire_coated").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_wire_coated"); + + factory_titanium_hull = new BlockGeneric(Material.iron).setBlockName("factory_titanium_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_titanium_hull"); + factory_titanium_furnace = new FactoryHatch(Material.iron).setBlockName("factory_titanium_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_titanium_furnace"); + factory_titanium_core = new BlockGeneric(Material.iron).setBlockName("factory_titanium_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_titanium_core"); + factory_advanced_hull = new BlockGeneric(Material.iron).setBlockName("factory_advanced_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_advanced_hull"); + factory_advanced_furnace = new FactoryHatch(Material.iron).setBlockName("factory_advanced_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_advanced_furnace"); + factory_advanced_core = new BlockGeneric(Material.iron).setBlockName("factory_advanced_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_advanced_core"); launch_pad = new LaunchPad(Material.iron).setBlockName("launch_pad").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke).setBlockTextureName(RefStrings.MODID + ":launch_pad"); launch_pad_generic = new LaunchPad(Material.iron).setBlockName("launch_pad_generic").setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":launch_pad"); @@ -482,6 +497,14 @@ public class ModBlocks { GameRegistry.registerBlock(machine_electric_furnace_on, machine_electric_furnace_on.getUnlocalizedName()); GameRegistry.registerBlock(machine_deuterium, machine_deuterium.getUnlocalizedName()); + //Industrial Factories + GameRegistry.registerBlock(factory_titanium_hull, factory_titanium_hull.getUnlocalizedName()); + GameRegistry.registerBlock(factory_titanium_furnace, factory_titanium_furnace.getUnlocalizedName()); + GameRegistry.registerBlock(factory_titanium_core, factory_titanium_core.getUnlocalizedName()); + GameRegistry.registerBlock(factory_advanced_hull, factory_advanced_hull.getUnlocalizedName()); + GameRegistry.registerBlock(factory_advanced_furnace, factory_advanced_furnace.getUnlocalizedName()); + GameRegistry.registerBlock(factory_advanced_core, factory_advanced_core.getUnlocalizedName()); + //Launch Pads GameRegistry.registerBlock(launch_pad, launch_pad.getUnlocalizedName()); GameRegistry.registerBlock(launch_pad_generic, launch_pad_generic.getUnlocalizedName()); diff --git a/com/hbm/blocks/TileEntityYellowBarrel.java b/com/hbm/blocks/TileEntityYellowBarrel.java index 84dfd6944..c94615862 100644 --- a/com/hbm/blocks/TileEntityYellowBarrel.java +++ b/com/hbm/blocks/TileEntityYellowBarrel.java @@ -77,7 +77,7 @@ public class TileEntityYellowBarrel extends TileEntity { } else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom)) { ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.getId(), 2 * 60 * 20, 2)); - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.getId(), 5, 4)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.getId(), 20, 4)); ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 1 * 60 * 20, 1)); } } diff --git a/com/hbm/entity/EntityNukeExplosionAdvanced.java b/com/hbm/entity/EntityNukeExplosionAdvanced.java index 0383f7ede..113b60380 100644 --- a/com/hbm/entity/EntityNukeExplosionAdvanced.java +++ b/com/hbm/entity/EntityNukeExplosionAdvanced.java @@ -40,8 +40,8 @@ public class EntityNukeExplosionAdvanced extends Entity { if(this.waste) { exp = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, 0); - wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.4), this.coefficient, 2); - vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange * 2, this.coefficient, 1); + wst = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 1.8), this.coefficient, 2); + vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1); } else { expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient); } diff --git a/com/hbm/explosion/ExplosionNukeGeneric.java b/com/hbm/explosion/ExplosionNukeGeneric.java index 64edd436e..1428c7146 100644 --- a/com/hbm/explosion/ExplosionNukeGeneric.java +++ b/com/hbm/explosion/ExplosionNukeGeneric.java @@ -7,6 +7,7 @@ import java.util.Random; import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.entity.Entity; import net.minecraft.entity.passive.EntityOcelot; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; @@ -22,6 +23,8 @@ import com.hbm.blocks.ModBlocks; import com.hbm.entity.EntityMiniNuke; import com.hbm.entity.EntityMirv; import com.hbm.entity.EntityNukeCloudSmall; +import com.hbm.items.ModItems; +import com.hbm.lib.Library; public class ExplosionNukeGeneric { @@ -115,7 +118,7 @@ public class ExplosionNukeGeneric { d6 = entity.posY + entity.getEyeHeight() - y; d7 = entity.posZ - z; double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); - if (d9 < wat && !(entity instanceof EntityOcelot) && !(entity instanceof EntityNukeCloudSmall) && !(entity instanceof EntityMirv) && !(entity instanceof EntityMiniNuke)) + if (d9 < wat && !(entity instanceof EntityOcelot) && !(entity instanceof EntityNukeCloudSmall) && !(entity instanceof EntityMirv) && !(entity instanceof EntityMiniNuke) && !(entity instanceof EntityPlayer && Library.checkArmor((EntityPlayer)entity, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots))) { d5 /= d9; d6 /= d9; diff --git a/com/hbm/items/ArmorEuphemium.java b/com/hbm/items/ArmorEuphemium.java index c485fe347..911f860d3 100644 --- a/com/hbm/items/ArmorEuphemium.java +++ b/com/hbm/items/ArmorEuphemium.java @@ -12,6 +12,8 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; + +import com.hbm.lib.Library; import com.hbm.lib.RefStrings; public class ArmorEuphemium extends ItemArmor implements ISpecialArmor { @@ -36,10 +38,11 @@ public class ArmorEuphemium extends ItemArmor implements ISpecialArmor { @Override public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { - //if(source == source.inFire || source == source.lava || source == source.onFire) { - return new ArmorProperties(1, 1, MathHelper.floor_double(999999999)); - //} - //return new ArmorProperties(0, 0, 0); + if(player instanceof EntityPlayer && Library.checkArmor((EntityPlayer)player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)) + { + return new ArmorProperties(1, 1, MathHelper.floor_double(999999999)); + } + return new ArmorProperties(0, 0, 0); } @Override @@ -71,15 +74,18 @@ public class ArmorEuphemium extends ItemArmor implements ISpecialArmor { @Override public void onArmorTick(World world, EntityPlayer player, ItemStack armor) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 1, 127)); - player.addPotionEffect(new PotionEffect(Potion.resistance.id, 1, 127)); - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 1, 127)); - player.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 1, 127)); + if(player instanceof EntityPlayer && Library.checkArmor((EntityPlayer)player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)) + { + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5, 127, true)); + player.addPotionEffect(new PotionEffect(Potion.resistance.id, 5, 127, true)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 5, 127, true)); + player.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 5, 127, true)); - if(player.motionY < -0.25D) - { - player.motionY = -0.25D; - } + if(player.motionY < -0.25D) + { + player.motionY = -0.25D; + } + } } @Override diff --git a/com/hbm/items/ArmorSchrabidium.java b/com/hbm/items/ArmorSchrabidium.java index 37820d39b..5fc845314 100644 --- a/com/hbm/items/ArmorSchrabidium.java +++ b/com/hbm/items/ArmorSchrabidium.java @@ -80,25 +80,25 @@ public class ArmorSchrabidium extends ItemArmor implements ISpecialArmor { if(armor.getItem() == ModItems.schrabidium_helmet) { - player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 5, 0)); - player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 5, 9)); + player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 5, 0, true)); + player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 5, 9, true)); } if(armor.getItem() == ModItems.schrabidium_plate) { - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5, 0)); - player.addPotionEffect(new PotionEffect(Potion.resistance.id, 5, 0)); - player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 5, 0)); + player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5, 0, true)); + player.addPotionEffect(new PotionEffect(Potion.resistance.id, 5, 0, true)); + player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 5, 0, true)); } if(armor.getItem() == ModItems.schrabidium_legs) { - player.addPotionEffect(new PotionEffect(Potion.jump.id, 5, 4)); + player.addPotionEffect(new PotionEffect(Potion.jump.id, 5, 4, true)); } if(armor.getItem() == ModItems.schrabidium_boots) { - player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 5, 4)); + player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 5, 4, true)); } } diff --git a/com/hbm/items/ArmorT45.java b/com/hbm/items/ArmorT45.java index eb0296bb7..1967af32a 100644 --- a/com/hbm/items/ArmorT45.java +++ b/com/hbm/items/ArmorT45.java @@ -208,13 +208,13 @@ public class ArmorT45 extends ItemArmor implements ISpecialArmor { { if(player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() == ModItems.t45_plate && player.inventory.armorInventory[2].stackTagCompound != null && player.inventory.armorInventory[2].stackTagCompound.getInteger("charge") > 0) { - player.addPotionEffect(new PotionEffect(Potion.jump.id, 1, 0)); - player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 1, 1)); - player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 1, 2)); - player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 0)); + player.addPotionEffect(new PotionEffect(Potion.jump.id, 5, 0, true)); + player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 5, 1, true)); + player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 5, 2, true)); + player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 5, 0, true)); } else { - player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 1, 1)); - player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 0)); + player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 5, 1, true)); + player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 5, 0, true)); } } } diff --git a/com/hbm/items/ItemStarterKit.java b/com/hbm/items/ItemStarterKit.java index 391420db4..6c5734fc3 100644 --- a/com/hbm/items/ItemStarterKit.java +++ b/com/hbm/items/ItemStarterKit.java @@ -7,6 +7,8 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; public class ItemStarterKit extends Item { @@ -316,6 +318,22 @@ public class ItemStarterKit extends Item { player.inventory.addItemStackToInventory(new ItemStack(ModItems.fusion_core, 1)); } + if(this == ModItems.stealth_boy) + { + player.addPotionEffect(new PotionEffect(Potion.invisibility.id, 30 * 20, 0, true)); + } + + if(this == ModItems.euphemium_kit) + { + player.inventory.addItemStackToInventory(new ItemStack(ModItems.euphemium_helmet, 1)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.euphemium_plate, 1)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.euphemium_legs, 1)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.euphemium_boots, 1)); + player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.statue_elb), 1)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_cursed, 1)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.watch, 1)); + } + return stack; } diff --git a/com/hbm/items/ItemSyringe.java b/com/hbm/items/ItemSyringe.java index 7bd1707e6..dfc95fc75 100644 --- a/com/hbm/items/ItemSyringe.java +++ b/com/hbm/items/ItemSyringe.java @@ -2,6 +2,7 @@ package com.hbm.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; @@ -64,6 +65,28 @@ public class ItemSyringe extends Item { } } + if(this == ModItems.syringe_poison) + { + if (!world.isRemote) + { + player.addPotionEffect(new PotionEffect(Potion.poison.id, 30 * 20, 4)); + player.addPotionEffect(new PotionEffect(Potion.wither.id, 15 * 20, 2)); + player.addPotionEffect(new PotionEffect(Potion.confusion.id, 15 * 20, 0)); + + stack.stackSize--; + + if (stack.stackSize <= 0) + { + return new ItemStack(ModItems.syringe_empty); + } + + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_empty, 1, 0), false); + } + } + } + if(this == ModItems.syringe_metal_stimpak) { if (!world.isRemote) @@ -84,6 +107,47 @@ public class ItemSyringe extends Item { } } + if(this == ModItems.syringe_metal_medx) + { + if (!world.isRemote) + { + player.addPotionEffect(new PotionEffect(Potion.resistance.id, 4 * 60 * 20, 2)); + + stack.stackSize--; + + if (stack.stackSize <= 0) + { + return new ItemStack(ModItems.syringe_metal_empty); + } + + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false); + } + } + } + + if(this == ModItems.syringe_metal_psycho) + { + if (!world.isRemote) + { + player.addPotionEffect(new PotionEffect(Potion.resistance.id, 2 * 60 * 20, 0)); + player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2 * 60 * 20, 0)); + + stack.stackSize--; + + if (stack.stackSize <= 0) + { + return new ItemStack(ModItems.syringe_metal_empty); + } + + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_metal_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false); + } + } + } + return stack; } @@ -109,4 +173,136 @@ public class ItemSyringe extends Item { return EnumRarity.common; } + + public boolean hitEntity(ItemStack stack, EntityLivingBase entity, EntityLivingBase entityPlayer) + { + World world = entity.worldObj; + + if(this == ModItems.syringe_antidote) + { + if (!world.isRemote) + { + entity.clearActivePotions(); + + stack.stackSize--; + + if(entityPlayer instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer)entityPlayer; + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_empty, 1, 0), false); + } + } + } + } + + if(this == ModItems.syringe_awesome) + { + if (!world.isRemote) + { + entity.addPotionEffect(new PotionEffect(Potion.regeneration.id, 50 * 20, 9)); + entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 50 * 20, 9)); + entity.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 50 * 20, 0)); + entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50 * 20, 24)); + entity.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 50 * 20, 9)); + entity.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 50 * 20, 6)); + entity.addPotionEffect(new PotionEffect(Potion.jump.id, 50 * 20, 9)); + entity.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 50 * 20, 9)); + entity.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 50 * 20, 4)); + entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 4)); + + stack.stackSize--; + + if(entityPlayer instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer)entityPlayer; + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_empty, 1, 0), false); + } + } + } + } + + if(this == ModItems.syringe_poison) + { + if (!world.isRemote) + { + entity.addPotionEffect(new PotionEffect(Potion.poison.id, 30 * 20, 4)); + entity.addPotionEffect(new PotionEffect(Potion.wither.id, 15 * 20, 2)); + entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 15 * 20, 0)); + + stack.stackSize--; + + if(entityPlayer instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer)entityPlayer; + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_empty, 1, 0), false); + } + } + } + } + + if(this == ModItems.syringe_metal_stimpak) + { + if (!world.isRemote) + { + entity.heal(5); + + stack.stackSize--; + + if(entityPlayer instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer)entityPlayer; + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false); + } + } + } + } + + if(this == ModItems.syringe_metal_medx) + { + if (!world.isRemote) + { + entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 4 * 60 * 20, 2)); + + stack.stackSize--; + + if(entityPlayer instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer)entityPlayer; + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false); + } + } + } + } + + if(this == ModItems.syringe_metal_psycho) + { + if (!world.isRemote) + { + entity.addPotionEffect(new PotionEffect(Potion.resistance.id, 2 * 60 * 20, 0)); + entity.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 2 * 60 * 20, 0)); + + stack.stackSize--; + + if(entityPlayer instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer)entityPlayer; + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.syringe_empty))) + { + player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.syringe_metal_empty, 1, 0), false); + } + } + } + } + return false; + } } diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index ba351a697..660ba29d3 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -164,9 +164,13 @@ public class ModItems { public static Item syringe_empty; public static Item syringe_antidote; + public static Item syringe_poison; public static Item syringe_awesome; public static Item syringe_metal_empty; public static Item syringe_metal_stimpak; + public static Item syringe_metal_medx; + public static Item syringe_metal_psycho; + public static Item stealth_boy; public static Item rod_empty; public static Item rod_uranium; @@ -403,6 +407,7 @@ public class ModItems { public static Item prototype_kit; public static Item missile_kit; public static Item t45_kit; + public static Item euphemium_kit; public static Item igniter; @@ -564,9 +569,13 @@ public class ModItems { syringe_empty = new Item().setUnlocalizedName("syringe_empty").setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":syringe_empty"); syringe_antidote = new ItemSyringe().setUnlocalizedName("syringe_antidote").setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":syringe_antidote"); + syringe_poison = new ItemSyringe().setUnlocalizedName("syringe_poison").setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":syringe_poison"); syringe_awesome = new ItemSyringe().setUnlocalizedName("syringe_awesome").setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":syringe_awesome"); syringe_metal_empty = new Item().setUnlocalizedName("syringe_metal_empty").setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":syringe_metal_empty"); syringe_metal_stimpak = new ItemSyringe().setUnlocalizedName("syringe_metal_stimpak").setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":syringe_metal_stimpak"); + syringe_metal_medx = new ItemSyringe().setUnlocalizedName("syringe_metal_medx").setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":syringe_metal_medx"); + syringe_metal_psycho = new ItemSyringe().setUnlocalizedName("syringe_metal_psycho").setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":syringe_metal_psycho"); + stealth_boy = new ItemStarterKit().setUnlocalizedName("stealth_boy").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":stealth_boy"); rod_empty = new Item().setUnlocalizedName("rod_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":rod_empty"); rod_uranium = new ItemCustomLore().setUnlocalizedName("rod_uranium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium"); @@ -754,6 +763,7 @@ public class ModItems { prototype_kit = new ItemStarterKit().setUnlocalizedName("prototype_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":prototype_kit"); missile_kit = new ItemStarterKit().setUnlocalizedName("missile_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":missile_kit"); t45_kit = new ItemStarterKit().setUnlocalizedName("t45_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":t45_kit"); + euphemium_kit = new ItemStarterKit().setUnlocalizedName("euphemium_kit").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":code"); igniter = new ItemCustomLore().setUnlocalizedName("igniter").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":trigger"); ingot_euphemium = new ItemCustomLore().setUnlocalizedName("ingot_euphemium").setTextureName(RefStrings.MODID + ":ingot_euphemium"); @@ -1133,9 +1143,13 @@ public class ModItems { //Syringes GameRegistry.registerItem(syringe_empty, syringe_empty.getUnlocalizedName()); GameRegistry.registerItem(syringe_antidote, syringe_antidote.getUnlocalizedName()); + GameRegistry.registerItem(syringe_poison, syringe_poison.getUnlocalizedName()); GameRegistry.registerItem(syringe_awesome, syringe_awesome.getUnlocalizedName()); GameRegistry.registerItem(syringe_metal_empty, syringe_metal_empty.getUnlocalizedName()); GameRegistry.registerItem(syringe_metal_stimpak, syringe_metal_stimpak.getUnlocalizedName()); + GameRegistry.registerItem(syringe_metal_medx, syringe_metal_medx.getUnlocalizedName()); + GameRegistry.registerItem(syringe_metal_psycho, syringe_metal_psycho.getUnlocalizedName()); + GameRegistry.registerItem(stealth_boy, stealth_boy.getUnlocalizedName()); //Food GameRegistry.registerItem(bomb_waffle, bomb_waffle.getUnlocalizedName()); @@ -1225,5 +1239,6 @@ public class ModItems { GameRegistry.registerItem(missile_kit, missile_kit.getUnlocalizedName()); GameRegistry.registerItem(grenade_kit, grenade_kit.getUnlocalizedName()); GameRegistry.registerItem(t45_kit, t45_kit.getUnlocalizedName()); + GameRegistry.registerItem(euphemium_kit, euphemium_kit.getUnlocalizedName()); } } diff --git a/com/hbm/lib/HbmChestContents.java b/com/hbm/lib/HbmChestContents.java index b1e3564af..48bee062a 100644 --- a/com/hbm/lib/HbmChestContents.java +++ b/com/hbm/lib/HbmChestContents.java @@ -40,7 +40,6 @@ public class HbmChestContents { private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] {new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.neutron_reflector, 0, 2, 3, 3), new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 2, 3), new WeightedRandomChestContent(ModItems.circuit_schrabidium, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.nuke_starter_kit, 0, 1, 1, 2), @@ -56,7 +55,7 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.battery_schrabidium, 1000, 1, 1, 1), new WeightedRandomChestContent(ModItems.syringe_awesome, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.fusion_core, 0, 1, 1, 4), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.float_bomb), 0, 1, 1, 1)}; + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_barrel), 0, 1, 3, 1)}; private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] {new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5), diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index 8b55046fd..0a42fdaa0 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -127,7 +127,7 @@ public class Library { public static boolean checkForHazmat(EntityPlayer player) { - if(checkArmor(player, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots) || checkArmor(player, ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs, ModItems.t45_boots)) + if(checkArmor(player, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots) || checkArmor(player, ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs, ModItems.t45_boots) || checkArmor(player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)) { return true; } @@ -149,6 +149,10 @@ public class Library { { return true; } + if(checkArmorPiece(player, ModItems.euphemium_helmet, 3)) + { + return true; + } return false; } diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index 8a44d30d4..7f608aae3 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -396,11 +396,15 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.syringe_antidote, 6), new Object[] { "SPS", "SMS", "SPS", 'S', ModItems.syringe_empty, 'P', Items.pumpkin_seeds, 'M', Items.milk_bucket }); GameRegistry.addRecipe(new ItemStack(ModItems.syringe_antidote, 6), new Object[] { "SSS", "PMP", "SSS", 'S', ModItems.syringe_empty, 'P', Items.pumpkin_seeds, 'M', Items.reeds }); GameRegistry.addRecipe(new ItemStack(ModItems.syringe_antidote, 6), new Object[] { "SPS", "SMS", "SPS", 'S', ModItems.syringe_empty, 'P', Items.pumpkin_seeds, 'M', Items.reeds }); + GameRegistry.addRecipe(new ItemStack(ModItems.syringe_poison, 1), new Object[] { "SLS", "LCL", "SLS", 'C', ModItems.syringe_empty, 'S', Items.spider_eye, 'L', ModItems.powder_lead }); GameRegistry.addRecipe(new ItemStack(ModItems.syringe_awesome, 1), new Object[] { "SPS", "NCN", "SPS", 'C', ModItems.syringe_empty, 'S', ModItems.sulfur, 'P', ModItems.nugget_pu239, 'N', ModItems.nugget_pu238 }); GameRegistry.addRecipe(new ItemStack(ModItems.syringe_awesome, 1), new Object[] { "SNS", "PCP", "SNS", 'C', ModItems.syringe_empty, 'S', ModItems.sulfur, 'P', ModItems.nugget_pu239, 'N', ModItems.nugget_pu238 }); GameRegistry.addRecipe(new ItemStack(ModItems.syringe_metal_empty, 6), new Object[] { "P", "C", "B", 'B', Item.getItemFromBlock(Blocks.iron_bars), 'C', ModItems.rod_empty, 'P', ModItems.plate_iron }); GameRegistry.addRecipe(new ItemStack(ModItems.syringe_metal_stimpak, 1), new Object[] { " N ", "NSN", " N ", 'N', Items.nether_wart, 'S', ModItems.syringe_metal_empty }); - + GameRegistry.addRecipe(new ItemStack(ModItems.syringe_metal_medx, 1), new Object[] { " N ", "NSN", " N ", 'N', Items.quartz, 'S', ModItems.syringe_metal_empty }); + GameRegistry.addRecipe(new ItemStack(ModItems.syringe_metal_psycho, 1), new Object[] { " N ", "NSN", " N ", 'N', Items.glowstone_dust, 'S', ModItems.syringe_metal_empty }); + + GameRegistry.addRecipe(new ItemStack(ModItems.stealth_boy, 1), new Object[] { " B", "LI", "LC", 'B', Item.getItemFromBlock(Blocks.stone_button), 'L', Items.leather, 'I', ModItems.ingot_steel, 'C', ModItems.circuit_red_copper }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.nuke_gadget), 1), new Object[] { "DGD", "FCF", "DPD", 'G', ModItems.wire_gold, 'F', ModItems.fins_flat, 'C', ModItems.sphere_steel, 'P', ModItems.pedestal_steel, 'D', new ItemStack(Items.dye, 1, 8) }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.nuke_boy), 1), new Object[] { "ADD", "HHF", "CDD", 'A', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'C', ModItems.circuit_aluminium, 'F', ModItems.fins_small_steel, 'D', new ItemStack(Items.dye, 1, 4) }); @@ -484,6 +488,8 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_shovel, 1), new Object[] { "I", "S", "S", 'I', ModItems.ingot_schrabidium, 'S', Items.stick }); GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_hoe, 1), new Object[] { "II", " S", " S", 'I', ModItems.ingot_schrabidium, 'S', Items.stick }); + GameRegistry.addRecipe(new ItemStack(ModItems.chainsaw, 1), new Object[] { "TTG", "SSM", 'T', ModItems.plate_iron, 'S', ModItems.plate_steel, 'M', ModItems.motor, 'G', ModItems.circuit_gold }); + GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_helmet, 1), new Object[] { "EEE", "EIE", " P ", 'E', ModItems.hazmat_cloth, 'I', Item.getItemFromBlock(Blocks.glass_pane), 'P', ModItems.plate_steel }); GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.hazmat_cloth }); GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.hazmat_cloth }); diff --git a/com/hbm/render/ModelGasMask.java b/com/hbm/render/ModelGasMask.java index 1600ee527..7b424bece 100644 --- a/com/hbm/render/ModelGasMask.java +++ b/com/hbm/render/ModelGasMask.java @@ -17,6 +17,7 @@ import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelBox; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; public class ModelGasMask extends ModelBiped { @@ -64,11 +65,16 @@ public class ModelGasMask extends ModelBiped @Override public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + EntityPlayer player = (EntityPlayer)entity; + if(player.isSneaking()) + { + this.isSneak = true; + } else { + this.isSneak = false; + } super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.bipedHead.rotationPointX = 0.0F; - this.bipedHead.rotationPointY = 0.0F; - this.mask.rotationPointX = 0.0F; - this.mask.rotationPointY = 0.0F; + this.mask.rotationPointX = bipedHead.rotationPointX; + this.mask.rotationPointY = bipedHead.rotationPointY; this.mask.rotateAngleX = bipedHead.rotateAngleX - 45; } @Override diff --git a/com/hbm/render/ModelGoggles.java b/com/hbm/render/ModelGoggles.java index 7ec51e794..964f3ac1a 100644 --- a/com/hbm/render/ModelGoggles.java +++ b/com/hbm/render/ModelGoggles.java @@ -16,6 +16,7 @@ import org.lwjgl.opengl.GL11; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; public class ModelGoggles extends ModelBiped { @@ -61,9 +62,14 @@ public class ModelGoggles extends ModelBiped @Override public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + EntityPlayer player = (EntityPlayer)entity; + if(player.isSneaking()) + { + this.isSneak = true; + } else { + this.isSneak = false; + } super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.bipedHead.rotationPointX = 0.0F; - this.bipedHead.rotationPointY = 0.0F; this.bipedHead.rotateAngleY = this.bipedHead.rotateAngleY; this.bipedHead.rotateAngleX = this.bipedHead.rotateAngleX; } diff --git a/com/hbm/render/ModelT45Helmet.java b/com/hbm/render/ModelT45Helmet.java index 47fc0a484..c3cc0a71d 100644 --- a/com/hbm/render/ModelT45Helmet.java +++ b/com/hbm/render/ModelT45Helmet.java @@ -11,6 +11,8 @@ package com.hbm.render; +import java.util.ArrayList; + import org.lwjgl.opengl.GL11; import net.minecraft.client.model.ModelBiped; @@ -22,21 +24,13 @@ public class ModelT45Helmet extends ModelBiped { //fields ModelRenderer helmet; - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - ModelRenderer Shape7; - ModelRenderer Shape8; public ModelT45Helmet() { textureWidth = 64; textureHeight = 32; - helmet = new ModelRenderer(this, 0, 0); + /*helmet = new ModelRenderer(this, 0, 0); Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 8, 8, 8); Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 4, -4F); @@ -84,7 +78,37 @@ public class ModelT45Helmet extends ModelBiped Shape8.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 4, -4.5F); Shape8.setTextureSize(64, 32); Shape8.mirror = true; - setRotation(Shape8, -0.7853982F, 0F, 0F); + setRotation(Shape8, -0.7853982F, 0F, 0F);*/ + + bipedHead = new ModelRenderer(this, 0, 0); + bipedHead.addBox(-4F, 0F - 8 + 0.0625F / 4, -4F, 8, 8, 8); + + bipedHead.setTextureOffset(32, 0); + bipedHead.addBox(1F, 1F - 8 + 0.0625F / 4 + 1, -5F, 2, 2, 1); + + bipedHead.setTextureOffset(40, 6); + bipedHead.addBox(-5F, 1F - 8 + 0.0625F / 4, -5.466667F, 1, 1, 4); + + bipedHead.setTextureOffset(0, 16); + bipedHead.addBox(-5F, 6F - 8 + 0.0625F / 4, -4.5F, 10, 1, 9); + + helmet = bipedHeadwear; + helmet.cubeList = new ArrayList(); + + float yOffset = (float)Math.sqrt(2) * 3.5F; + float zOffset = - (float)Math.sqrt(2) * 0.5F; + + helmet.setTextureOffset(40, 0); + helmet.addBox(-2F, 5F - 8 + 0.0625F / 4 + yOffset, -4F + zOffset, 4, 2, 2); + + helmet.setTextureOffset(54, 0); + helmet.addBox(-1F, 5F - 8 + 0.0625F / 4 + 2 + yOffset, -4F + zOffset, 2, 1, 2); + + helmet.setTextureOffset(32, 7); + helmet.addBox(-1.5F, 5F - 8 + 0.0625F / 4 + 0.5F + yOffset, -4.5F + zOffset, 1, 1, 1); + + helmet.setTextureOffset(32, 5); + helmet.addBox(0.5F, 5F - 8 + 0.0625F / 4 + 0.5F + yOffset, -4.5F + zOffset, 1, 1, 1); } /*public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) @@ -119,11 +143,16 @@ public void setRotationAngles(float f, float f1, float f2, float f3, float f4, f this.isSneak = false; } + this.bipedHead.rotationPointX = 0.0F; + this.bipedHead.rotationPointY = 0.0F; + //this.helmet.rotationPointX = this.bipedHead.rotationPointX; + //this.helmet.rotationPointY = this.bipedHead.rotationPointY; + //this.helmet.rotateAngleY = this.bipedHead.rotateAngleY; + //this.helmet.rotateAngleX = this.bipedHead.rotateAngleX; super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.helmet.rotationPointX = this.bipedHead.rotationPointX; - this.helmet.rotationPointY = this.bipedHead.rotationPointY; - this.helmet.rotateAngleY = this.bipedHead.rotateAngleY; - this.helmet.rotateAngleX = this.bipedHead.rotateAngleX; + this.helmet.rotationPointX = bipedHead.rotationPointX; + this.helmet.rotationPointY = bipedHead.rotationPointY; + this.helmet.rotateAngleX = bipedHead.rotateAngleX - 45; } @Override @@ -131,9 +160,11 @@ public void render(Entity par1Entity, float par2, float par3, float par4, float { setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); - //GL11.glScalef(1.125F, 1.125F, 1.125F); + GL11.glScalef(1.125F, 1.125F, 1.125F); GL11.glScalef(1.0625F, 1.0625F, 1.0625F); - this.helmet.addChild(Shape1); + bipedHead.render(par7); + helmet.render(par7); + /*this.helmet.addChild(Shape1); this.helmet.addChild(Shape2); this.helmet.addChild(Shape3); this.helmet.addChild(Shape4); @@ -141,7 +172,7 @@ public void render(Entity par1Entity, float par2, float par3, float par4, float this.helmet.addChild(Shape6); this.helmet.addChild(Shape7); this.helmet.addChild(Shape8); - this.helmet.render(par7); + this.helmet.render(par7);*/ GL11.glPopMatrix(); }