From d2ca9963624869aeb432d46398ff4421d228943a Mon Sep 17 00:00:00 2001 From: HbmMods Date: Sat, 16 Jul 2016 14:02:06 +0200 Subject: [PATCH] XVL1456 --- assets/hbm/lang/de_DE.lang | 4 + assets/hbm/lang/en_US.lang | 8 +- .../textures/items/coil_advanced_torus.png | Bin 0 -> 302 bytes assets/hbm/textures/items/gun_xvl1456.png | Bin 0 -> 336 bytes .../hbm/textures/items/gun_xvl1456_ammo.png | Bin 0 -> 335 bytes assets/hbm/textures/models/ModelXVL1456.png | Bin 3107 -> 3108 bytes com/hbm/blocks/ModBlocks.java | 2 +- com/hbm/entity/EntityBullet.java | 1144 ++++++++--------- com/hbm/items/GunXVL1456.java | 36 +- com/hbm/items/ModItems.java | 5 +- com/hbm/lib/HbmChestContents.java | 2 + com/hbm/lib/ModDamageSource.java | 1 + com/hbm/main/CraftingManager.java | 8 + 13 files changed, 622 insertions(+), 588 deletions(-) create mode 100644 assets/hbm/textures/items/coil_advanced_torus.png create mode 100644 assets/hbm/textures/items/gun_xvl1456.png create mode 100644 assets/hbm/textures/items/gun_xvl1456_ammo.png 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 0000000000000000000000000000000000000000..d46cb0e9584c3237a91240ef19ff36f27a0b8096 GIT binary patch literal 302 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXPIMM=Lb}?#?!?y z#KM1R-)mkbL!Rc{9M&6nvo|o`R=C@v*!Swh$)^HB_WQK>Z=W^VykDaI!4BQ(q`!4D z_P(>5Rr-8k_ioABbF=oDWW8W~QLHvkr|W=kFvIT!>|f%qTsiE(JE2ud^OD1%2_jE2 z9nQ|?x$E-&^ZL_FWrx)_%ACL5l+d2!r_{o@K&PTrA~Jn{?MIfPs4f$qS10#LT=By}Z;C1rt33 zJca`vY<7dnkbVF3&PyyS{wgm+VZFA0SXS%%Hd+q@f zyB9pPk#veQf1ssk^x%~o4966TC!No4yY_k2`O@1?$mW`54ix{Pk zEthNwwAitssfj6K^Nblc{=ayUu|U9y&sEWm$B3onBJaTf4~}LYPY;g<>84P@k3a00 Z8N^x-mviT{2m?LC;OXk;vd$@?2>^g5b#nj! literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..77ed27a29e077bc22eb13841aa872a7a1b372f7b GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt33 zJv8BcI2AUXx;2k2x^dNt18ZL}R_)2OKdC-{ z%7nWidvuKdn4if@`zC(*ndCCxAg_&ciVs)czj#KWA!@ZF%ekF;Z_lr`eK-BurcMT ZE_x&DZI7M&LZDw5JYD@<);T3K0RRpVe6j!l literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/models/ModelXVL1456.png b/assets/hbm/textures/models/ModelXVL1456.png index fd3f90d76fd43b2086aa97a70bf2195e232e77a8..0faabee248a40d42e062ba820c2c8118123c436f 100644 GIT binary patch delta 2039 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 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 });