Added new textures and factory blocks

This commit is contained in:
HbmMods 2016-02-09 18:49:10 +01:00
parent 2dfb9a3200
commit 6ecfecfe04
58 changed files with 513 additions and 58 deletions

View File

@ -310,6 +310,7 @@ item.nuke_electric_kit.name=Kit des Elektronikingenieurs
item.prototype_kit.name=Prototyp Kit item.prototype_kit.name=Prototyp Kit
item.missile_kit.name=Raketen Kit item.missile_kit.name=Raketen Kit
item.t45_kit.name=T45-Powerrüstungskit item.t45_kit.name=T45-Powerrüstungskit
item.euphemium_kit.name=Euphemium Kit
tile.waste_earth.name=Totes Gras tile.waste_earth.name=Totes Gras
tile.waste_trinitite.name=Trinititerz tile.waste_trinitite.name=Trinititerz
@ -409,9 +410,14 @@ item.plate_gold.name=Goldplatte
item.syringe_empty.name=Leere Spritze item.syringe_empty.name=Leere Spritze
item.syringe_antidote.name=Gegenmittel item.syringe_antidote.name=Gegenmittel
item.syringe_poison.name=Giftspritze
item.syringe_awesome.name=AWESOME item.syringe_awesome.name=AWESOME
item.syringe_metal_empty.name=Metallspritze item.syringe_metal_empty.name=Metallspritze
item.syringe_metal_stimpak.name=Stimpak 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_bullet.name=Patrone
entity.hbm.entity_rocket.name=Rakete entity.hbm.entity_rocket.name=Rakete

View File

@ -310,6 +310,7 @@ item.nuke_electric_kit.name=Electronic Engineer's Kit
item.prototype_kit.name=Prototype Kit item.prototype_kit.name=Prototype Kit
item.missile_kit.name=Missile Kit item.missile_kit.name=Missile Kit
item.t45_kit.name=T45 Power Armor Kit item.t45_kit.name=T45 Power Armor Kit
item.euphemium_kit.name=Euphemium Kit
tile.waste_earth.name=Dead Grass tile.waste_earth.name=Dead Grass
@ -410,9 +411,14 @@ item.plate_gold.name=Gold Plate
item.syringe_empty.name=Empty Syringe item.syringe_empty.name=Empty Syringe
item.syringe_antidote.name=Antidote item.syringe_antidote.name=Antidote
item.syringe_poison.name=Poisnous Injection
item.syringe_awesome.name=AWESOME item.syringe_awesome.name=AWESOME
item.syringe_metal_empty.name=Metal Syringe item.syringe_metal_empty.name=Metal Syringe
item.syringe_metal_stimpak.name=Stimpak 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_bullet.name=Bullet
entity.hbm.entity_rocket.name=Rocket entity.hbm.entity_rocket.name=Rocket

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 511 B

View File

@ -3,6 +3,8 @@ package com.hbm.blocks;
import java.util.Random; import java.util.Random;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
@ -26,7 +28,8 @@ public class DecoBlockAlt extends BlockContainer {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) { public void registerBlockIcons(IIconRegister iconRegister) {
this.blockIcon = iconRegister.registerIcon("stone"); //this.blockIcon = iconRegister.registerIcon("stone");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":code");
} }
@Override @Override

View File

@ -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;
}
}*/
}

View File

@ -172,6 +172,14 @@ public class ModBlocks {
public static Block bomb_multi_large; public static Block bomb_multi_large;
public static final int guiID_bomb_multi_large = 18; 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;
public static Block launch_pad_generic; public static Block launch_pad_generic;
public static Block launch_pad_incendiary; 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_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); 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"); 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 = 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"); 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_electric_furnace_on, machine_electric_furnace_on.getUnlocalizedName());
GameRegistry.registerBlock(machine_deuterium, machine_deuterium.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 //Launch Pads
GameRegistry.registerBlock(launch_pad, launch_pad.getUnlocalizedName()); GameRegistry.registerBlock(launch_pad, launch_pad.getUnlocalizedName());
GameRegistry.registerBlock(launch_pad_generic, launch_pad_generic.getUnlocalizedName()); GameRegistry.registerBlock(launch_pad_generic, launch_pad_generic.getUnlocalizedName());

View File

@ -77,7 +77,7 @@ public class TileEntityYellowBarrel extends TileEntity {
} else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom)) } 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.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)); ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 1 * 60 * 20, 1));
} }
} }

View File

@ -40,8 +40,8 @@ public class EntityNukeExplosionAdvanced extends Entity {
if(this.waste) if(this.waste)
{ {
exp = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient, 0); 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); 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, this.destructionRange * 2, this.coefficient, 1); vap = new ExplosionNukeAdvanced((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, (int)(this.destructionRange * 2.5), this.coefficient, 1);
} else { } else {
expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient); expl = new ExplosionFleija((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange, this.coefficient);
} }

View File

@ -7,6 +7,7 @@ import java.util.Random;
import net.minecraft.enchantment.EnchantmentProtection; import net.minecraft.enchantment.EnchantmentProtection;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
@ -22,6 +23,8 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.entity.EntityMiniNuke; import com.hbm.entity.EntityMiniNuke;
import com.hbm.entity.EntityMirv; import com.hbm.entity.EntityMirv;
import com.hbm.entity.EntityNukeCloudSmall; import com.hbm.entity.EntityNukeCloudSmall;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
public class ExplosionNukeGeneric { public class ExplosionNukeGeneric {
@ -115,7 +118,7 @@ public class ExplosionNukeGeneric {
d6 = entity.posY + entity.getEyeHeight() - y; d6 = entity.posY + entity.getEyeHeight() - y;
d7 = entity.posZ - z; d7 = entity.posZ - z;
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); 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; d5 /= d9;
d6 /= d9; d6 /= d9;

View File

@ -12,6 +12,8 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.ISpecialArmor;
import com.hbm.lib.Library;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
public class ArmorEuphemium extends ItemArmor implements ISpecialArmor { public class ArmorEuphemium extends ItemArmor implements ISpecialArmor {
@ -36,10 +38,11 @@ public class ArmorEuphemium extends ItemArmor implements ISpecialArmor {
@Override @Override
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) {
//if(source == source.inFire || source == source.lava || source == source.onFire) { 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(1, 1, MathHelper.floor_double(999999999));
//return new ArmorProperties(0, 0, 0); }
return new ArmorProperties(0, 0, 0);
} }
@Override @Override
@ -71,15 +74,18 @@ public class ArmorEuphemium extends ItemArmor implements ISpecialArmor {
@Override @Override
public void onArmorTick(World world, EntityPlayer player, ItemStack armor) { public void onArmorTick(World world, EntityPlayer player, ItemStack armor) {
player.addPotionEffect(new PotionEffect(Potion.regeneration.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.resistance.id, 1, 127)); {
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 1, 127)); player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5, 127, true));
player.addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 1, 127)); 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) if(player.motionY < -0.25D)
{ {
player.motionY = -0.25D; player.motionY = -0.25D;
} }
}
} }
@Override @Override

View File

@ -80,25 +80,25 @@ public class ArmorSchrabidium extends ItemArmor implements ISpecialArmor {
if(armor.getItem() == ModItems.schrabidium_helmet) if(armor.getItem() == ModItems.schrabidium_helmet)
{ {
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 5, 0)); player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 5, 0, true));
player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 5, 9)); player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 5, 9, true));
} }
if(armor.getItem() == ModItems.schrabidium_plate) if(armor.getItem() == ModItems.schrabidium_plate)
{ {
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5, 0)); player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 5, 0, true));
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 5, 0)); player.addPotionEffect(new PotionEffect(Potion.resistance.id, 5, 0, true));
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 5, 0)); player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 5, 0, true));
} }
if(armor.getItem() == ModItems.schrabidium_legs) 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) 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));
} }
} }

View File

@ -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) 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.jump.id, 5, 0, true));
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 1, 1)); player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 5, 1, true));
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 1, 2)); player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 5, 2, true));
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 1, 0)); player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 5, 0, true));
} else { } else {
player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 1, 1)); player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 5, 1, true));
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 1, 0)); player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 5, 0, true));
} }
} }
} }

View File

@ -7,6 +7,8 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World; import net.minecraft.world.World;
public class ItemStarterKit extends Item { public class ItemStarterKit extends Item {
@ -316,6 +318,22 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.fusion_core, 1)); 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; return stack;
} }

View File

@ -2,6 +2,7 @@ package com.hbm.items;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item; 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(this == ModItems.syringe_metal_stimpak)
{ {
if (!world.isRemote) 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; return stack;
} }
@ -109,4 +173,136 @@ public class ItemSyringe extends Item {
return EnumRarity.common; 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;
}
} }

View File

@ -164,9 +164,13 @@ public class ModItems {
public static Item syringe_empty; public static Item syringe_empty;
public static Item syringe_antidote; public static Item syringe_antidote;
public static Item syringe_poison;
public static Item syringe_awesome; public static Item syringe_awesome;
public static Item syringe_metal_empty; public static Item syringe_metal_empty;
public static Item syringe_metal_stimpak; 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_empty;
public static Item rod_uranium; public static Item rod_uranium;
@ -403,6 +407,7 @@ public class ModItems {
public static Item prototype_kit; public static Item prototype_kit;
public static Item missile_kit; public static Item missile_kit;
public static Item t45_kit; public static Item t45_kit;
public static Item euphemium_kit;
public static Item igniter; 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_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_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_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_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_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_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"); 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"); 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"); 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"); 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"); 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"); ingot_euphemium = new ItemCustomLore().setUnlocalizedName("ingot_euphemium").setTextureName(RefStrings.MODID + ":ingot_euphemium");
@ -1133,9 +1143,13 @@ public class ModItems {
//Syringes //Syringes
GameRegistry.registerItem(syringe_empty, syringe_empty.getUnlocalizedName()); GameRegistry.registerItem(syringe_empty, syringe_empty.getUnlocalizedName());
GameRegistry.registerItem(syringe_antidote, syringe_antidote.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_awesome, syringe_awesome.getUnlocalizedName());
GameRegistry.registerItem(syringe_metal_empty, syringe_metal_empty.getUnlocalizedName()); GameRegistry.registerItem(syringe_metal_empty, syringe_metal_empty.getUnlocalizedName());
GameRegistry.registerItem(syringe_metal_stimpak, syringe_metal_stimpak.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 //Food
GameRegistry.registerItem(bomb_waffle, bomb_waffle.getUnlocalizedName()); GameRegistry.registerItem(bomb_waffle, bomb_waffle.getUnlocalizedName());
@ -1225,5 +1239,6 @@ public class ModItems {
GameRegistry.registerItem(missile_kit, missile_kit.getUnlocalizedName()); GameRegistry.registerItem(missile_kit, missile_kit.getUnlocalizedName());
GameRegistry.registerItem(grenade_kit, grenade_kit.getUnlocalizedName()); GameRegistry.registerItem(grenade_kit, grenade_kit.getUnlocalizedName());
GameRegistry.registerItem(t45_kit, t45_kit.getUnlocalizedName()); GameRegistry.registerItem(t45_kit, t45_kit.getUnlocalizedName());
GameRegistry.registerItem(euphemium_kit, euphemium_kit.getUnlocalizedName());
} }
} }

View File

@ -40,7 +40,6 @@ public class HbmChestContents {
private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[]
{new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 1, 1, 1), {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_gold, 0, 1, 2, 3),
new WeightedRandomChestContent(ModItems.circuit_schrabidium, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.circuit_schrabidium, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.nuke_starter_kit, 0, 1, 1, 2), 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.battery_schrabidium, 1000, 1, 1, 1),
new WeightedRandomChestContent(ModItems.syringe_awesome, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.syringe_awesome, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.fusion_core, 0, 1, 1, 4), 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[] private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[]
{new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5), {new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5),

View File

@ -127,7 +127,7 @@ public class Library {
public static boolean checkForHazmat(EntityPlayer player) { 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; return true;
} }
@ -149,6 +149,10 @@ public class Library {
{ {
return true; return true;
} }
if(checkArmorPiece(player, ModItems.euphemium_helmet, 3))
{
return true;
}
return false; return false;
} }

View File

@ -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[] { "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[] { "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_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[] { "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_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_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_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_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) }); 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_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.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_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_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 }); GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.hazmat_cloth });

View File

@ -17,6 +17,7 @@ import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelBox; import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
public class ModelGasMask extends ModelBiped public class ModelGasMask extends ModelBiped
{ {
@ -64,11 +65,16 @@ public class ModelGasMask extends ModelBiped
@Override @Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) 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); super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
this.bipedHead.rotationPointX = 0.0F; this.mask.rotationPointX = bipedHead.rotationPointX;
this.bipedHead.rotationPointY = 0.0F; this.mask.rotationPointY = bipedHead.rotationPointY;
this.mask.rotationPointX = 0.0F;
this.mask.rotationPointY = 0.0F;
this.mask.rotateAngleX = bipedHead.rotateAngleX - 45; this.mask.rotateAngleX = bipedHead.rotateAngleX - 45;
} }
@Override @Override

View File

@ -16,6 +16,7 @@ import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
public class ModelGoggles extends ModelBiped public class ModelGoggles extends ModelBiped
{ {
@ -61,9 +62,14 @@ public class ModelGoggles extends ModelBiped
@Override @Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) 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); 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.rotateAngleY = this.bipedHead.rotateAngleY;
this.bipedHead.rotateAngleX = this.bipedHead.rotateAngleX; this.bipedHead.rotateAngleX = this.bipedHead.rotateAngleX;
} }

View File

@ -11,6 +11,8 @@
package com.hbm.render; package com.hbm.render;
import java.util.ArrayList;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelBiped;
@ -22,21 +24,13 @@ public class ModelT45Helmet extends ModelBiped
{ {
//fields //fields
ModelRenderer helmet; ModelRenderer helmet;
ModelRenderer Shape1;
ModelRenderer Shape2;
ModelRenderer Shape3;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape6;
ModelRenderer Shape7;
ModelRenderer Shape8;
public ModelT45Helmet() public ModelT45Helmet()
{ {
textureWidth = 64; textureWidth = 64;
textureHeight = 32; textureHeight = 32;
helmet = new ModelRenderer(this, 0, 0); /*helmet = new ModelRenderer(this, 0, 0);
Shape1 = new ModelRenderer(this, 0, 0); Shape1 = new ModelRenderer(this, 0, 0);
Shape1.addBox(0F, 0F, 0F, 8, 8, 8); Shape1.addBox(0F, 0F, 0F, 8, 8, 8);
Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 4, -4F); 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.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 4, -4.5F);
Shape8.setTextureSize(64, 32); Shape8.setTextureSize(64, 32);
Shape8.mirror = true; 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) /*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.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); super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
this.helmet.rotationPointX = this.bipedHead.rotationPointX; this.helmet.rotationPointX = bipedHead.rotationPointX;
this.helmet.rotationPointY = this.bipedHead.rotationPointY; this.helmet.rotationPointY = bipedHead.rotationPointY;
this.helmet.rotateAngleY = this.bipedHead.rotateAngleY; this.helmet.rotateAngleX = bipedHead.rotateAngleX - 45;
this.helmet.rotateAngleX = this.bipedHead.rotateAngleX;
} }
@Override @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); setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
GL11.glPushMatrix(); 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); 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(Shape2);
this.helmet.addChild(Shape3); this.helmet.addChild(Shape3);
this.helmet.addChild(Shape4); 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(Shape6);
this.helmet.addChild(Shape7); this.helmet.addChild(Shape7);
this.helmet.addChild(Shape8); this.helmet.addChild(Shape8);
this.helmet.render(par7); this.helmet.render(par7);*/
GL11.glPopMatrix(); GL11.glPopMatrix();
} }