mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
XVL1456
This commit is contained in:
parent
92027d08d7
commit
d2ca996362
@ -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.euthanizedSelf=%1$s hat sich selbst eingeschläfert, was für ein Vollpfosten.
|
||||||
death.attack.euthanizedSelf2=%1$s gewinnt den Darwin Award.
|
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.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.redstone_sword.name=Redstoneschwert
|
||||||
item.big_sword.name=Großes Schwert
|
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.plate_advanced_alloy.name=Fortgeschrittene Legierungsplatte
|
||||||
item.wire_advanced_alloy.name=Supraleiter
|
item.wire_advanced_alloy.name=Supraleiter
|
||||||
item.coil_advanced_alloy.name=Supraleitende Magnetspule
|
item.coil_advanced_alloy.name=Supraleitende Magnetspule
|
||||||
|
item.coil_advanced_torus.name=Supraleitende Ringspule
|
||||||
item.lithium.name=Lithiumwürfel
|
item.lithium.name=Lithiumwürfel
|
||||||
|
|
||||||
item.nugget_u235.name=U235-Nugget
|
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_schrabidium.name=Schrabidiumrevolver
|
||||||
item.gun_revolver_cursed.name=Verfluchte Pistole
|
item.gun_revolver_cursed.name=Verfluchte Pistole
|
||||||
item.gun_fatman.name=M42 Nukleares Katapult "Fat Man"
|
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_iron_ammo.name=Patrone
|
||||||
item.gun_revolver_ammo.name=Bleipatrone
|
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_schrabidium_ammo.name=Schrabidiumpatrone
|
||||||
item.gun_revolver_cursed_ammo.name=Stahlpatrone
|
item.gun_revolver_cursed_ammo.name=Stahlpatrone
|
||||||
item.gun_fatman_ammo.name=Miniatombombe
|
item.gun_fatman_ammo.name=Miniatombombe
|
||||||
|
item.gun_xvl1456_ammo.name=Kiste mit erschöpftem Uran-235
|
||||||
|
|
||||||
tile.block_schrabidium.name=Schrabidiumblock
|
tile.block_schrabidium.name=Schrabidiumblock
|
||||||
item.plate_gold.name=Goldplatte
|
item.plate_gold.name=Goldplatte
|
||||||
|
|||||||
@ -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.euthanizedSelf=%1$s euthanized himself, what a dork.
|
||||||
death.attack.euthanizedSelf2=%1$s wins the Darwin Award.
|
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.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.redstone_sword.name=Redstone Sword
|
||||||
item.big_sword.name=Great 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.tsar_core.name=Tsar Bomba Core
|
||||||
|
|
||||||
item.fleija_igniter.name=Pulseigniter
|
item.fleija_igniter.name=Pulse Igniter
|
||||||
item.fleija_propellant.name=Schrabidiumpropellant
|
item.fleija_propellant.name=Schrabidium Propellant
|
||||||
item.fleija_core.name=F.L.E.I.J.A. Uranium 235 Charge
|
item.fleija_core.name=F.L.E.I.J.A. Uranium 235 Charge
|
||||||
|
|
||||||
container.nukeGadget=The Gadget
|
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.plate_advanced_alloy.name=Advanced Alloy Plate
|
||||||
item.wire_advanced_alloy.name=Super Conductor
|
item.wire_advanced_alloy.name=Super Conductor
|
||||||
item.coil_advanced_alloy.name=Super Conducting Coil
|
item.coil_advanced_alloy.name=Super Conducting Coil
|
||||||
|
item.coil_advanced_torus.name=Super Conducting Ring Coil
|
||||||
item.lithium.name=Lithium Cube
|
item.lithium.name=Lithium Cube
|
||||||
|
|
||||||
item.nugget_u235.name=U235 Nugget
|
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_schrabidium.name=Schrabidium Revolver
|
||||||
item.gun_revolver_cursed.name=Cursed Revolver
|
item.gun_revolver_cursed.name=Cursed Revolver
|
||||||
item.gun_fatman.name=M42 Nuclear Catapult "Fat Man"
|
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_iron_ammo.name=Bullet
|
||||||
item.gun_revolver_ammo.name=Lead 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_schrabidium_ammo.name=Schrabidium Bullet
|
||||||
item.gun_revolver_cursed_ammo.name=Steel Bullet
|
item.gun_revolver_cursed_ammo.name=Steel Bullet
|
||||||
item.gun_fatman_ammo.name=Mini Nuke
|
item.gun_fatman_ammo.name=Mini Nuke
|
||||||
|
item.gun_xvl1456_ammo.name=Depleted Uranium-235 Box
|
||||||
|
|
||||||
tile.block_schrabidium.name=Block of Schrabidium
|
tile.block_schrabidium.name=Block of Schrabidium
|
||||||
item.plate_gold.name=Gold Plate
|
item.plate_gold.name=Gold Plate
|
||||||
|
|||||||
BIN
assets/hbm/textures/items/coil_advanced_torus.png
Normal file
BIN
assets/hbm/textures/items/coil_advanced_torus.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 302 B |
BIN
assets/hbm/textures/items/gun_xvl1456.png
Normal file
BIN
assets/hbm/textures/items/gun_xvl1456.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 336 B |
BIN
assets/hbm/textures/items/gun_xvl1456_ammo.png
Normal file
BIN
assets/hbm/textures/items/gun_xvl1456_ammo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 335 B |
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
@ -464,7 +464,7 @@ public class ModBlocks {
|
|||||||
|
|
||||||
mud_fluid = new MudFluid().setDensity(2500).setViscosity(3000).setLuminosity(5).setTemperature(2773).setUnlocalizedName("mud_fluid");
|
mud_fluid = new MudFluid().setDensity(2500).setViscosity(3000).setLuminosity(5).setTemperature(2773).setUnlocalizedName("mud_fluid");
|
||||||
FluidRegistry.registerFluid(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() {
|
private static void registerBlock() {
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import net.minecraft.enchantment.EnchantmentHelper;
|
|||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.IProjectile;
|
import net.minecraft.entity.IProjectile;
|
||||||
|
import net.minecraft.entity.item.EntityItemFrame;
|
||||||
import net.minecraft.entity.monster.EntityEnderman;
|
import net.minecraft.entity.monster.EntityEnderman;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
@ -31,8 +32,7 @@ import com.hbm.lib.ModDamageSource;
|
|||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class EntityBullet extends Entity implements IProjectile
|
public class EntityBullet extends Entity implements IProjectile {
|
||||||
{
|
|
||||||
private int field_145791_d = -1;
|
private int field_145791_d = -1;
|
||||||
private int field_145792_e = -1;
|
private int field_145792_e = -1;
|
||||||
private int field_145789_f = -1;
|
private int field_145789_f = -1;
|
||||||
@ -57,16 +57,13 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
private boolean isTau = false;
|
private boolean isTau = false;
|
||||||
private boolean instakill = false;
|
private boolean instakill = false;
|
||||||
|
|
||||||
|
public EntityBullet(World p_i1753_1_) {
|
||||||
public EntityBullet(World p_i1753_1_)
|
|
||||||
{
|
|
||||||
super(p_i1753_1_);
|
super(p_i1753_1_);
|
||||||
this.renderDistanceWeight = 10.0D;
|
this.renderDistanceWeight = 10.0D;
|
||||||
this.setSize(0.5F, 0.5F);
|
this.setSize(0.5F, 0.5F);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityBullet(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_)
|
public EntityBullet(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) {
|
||||||
{
|
|
||||||
super(p_i1754_1_);
|
super(p_i1754_1_);
|
||||||
this.renderDistanceWeight = 10.0D;
|
this.renderDistanceWeight = 10.0D;
|
||||||
this.setSize(0.5F, 0.5F);
|
this.setSize(0.5F, 0.5F);
|
||||||
@ -74,14 +71,13 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
this.yOffset = 0.0F;
|
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_)
|
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_);
|
super(p_i1755_1_);
|
||||||
this.renderDistanceWeight = 10.0D;
|
this.renderDistanceWeight = 10.0D;
|
||||||
this.shootingEntity = p_i1755_2_;
|
this.shootingEntity = p_i1755_2_;
|
||||||
|
|
||||||
if (p_i1755_2_ instanceof EntityPlayer)
|
if (p_i1755_2_ instanceof EntityPlayer) {
|
||||||
{
|
|
||||||
this.canBePickedUp = 1;
|
this.canBePickedUp = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,8 +87,7 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ;
|
double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ;
|
||||||
double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2);
|
double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2);
|
||||||
|
|
||||||
if (d3 >= 1.0E-7D)
|
if (d3 >= 1.0E-7D) {
|
||||||
{
|
|
||||||
float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
|
float f2 = (float) (Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;
|
||||||
float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI));
|
float f3 = (float) (-(Math.atan2(d1, d3) * 180.0D / Math.PI));
|
||||||
double d4 = d0 / d3;
|
double d4 = d0 / d3;
|
||||||
@ -104,26 +99,28 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityBullet(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, boolean instakill)
|
public EntityBullet(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax,
|
||||||
{
|
boolean instakill) {
|
||||||
super(p_i1756_1_);
|
super(p_i1756_1_);
|
||||||
this.renderDistanceWeight = 10.0D;
|
this.renderDistanceWeight = 10.0D;
|
||||||
this.shootingEntity = p_i1756_2_;
|
this.shootingEntity = p_i1756_2_;
|
||||||
|
|
||||||
if (p_i1756_2_ instanceof EntityPlayer)
|
if (p_i1756_2_ instanceof EntityPlayer) {
|
||||||
{
|
|
||||||
this.canBePickedUp = 1;
|
this.canBePickedUp = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setSize(0.5F, 0.5F);
|
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.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.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
||||||
this.posY -= 0.10000000149011612D;
|
this.posY -= 0.10000000149011612D;
|
||||||
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
||||||
this.setPosition(this.posX, this.posY, this.posZ);
|
this.setPosition(this.posX, this.posY, this.posZ);
|
||||||
this.yOffset = 0.0F;
|
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.motionX = -MathHelper.sin(this.rotationYaw / 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);
|
* 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.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.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
|
||||||
|
|
||||||
@ -132,26 +129,28 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
this.instakill = instakill;
|
this.instakill = instakill;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityBullet(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, boolean instakill, String isTau)
|
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_);
|
super(p_i1756_1_);
|
||||||
this.renderDistanceWeight = 10.0D;
|
this.renderDistanceWeight = 10.0D;
|
||||||
this.shootingEntity = p_i1756_2_;
|
this.shootingEntity = p_i1756_2_;
|
||||||
|
|
||||||
if (p_i1756_2_ instanceof EntityPlayer)
|
if (p_i1756_2_ instanceof EntityPlayer) {
|
||||||
{
|
|
||||||
this.canBePickedUp = 1;
|
this.canBePickedUp = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setSize(0.5F, 0.5F);
|
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.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.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
||||||
this.posY -= 0.10000000149011612D;
|
this.posY -= 0.10000000149011612D;
|
||||||
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F;
|
||||||
this.setPosition(this.posX, this.posY, this.posZ);
|
this.setPosition(this.posX, this.posY, this.posZ);
|
||||||
this.yOffset = 0.0F;
|
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.motionX = -MathHelper.sin(this.rotationYaw / 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);
|
* 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.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.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F);
|
||||||
this.setTau(isTau == "tauDay");
|
this.setTau(isTau == "tauDay");
|
||||||
@ -172,25 +171,28 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void entityInit()
|
protected void entityInit() {
|
||||||
{
|
|
||||||
this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
|
this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
|
||||||
this.dataWatcher.addObject(17, 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.
|
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z
|
||||||
|
* direction.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
|
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_);
|
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_1_ /= f2;
|
||||||
p_70186_3_ /= f2;
|
p_70186_3_ /= f2;
|
||||||
p_70186_5_ /= f2;
|
p_70186_5_ /= f2;
|
||||||
p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_;
|
p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D
|
||||||
p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_;
|
* p_70186_8_;
|
||||||
p_70186_5_ += 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_1_ *= p_70186_7_;
|
||||||
p_70186_3_ *= p_70186_7_;
|
p_70186_3_ *= p_70186_7_;
|
||||||
p_70186_5_ *= p_70186_7_;
|
p_70186_5_ *= p_70186_7_;
|
||||||
@ -204,13 +206,13 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
|
* Sets the position and rotation. Only difference from the other one is no
|
||||||
* posY, posZ, yaw, pitch
|
* bounding on the rotation. Args: posX, posY, posZ, yaw, pitch
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@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_)
|
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.setPosition(p_70056_1_, p_70056_3_, p_70056_5_);
|
||||||
this.setRotation(p_70056_7_, p_70056_8_);
|
this.setRotation(p_70056_7_, p_70056_8_);
|
||||||
}
|
}
|
||||||
@ -220,14 +222,12 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
|
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) {
|
||||||
{
|
|
||||||
this.motionX = p_70016_1_;
|
this.motionX = p_70016_1_;
|
||||||
this.motionY = p_70016_3_;
|
this.motionY = p_70016_3_;
|
||||||
this.motionZ = p_70016_5_;
|
this.motionZ = p_70016_5_;
|
||||||
|
|
||||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
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_);
|
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.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 = (float) (Math.atan2(p_70016_3_, f) * 180.0D / Math.PI);
|
||||||
@ -243,86 +243,83 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
*/
|
*/
|
||||||
// @Override
|
// @Override
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate()
|
public void onUpdate() {
|
||||||
{
|
|
||||||
super.onUpdate();
|
super.onUpdate();
|
||||||
|
|
||||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
|
||||||
{
|
|
||||||
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
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.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D
|
||||||
//this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI);
|
/ 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)
|
if (block.getMaterial() != Material.air) {
|
||||||
{
|
block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e,
|
||||||
block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
this.field_145789_f);
|
||||||
AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(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())
|
if (axisalignedbb != null
|
||||||
{
|
&& axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))
|
||||||
|
&& !this.getIsCritical()) {
|
||||||
this.inGround = true;
|
this.inGround = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(block == ModBlocks.red_barrel)
|
if (block == ModBlocks.red_barrel) {
|
||||||
{
|
|
||||||
((RedBarrel) block).explode(worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
((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)
|
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.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);
|
this.worldObj.playSound(this.field_145791_d, this.field_145792_e, this.field_145789_f, "dig.glass",
|
||||||
|
1.0F, 1.0F, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.arrowShake > 0)
|
if (this.arrowShake > 0) {
|
||||||
{
|
|
||||||
--this.arrowShake;
|
--this.arrowShake;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.inGround && !this.getIsCritical())
|
if (this.inGround && !this.getIsCritical()) {
|
||||||
{
|
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
++this.ticksInAir;
|
++this.ticksInAir;
|
||||||
Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
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);
|
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);
|
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false);
|
||||||
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||||
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY,
|
||||||
|
this.posZ + this.motionZ);
|
||||||
|
|
||||||
if (movingobjectposition != null)
|
if (movingobjectposition != null) {
|
||||||
{
|
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord,
|
||||||
vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
|
movingobjectposition.hitVec.zCoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity entity = null;
|
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));
|
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;
|
double d0 = 0.0D;
|
||||||
int i;
|
int i;
|
||||||
float f1;
|
float f1;
|
||||||
|
|
||||||
for (i = 0; i < list.size(); ++i)
|
for (i = 0; i < list.size(); ++i) {
|
||||||
{
|
|
||||||
Entity entity1 = (Entity) list.get(i);
|
Entity entity1 = (Entity) list.get(i);
|
||||||
|
|
||||||
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5))
|
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
|
||||||
{
|
|
||||||
f1 = 0.3F;
|
f1 = 0.3F;
|
||||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1);
|
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1);
|
||||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
|
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3);
|
||||||
|
|
||||||
if (movingobjectposition1 != null)
|
if (movingobjectposition1 != null) {
|
||||||
{
|
|
||||||
double d1 = vec31.distanceTo(movingobjectposition1.hitVec);
|
double d1 = vec31.distanceTo(movingobjectposition1.hitVec);
|
||||||
|
|
||||||
if (d1 < d0 || d0 == 0.0D)
|
if (d1 < d0 || d0 == 0.0D) {
|
||||||
{
|
|
||||||
entity = entity1;
|
entity = entity1;
|
||||||
d0 = d1;
|
d0 = d1;
|
||||||
}
|
}
|
||||||
@ -330,17 +327,16 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity != null)
|
if (entity != null) {
|
||||||
{
|
|
||||||
movingobjectposition = new MovingObjectPosition(entity);
|
movingobjectposition = new MovingObjectPosition(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer)
|
if (movingobjectposition != null && movingobjectposition.entityHit != null
|
||||||
{
|
&& movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||||
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
|
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
|
||||||
|
|
||||||
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer))
|
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer
|
||||||
{
|
&& !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer)) {
|
||||||
movingobjectposition = null;
|
movingobjectposition = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -348,15 +344,21 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
float f2;
|
float f2;
|
||||||
float f4;
|
float f4;
|
||||||
|
|
||||||
if (movingobjectposition != null)
|
if (movingobjectposition != null) {
|
||||||
{
|
if (movingobjectposition.entityHit != null) {
|
||||||
if (movingobjectposition.entityHit != null)
|
//TODO: Remove test feature in retail version
|
||||||
{
|
if (!(movingobjectposition.entityHit instanceof EntityItemFrame)
|
||||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
|| 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);
|
int k = MathHelper.ceiling_double_int(f2 * this.damage);
|
||||||
|
|
||||||
if (this.getIsCritical())
|
if (this.getIsCritical()) {
|
||||||
{
|
|
||||||
k += this.rand.nextInt(k / 2 + 2);
|
k += this.rand.nextInt(k / 2 + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,47 +378,46 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman))
|
if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) {
|
||||||
{
|
|
||||||
movingobjectposition.entityHit.setFire(5);
|
movingobjectposition.entityHit.setFire(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (movingobjectposition.entityHit.attackEntityFrom(damagesource, /*(float)k*/(float)damage))
|
if (movingobjectposition.entityHit.attackEntityFrom(damagesource,
|
||||||
{
|
/* (float)k */(float) damage)) {
|
||||||
if (movingobjectposition.entityHit instanceof EntityLivingBase)
|
if (movingobjectposition.entityHit instanceof EntityLivingBase) {
|
||||||
{
|
|
||||||
EntityLivingBase entitylivingbase = (EntityLivingBase) movingobjectposition.entityHit;
|
EntityLivingBase entitylivingbase = (EntityLivingBase) movingobjectposition.entityHit;
|
||||||
|
|
||||||
if (this.knockbackStrength > 0)
|
if (this.knockbackStrength > 0) {
|
||||||
{
|
f4 = MathHelper
|
||||||
f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||||
|
|
||||||
if (f4 > 0.0F)
|
if (f4 > 0.0F) {
|
||||||
{
|
movingobjectposition.entityHit.addVelocity(
|
||||||
movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4);
|
this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D,
|
||||||
|
this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase)
|
if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) {
|
||||||
{
|
|
||||||
EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity);
|
EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity);
|
||||||
EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase);
|
EnchantmentHelper.func_151385_b((EntityLivingBase) this.shootingEntity,
|
||||||
|
entitylivingbase);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP)
|
if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity
|
||||||
{
|
&& movingobjectposition.entityHit instanceof EntityPlayer
|
||||||
((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
|
&& this.shootingEntity instanceof EntityPlayerMP) {
|
||||||
|
((EntityPlayerMP) this.shootingEntity).playerNetServerHandler
|
||||||
|
.sendPacket(new S2BPacketChangeGameState(6, 0.0F));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(movingobjectposition.entityHit instanceof EntityEnderman)) {
|
||||||
if (!(movingobjectposition.entityHit instanceof EntityEnderman))
|
if (!this.worldObj.isRemote) {
|
||||||
{
|
if (!instakill || movingobjectposition.entityHit instanceof EntityPlayer) {
|
||||||
if (!this.worldObj.isRemote)
|
// movingobjectposition.entityHit.attackEntityFrom(DamageSource.generic,
|
||||||
{
|
// dmgMin + rand.nextInt(dmgMax -
|
||||||
if(!instakill || movingobjectposition.entityHit instanceof EntityPlayer)
|
// dmgMin));
|
||||||
{
|
|
||||||
//movingobjectposition.entityHit.attackEntityFrom(DamageSource.generic, dmgMin + rand.nextInt(dmgMax - dmgMin));
|
|
||||||
} else if (movingobjectposition.entityHit instanceof EntityLivingBase) {
|
} else if (movingobjectposition.entityHit instanceof EntityLivingBase) {
|
||||||
((EntityLivingBase) movingobjectposition.entityHit).setHealth(0.0F);
|
((EntityLivingBase) movingobjectposition.entityHit).setHealth(0.0F);
|
||||||
}
|
}
|
||||||
@ -424,9 +425,7 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
if (!this.getIsCritical())
|
if (!this.getIsCritical())
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
}
|
||||||
}
|
} else if (!this.getIsCritical()) {
|
||||||
else if(!this.getIsCritical())
|
|
||||||
{
|
|
||||||
this.motionX *= -0.10000000149011612D;
|
this.motionX *= -0.10000000149011612D;
|
||||||
this.motionY *= -0.10000000149011612D;
|
this.motionY *= -0.10000000149011612D;
|
||||||
this.motionZ *= -0.10000000149011612D;
|
this.motionZ *= -0.10000000149011612D;
|
||||||
@ -435,38 +434,44 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
this.ticksInAir = 0;
|
this.ticksInAir = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(!this.getIsCritical())
|
} else if (!this.getIsCritical()) {
|
||||||
{
|
|
||||||
this.field_145791_d = movingobjectposition.blockX;
|
this.field_145791_d = movingobjectposition.blockX;
|
||||||
this.field_145792_e = movingobjectposition.blockY;
|
this.field_145792_e = movingobjectposition.blockY;
|
||||||
this.field_145789_f = movingobjectposition.blockZ;
|
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.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e,
|
||||||
this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
|
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.motionX = ((float) (movingobjectposition.hitVec.xCoord - this.posX));
|
||||||
this.motionY = ((float) (movingobjectposition.hitVec.yCoord - this.posY));
|
this.motionY = ((float) (movingobjectposition.hitVec.yCoord - this.posY));
|
||||||
this.motionZ = ((float) (movingobjectposition.hitVec.zCoord - this.posZ));
|
this.motionZ = ((float) (movingobjectposition.hitVec.zCoord - this.posZ));
|
||||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
f2 = MathHelper.sqrt_double(
|
||||||
|
this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||||
this.posX -= this.motionX / f2 * 0.05000000074505806D;
|
this.posX -= this.motionX / f2 * 0.05000000074505806D;
|
||||||
this.posY -= this.motionY / f2 * 0.05000000074505806D;
|
this.posY -= this.motionY / f2 * 0.05000000074505806D;
|
||||||
this.posZ -= this.motionZ / f2 * 0.05000000074505806D;
|
this.posZ -= this.motionZ / f2 * 0.05000000074505806D;
|
||||||
this.inGround = true;
|
this.inGround = true;
|
||||||
this.arrowShake = 7;
|
this.arrowShake = 7;
|
||||||
|
|
||||||
if (this.field_145790_g.getMaterial() != Material.air)
|
if (this.field_145790_g.getMaterial() != Material.air) {
|
||||||
{
|
this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d,
|
||||||
this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this);
|
this.field_145792_e, this.field_145789_f, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getIsCritical())
|
if (this.getIsCritical()) {
|
||||||
{
|
for (i = 0; i < 8; ++i) {
|
||||||
for (i = 0; i < 8; ++i)
|
|
||||||
{
|
|
||||||
if (!this.getIsTau())
|
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*/);
|
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
|
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*/);
|
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*/);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -476,44 +481,43 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * 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);
|
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||||
|
|
||||||
//for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
// for (this.rotationPitch = (float)(Math.atan2(this.motionY,
|
||||||
|
// (double)f2) * 180.0D / Math.PI); this.rotationPitch -
|
||||||
|
// this.prevRotationPitch < -180.0F; this.prevRotationPitch -=
|
||||||
|
// 360.0F)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
|
/*
|
||||||
{
|
* while (this.rotationPitch - this.prevRotationPitch >= 180.0F) {
|
||||||
this.prevRotationPitch += 360.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; }
|
||||||
|
*/
|
||||||
|
|
||||||
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
|
// this.rotationPitch = this.prevRotationPitch + (this.rotationPitch
|
||||||
{
|
// - this.prevRotationPitch) * 0.2F;
|
||||||
this.prevRotationYaw -= 360.0F;
|
// this.rotationYaw = this.prevRotationYaw + (this.rotationYaw -
|
||||||
}
|
// this.prevRotationYaw) * 0.2F;
|
||||||
|
|
||||||
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
|
|
||||||
{
|
|
||||||
this.prevRotationYaw += 360.0F;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
|
|
||||||
//this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
|
|
||||||
float f3 = 0.99F;
|
float f3 = 0.99F;
|
||||||
f1 = 0.05F;
|
f1 = 0.05F;
|
||||||
|
|
||||||
if (this.isInWater())
|
if (this.isInWater()) {
|
||||||
{
|
for (int l = 0; l < 4; ++l) {
|
||||||
for (int l = 0; l < 4; ++l)
|
|
||||||
{
|
|
||||||
f4 = 0.25F;
|
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);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
f3 = 0.8F;
|
f3 = 0.8F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isWet())
|
if (this.isWet()) {
|
||||||
{
|
|
||||||
this.extinguish();
|
this.extinguish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -533,8 +537,7 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
|
public void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||||
{
|
|
||||||
p_70014_1_.setShort("xTile", (short) this.field_145791_d);
|
p_70014_1_.setShort("xTile", (short) this.field_145791_d);
|
||||||
p_70014_1_.setShort("yTile", (short) this.field_145792_e);
|
p_70014_1_.setShort("yTile", (short) this.field_145792_e);
|
||||||
p_70014_1_.setShort("zTile", (short) this.field_145789_f);
|
p_70014_1_.setShort("zTile", (short) this.field_145789_f);
|
||||||
@ -551,8 +554,7 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
|
public void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||||
{
|
|
||||||
this.field_145791_d = p_70037_1_.getShort("xTile");
|
this.field_145791_d = p_70037_1_.getShort("xTile");
|
||||||
this.field_145792_e = p_70037_1_.getShort("yTile");
|
this.field_145792_e = p_70037_1_.getShort("yTile");
|
||||||
this.field_145789_f = p_70037_1_.getShort("zTile");
|
this.field_145789_f = p_70037_1_.getShort("zTile");
|
||||||
@ -562,17 +564,13 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
this.arrowShake = p_70037_1_.getByte("shake") & 255;
|
this.arrowShake = p_70037_1_.getByte("shake") & 255;
|
||||||
this.inGround = p_70037_1_.getByte("inGround") == 1;
|
this.inGround = p_70037_1_.getByte("inGround") == 1;
|
||||||
|
|
||||||
if (p_70037_1_.hasKey("damage", 99))
|
if (p_70037_1_.hasKey("damage", 99)) {
|
||||||
{
|
|
||||||
this.damage = p_70037_1_.getDouble("damage");
|
this.damage = p_70037_1_.getDouble("damage");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_70037_1_.hasKey("pickup", 99))
|
if (p_70037_1_.hasKey("pickup", 99)) {
|
||||||
{
|
|
||||||
this.canBePickedUp = p_70037_1_.getByte("pickup");
|
this.canBePickedUp = p_70037_1_.getByte("pickup");
|
||||||
}
|
} else if (p_70037_1_.hasKey("player", 99)) {
|
||||||
else if (p_70037_1_.hasKey("player", 99))
|
|
||||||
{
|
|
||||||
this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0;
|
this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -581,19 +579,16 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
* Called by a player entity when they collide with an entity
|
* Called by a player entity when they collide with an entity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onCollideWithPlayer(EntityPlayer p_70100_1_)
|
public void onCollideWithPlayer(EntityPlayer p_70100_1_) {
|
||||||
{
|
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) {
|
||||||
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
|
|
||||||
{
|
|
||||||
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode;
|
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)))
|
if (this.canBePickedUp == 1
|
||||||
{
|
&& !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1))) {
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag)
|
if (flag) {
|
||||||
{
|
|
||||||
p_70100_1_.onItemPickup(this, 1);
|
p_70100_1_.onItemPickup(this, 1);
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
}
|
||||||
@ -601,37 +596,32 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
|
* returns if this entity triggers Block.onEntityWalking on the blocks they
|
||||||
* prevent them from trampling crops
|
* walk on. used for spiders and wolves to prevent them from trampling crops
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected boolean canTriggerWalking()
|
protected boolean canTriggerWalking() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public float getShadowSize()
|
public float getShadowSize() {
|
||||||
{
|
|
||||||
return 0.0F;
|
return 0.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDamage(double p_70239_1_)
|
public void setDamage(double p_70239_1_) {
|
||||||
{
|
|
||||||
this.damage = p_70239_1_;
|
this.damage = p_70239_1_;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getDamage()
|
public double getDamage() {
|
||||||
{
|
|
||||||
return this.damage;
|
return this.damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the amount of knockback the arrow applies when it hits a mob.
|
* Sets the amount of knockback the arrow applies when it hits a mob.
|
||||||
*/
|
*/
|
||||||
public void setKnockbackStrength(int p_70240_1_)
|
public void setKnockbackStrength(int p_70240_1_) {
|
||||||
{
|
|
||||||
this.knockbackStrength = p_70240_1_;
|
this.knockbackStrength = p_70240_1_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -639,52 +629,44 @@ public class EntityBullet extends Entity implements IProjectile
|
|||||||
* If returns false, the item will not inflict any damage against entities.
|
* If returns false, the item will not inflict any damage against entities.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean canAttackWithItem()
|
public boolean canAttackWithItem() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
* Whether the arrow has a stream of critical hit particles flying behind
|
||||||
|
* it.
|
||||||
*/
|
*/
|
||||||
public void setIsCritical(boolean p_70243_1_)
|
public void setIsCritical(boolean p_70243_1_) {
|
||||||
{
|
|
||||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||||
|
|
||||||
if (p_70243_1_)
|
if (p_70243_1_) {
|
||||||
{
|
|
||||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1)));
|
this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1)));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2)));
|
this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void setTau(boolean p_70243_1_)
|
|
||||||
{
|
public void setTau(boolean p_70243_1_) {
|
||||||
byte b0 = this.dataWatcher.getWatchableObjectByte(17);
|
byte b0 = this.dataWatcher.getWatchableObjectByte(17);
|
||||||
|
|
||||||
if (p_70243_1_)
|
if (p_70243_1_) {
|
||||||
{
|
|
||||||
this.dataWatcher.updateObject(17, Byte.valueOf((byte) (b0 | 1)));
|
this.dataWatcher.updateObject(17, Byte.valueOf((byte) (b0 | 1)));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
this.dataWatcher.updateObject(17, Byte.valueOf((byte) (b0 & -2)));
|
this.dataWatcher.updateObject(17, Byte.valueOf((byte) (b0 & -2)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the arrow has a stream of critical hit particles flying behind it.
|
* Whether the arrow has a stream of critical hit particles flying behind
|
||||||
|
* it.
|
||||||
*/
|
*/
|
||||||
public boolean getIsCritical()
|
public boolean getIsCritical() {
|
||||||
{
|
|
||||||
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
|
||||||
return (b0 & 1) != 0;
|
return (b0 & 1) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getIsTau()
|
public boolean getIsTau() {
|
||||||
{
|
|
||||||
byte b0 = this.dataWatcher.getWatchableObjectByte(17);
|
byte b0 = this.dataWatcher.getWatchableObjectByte(17);
|
||||||
return (b0 & 1) != 0;
|
return (b0 & 1) != 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,16 @@
|
|||||||
package com.hbm.items;
|
package com.hbm.items;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.entity.EntityBullet;
|
import com.hbm.entity.EntityBullet;
|
||||||
import com.hbm.entity.EntityMiniNuke;
|
import com.hbm.entity.EntityMiniNuke;
|
||||||
|
import com.hbm.lib.ModDamageSource;
|
||||||
|
|
||||||
import net.minecraft.enchantment.Enchantment;
|
import net.minecraft.enchantment.Enchantment;
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.EnumAction;
|
import net.minecraft.item.EnumAction;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -22,6 +25,12 @@ public class GunXVL1456 extends Item {
|
|||||||
|
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
|
|
||||||
|
public GunXVL1456()
|
||||||
|
{
|
||||||
|
this.maxStackSize = 1;
|
||||||
|
this.setMaxDamage(2500);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
|
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
|
||||||
return EnumAction.bow;
|
return EnumAction.bow;
|
||||||
@ -35,13 +44,13 @@ public class GunXVL1456 extends Item {
|
|||||||
// if (event.isCanceled()) {
|
// if (event.isCanceled()) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
j = event.charge;
|
j = event.charge * 2;
|
||||||
|
|
||||||
if (player.isSneaking() && j >= 20) {
|
if (player.isSneaking() && j >= 20) {
|
||||||
boolean flag = player.capabilities.isCreativeMode
|
boolean flag = player.capabilities.isCreativeMode
|
||||||
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
|
|| 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 entitybullet = new EntityBullet(world, player, 3.0F, j, j + 5, false, "tauDay");
|
||||||
|
|
||||||
entitybullet.setDamage(j + rand.nextInt(6));
|
entitybullet.setDamage(j + rand.nextInt(6));
|
||||||
@ -60,6 +69,9 @@ public class GunXVL1456 extends Item {
|
|||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
world.spawnEntityInWorld(entitybullet);
|
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)
|
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_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);
|
((EntityPlayer)p_77663_3_).dropOneItem(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,7 +120,7 @@ public class GunXVL1456 extends Item {
|
|||||||
if (!player.isSneaking()) {
|
if (!player.isSneaking()) {
|
||||||
boolean flag = player.capabilities.isCreativeMode
|
boolean flag = player.capabilities.isCreativeMode
|
||||||
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
|
|| 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");
|
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 35, 45, false, "eyyOk");
|
||||||
entityarrow.setDamage(35 + rand.nextInt(45 - 35));
|
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;
|
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!");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,6 +117,7 @@ public class ModItems {
|
|||||||
public static Item wire_schrabidium;
|
public static Item wire_schrabidium;
|
||||||
public static Item wire_advanced_alloy;
|
public static Item wire_advanced_alloy;
|
||||||
public static Item coil_advanced_alloy;
|
public static Item coil_advanced_alloy;
|
||||||
|
public static Item coil_advanced_torus;
|
||||||
|
|
||||||
public static Item circuit_aluminium;
|
public static Item circuit_aluminium;
|
||||||
public static Item circuit_copper;
|
public static Item circuit_copper;
|
||||||
@ -594,6 +595,7 @@ public class ModItems {
|
|||||||
lithium = new Item().setUnlocalizedName("lithium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":lithium");
|
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");
|
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_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_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");
|
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_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_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_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_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_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);
|
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, coil_copper.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(coil_copper_torus, coil_copper_torus.getUnlocalizedName());
|
GameRegistry.registerItem(coil_copper_torus, coil_copper_torus.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(coil_advanced_alloy, coil_advanced_alloy.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(coil_tungsten, coil_tungsten.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(tank_steel, tank_steel.getUnlocalizedName());
|
GameRegistry.registerItem(tank_steel, tank_steel.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(motor, motor.getUnlocalizedName());
|
GameRegistry.registerItem(motor, motor.getUnlocalizedName());
|
||||||
|
|||||||
@ -51,6 +51,8 @@ public class HbmChestContents {
|
|||||||
new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 32, 5),
|
new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 32, 5),
|
||||||
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 8, 2),
|
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.grenade_nuclear, 0, 1, 1, 2),
|
||||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 2),
|
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 2),
|
||||||
new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 3),
|
new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 3),
|
||||||
|
|||||||
@ -13,6 +13,7 @@ public class ModDamageSource extends DamageSource {
|
|||||||
public static DamageSource mudPoisoning = (new DamageSource("mudPoisoning")).setDamageBypassesArmor();
|
public static DamageSource mudPoisoning = (new DamageSource("mudPoisoning")).setDamageBypassesArmor();
|
||||||
public static DamageSource euthanizedSelf = (new DamageSource("euthanizedSelf")).setDamageBypassesArmor();
|
public static DamageSource euthanizedSelf = (new DamageSource("euthanizedSelf")).setDamageBypassesArmor();
|
||||||
public static DamageSource euthanizedSelf2 = (new DamageSource("euthanizedSelf2")).setDamageBypassesArmor();
|
public static DamageSource euthanizedSelf2 = (new DamageSource("euthanizedSelf2")).setDamageBypassesArmor();
|
||||||
|
public static DamageSource tauBlast = (new DamageSource("tauBlast")).setDamageBypassesArmor();
|
||||||
|
|
||||||
public ModDamageSource(String p_i1566_1_) {
|
public ModDamageSource(String p_i1566_1_) {
|
||||||
super(p_i1566_1_);
|
super(p_i1566_1_);
|
||||||
|
|||||||
@ -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_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_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_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.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.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 }));
|
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_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, 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_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 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 });
|
GameRegistry.addRecipe(new ItemStack(ModItems.grenade_strong, 2), new Object[] { " G ", "SGS", " S ", 'G', ModItems.grenade_generic, 'S', Items.gunpowder });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user