diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index f9493992f..6e09105aa 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -10,6 +10,7 @@ death.attack.euthanized=%1$s wurde von %2$s eingeschläfert. death.attack.euthanizedSelf=%1$s hat sich selbst eingeschläfert, was für ein Vollpfosten. death.attack.euthanizedSelf2=%1$s gewinnt den Darwin Award. death.attack.tau=%1$s wurde von %2$s mit negativ geladenen Tauonen durchsiebt. +death.attack.tauBlast=%1$s lud die XVL1456 zu lange auf und wurde in Stücke gerissen. item.redstone_sword.name=Redstoneschwert item.big_sword.name=Großes Schwert @@ -182,6 +183,7 @@ item.ingot_advanced_alloy.name=Fortgeschrittene Legierung item.plate_advanced_alloy.name=Fortgeschrittene Legierungsplatte item.wire_advanced_alloy.name=Supraleiter item.coil_advanced_alloy.name=Supraleitende Magnetspule +item.coil_advanced_torus.name=Supraleitende Ringspule item.lithium.name=Lithiumwürfel item.nugget_u235.name=U235-Nugget @@ -478,6 +480,7 @@ item.gun_revolver_gold.name=Goldener Revolver item.gun_revolver_schrabidium.name=Schrabidiumrevolver item.gun_revolver_cursed.name=Verfluchte Pistole item.gun_fatman.name=M42 Nukleares Katapult "Fat Man" +item.gun_xvl1456.name=XVL1456 Tau-Kanone Prototyp item.gun_revolver_iron_ammo.name=Patrone item.gun_revolver_ammo.name=Bleipatrone @@ -485,6 +488,7 @@ item.gun_revolver_gold_ammo.name=Goldene Kugel item.gun_revolver_schrabidium_ammo.name=Schrabidiumpatrone item.gun_revolver_cursed_ammo.name=Stahlpatrone item.gun_fatman_ammo.name=Miniatombombe +item.gun_xvl1456_ammo.name=Kiste mit erschöpftem Uran-235 tile.block_schrabidium.name=Schrabidiumblock item.plate_gold.name=Goldplatte diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index c06ce1ad5..a2b12e133 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -10,6 +10,7 @@ death.attack.euthanized=%1$s was euthanized by %2$s. death.attack.euthanizedSelf=%1$s euthanized himself, what a dork. death.attack.euthanizedSelf2=%1$s wins the Darwin Award. death.attack.tau=%1$s was riddeled by %2$s using negatively charged tauons. +death.attack.tauBlast=%1$s charged the XVL1456 for too long and was blown into pieces. item.redstone_sword.name=Redstone Sword item.big_sword.name=Great Sword @@ -44,8 +45,8 @@ item.mike_cooling_unit.name=Deuterium Cooling Unit item.tsar_core.name=Tsar Bomba Core -item.fleija_igniter.name=Pulseigniter -item.fleija_propellant.name=Schrabidiumpropellant +item.fleija_igniter.name=Pulse Igniter +item.fleija_propellant.name=Schrabidium Propellant item.fleija_core.name=F.L.E.I.J.A. Uranium 235 Charge container.nukeGadget=The Gadget @@ -182,6 +183,7 @@ item.ingot_advanced_alloy.name=Advanced Alloy Ingot item.plate_advanced_alloy.name=Advanced Alloy Plate item.wire_advanced_alloy.name=Super Conductor item.coil_advanced_alloy.name=Super Conducting Coil +item.coil_advanced_torus.name=Super Conducting Ring Coil item.lithium.name=Lithium Cube item.nugget_u235.name=U235 Nugget @@ -478,6 +480,7 @@ item.gun_revolver_gold.name=Golden Revolver item.gun_revolver_schrabidium.name=Schrabidium Revolver item.gun_revolver_cursed.name=Cursed Revolver item.gun_fatman.name=M42 Nuclear Catapult "Fat Man" +item.gun_xvl1456.name=XVL1456 Tau Cannon Prototype item.gun_revolver_iron_ammo.name=Bullet item.gun_revolver_ammo.name=Lead Bullet @@ -485,6 +488,7 @@ item.gun_revolver_gold_ammo.name=Golden Bullet item.gun_revolver_schrabidium_ammo.name=Schrabidium Bullet item.gun_revolver_cursed_ammo.name=Steel Bullet item.gun_fatman_ammo.name=Mini Nuke +item.gun_xvl1456_ammo.name=Depleted Uranium-235 Box tile.block_schrabidium.name=Block of Schrabidium item.plate_gold.name=Gold Plate diff --git a/assets/hbm/textures/items/coil_advanced_torus.png b/assets/hbm/textures/items/coil_advanced_torus.png new file mode 100644 index 000000000..d46cb0e95 Binary files /dev/null and b/assets/hbm/textures/items/coil_advanced_torus.png differ diff --git a/assets/hbm/textures/items/gun_xvl1456.png b/assets/hbm/textures/items/gun_xvl1456.png new file mode 100644 index 000000000..6507efa70 Binary files /dev/null and b/assets/hbm/textures/items/gun_xvl1456.png differ diff --git a/assets/hbm/textures/items/gun_xvl1456_ammo.png b/assets/hbm/textures/items/gun_xvl1456_ammo.png new file mode 100644 index 000000000..77ed27a29 Binary files /dev/null and b/assets/hbm/textures/items/gun_xvl1456_ammo.png differ diff --git a/assets/hbm/textures/models/ModelXVL1456.png b/assets/hbm/textures/models/ModelXVL1456.png index fd3f90d76..0faabee24 100644 Binary files a/assets/hbm/textures/models/ModelXVL1456.png and b/assets/hbm/textures/models/ModelXVL1456.png differ diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index 04d124dac..73007a3ca 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -464,7 +464,7 @@ public class ModBlocks { mud_fluid = new MudFluid().setDensity(2500).setViscosity(3000).setLuminosity(5).setTemperature(2773).setUnlocalizedName("mud_fluid"); FluidRegistry.registerFluid(mud_fluid); - mud_block = new MudBlock(mud_fluid, fluidmud.setReplaceable(), ModDamageSource.mudPoisoning).setBlockName("mud_block"); + mud_block = new MudBlock(mud_fluid, fluidmud.setReplaceable(), ModDamageSource.mudPoisoning).setBlockName("mud_block").setResistance(500F); } private static void registerBlock() { diff --git a/com/hbm/entity/EntityBullet.java b/com/hbm/entity/EntityBullet.java index 9a887e286..cb92d5110 100644 --- a/com/hbm/entity/EntityBullet.java +++ b/com/hbm/entity/EntityBullet.java @@ -8,6 +8,7 @@ import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; +import net.minecraft.entity.item.EntityItemFrame; import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -31,661 +32,642 @@ import com.hbm.lib.ModDamageSource; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class EntityBullet extends Entity implements IProjectile -{ - private int field_145791_d = -1; - private int field_145792_e = -1; - private int field_145789_f = -1; - public double gravity = 0.0D; - private Block field_145790_g; - private int inData; - private boolean inGround; - /** 1 if the player can pick up the arrow */ - public int canBePickedUp; - /** Seems to be some sort of timer for animating an arrow. */ - public int arrowShake; - /** The owner of this arrow. */ - public Entity shootingEntity; - private int ticksInGround; - private int ticksInAir; - public double damage; - /** The amount of knockback an arrow applies when it hits a mob. */ - private int knockbackStrength; - private static final String __OBFID = "CL_00001715"; - private int dmgMin = 0; - private int dmgMax = 1; - private boolean isTau = false; - private boolean instakill = false; - +public class EntityBullet extends Entity implements IProjectile { + private int field_145791_d = -1; + private int field_145792_e = -1; + private int field_145789_f = -1; + public double gravity = 0.0D; + private Block field_145790_g; + private int inData; + private boolean inGround; + /** 1 if the player can pick up the arrow */ + public int canBePickedUp; + /** Seems to be some sort of timer for animating an arrow. */ + public int arrowShake; + /** The owner of this arrow. */ + public Entity shootingEntity; + private int ticksInGround; + private int ticksInAir; + public double damage; + /** The amount of knockback an arrow applies when it hits a mob. */ + private int knockbackStrength; + private static final String __OBFID = "CL_00001715"; + private int dmgMin = 0; + private int dmgMax = 1; + private boolean isTau = false; + private boolean instakill = false; - public EntityBullet(World p_i1753_1_) - { - super(p_i1753_1_); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - } + public EntityBullet(World p_i1753_1_) { + super(p_i1753_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } - public EntityBullet(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) - { - super(p_i1754_1_); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); - this.yOffset = 0.0F; - } + public EntityBullet(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) { + super(p_i1754_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); + this.yOffset = 0.0F; + } - public EntityBullet(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) - { - super(p_i1755_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1755_2_; + public EntityBullet(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, + float p_i1755_5_) { + super(p_i1755_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1755_2_; - if (p_i1755_2_ instanceof EntityPlayer) - { - this.canBePickedUp = 1; - } + if (p_i1755_2_ instanceof EntityPlayer) { + this.canBePickedUp = 1; + } - this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; - double d0 = p_i1755_3_.posX - p_i1755_2_.posX; - double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; - double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; - double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + double d0 = p_i1755_3_.posX - p_i1755_2_.posX; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; + double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); - if (d3 >= 1.0E-7D) - { - float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); - double d4 = d0 / d3; - double d5 = d2 / d3; - this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); - this.yOffset = 0.0F; - float f4 = (float)d3 * 0.2F; - this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); - } - } + if (d3 >= 1.0E-7D) { + float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI)); + double d4 = d0 / d3; + double d5 = d2 / d3; + this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float) d3 * 0.2F; + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); + } + } - public EntityBullet(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, boolean instakill) - { - super(p_i1756_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1756_2_; + public EntityBullet(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, + boolean instakill) { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; - if (p_i1756_2_ instanceof EntityPlayer) - { - this.canBePickedUp = 1; - } + if (p_i1756_2_ instanceof EntityPlayer) { + this.canBePickedUp = 1; + } - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); - this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; - this.posY -= 0.10000000149011612D; - this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; - this.setPosition(this.posX, this.posY, this.posZ); - this.yOffset = 0.0F; - this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); - this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); - this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); - this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); - - //this.dmgMin = dmgMin; - //this.dmgMax = dmgMax; - this.instakill = instakill; - } + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, + p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) + * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) + * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); - public EntityBullet(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, boolean instakill, String isTau) - { - super(p_i1756_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1756_2_; + // this.dmgMin = dmgMin; + // this.dmgMax = dmgMax; + this.instakill = instakill; + } - if (p_i1756_2_ instanceof EntityPlayer) - { - this.canBePickedUp = 1; - } + public EntityBullet(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, + boolean instakill, String isTau) { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); - this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; - this.posY -= 0.10000000149011612D; - this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; - this.setPosition(this.posX, this.posY, this.posZ); - this.yOffset = 0.0F; - this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); - this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); - this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); - this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); - this.setTau(isTau == "tauDay"); - this.setIsCritical(true); - } + if (p_i1756_2_ instanceof EntityPlayer) { + this.canBePickedUp = 1; + } - public EntityBullet(World world, int x, int y, int z, double mx, double my, double mz, double grav) { - super(world); - this.posX = x + 0.5F; - this.posY = y + 0.5F; - this.posZ = z + 0.5F; - - this.motionX = mx; - this.motionY = my; - this.motionZ = mz; - - this.gravity = grav; - } + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, + p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) + * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) + * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + this.setTau(isTau == "tauDay"); + this.setIsCritical(true); + } - @Override - protected void entityInit() - { - this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); - this.dataWatcher.addObject(17, Byte.valueOf((byte)0)); - } + public EntityBullet(World world, int x, int y, int z, double mx, double my, double mz, double grav) { + super(world); + this.posX = x + 0.5F; + this.posY = y + 0.5F; + this.posZ = z + 0.5F; - /** - * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. - */ - @Override - public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) - { - float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); - p_70186_1_ /= f2; - p_70186_3_ /= f2; - p_70186_5_ /= f2; - p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; - p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; - p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; - p_70186_1_ *= p_70186_7_; - p_70186_3_ *= p_70186_7_; - p_70186_5_ *= p_70186_7_; - this.motionX = p_70186_1_; - this.motionY = p_70186_3_; - this.motionZ = p_70186_5_; - float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); - this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); - this.ticksInGround = 0; - } + this.motionX = mx; + this.motionY = my; + this.motionZ = mz; - /** - * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, - * posY, posZ, yaw, pitch - */ - @Override + this.gravity = grav; + } + + @Override + protected void entityInit() { + this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + this.dataWatcher.addObject(17, Byte.valueOf((byte) 0)); + } + + /** + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z + * direction. + */ + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, + float p_70186_8_) { + float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D + * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D + * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D + * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; + this.motionX = p_70186_1_; + this.motionY = p_70186_3_; + this.motionZ = p_70186_5_; + float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); + this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); + this.ticksInGround = 0; + } + + /** + * Sets the position and rotation. Only difference from the other one is no + * bounding on the rotation. Args: posX, posY, posZ, yaw, pitch + */ + @Override @SideOnly(Side.CLIENT) - public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) - { - this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); - this.setRotation(p_70056_7_, p_70056_8_); - } + public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, + float p_70056_8_, int p_70056_9_) { + this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); + this.setRotation(p_70056_7_, p_70056_8_); + } - /** - * Sets the velocity to the args. Args: x, y, z - */ - @Override + /** + * Sets the velocity to the args. Args: x, y, z + */ + @Override @SideOnly(Side.CLIENT) - public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) - { - this.motionX = p_70016_1_; - this.motionY = p_70016_3_; - this.motionZ = p_70016_5_; + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; - if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) - { - float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); - this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); - this.prevRotationPitch = this.rotationPitch; - this.prevRotationYaw = this.rotationYaw; - this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); - this.ticksInGround = 0; - } - } + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { + float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); + this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch; + this.prevRotationYaw = this.rotationYaw; + this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.ticksInGround = 0; + } + } - /** - * Called to update the entity's position/logic. - */ - //@Override - @Override - public void onUpdate() - { - super.onUpdate(); + /** + * Called to update the entity's position/logic. + */ + // @Override + @Override + public void onUpdate() { + super.onUpdate(); - if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) - { - float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - //this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); - } + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { + float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D + / Math.PI); + // this.prevRotationPitch = this.rotationPitch = + // (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); + } - Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); - if (block.getMaterial() != Material.air) - { - block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + if (block.getMaterial() != Material.air) { + block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, + this.field_145789_f); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, + this.field_145792_e, this.field_145789_f); - if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)) && !this.getIsCritical()) - { - this.inGround = true; - } - - if(block == ModBlocks.red_barrel) - { - ((RedBarrel)block).explode(worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - } - - if(block == Blocks.glass || block == Blocks.stained_glass || block == Blocks.glass_pane || block == Blocks.stained_glass_pane) - { - this.worldObj.setBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f, Blocks.air); - this.worldObj.playSound(this.field_145791_d, this.field_145792_e, this.field_145789_f, "dig.glass", 1.0F, 1.0F, true); - } - } + if (axisalignedbb != null + && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)) + && !this.getIsCritical()) { + this.inGround = true; + } - if (this.arrowShake > 0) - { - --this.arrowShake; - } + if (block == ModBlocks.red_barrel) { + ((RedBarrel) block).explode(worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + } - if (this.inGround && !this.getIsCritical()) - { - this.setDead(); - } - else - { - ++this.ticksInAir; - Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); - MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); - vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); - vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + if (block == Blocks.glass || block == Blocks.stained_glass || block == Blocks.glass_pane + || block == Blocks.stained_glass_pane) { + this.worldObj.setBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f, Blocks.air); + this.worldObj.playSound(this.field_145791_d, this.field_145792_e, this.field_145789_f, "dig.glass", + 1.0F, 1.0F, true); + } + } - if (movingobjectposition != null) - { - vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } + if (this.arrowShake > 0) { + --this.arrowShake; + } - Entity entity = null; - List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); - double d0 = 0.0D; - int i; - float f1; + if (this.inGround && !this.getIsCritical()) { + this.setDead(); + } else { + ++this.ticksInAir; + Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, + this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); + vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, + this.posZ + this.motionZ); - for (i = 0; i < list.size(); ++i) - { - Entity entity1 = (Entity)list.get(i); + if (movingobjectposition != null) { + vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, + movingobjectposition.hitVec.zCoord); + } - if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) - { - f1 = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); - MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, + this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int i; + float f1; - if (movingobjectposition1 != null) - { - double d1 = vec31.distanceTo(movingobjectposition1.hitVec); + for (i = 0; i < list.size(); ++i) { + Entity entity1 = (Entity) list.get(i); - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } + if (movingobjectposition1 != null) { + double d1 = vec31.distanceTo(movingobjectposition1.hitVec); - if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) - { - EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; - - if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) - { - movingobjectposition = null; - } - } - - float f2; - float f4; - - if (movingobjectposition != null) - { - if (movingobjectposition.entityHit != null) - { - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - int k = MathHelper.ceiling_double_int(f2 * this.damage); - - if (this.getIsCritical()) - { - k += this.rand.nextInt(k / 2 + 2); - } - - DamageSource damagesource = null; - - if (!this.getIsCritical()) { - if (this.shootingEntity == null) { - damagesource = ModDamageSource.causeBulletDamage(this, this); - } else { - damagesource = ModDamageSource.causeBulletDamage(this, shootingEntity); - } - } else { - if (this.shootingEntity == null) { - damagesource = ModDamageSource.causeTauDamage(this, this); - } else { - damagesource = ModDamageSource.causeTauDamage(this, shootingEntity); + if (d1 < d0 || d0 == 0.0D) { + entity = entity1; + d0 = d1; } } + } + } - if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) - { - movingobjectposition.entityHit.setFire(5); - } + if (entity != null) { + movingobjectposition = new MovingObjectPosition(entity); + } - if (movingobjectposition.entityHit.attackEntityFrom(damagesource, /*(float)k*/(float)damage)) - { - if (movingobjectposition.entityHit instanceof EntityLivingBase) - { - EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; + if (movingobjectposition != null && movingobjectposition.entityHit != null + && movingobjectposition.entityHit instanceof EntityPlayer) { + EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit; - if (this.knockbackStrength > 0) - { - f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer + && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) { + movingobjectposition = null; + } + } - if (f4 > 0.0F) - { - movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); - } - } + float f2; + float f4; - if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) - { - EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); - EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); - } + if (movingobjectposition != null) { + if (movingobjectposition.entityHit != null) { + //TODO: Remove test feature in retail version + if (!(movingobjectposition.entityHit instanceof EntityItemFrame) + || movingobjectposition.entityHit instanceof EntityItemFrame + && (((EntityItemFrame) movingobjectposition.entityHit).getDisplayedItem() == null + || ((EntityItemFrame) movingobjectposition.entityHit) + .getDisplayedItem() != null + && ((EntityItemFrame) movingobjectposition.entityHit) + .getDisplayedItem().getItem() != ModItems.flame_pony)) { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + + this.motionZ * this.motionZ); + int k = MathHelper.ceiling_double_int(f2 * this.damage); - if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) - { - ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); - } - } + if (this.getIsCritical()) { + k += this.rand.nextInt(k / 2 + 2); + } + DamageSource damagesource = null; - if (!(movingobjectposition.entityHit instanceof EntityEnderman)) - { - if (!this.worldObj.isRemote) - { - if(!instakill || movingobjectposition.entityHit instanceof EntityPlayer) - { - //movingobjectposition.entityHit.attackEntityFrom(DamageSource.generic, dmgMin + rand.nextInt(dmgMax - dmgMin)); - } else if(movingobjectposition.entityHit instanceof EntityLivingBase) { - ((EntityLivingBase)movingobjectposition.entityHit).setHealth(0.0F); - } - } - if(!this.getIsCritical()) - this.setDead(); - } - } - else if(!this.getIsCritical()) - { - this.motionX *= -0.10000000149011612D; - this.motionY *= -0.10000000149011612D; - this.motionZ *= -0.10000000149011612D; - this.rotationYaw += 180.0F; - this.prevRotationYaw += 180.0F; - this.ticksInAir = 0; - } - } - else if(!this.getIsCritical()) - { - this.field_145791_d = movingobjectposition.blockX; - this.field_145792_e = movingobjectposition.blockY; - this.field_145789_f = movingobjectposition.blockZ; - this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); - this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); - this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); - this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); - this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - this.posX -= this.motionX / f2 * 0.05000000074505806D; - this.posY -= this.motionY / f2 * 0.05000000074505806D; - this.posZ -= this.motionZ / f2 * 0.05000000074505806D; - this.inGround = true; - this.arrowShake = 7; + if (!this.getIsCritical()) { + if (this.shootingEntity == null) { + damagesource = ModDamageSource.causeBulletDamage(this, this); + } else { + damagesource = ModDamageSource.causeBulletDamage(this, shootingEntity); + } + } else { + if (this.shootingEntity == null) { + damagesource = ModDamageSource.causeTauDamage(this, this); + } else { + damagesource = ModDamageSource.causeTauDamage(this, shootingEntity); + } + } - if (this.field_145790_g.getMaterial() != Material.air) - { - this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); - } - } - } + if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) { + movingobjectposition.entityHit.setFire(5); + } - if (this.getIsCritical()) - { - for (i = 0; i < 8; ++i) - { - if(!this.getIsTau()) - this.worldObj.spawnParticle("fireworksSpark", this.posX + this.motionX * (double)i / 8.0D, this.posY + this.motionY * (double)i / 8.0D, this.posZ + this.motionZ * (double)i / 8.0D, 0, 0, 0/*-this.motionX, -this.motionY + 0.2D, -this.motionZ*/); - else - this.worldObj.spawnParticle("reddust", this.posX + this.motionX * (double)i / 8.0D, this.posY + this.motionY * (double)i / 8.0D, this.posZ + this.motionZ * (double)i / 8.0D, 0, 0, 0/*-this.motionX, -this.motionY + 0.2D, -this.motionZ*/); - } - } + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, + /* (float)k */(float) damage)) { + if (movingobjectposition.entityHit instanceof EntityLivingBase) { + EntityLivingBase entitylivingbase = (EntityLivingBase) movingobjectposition.entityHit; - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + if (this.knockbackStrength > 0) { + f4 = MathHelper + .sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - //for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) - { - ; - } + if (f4 > 0.0F) { + movingobjectposition.entityHit.addVelocity( + this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, + this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); + } + } - /*while (this.rotationPitch - this.prevRotationPitch >= 180.0F) - { - this.prevRotationPitch += 360.0F; - } + if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) { + EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); + EnchantmentHelper.func_151385_b((EntityLivingBase) this.shootingEntity, + entitylivingbase); + } - while (this.rotationYaw - this.prevRotationYaw < -180.0F) - { - this.prevRotationYaw -= 360.0F; - } + if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity + && movingobjectposition.entityHit instanceof EntityPlayer + && this.shootingEntity instanceof EntityPlayerMP) { + ((EntityPlayerMP) this.shootingEntity).playerNetServerHandler + .sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + } + } - while (this.rotationYaw - this.prevRotationYaw >= 180.0F) - { - this.prevRotationYaw += 360.0F; - }*/ + if (!(movingobjectposition.entityHit instanceof EntityEnderman)) { + if (!this.worldObj.isRemote) { + if (!instakill || movingobjectposition.entityHit instanceof EntityPlayer) { + // movingobjectposition.entityHit.attackEntityFrom(DamageSource.generic, + // dmgMin + rand.nextInt(dmgMax - + // dmgMin)); + } else if (movingobjectposition.entityHit instanceof EntityLivingBase) { + ((EntityLivingBase) movingobjectposition.entityHit).setHealth(0.0F); + } + } + if (!this.getIsCritical()) + this.setDead(); + } + } else if (!this.getIsCritical()) { + this.motionX *= -0.10000000149011612D; + this.motionY *= -0.10000000149011612D; + this.motionZ *= -0.10000000149011612D; + this.rotationYaw += 180.0F; + this.prevRotationYaw += 180.0F; + this.ticksInAir = 0; + } + } + } else if (!this.getIsCritical()) { + this.field_145791_d = movingobjectposition.blockX; + this.field_145792_e = movingobjectposition.blockY; + this.field_145789_f = movingobjectposition.blockZ; + this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, + this.field_145789_f); + this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, + this.field_145789_f); + this.motionX = ((float) (movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = ((float) (movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = ((float) (movingobjectposition.hitVec.zCoord - this.posZ)); + f2 = MathHelper.sqrt_double( + this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / f2 * 0.05000000074505806D; + this.posY -= this.motionY / f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / f2 * 0.05000000074505806D; + this.inGround = true; + this.arrowShake = 7; - //this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; - //this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; - float f3 = 0.99F; - f1 = 0.05F; + if (this.field_145790_g.getMaterial() != Material.air) { + this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, + this.field_145792_e, this.field_145789_f, this); + } + } + } - if (this.isInWater()) - { - for (int l = 0; l < 4; ++l) - { - f4 = 0.25F; - this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ); - } + if (this.getIsCritical()) { + for (i = 0; i < 8; ++i) { + if (!this.getIsTau()) + this.worldObj.spawnParticle("fireworksSpark", this.posX + this.motionX * (double) i / 8.0D, + this.posY + this.motionY * (double) i / 8.0D, + this.posZ + this.motionZ * (double) i / 8.0D, 0, 0, + 0/*-this.motionX, -this.motionY + 0.2D, -this.motionZ*/); + else + this.worldObj.spawnParticle("reddust", this.posX + this.motionX * (double) i / 8.0D, + this.posY + this.motionY * (double) i / 8.0D, + this.posZ + this.motionZ * (double) i / 8.0D, 0, 0, + 0/*-this.motionX, -this.motionY + 0.2D, -this.motionZ*/); + } + } - f3 = 0.8F; - } + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); - if (this.isWet()) - { - this.extinguish(); - } + // for (this.rotationPitch = (float)(Math.atan2(this.motionY, + // (double)f2) * 180.0D / Math.PI); this.rotationPitch - + // this.prevRotationPitch < -180.0F; this.prevRotationPitch -= + // 360.0F) + { + ; + } - this.motionX *= f3; - this.motionY *= f3; - this.motionZ *= f3; - this.motionY -= gravity; - this.setPosition(this.posX, this.posY, this.posZ); - this.func_145775_I(); - } + /* + * while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { + * this.prevRotationPitch += 360.0F; } + * + * while (this.rotationYaw - this.prevRotationYaw < -180.0F) { + * this.prevRotationYaw -= 360.0F; } + * + * while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { + * this.prevRotationYaw += 360.0F; } + */ - if(this.ticksExisted > 250) - this.setDead(); - } + // this.rotationPitch = this.prevRotationPitch + (this.rotationPitch + // - this.prevRotationPitch) * 0.2F; + // this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - + // this.prevRotationYaw) * 0.2F; + float f3 = 0.99F; + f1 = 0.05F; - /** - * (abstract) Protected helper method to write subclass entity data to NBT. - */ - @Override - public void writeEntityToNBT(NBTTagCompound p_70014_1_) - { - p_70014_1_.setShort("xTile", (short)this.field_145791_d); - p_70014_1_.setShort("yTile", (short)this.field_145792_e); - p_70014_1_.setShort("zTile", (short)this.field_145789_f); - p_70014_1_.setShort("life", (short)this.ticksInGround); - p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); - p_70014_1_.setByte("inData", (byte)this.inData); - p_70014_1_.setByte("shake", (byte)this.arrowShake); - p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); - p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); - p_70014_1_.setDouble("damage", this.damage); - } + if (this.isInWater()) { + for (int l = 0; l < 4; ++l) { + f4 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, + this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ); + } - /** - * (abstract) Protected helper method to read subclass entity data from NBT. - */ - @Override - public void readEntityFromNBT(NBTTagCompound p_70037_1_) - { - this.field_145791_d = p_70037_1_.getShort("xTile"); - this.field_145792_e = p_70037_1_.getShort("yTile"); - this.field_145789_f = p_70037_1_.getShort("zTile"); - this.ticksInGround = p_70037_1_.getShort("life"); - this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); - this.inData = p_70037_1_.getByte("inData") & 255; - this.arrowShake = p_70037_1_.getByte("shake") & 255; - this.inGround = p_70037_1_.getByte("inGround") == 1; + f3 = 0.8F; + } - if (p_70037_1_.hasKey("damage", 99)) - { - this.damage = p_70037_1_.getDouble("damage"); - } + if (this.isWet()) { + this.extinguish(); + } - if (p_70037_1_.hasKey("pickup", 99)) - { - this.canBePickedUp = p_70037_1_.getByte("pickup"); - } - else if (p_70037_1_.hasKey("player", 99)) - { - this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; - } - } + this.motionX *= f3; + this.motionY *= f3; + this.motionZ *= f3; + this.motionY -= gravity; + this.setPosition(this.posX, this.posY, this.posZ); + this.func_145775_I(); + } - /** - * Called by a player entity when they collide with an entity - */ - @Override - public void onCollideWithPlayer(EntityPlayer p_70100_1_) - { - if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) - { - boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; + if (this.ticksExisted > 250) + this.setDead(); + } - if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1))) - { - flag = false; - } + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { + p_70014_1_.setShort("xTile", (short) this.field_145791_d); + p_70014_1_.setShort("yTile", (short) this.field_145792_e); + p_70014_1_.setShort("zTile", (short) this.field_145789_f); + p_70014_1_.setShort("life", (short) this.ticksInGround); + p_70014_1_.setByte("inTile", (byte) Block.getIdFromBlock(this.field_145790_g)); + p_70014_1_.setByte("inData", (byte) this.inData); + p_70014_1_.setByte("shake", (byte) this.arrowShake); + p_70014_1_.setByte("inGround", (byte) (this.inGround ? 1 : 0)); + p_70014_1_.setByte("pickup", (byte) this.canBePickedUp); + p_70014_1_.setDouble("damage", this.damage); + } - if (flag) - { - p_70100_1_.onItemPickup(this, 1); - this.setDead(); - } - } - } + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { + this.field_145791_d = p_70037_1_.getShort("xTile"); + this.field_145792_e = p_70037_1_.getShort("yTile"); + this.field_145789_f = p_70037_1_.getShort("zTile"); + this.ticksInGround = p_70037_1_.getShort("life"); + this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); + this.inData = p_70037_1_.getByte("inData") & 255; + this.arrowShake = p_70037_1_.getByte("shake") & 255; + this.inGround = p_70037_1_.getByte("inGround") == 1; - /** - * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to - * prevent them from trampling crops - */ - @Override - protected boolean canTriggerWalking() - { - return false; - } + if (p_70037_1_.hasKey("damage", 99)) { + this.damage = p_70037_1_.getDouble("damage"); + } - @Override + if (p_70037_1_.hasKey("pickup", 99)) { + this.canBePickedUp = p_70037_1_.getByte("pickup"); + } else if (p_70037_1_.hasKey("player", 99)) { + this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; + } + } + + /** + * Called by a player entity when they collide with an entity + */ + @Override + public void onCollideWithPlayer(EntityPlayer p_70100_1_) { + if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { + boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; + + if (this.canBePickedUp == 1 + && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1))) { + flag = false; + } + + if (flag) { + p_70100_1_.onItemPickup(this, 1); + this.setDead(); + } + } + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they + * walk on. used for spiders and wolves to prevent them from trampling crops + */ + @Override + protected boolean canTriggerWalking() { + return false; + } + + @Override @SideOnly(Side.CLIENT) - public float getShadowSize() - { - return 0.0F; - } + public float getShadowSize() { + return 0.0F; + } - public void setDamage(double p_70239_1_) - { - this.damage = p_70239_1_; - } + public void setDamage(double p_70239_1_) { + this.damage = p_70239_1_; + } - public double getDamage() - { - return this.damage; - } + public double getDamage() { + return this.damage; + } - /** - * Sets the amount of knockback the arrow applies when it hits a mob. - */ - public void setKnockbackStrength(int p_70240_1_) - { - this.knockbackStrength = p_70240_1_; - } + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int p_70240_1_) { + this.knockbackStrength = p_70240_1_; + } - /** - * If returns false, the item will not inflict any damage against entities. - */ - @Override - public boolean canAttackWithItem() - { - return false; - } + /** + * If returns false, the item will not inflict any damage against entities. + */ + @Override + public boolean canAttackWithItem() { + return false; + } - /** - * Whether the arrow has a stream of critical hit particles flying behind it. - */ - public void setIsCritical(boolean p_70243_1_) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); + /** + * Whether the arrow has a stream of critical hit particles flying behind + * it. + */ + public void setIsCritical(boolean p_70243_1_) { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); - if (p_70243_1_) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); - } - else - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); - } - } - public void setTau(boolean p_70243_1_) - { - byte b0 = this.dataWatcher.getWatchableObjectByte(17); + if (p_70243_1_) { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1))); + } else { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2))); + } + } - if (p_70243_1_) - { - this.dataWatcher.updateObject(17, Byte.valueOf((byte)(b0 | 1))); - } - else - { - this.dataWatcher.updateObject(17, Byte.valueOf((byte)(b0 & -2))); - } - } + public void setTau(boolean p_70243_1_) { + byte b0 = this.dataWatcher.getWatchableObjectByte(17); - /** - * Whether the arrow has a stream of critical hit particles flying behind it. - */ - public boolean getIsCritical() - { - byte b0 = this.dataWatcher.getWatchableObjectByte(16); - return (b0 & 1) != 0; - } - - public boolean getIsTau() - { - byte b0 = this.dataWatcher.getWatchableObjectByte(17); - return (b0 & 1) != 0; - } + if (p_70243_1_) { + this.dataWatcher.updateObject(17, Byte.valueOf((byte) (b0 | 1))); + } else { + this.dataWatcher.updateObject(17, Byte.valueOf((byte) (b0 & -2))); + } + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind + * it. + */ + public boolean getIsCritical() { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + return (b0 & 1) != 0; + } + + public boolean getIsTau() { + byte b0 = this.dataWatcher.getWatchableObjectByte(17); + return (b0 & 1) != 0; + } } diff --git a/com/hbm/items/GunXVL1456.java b/com/hbm/items/GunXVL1456.java index 4ef8702b1..548b336ba 100644 --- a/com/hbm/items/GunXVL1456.java +++ b/com/hbm/items/GunXVL1456.java @@ -1,13 +1,16 @@ package com.hbm.items; +import java.util.List; import java.util.Random; import com.hbm.entity.EntityBullet; import com.hbm.entity.EntityMiniNuke; +import com.hbm.lib.ModDamageSource; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; @@ -22,6 +25,12 @@ public class GunXVL1456 extends Item { Random rand = new Random(); + public GunXVL1456() + { + this.maxStackSize = 1; + this.setMaxDamage(2500); + } + @Override public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.bow; @@ -35,13 +44,13 @@ public class GunXVL1456 extends Item { // if (event.isCanceled()) { // return; // } - j = event.charge; + j = event.charge * 2; if (player.isSneaking() && j >= 20) { boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; - if ((flag || player.inventory.hasItem(ModItems.gun_xvl1456_ammo) && stack.hasTagCompound())) { + if (flag || player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) { EntityBullet entitybullet = new EntityBullet(world, player, 3.0F, j, j + 5, false, "tauDay"); entitybullet.setDamage(j + rand.nextInt(6)); @@ -60,6 +69,9 @@ public class GunXVL1456 extends Item { if (!world.isRemote) { world.spawnEntityInWorld(entitybullet); } + stack.damageItem((int)(j * 0.05F), player); + + player.rotationPitch -= (j * 0.1F); } } } @@ -91,7 +103,10 @@ public class GunXVL1456 extends Item { { if(!p_77663_2_.isRemote) { + p_77663_1_.damageItem(1250, (EntityLivingBase) p_77663_3_); + p_77663_2_.createExplosion(p_77663_3_, p_77663_3_.posX, p_77663_3_.posY, p_77663_3_.posZ, 10.0F, true); + p_77663_3_.attackEntityFrom(ModDamageSource.tauBlast, 1000F); ((EntityPlayer)p_77663_3_).dropOneItem(false); } } @@ -105,7 +120,7 @@ public class GunXVL1456 extends Item { if (!player.isSneaking()) { boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; - if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) && count % 5 == 0) { + if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) && count % 4 == 0) { EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 35, 45, false, "eyyOk"); entityarrow.setDamage(35 + rand.nextInt(45 - 35)); @@ -132,6 +147,12 @@ public class GunXVL1456 extends Item { } } } + if(count % 2 == 0) + { + //world.playSoundAtEntity(player, "dig.stone", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + 1F); + //world.playSoundAtEntity(player, "random.click", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + 1F); + world.playSoundAtEntity(player, "random.click", 1.0F, (this.getMaxItemUseDuration(stack) - count) * 0.01F); + } } } @@ -140,4 +161,13 @@ public class GunXVL1456 extends Item { return 1; } + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add("Hold right mouse button"); + list.add("to shoot tauons,"); + list.add("sneak to charge up for"); + list.add("stronger shots!"); + } + } diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index edd873c44..6f3ae0a6f 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -117,6 +117,7 @@ public class ModItems { public static Item wire_schrabidium; public static Item wire_advanced_alloy; public static Item coil_advanced_alloy; + public static Item coil_advanced_torus; public static Item circuit_aluminium; public static Item circuit_copper; @@ -594,6 +595,7 @@ public class ModItems { lithium = new Item().setUnlocalizedName("lithium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":lithium"); wire_advanced_alloy = new Item().setUnlocalizedName("wire_advanced_alloy").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":wire_advanced_alloy"); coil_advanced_alloy = new Item().setUnlocalizedName("coil_advanced_alloy").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":coil_advanced_alloy"); + coil_advanced_torus = new Item().setUnlocalizedName("coil_advanced_torus").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":coil_advanced_torus"); nugget_uranium = new Item().setUnlocalizedName("nugget_uranium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_uranium"); nugget_u235 = new Item().setUnlocalizedName("nugget_u235").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_uranium"); @@ -818,7 +820,7 @@ public class ModItems { pellet_hes = new WatzFuel(108000, 65000, 1F, 85, 1, 1.025F).setUnlocalizedName("pellet_hes").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_hes").setMaxStackSize(1); pellet_mes = new WatzFuel(216000, 23000, 1.025F, 50, 1, 1F).setUnlocalizedName("pellet_mes").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_mes").setMaxStackSize(1); pellet_les = new WatzFuel(432000, 7000, 1.05F, 15, 1, 0.975F).setUnlocalizedName("pellet_les").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_les").setMaxStackSize(1); - pellet_beryllium = new WatzFuel(864000, 50, 0, 0, 0.95F, 1.025F).setUnlocalizedName("pellet_beryllium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_beryllium").setMaxStackSize(1); + pellet_beryllium = new WatzFuel(864000, 50, 1.05F, 0, 0.95F, 1.025F).setUnlocalizedName("pellet_beryllium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_beryllium").setMaxStackSize(1); pellet_neptunium = new WatzFuel(216000, 3000, 1.1F, 25, 1.1F, 1.005F).setUnlocalizedName("pellet_neptunium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_neptunium").setMaxStackSize(1); pellet_lead = new WatzFuel(1728000, 0, 0.95F, 0, 0.95F, 0.95F).setUnlocalizedName("pellet_lead").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_lead").setMaxStackSize(1); pellet_advanced = new WatzFuel(216000, 1000, 1.1F, 0, 0.995F, 0.99F).setUnlocalizedName("pellet_advanced").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_advanced").setMaxStackSize(1); @@ -1156,6 +1158,7 @@ public class ModItems { GameRegistry.registerItem(coil_copper, coil_copper.getUnlocalizedName()); GameRegistry.registerItem(coil_copper_torus, coil_copper_torus.getUnlocalizedName()); GameRegistry.registerItem(coil_advanced_alloy, coil_advanced_alloy.getUnlocalizedName()); + GameRegistry.registerItem(coil_advanced_torus, coil_advanced_torus.getUnlocalizedName()); GameRegistry.registerItem(coil_tungsten, coil_tungsten.getUnlocalizedName()); GameRegistry.registerItem(tank_steel, tank_steel.getUnlocalizedName()); GameRegistry.registerItem(motor, motor.getUnlocalizedName()); diff --git a/com/hbm/lib/HbmChestContents.java b/com/hbm/lib/HbmChestContents.java index 73caba04e..19b9f6f15 100644 --- a/com/hbm/lib/HbmChestContents.java +++ b/com/hbm/lib/HbmChestContents.java @@ -51,6 +51,8 @@ public class HbmChestContents { new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 32, 5), new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1), new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 8, 2), + new WeightedRandomChestContent(ModItems.gun_xvl1456, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.gun_xvl1456_ammo, 0, 1, 8, 2), new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 1, 2), new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 2), new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 3), diff --git a/com/hbm/lib/ModDamageSource.java b/com/hbm/lib/ModDamageSource.java index 7dacbf36a..7d27475ce 100644 --- a/com/hbm/lib/ModDamageSource.java +++ b/com/hbm/lib/ModDamageSource.java @@ -13,6 +13,7 @@ public class ModDamageSource extends DamageSource { public static DamageSource mudPoisoning = (new DamageSource("mudPoisoning")).setDamageBypassesArmor(); public static DamageSource euthanizedSelf = (new DamageSource("euthanizedSelf")).setDamageBypassesArmor(); public static DamageSource euthanizedSelf2 = (new DamageSource("euthanizedSelf2")).setDamageBypassesArmor(); + public static DamageSource tauBlast = (new DamageSource("tauBlast")).setDamageBypassesArmor(); public ModDamageSource(String p_i1566_1_) { super(p_i1566_1_); diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index 67dd3f75f..d07ec41d4 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -293,6 +293,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_copper, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_red_copper, 'I', "ingotIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_advanced_alloy, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_advanced_alloy, 'I', "ingotIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_copper_torus, 2), new Object[] { "PCP", "C C", "PCP", 'P', "plateIron", 'C', ModItems.coil_copper })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_advanced_torus, 2), new Object[] { "PCP", "C C", "PCP", 'P', "plateIron", 'C', ModItems.coil_advanced_alloy })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_tungsten, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_tungsten, 'I', "ingotIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.tank_steel, 1), new Object[] { "STS", "S S", "STS", 'S', "plateSteel", 'T', "plateTitanium" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.motor, 1), new Object[] { " R ", "ICI", "ITI", 'R', ModItems.wire_red_copper, 'T', ModItems.coil_copper_torus, 'I', "plateIron", 'C', ModItems.coil_copper })); @@ -452,6 +453,13 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed_ammo, 16), new Object[] { "L", "S", 'L', "plateSteel", 'S', Items.gunpowder })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "III", "WPH", 'S', "plateSteel", 'I', "ingotSteel", 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston) })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman_ammo, 2), new Object[] { " S ", "SPS", "ITI", 'S', "plateSteel", 'P', ModItems.ingot_pu239, 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', "plateSteel", 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.circuit_copper })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', "plateSteel", 'R', ModItems.rod_quad_uranium_fuel_depleted })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', "plateSteel", 'R', ModItems.rod_dual_uranium_fuel_depleted })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', "plateSteel", 'R', ModItems.rod_uranium_fuel_depleted })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', "plateSteel", 'R', ModItems.rod_uranium_fuel_depleted })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', "plateSteel", 'R', "U238" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', "plateSteel", 'R', "U238" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_generic, 4), new Object[] { "RS ", "ITI", " I ", 'I', "plateIron", 'R', ModItems.wire_red_copper, 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt) })); GameRegistry.addRecipe(new ItemStack(ModItems.grenade_strong, 2), new Object[] { " G ", "SGS", " S ", 'G', ModItems.grenade_generic, 'S', Items.gunpowder });