From 4aea1af8b5662c5a6f07d5188d1706ffcedf2ece Mon Sep 17 00:00:00 2001 From: Bob Date: Sun, 3 Nov 2024 21:32:07 +0100 Subject: [PATCH] there are spiders under my skin --- .../com/hbm/blocks/generic/BlockOutgas.java | 2 +- .../com/hbm/blocks/generic/DecoBlockAlt.java | 1 - .../java/com/hbm/entity/EntityMappings.java | 3 +- .../projectile/EntityBulletBeamBase.java | 193 ++++++ .../projectile/EntityNightmareBlast.java | 530 ----------------- .../entity/projectile/EntityPlasmaBeam.java | 556 ------------------ src/main/java/com/hbm/items/weapon/GunHP.java | 52 +- .../hbm/items/weapon/sedna/BulletConfig.java | 26 +- .../com/hbm/items/weapon/sedna/Receiver.java | 6 + .../weapon/sedna/factory/GunFactory.java | 1 + .../sedna/factory/GunFactoryClient.java | 9 +- .../hbm/items/weapon/sedna/factory/Lego.java | 71 ++- .../weapon/sedna/factory/LegoClient.java | 23 + .../weapon/sedna/factory/Orchestras.java | 11 +- .../weapon/sedna/factory/XFactoryEnergy.java | 85 ++- .../weapon/sedna/factory/XFactoryFlamer.java | 5 +- .../weapon/sedna/factory/XFactoryRocket.java | 7 +- .../java/com/hbm/lib/ModDamageSource.java | 4 - src/main/java/com/hbm/main/ClientProxy.java | 3 +- .../render/entity/projectile/RenderBeam.java | 80 +-- .../projectile/RenderOminousBullet.java | 87 --- .../weapon/sedna/ItemRenderTeslaCannon.java | 38 +- .../assets/hbm/textures/items/ammo.png | Bin 14417 -> 14728 bytes .../items/ammo_standard.capacitor.png | Bin 0 -> 250 bytes ...ammo_standard.capacitor_blacklightning.png | Bin 0 -> 249 bytes .../ammo_standard.capacitor_overcharge.png | Bin 0 -> 258 bytes 26 files changed, 443 insertions(+), 1350 deletions(-) create mode 100644 src/main/java/com/hbm/entity/projectile/EntityBulletBeamBase.java delete mode 100644 src/main/java/com/hbm/entity/projectile/EntityNightmareBlast.java delete mode 100644 src/main/java/com/hbm/entity/projectile/EntityPlasmaBeam.java delete mode 100644 src/main/java/com/hbm/render/entity/projectile/RenderOminousBullet.java create mode 100644 src/main/resources/assets/hbm/textures/items/ammo_standard.capacitor.png create mode 100644 src/main/resources/assets/hbm/textures/items/ammo_standard.capacitor_blacklightning.png create mode 100644 src/main/resources/assets/hbm/textures/items/ammo_standard.capacitor_overcharge.png diff --git a/src/main/java/com/hbm/blocks/generic/BlockOutgas.java b/src/main/java/com/hbm/blocks/generic/BlockOutgas.java index ae6107817..9fe92c1b9 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockOutgas.java +++ b/src/main/java/com/hbm/blocks/generic/BlockOutgas.java @@ -103,7 +103,7 @@ public class BlockOutgas extends BlockOre { @Override public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { - if(onNeighbour) { + if(onNeighbour && world.rand.nextInt(3) == 0) { for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { diff --git a/src/main/java/com/hbm/blocks/generic/DecoBlockAlt.java b/src/main/java/com/hbm/blocks/generic/DecoBlockAlt.java index 020a202f7..97bd5d391 100644 --- a/src/main/java/com/hbm/blocks/generic/DecoBlockAlt.java +++ b/src/main/java/com/hbm/blocks/generic/DecoBlockAlt.java @@ -1,7 +1,6 @@ package com.hbm.blocks.generic; import java.util.ArrayList; -import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.items.ModItems; diff --git a/src/main/java/com/hbm/entity/EntityMappings.java b/src/main/java/com/hbm/entity/EntityMappings.java index ca32a4fd0..352e85ca4 100644 --- a/src/main/java/com/hbm/entity/EntityMappings.java +++ b/src/main/java/com/hbm/entity/EntityMappings.java @@ -86,9 +86,7 @@ public class EntityMappings { addEntity(EntityGrenadeASchrab.class, "entity_grenade_aschrab", 500); addEntity(EntityFalloutRain.class, "entity_fallout", 1000); addEntity(EntityEMPBlast.class, "entity_emp_blast", 1000); - addEntity(EntityPlasmaBeam.class, "entity_immolator_beam", 1000); addEntity(EntityLN2.class, "entity_LN2", 1000); - addEntity(EntityNightmareBlast.class, "entity_ominous_bullet", 1000); addEntity(EntityGrenadePulse.class, "entity_grenade_pulse", 1000); addEntity(EntityLaserBeam.class, "entity_laser_beam", 1000); addEntity(EntityMinerBeam.class, "entity_miner_beam", 1000); @@ -150,6 +148,7 @@ public class EntityMappings { addEntity(EntityFallingNuke.class, "entity_falling_bomb", 1000); addEntity(EntityBulletBaseNT.class, "entity_bullet_mk3", 250, false); addEntity(EntityBulletBaseMK4.class, "entity_bullet_mk4", 250, false); + addEntity(EntityBulletBeamBase.class, "entity_beam_mk4", 250, false); addEntity(EntityMinerRocket.class, "entity_miner_lander", 1000); addEntity(EntityFogFX.class, "entity_nuclear_fog", 1000); addEntity(EntityDuchessGambit.class, "entity_duchessgambit", 1000); diff --git a/src/main/java/com/hbm/entity/projectile/EntityBulletBeamBase.java b/src/main/java/com/hbm/entity/projectile/EntityBulletBeamBase.java new file mode 100644 index 000000000..38931acf7 --- /dev/null +++ b/src/main/java/com/hbm/entity/projectile/EntityBulletBeamBase.java @@ -0,0 +1,193 @@ +package com.hbm.entity.projectile; + +import java.util.List; + +import com.hbm.items.weapon.sedna.BulletConfig; + +import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import io.netty.buffer.ByteBuf; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityBulletBeamBase extends Entity implements IEntityAdditionalSpawnData { + + protected EntityLivingBase thrower; + public BulletConfig config; + public float damage; + public double headingX; + public double headingY; + public double headingZ; + public double beamLength; + + public EntityBulletBeamBase(World world) { + super(world); + this.ignoreFrustumCheck = true; + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } + + public EntityBulletBeamBase(EntityLivingBase entity, BulletConfig config, float baseDamage, float angularInaccuracy, double sideOffset, double heightOffset, double frontOffset) { + this(entity.worldObj); + + this.thrower = entity; + this.setBulletConfig(config); + + this.damage = baseDamage * this.config.damageMult; + + this.setLocationAndAngles(thrower.posX, thrower.posY + thrower.getEyeHeight(), thrower.posZ, thrower.rotationYaw + (float) rand.nextGaussian() * angularInaccuracy, thrower.rotationPitch + (float) rand.nextGaussian() * angularInaccuracy); + + Vec3 offset = Vec3.createVectorHelper(sideOffset, heightOffset, frontOffset); + offset.rotateAroundX(-this.rotationPitch / 180F * (float) Math.PI); + offset.rotateAroundY(-this.rotationYaw / 180F * (float) Math.PI); + + this.posX += offset.xCoord; + this.posY += offset.yCoord; + this.posZ += offset.zCoord; + + this.setPosition(this.posX, this.posY, this.posZ); + + this.headingX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); + this.headingZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI)); + this.headingY = (double) (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI)); + + double range = 150D; + this.headingX *= range; + this.headingY *= range; + this.headingZ *= range; + + performHitscan(); + } + + @Override + protected void entityInit() { + this.dataWatcher.addObject(3, Integer.valueOf(0)); + } + + public void setBulletConfig(BulletConfig config) { + this.config = config; + this.dataWatcher.updateObject(3, config.id); + } + + public BulletConfig getBulletConfig() { + int id = this.dataWatcher.getWatchableObjectInt(3); + if(id < 0 || id > BulletConfig.configs.size()) return null; + return BulletConfig.configs.get(id); + } + + @Override + public void onUpdate() { + + if(config == null) config = this.getBulletConfig(); + + if(config == null){ + this.setDead(); + return; + } + + super.onUpdate(); + + if(!worldObj.isRemote && this.ticksExisted > config.expires) this.setDead(); + } + + protected void performHitscan() { + + Vec3 pos = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 nextPos = Vec3.createVectorHelper(this.posX + this.headingX, this.posY + this.headingY, this.posZ + this.headingZ); + MovingObjectPosition mop = null; + if(!this.isSpectral()) mop = this.worldObj.func_147447_a(pos, nextPos, false, true, false); + pos = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + nextPos = Vec3.createVectorHelper(this.posX + this.headingX, this.posY + this.headingY, this.posZ + this.headingZ); + + if(mop != null) { + nextPos = Vec3.createVectorHelper(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord); + } + + if(!this.worldObj.isRemote && this.doesImpactEntities()) { + + Entity hitEntity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.headingX, this.headingY, this.headingZ).expand(1.0D, 1.0D, 1.0D)); + double nearest = 0.0D; + MovingObjectPosition nonPenImpact = null; + + for(int j = 0; j < list.size(); ++j) { + Entity entity = (Entity) list.get(j); + + if(entity.canBeCollidedWith() && entity != thrower) { + double hitbox = 0.3F; + AxisAlignedBB aabb = entity.boundingBox.expand(hitbox, hitbox, hitbox); + MovingObjectPosition hitMop = aabb.calculateIntercept(pos, nextPos); + + if(hitMop != null) { + + // if penetration is enabled, run impact for all intersecting entities + if(this.doesPenetrate()) { + this.onImpact(new MovingObjectPosition(entity, hitMop.hitVec)); + } else { + + double dist = pos.distanceTo(hitMop.hitVec); + + if(dist < nearest || nearest == 0.0D) { + hitEntity = entity; + nearest = dist; + nonPenImpact = hitMop; + } + } + } + } + } + + // if not, only run it for the closest MOP + if(!this.doesPenetrate() && hitEntity != null) { + mop = new MovingObjectPosition(hitEntity, nonPenImpact.hitVec); + } + } + + if(mop != null) { + if(mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ) == Blocks.portal) { + this.setInPortal(); + } else { + this.onImpact(mop); + } + + Vec3 vec = Vec3.createVectorHelper(mop.hitVec.xCoord - posX, mop.hitVec.yCoord - posY, mop.hitVec.zCoord - posZ); + this.beamLength = vec.lengthVector(); + } else { + Vec3 vec = Vec3.createVectorHelper(nextPos.xCoord - posX, nextPos.yCoord - posY, nextPos.zCoord - posZ); + this.beamLength = vec.lengthVector(); + } + + } + + + protected void onImpact(MovingObjectPosition mop) { + if(!worldObj.isRemote) { + if(this.config.onImpactBeam != null) this.config.onImpactBeam.accept(this, mop); + } + } + + public boolean doesImpactEntities() { return this.config.impactsEntities; } + public boolean doesPenetrate() { return this.config.doesPenetrate; } + public boolean isSpectral() { return this.config.isSpectral; } + + @Override @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; } + + @Override protected void writeEntityToNBT(NBTTagCompound nbt) { } + @Override public boolean writeToNBTOptional(NBTTagCompound nbt) { return false; } + @Override public void readEntityFromNBT(NBTTagCompound nbt) { this.setDead(); } + + @Override public void writeSpawnData(ByteBuf buf) { + buf.writeDouble(beamLength); + } + @Override public void readSpawnData(ByteBuf buf) { + this.beamLength = buf.readDouble(); + } +} diff --git a/src/main/java/com/hbm/entity/projectile/EntityNightmareBlast.java b/src/main/java/com/hbm/entity/projectile/EntityNightmareBlast.java deleted file mode 100644 index 0ddbb2409..000000000 --- a/src/main/java/com/hbm/entity/projectile/EntityNightmareBlast.java +++ /dev/null @@ -1,530 +0,0 @@ -package com.hbm.entity.projectile; - -import java.util.List; - -import com.hbm.entity.grenade.EntityGrenadeZOMG; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.server.S2BPacketChangeGameState; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; - -public class EntityNightmareBlast extends Entity implements IProjectile -{ - private int field_145791_d = -1; - private int field_145792_e = -1; - private int field_145789_f = -1; - public double gravity = 0.0D; - private Block field_145790_g; - private int inData; - private boolean inGround; - /** 1 if the player can pick up the arrow */ - public int canBePickedUp; - /** Seems to be some sort of timer for animating an arrow. */ - public int arrowShake; - /** The owner of this arrow. */ - public Entity shootingEntity; - private int ticksInGround; - private int ticksInAir; - private double damage = 2.0D; - /** The amount of knockback an arrow applies when it hits a mob. */ - private int knockbackStrength; - public EntityNightmareBlast(World p_i1753_1_) - { - super(p_i1753_1_); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - } - - public EntityNightmareBlast(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) - { - super(p_i1754_1_); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); - this.yOffset = 0.0F; - } - - public EntityNightmareBlast(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) - { - super(p_i1755_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1755_2_; - - if (p_i1755_2_ instanceof EntityPlayer) - { - this.canBePickedUp = 1; - } - - this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; - double d0 = p_i1755_3_.posX - p_i1755_2_.posX; - double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; - double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; - double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); - - if (d3 >= 1.0E-7D) - { - float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); - double d4 = d0 / d3; - double d5 = d2 / d3; - this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); - this.yOffset = 0.0F; - float f4 = (float)d3 * 0.2F; - this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); - } - } - - public EntityNightmareBlast(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, EntityGrenadeZOMG grenade) { - super(p_i1756_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1756_2_; - - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(grenade.posX, grenade.posY + grenade.getEyeHeight(), grenade.posZ, - grenade.rotationYaw, grenade.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 EntityNightmareBlast(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) - { - 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); - } - - public EntityNightmareBlast(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; - } - - @Override - protected void entityInit() - { - this.dataWatcher.addObject(16, 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.054499999832361937D * p_70186_8_; - p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.054499999832361937D * p_70186_8_; - p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.054499999832361937D * 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_); - } - - /** - * 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_; - - 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(); - - if(this.ticksExisted > 100) - this.setDead(); - - if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) - { - 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); - - if (block.getMaterial() != Material.air) - { - block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - if(!worldObj.isRemote) { - this.worldObj.setBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f, Blocks.air); - this.setDead(); - } - } - - if (this.arrowShake > 0) - { - --this.arrowShake; - } - 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 (movingobjectposition != null) - { - vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } - - 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; - - for (i = 0; i < list.size(); ++i) - { - Entity entity1 = (Entity)list.get(i); - - 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 (movingobjectposition1 != null) - { - double d1 = vec31.distanceTo(movingobjectposition1.hitVec); - - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } - - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } - - 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.shootingEntity == null) - { - damagesource = DamageSource.generic; - } - else - { - damagesource = DamageSource.generic; - } - - if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) - { - movingobjectposition.entityHit.setFire(5); - } - - if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) - { - if (movingobjectposition.entityHit instanceof EntityLivingBase) - { - EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - - if (this.knockbackStrength > 0) - { - f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - - if (f4 > 0.0F) - { - movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / 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 (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 (!(movingobjectposition.entityHit instanceof EntityEnderman)) - { - if (!this.worldObj.isRemote && movingobjectposition.entityHit instanceof EntityLivingBase) - { - movingobjectposition.entityHit.attackEntityFrom(damagesource, (float) this.damage); - if(!worldObj.isRemote) - this.worldObj.setBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f, Blocks.air); - this.setDead(); - } - } - } - } - else - { - 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.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); - - f1 = 0.05F; - - 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.isWet()) - { - this.extinguish(); - } - - this.setPosition(this.posX, this.posY, this.posZ); - this.func_145775_I(); - } - } - - /** - * (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); - } - - /** - * (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; - - if (p_70037_1_.hasKey("damage", 99)) - { - this.damage = p_70037_1_.getDouble("damage"); - } - - 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; - } - } - - /** - * 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 void setDamage(double p_70239_1_) - { - this.damage = p_70239_1_; - } - - 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_; - } - - /** - * 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); - - if (p_70243_1_) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); - } - else - { - this.dataWatcher.updateObject(16, 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; - } -} diff --git a/src/main/java/com/hbm/entity/projectile/EntityPlasmaBeam.java b/src/main/java/com/hbm/entity/projectile/EntityPlasmaBeam.java deleted file mode 100644 index 406d71d14..000000000 --- a/src/main/java/com/hbm/entity/projectile/EntityPlasmaBeam.java +++ /dev/null @@ -1,556 +0,0 @@ -package com.hbm.entity.projectile; - -import java.util.List; - -import com.hbm.entity.grenade.EntityGrenadeZOMG; -import com.hbm.explosion.ExplosionChaos; -import com.hbm.explosion.ExplosionThermo; -import com.hbm.items.ModItems; -import com.hbm.lib.ModDamageSource; -import com.hbm.main.MainRegistry; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.IProjectile; -import net.minecraft.entity.monster.EntityEnderman; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.server.S2BPacketChangeGameState; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; - -public class EntityPlasmaBeam extends Entity implements IProjectile -{ - private int field_145791_d = -1; - private int field_145792_e = -1; - private int field_145789_f = -1; - public double gravity = 0.0D; - private Block field_145790_g; - private int inData; - private boolean inGround; - /** 1 if the player can pick up the arrow */ - public int canBePickedUp; - /** Seems to be some sort of timer for animating an arrow. */ - public int arrowShake; - /** The owner of this arrow. */ - public Entity shootingEntity; - private int ticksInGround; - private int ticksInAir; - private double damage = 2.0D; - /** The amount of knockback an arrow applies when it hits a mob. */ - private int knockbackStrength; - public EntityPlasmaBeam(World p_i1753_1_) - { - super(p_i1753_1_); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - } - - public EntityPlasmaBeam(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) - { - super(p_i1754_1_); - this.renderDistanceWeight = 10.0D; - this.setSize(0.5F, 0.5F); - this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); - this.yOffset = 0.0F; - } - - public EntityPlasmaBeam(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) - { - super(p_i1755_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1755_2_; - - if (p_i1755_2_ instanceof EntityPlayer) - { - this.canBePickedUp = 1; - } - - this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; - double d0 = p_i1755_3_.posX - p_i1755_2_.posX; - double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; - double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; - double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); - - if (d3 >= 1.0E-7D) - { - float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; - float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); - double d4 = d0 / d3; - double d5 = d2 / d3; - this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); - this.yOffset = 0.0F; - float f4 = (float)d3 * 0.2F; - this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); - } - } - - public EntityPlasmaBeam(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, EntityGrenadeZOMG grenade) { - super(p_i1756_1_); - this.renderDistanceWeight = 10.0D; - this.shootingEntity = p_i1756_2_; - - this.setSize(0.5F, 0.5F); - this.setLocationAndAngles(grenade.posX, grenade.posY + grenade.getEyeHeight(), grenade.posZ, - grenade.rotationYaw, grenade.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 EntityPlasmaBeam(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) - { - 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); - } - - public EntityPlasmaBeam(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; - } - - @Override - protected void entityInit() - { - this.dataWatcher.addObject(16, 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.002499999832361937D * p_70186_8_; - p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_; - p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * 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_); - } - - /** - * 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_; - - 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(); - - if(this.ticksExisted > 100) - this.setDead(); - - if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) - { - 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); - - if (block.getMaterial() != Material.air) - { - block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - if(!worldObj.isRemote) { - ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 2); - ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5); - ExplosionThermo.scorchLight(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 3); - } - this.setDead(); - } - - if (this.arrowShake > 0) - { - --this.arrowShake; - } - 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 (movingobjectposition != null) - { - vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); - } - - 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; - - for (i = 0; i < list.size(); ++i) - { - Entity entity1 = (Entity)list.get(i); - - 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 (movingobjectposition1 != null) - { - double d1 = vec31.distanceTo(movingobjectposition1.hitVec); - - if (d1 < d0 || d0 == 0.0D) - { - entity = entity1; - d0 = d1; - } - } - } - } - - if (entity != null) - { - movingobjectposition = new MovingObjectPosition(entity); - } - - 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; - } - - if(this.ticksExisted > 5 && surviveImmolation(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.shootingEntity == null) - { - damagesource = DamageSource.generic; - } - else - { - damagesource = ModDamageSource.causePlasmaDamage(this, this.shootingEntity); - } - - if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) - { - movingobjectposition.entityHit.setFire(5); - } - - if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) - { - if (movingobjectposition.entityHit instanceof EntityLivingBase) - { - EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - - if (this.knockbackStrength > 0) - { - f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); - - if (f4 > 0.0F) - { - movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / 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 (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 (!(movingobjectposition.entityHit instanceof EntityEnderman)) - { - if (!this.worldObj.isRemote && movingobjectposition.entityHit instanceof EntityLivingBase) - { - movingobjectposition.entityHit.attackEntityFrom(damagesource, 25 + rand.nextInt(20)); - if(!worldObj.isRemote) { - ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 2); - ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5); - ExplosionThermo.scorchLight(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 3); - } - this.setDead(); - } - } - } - } - else - { - 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.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); - - f1 = 0.05F; - - if (this.isInWater()) - { - this.setDead(); - if(!worldObj.isRemote) { - ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 2); - ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5); - ExplosionThermo.scorchLight(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 3); - } - } - - if (this.isWet()) - { - this.extinguish(); - } - - this.setPosition(this.posX, this.posY, this.posZ); - this.func_145775_I(); - } - } - - /** - * (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); - } - - /** - * (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; - - if (p_70037_1_.hasKey("damage", 99)) - { - this.damage = p_70037_1_.getDouble("damage"); - } - - 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; - } - } - - /** - * 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 void setDamage(double p_70239_1_) - { - this.damage = p_70239_1_; - } - - 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_; - } - - /** - * 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); - - if (p_70243_1_) - { - this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); - } - else - { - this.dataWatcher.updateObject(16, 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; - } - - private boolean surviveImmolation(EntityPlayer player) { - if(player.inventory.hasItem(ModItems.gun_revolver_pip) && player.inventory.hasItem(ModItems.bottle_sparkle) && player.inventory.hasItem(ModItems.geiger_counter)) { - player.triggerAchievement(MainRegistry.achSacrifice); - player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 3 * 20, 6)); - return true; - } else { - return false; - } - } -} diff --git a/src/main/java/com/hbm/items/weapon/GunHP.java b/src/main/java/com/hbm/items/weapon/GunHP.java index 8d3d0f31b..5899bb44a 100644 --- a/src/main/java/com/hbm/items/weapon/GunHP.java +++ b/src/main/java/com/hbm/items/weapon/GunHP.java @@ -4,10 +4,6 @@ import java.util.List; import java.util.Random; import com.google.common.collect.Multimap; -import com.hbm.entity.projectile.EntityPlasmaBeam; -import com.hbm.items.ModItems; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; @@ -17,6 +13,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.event.entity.player.ArrowNockEvent; +@Deprecated public class GunHP extends Item { Random rand = new Random(); @@ -46,52 +43,7 @@ public class GunHP extends Item { } @Override - public void onUsingTick(ItemStack stack, EntityPlayer player, int count) { - World world = player.worldObj; - - boolean flag = player.capabilities.isCreativeMode - || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; - if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_hp_ammo))) { - - EntityPlasmaBeam plasma = new EntityPlasmaBeam(world, player, 1F); - EntityPlasmaBeam plasma1 = new EntityPlasmaBeam(world, player, 1F); - EntityPlasmaBeam plasma2 = new EntityPlasmaBeam(world, player, 1F); - EntityPlasmaBeam plasma3 = new EntityPlasmaBeam(world, player, 1F); - EntityPlasmaBeam plasma4 = new EntityPlasmaBeam(world, player, 1F); - plasma1.motionX *= (0.75 + (rand.nextDouble() * 0.5)); - plasma1.motionY *= (0.75 + (rand.nextDouble() * 0.5)); - plasma1.motionZ *= (0.75 + (rand.nextDouble() * 0.5)); - plasma2.motionX *= (0.75 + (rand.nextDouble() * 0.5)); - plasma2.motionY *= (0.75 + (rand.nextDouble() * 0.5)); - plasma2.motionZ *= (0.75 + (rand.nextDouble() * 0.5)); - plasma3.motionX *= (0.75 + (rand.nextDouble() * 0.5)); - plasma3.motionY *= (0.75 + (rand.nextDouble() * 0.5)); - plasma3.motionZ *= (0.75 + (rand.nextDouble() * 0.5)); - plasma4.motionX *= (0.75 + (rand.nextDouble() * 0.5)); - plasma4.motionY *= (0.75 + (rand.nextDouble() * 0.5)); - plasma4.motionZ *= (0.75 + (rand.nextDouble() * 0.5)); - - if (flag) { - plasma.canBePickedUp = 2; - } else { - if (count % 20 == 0) - player.inventory.consumeInventoryItem(ModItems.gun_hp_ammo); - } - - if (count == this.getMaxItemUseDuration(stack)) - world.playSoundAtEntity(player, "hbm:weapon.immolatorIgnite", 1.0F, 1F); - if (count % 10 == 0) - world.playSoundAtEntity(player, "hbm:weapon.immolatorShoot", 1.0F, 1F); - - if (!world.isRemote) { - world.spawnEntityInWorld(plasma); - world.spawnEntityInWorld(plasma1); - world.spawnEntityInWorld(plasma2); - world.spawnEntityInWorld(plasma3); - world.spawnEntityInWorld(plasma4); - } - } - } + public void onUsingTick(ItemStack stack, EntityPlayer player, int count) { } @Override public int getItemEnchantability() { diff --git a/src/main/java/com/hbm/items/weapon/sedna/BulletConfig.java b/src/main/java/com/hbm/items/weapon/sedna/BulletConfig.java index 77a08d1fd..da182ef88 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/BulletConfig.java +++ b/src/main/java/com/hbm/items/weapon/sedna/BulletConfig.java @@ -6,6 +6,8 @@ import java.util.function.BiConsumer; import java.util.function.Consumer; import com.hbm.entity.projectile.EntityBulletBaseMK4; +import com.hbm.entity.projectile.EntityBulletBeamBase; +import com.hbm.interfaces.NotableComments; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; @@ -25,6 +27,7 @@ import net.minecraft.util.Vec3; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.ForgeDirection; +@NotableComments public class BulletConfig implements Cloneable { public static List configs = new ArrayList(); @@ -55,8 +58,9 @@ public class BulletConfig implements Cloneable { /** Whether damage dealt to an entity is subtracted from the projectile's damage on penetration */ public boolean damageFalloffByPen = true; - public Consumer onUpdate; + public Consumer onUpdate; public BiConsumer onImpact; + public BiConsumer onImpactBeam; //fuck fuck fuck fuck i should have used a better base class here god dammit public BiConsumer onRicochet = LAMBDA_STANDARD_RICOCHET; public BiConsumer onEntityHit = LAMBDA_STANDARD_ENTITY_HIT; @@ -71,6 +75,7 @@ public class BulletConfig implements Cloneable { public boolean renderRotations = true; public SpentCasing casing; public BiConsumer renderer; + public BiConsumer rendererBeam; public BulletConfig() { this.id = configs.size(); @@ -108,18 +113,21 @@ public class BulletConfig implements Cloneable { public BulletConfig setSelfDamageDelay(int delay) { this.selfDamageDelay = delay; return this; } public BulletConfig setRenderRotations(boolean rot) { this.renderRotations = rot; return this; } public BulletConfig setCasing(SpentCasing casing) { this.casing = casing; return this; } - public BulletConfig setRenderer(BiConsumer renderer) { this.renderer = renderer; return this; } - - public BulletConfig setOnUpdate(Consumer lambda) { this.onUpdate = lambda; return this; } - public BulletConfig setOnRicochet(BiConsumer lambda) { this.onRicochet = lambda; return this; } - public BulletConfig setOnImpact(BiConsumer lambda) { this.onImpact = lambda; return this; } - public BulletConfig setOnEntityHit(BiConsumer lambda) { this.onEntityHit = lambda; return this; } - public DamageSource getDamage(EntityBulletBaseMK4 bullet, EntityLivingBase shooter, boolean bypass) { + public BulletConfig setRenderer(BiConsumer renderer) { this.renderer = renderer; return this; } + public BulletConfig setRendererBeam(BiConsumer renderer) { this.rendererBeam = renderer; return this; } + + public BulletConfig setOnUpdate(Consumer lambda) { this.onUpdate = lambda; return this; } + public BulletConfig setOnRicochet(BiConsumer lambda) { this.onRicochet = lambda; return this; } + public BulletConfig setOnImpact(BiConsumer lambda) { this.onImpact = lambda; return this; } + public BulletConfig setOnBeamImpact(BiConsumer lambda) { this.onImpactBeam = lambda; return this; } + public BulletConfig setOnEntityHit(BiConsumer lambda) { this.onEntityHit = lambda; return this; } + + public DamageSource getDamage(Entity projectile, EntityLivingBase shooter, boolean bypass) { DamageSource dmg; - if(shooter != null) dmg = new EntityDamageSourceIndirect(damageType, bullet, shooter); + if(shooter != null) dmg = new EntityDamageSourceIndirect(damageType, projectile, shooter); else dmg = new DamageSource(damageType); if(this.dmgProj) dmg.setProjectile(); diff --git a/src/main/java/com/hbm/items/weapon/sedna/Receiver.java b/src/main/java/com/hbm/items/weapon/sedna/Receiver.java index 36f97488a..66c5469fd 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/Receiver.java +++ b/src/main/java/com/hbm/items/weapon/sedna/Receiver.java @@ -143,6 +143,12 @@ public class Receiver { .fire(Lego.LAMBDA_STANDARD_FIRE); } + public Receiver setupBeamFire() { + return this + .canFire(Lego.LAMBDA_STANDARD_CAN_FIRE) + .fire(Lego.LAMBDA_BEAM_FIRE); + } + public Receiver setupLockonFire() { return this .canFire(Lego.LAMBDA_LOCKON_CAN_FIRE) diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java index a0eb311e0..f96cb449a 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java @@ -78,6 +78,7 @@ public class GunFactory { G40_HE, G40_HEAT, G40_DEMO, G40_INC, G40_PHOSPHORUS, ROCKET_HE, ROCKET_HEAT, ROCKET_DEMO, ROCKET_INC, ROCKET_PHOSPHORUS, FLAME_DIESEL, FLAME_GAS, FLAME_NAPALM, FLAME_BALEFIRE, + CAPACITOR, CAPACITOR_OVERCHARGE, CAPACITOR_BLACKLIGHTNING, M44_EQUESTRIAN, G12_EQUESTRIAN, BMG50_EQUESTRIAN } } diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java index 8ac90fb2f..d51c03c30 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactoryClient.java @@ -11,11 +11,13 @@ import static com.hbm.items.weapon.sedna.factory.XFactory556mm.*; import static com.hbm.items.weapon.sedna.factory.XFactory762mm.*; import static com.hbm.items.weapon.sedna.factory.XFactory9mm.*; import static com.hbm.items.weapon.sedna.factory.XFactoryBlackPowder.*; +import static com.hbm.items.weapon.sedna.factory.XFactoryEnergy.*; import static com.hbm.items.weapon.sedna.factory.XFactoryRocket.*; import java.util.function.BiConsumer; import com.hbm.entity.projectile.EntityBulletBaseMK4; +import com.hbm.entity.projectile.EntityBulletBeamBase; import com.hbm.items.ModItems; import com.hbm.items.weapon.sedna.BulletConfig; import com.hbm.items.weapon.sedna.ItemGunBaseNT; @@ -127,6 +129,8 @@ public class GunFactoryClient { setRendererBulk(LegoClient.RENDER_RPZB, rocket_rpzb); setRendererBulk(LegoClient.RENDER_QD, rocket_qd); setRendererBulk(LegoClient.RENDER_ML, rocket_ml); + + setRendererBulkBeam(LegoClient.RENDER_LIGHTNING, energy_tesla, energy_tesla_overcharge); //HUDS ((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO); ((ItemGunBaseNT) ModItems.gun_pepperbox) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO); @@ -164,7 +168,6 @@ public class GunFactoryClient { ((ItemGunBaseNT) ModItems.gun_maresleg_akimbo) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO); } - public static void setRendererBulk(BiConsumer renderer, BulletConfig... configs) { - for(BulletConfig config : configs) config.setRenderer(renderer); - } + public static void setRendererBulk(BiConsumer renderer, BulletConfig... configs) { for(BulletConfig config : configs) config.setRenderer(renderer); } + public static void setRendererBulkBeam(BiConsumer renderer, BulletConfig... configs) { for(BulletConfig config : configs) config.setRendererBeam(renderer); } } diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/Lego.java b/src/main/java/com/hbm/items/weapon/sedna/factory/Lego.java index 5c8a28cd7..c9c569641 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/Lego.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/Lego.java @@ -6,10 +6,12 @@ import java.util.function.BiConsumer; import java.util.function.BiFunction; import com.hbm.entity.projectile.EntityBulletBaseMK4; +import com.hbm.entity.projectile.EntityBulletBeamBase; import com.hbm.explosion.vanillant.ExplosionVNT; import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth; import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon; import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard; +import com.hbm.interfaces.NotableComments; import com.hbm.items.weapon.sedna.BulletConfig; import com.hbm.items.weapon.sedna.GunConfig; import com.hbm.items.weapon.sedna.ItemGunBaseNT; @@ -31,8 +33,11 @@ import net.minecraft.util.Vec3; /** * "LEGO" - i.e. standardized building blocks which can be used to set up gun configs easily. * + * small update, 24/11/03: this turned into fucking spaghetti. fuuuuuuuck. + * * @author hbm */ +@NotableComments public class Lego { public static final Random ANIM_RAND = new Random(); @@ -182,6 +187,9 @@ public class Lego { doStandardFire(stack, ctx, AnimType.CYCLE, true); ItemGunBaseNT.setIsLockedOn(stack, false); }; + public static BiConsumer LAMBDA_BEAM_FIRE = (stack, ctx) -> { + doBeamFire(stack, ctx, AnimType.CYCLE, true); + }; public static void doStandardFire(ItemStack stack, LambdaContext ctx, AnimType anim, boolean calcWear) { EntityLivingBase entity = ctx.entity; @@ -194,23 +202,58 @@ public class Lego { IMagazine mag = primary.getMagazine(stack); BulletConfig config = (BulletConfig) mag.getType(stack, ctx.inventory); + Vec3 offset = primary.getProjectileOffset(stack); + double forwardOffset = offset.xCoord; + double heightOffset = offset.yCoord; + double sideOffset = ItemGunBaseNT.getIsAiming(stack) ? 0 : offset.zCoord; //TODO: make this configurable + + /*forwardOffset = 0.75; + heightOffset = -0.125; + sideOffset = -0.25D;*/ + + int projectiles = config.projectilesMin; + if(config.projectilesMax > config.projectilesMin) projectiles += entity.getRNG().nextInt(config.projectilesMax - config.projectilesMin + 1); + + for(int i = 0; i < projectiles; i++) { + float damage = calcDamage(ctx, stack, primary, calcWear, index); + float spread = calcSpread(ctx, stack, primary, calcWear, index, aim); + EntityBulletBaseMK4 mk4 = new EntityBulletBaseMK4(entity, config, damage, spread, sideOffset, heightOffset, forwardOffset); + if(ItemGunBaseNT.getIsLockedOn(stack)) mk4.lockonTarget = entity.worldObj.getEntityByID(ItemGunBaseNT.getLockonTarget(stack)); + entity.worldObj.spawnEntityInWorld(mk4); + } + + mag.useUpAmmo(stack, ctx.inventory, 1); + if(calcWear) ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear, ctx.config.getDurability(stack))); + } + + //shittily copy pasted because god damn this sucks ass why do projectiles need this much fucking setup jesus christ have mercy + public static void doBeamFire(ItemStack stack, LambdaContext ctx, AnimType anim, boolean calcWear) { + EntityLivingBase entity = ctx.entity; + EntityPlayer player = ctx.getPlayer(); + int index = ctx.configIndex; + if(anim != null) ItemGunBaseNT.playAnimation(player, stack, anim, ctx.configIndex); + + float aim = ItemGunBaseNT.getIsAiming(stack) ? 0.25F : 1F; + Receiver primary = ctx.config.getReceivers(stack)[0]; + IMagazine mag = primary.getMagazine(stack); + BulletConfig config = (BulletConfig) mag.getType(stack, ctx.inventory); + Vec3 offset = primary.getProjectileOffset(stack); double forwardOffset = offset.xCoord; double heightOffset = offset.yCoord; double sideOffset = ItemGunBaseNT.getIsAiming(stack) ? 0 : offset.zCoord; /*forwardOffset = 0.75; - heightOffset = -0.125; - sideOffset = -0.25D;*/ + heightOffset = 0; + sideOffset = -0.375D;*/ int projectiles = config.projectilesMin; if(config.projectilesMax > config.projectilesMin) projectiles += entity.getRNG().nextInt(config.projectilesMax - config.projectilesMin + 1); for(int i = 0; i < projectiles; i++) { - float damage = primary.getBaseDamage(stack) * (calcWear ? getStandardWearDamage(stack, ctx.config, index) : 1); - float spread = primary.getGunSpread(stack) * aim + (calcWear ? getStandardWearSpread(stack, ctx.config, index) * 0.125F : 0F); - EntityBulletBaseMK4 mk4 = new EntityBulletBaseMK4(entity, config, damage, spread, sideOffset, heightOffset, forwardOffset); - if(ItemGunBaseNT.getIsLockedOn(stack)) mk4.lockonTarget = entity.worldObj.getEntityByID(ItemGunBaseNT.getLockonTarget(stack)); + float damage = calcDamage(ctx, stack, primary, calcWear, index); + float spread = calcSpread(ctx, stack, primary, calcWear, index, aim); + EntityBulletBeamBase mk4 = new EntityBulletBeamBase(entity, config, damage, spread, sideOffset, heightOffset, forwardOffset); entity.worldObj.spawnEntityInWorld(mk4); } @@ -224,11 +267,27 @@ public class Lego { return (percent - 0.5F) * 2F; } + /** Returns the standard multiplier for damage based on wear */ public static float getStandardWearDamage(ItemStack stack, GunConfig config, int index) { float percent = (float) ItemGunBaseNT.getWear(stack, index) / config.getDurability(stack); if(percent < 0.75F) return 1F; return 1F - (percent - 0.75F) * 2F; } + + /** Returns the full calculated damage based on guncfg and wear */ + public static float calcDamage(LambdaContext ctx, ItemStack stack, Receiver primary, boolean calcWear, int index) { + return primary.getBaseDamage(stack) * (calcWear ? getStandardWearDamage(stack, ctx.config, index) : 1); + } + + public static float calcSpread(LambdaContext ctx, ItemStack stack, Receiver primary, boolean calcWear, int index, float aim) { + return primary.getGunSpread(stack) * aim + (calcWear ? getStandardWearSpread(stack, ctx.config, index) * 0.125F : 0F); //TODO: redo all this spread shit + /* + * spread should have multiple additive parts: + * - hipfire penalty (mitigated by aiming) + * - innate gun inaccuracy (usually 0, increases with wear) + * - bullet inaccuray (usually 0, higher with buckshot) + */ + } public static void standardExplode(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float range) { standardExplode(bullet, mop, range, 1F); } public static void standardExplode(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float range, float damageMod) { diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java b/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java index c13fb1f6a..76a4bea17 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/LegoClient.java @@ -5,16 +5,22 @@ import java.util.function.BiConsumer; import org.lwjgl.opengl.GL11; import com.hbm.entity.projectile.EntityBulletBaseMK4; +import com.hbm.entity.projectile.EntityBulletBeamBase; import com.hbm.items.weapon.sedna.hud.HUDComponentAmmoCounter; import com.hbm.items.weapon.sedna.hud.HUDComponentDurabilityBar; import com.hbm.lib.RefStrings; import com.hbm.main.ResourceManager; +import com.hbm.render.util.BeamPronter; +import com.hbm.render.util.BeamPronter.EnumBeamType; +import com.hbm.render.util.BeamPronter.EnumWaveType; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Vec3; public class LegoClient { @@ -219,4 +225,21 @@ public class LegoClient { double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp; if(length > 0) renderBulletStandard(Tessellator.instance, 0x808080, 0xFFF2A7, length * 2, true); }; + + public static BiConsumer RENDER_LIGHTNING = (bullet, interp) -> { + + GL11.glPushMatrix(); + GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0); + GL11.glRotatef(-bullet.rotationPitch - 90, 1F, 0, 0); + Vec3 delta = Vec3.createVectorHelper(0, bullet.beamLength, 0); + double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1); + GL11.glScaled(age / 2 + 0.5, 1, age / 2 + 0.5); + double scale = 0.075D; + int colorInner = ((int)(0x20 * age) << 16) | ((int)(0x20 * age) << 8) | (int) (0x40 * age); + int colorOuter = ((int)(0x40 * age) << 16) | ((int)(0x40 * age) << 8) | (int) (0x80 * age); + BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorInner, colorInner, bullet.ticksExisted / 3, (int)(bullet.beamLength / 2 + 1), (float)scale * 1F, 4, 0.25F); + BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorOuter, colorOuter, bullet.ticksExisted, (int)(bullet.beamLength / 2 + 1), (float)scale * 7F, 2, 0.0625F); + BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorOuter, colorOuter, bullet.ticksExisted / 2, (int)(bullet.beamLength / 2 + 1), (float)scale * 7F, 2, 0.0625F); + GL11.glPopMatrix(); + }; } diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/Orchestras.java b/src/main/java/com/hbm/items/weapon/sedna/factory/Orchestras.java index 692a9bf69..f42bd576a 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/Orchestras.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/Orchestras.java @@ -859,19 +859,14 @@ public class Orchestras { int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex); if(type == AnimType.CYCLE) { - if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.shredderCycle", 0.25F, 1.5F); + if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.shredderCycle", 0.25F, 1.25F); } if(type == AnimType.CYCLE_DRY) { if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1F); - if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.shredderCycle", 0.25F, 1.5F); - } - if(type == AnimType.RELOAD) { - if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F); - if(timer == 32) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F); + if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.shredderCycle", 0.25F, 1.25F); } if(type == AnimType.INSPECT) { - if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F); - if(timer == 28) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F); + if(timer == 12) entity.worldObj.playSoundAtEntity(entity, "hbm:block.squeakyToy", 0.25F, 1F); } }; } diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryEnergy.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryEnergy.java index 08cfef072..e99b23dca 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryEnergy.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryEnergy.java @@ -1,7 +1,12 @@ package com.hbm.items.weapon.sedna.factory; +import java.util.function.BiConsumer; import java.util.function.BiFunction; +import com.hbm.entity.projectile.EntityBulletBeamBase; +import com.hbm.explosion.vanillant.ExplosionVNT; +import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth; +import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard; import com.hbm.items.ModItems; import com.hbm.items.weapon.sedna.BulletConfig; import com.hbm.items.weapon.sedna.Crosshair; @@ -11,54 +16,92 @@ import com.hbm.items.weapon.sedna.Receiver; import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality; import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import com.hbm.items.weapon.sedna.mags.MagazineBelt; +import com.hbm.main.MainRegistry; +import com.hbm.packet.PacketDispatcher; +import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.HbmAnimations.AnimType; +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MovingObjectPosition; +import net.minecraftforge.common.util.ForgeDirection; public class XFactoryEnergy { public static BulletConfig energy_tesla; + public static BulletConfig energy_tesla_overcharge; + public static BulletConfig energy_tesla_blacklightning; + + public static BiConsumer LAMBDA_LIGHTNING_HIT = (beam, mop) -> { + + if(mop.typeOfHit == mop.typeOfHit.BLOCK) { + ForgeDirection dir = ForgeDirection.getOrientation(mop.sideHit); + mop.hitVec.xCoord += dir.offsetX * 0.5; + mop.hitVec.yCoord += dir.offsetY * 0.5; + mop.hitVec.zCoord += dir.offsetZ * 0.5; + } + + ExplosionVNT vnt = new ExplosionVNT(beam.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 2F); + vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, beam.damage)); + vnt.setPlayerProcessor(new PlayerProcessorStandard()); + vnt.explode(); + beam.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, "hbm:entity.ufoBlast", 5.0F, 0.9F + beam.worldObj.rand.nextFloat() * 0.2F); + beam.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, "fireworks.blast", 5.0F, 0.5F); + + float yaw = beam.worldObj.rand.nextFloat() * 180F; + for(int i = 0; i < 3; i++) { + NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "plasmablast"); + data.setFloat("r", 0.5F); + data.setFloat("g", 0.5F); + data.setFloat("b", 1.0F); + data.setFloat("pitch", -60F + 60F * i); + data.setFloat("yaw", yaw); + data.setFloat("scale", 2F); + PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord), + new TargetPoint(beam.worldObj.provider.dimensionId, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 100)); + } + }; public static void init() { - - energy_tesla = new BulletConfig().setItem(EnumAmmo.P9_SP).setSpread(0.01F); + + energy_tesla = new BulletConfig().setItem(EnumAmmo.CAPACITOR).setSpread(0.0F).setLife(5).setRenderRotations(false).setDoesPenetrate(true) + .setOnBeamImpact(LAMBDA_LIGHTNING_HIT); + energy_tesla_overcharge = new BulletConfig().setItem(EnumAmmo.CAPACITOR_OVERCHARGE).setSpread(0.0F).setLife(5).setRenderRotations(false).setDoesPenetrate(true) + .setDamage(1.5F).setOnBeamImpact(LAMBDA_LIGHTNING_HIT); + energy_tesla_blacklightning = new BulletConfig().setItem(EnumAmmo.CAPACITOR_BLACKLIGHTNING).setSpread(0.0F).setLife(5).setRenderRotations(false).setDoesPenetrate(true) + .setDamage(5F).setOnBeamImpact(LAMBDA_LIGHTNING_HIT); ModItems.gun_tesla_cannon = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig() - .dura(2_000).draw(10).inspect(33).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE) + .dura(2_000).draw(10).inspect(33).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE) .rec(new Receiver(0) - .dmg(15F).delay(10).reload(44).jam(19).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F) - .mag(new MagazineBelt().addConfigs(energy_tesla)) - .offset(0.75, -0.125, -0.25) - .setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL)) + .dmg(15F).delay(20).reload(44).jam(19).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F) + .mag(new MagazineBelt().addConfigs(energy_tesla, energy_tesla_overcharge, energy_tesla_blacklightning)) + .offset(0.75, 0, -0.375) + .setupBeamFire().recoil(Lego.LAMBDA_STANDARD_RECOIL)) .setupStandardConfiguration() .anim(LAMBDA_TESLA_ANIMS).orchestra(Orchestras.ORCHESTRA_TESLA) ).setUnlocalizedName("gun_tesla_cannon"); } @SuppressWarnings("incomplete-switch") public static BiFunction LAMBDA_TESLA_ANIMS = (stack, type) -> { + int amount = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory); switch(type) { case EQUIP: return new BusAnimation() .addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_DOWN)); case CYCLE: return new BusAnimation() - .addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -1, 50, IType.SIN_DOWN).addPos(0, 0, 0, 150, IType.SIN_FULL)) - .addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 18, 100)); + .addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, ItemGunBaseNT.getIsAiming(stack) ? -0.5 : -1, 100, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL)) + .addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 22.5, 350)) + .addBus("COUNT", new BusAnimationSequence().addPos(amount, 0, 0, 0)); case CYCLE_DRY: return new BusAnimation() - .addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 18, 100)); - case RELOAD: return new BusAnimation() - .addBus("MAG", new BusAnimationSequence().addPos(0, -8, 0, 250, IType.SIN_UP).addPos(0, -8, 0, 1000).addPos(0, 0, 0, 300)) - .addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(-25, 0, 0, 300, IType.SIN_FULL).addPos(-25, 0, 0, 500).addPos(-27, 0, 0, 100, IType.SIN_DOWN).addPos(-25, 0, 0, 100, IType.SIN_FULL).addPos(-25, 0, 0, 150).addPos(0, 0, 0, 300, IType.SIN_FULL)); - case JAMMED: return new BusAnimation() - .addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, -2, 0, 150, IType.SIN_UP).addPos(0, 0, 0, 100)) - .addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(-2, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL)); + .addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 22.5, 350)); case INSPECT: return new BusAnimation() - .addBus("MAG", new BusAnimationSequence() - .addPos(0, -1, 0, 150).addPos(6, -1, 0, 150).addPos(6, 12, 0, 350, IType.SIN_DOWN).addPos(6, -2, 0, 350, IType.SIN_UP).addPos(6, -1, 0, 50) - .addPos(6, -1, 0, 100).addPos(0, -1, 0, 150, IType.SIN_FULL).addPos(0, 0, 0, 150, IType.SIN_UP)) - .addBus("SPEEN", new BusAnimationSequence().addPos(0, 0, 0, 300).addPos(360, 0, 0, 700)) - .addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 1450).addPos(-2, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL)); + .addBus("YOMI", new BusAnimationSequence().addPos(8, -4, 0, 0).addPos(4, -1, 0, 500, IType.SIN_DOWN).addPos(4, -1, 0, 1000).addPos(6, -6, 0, 500, IType.SIN_UP)) + .addBus("SQUEEZE", new BusAnimationSequence().addPos(1, 1, 1, 0).addPos(1, 1, 1, 750).addPos(1, 1, 0.5, 125).addPos(1, 1, 1, 125)); } return null; diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryFlamer.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryFlamer.java index 24b55823a..818c28f0d 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryFlamer.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryFlamer.java @@ -28,6 +28,7 @@ import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.HbmAnimations.AnimType; import net.minecraft.block.Block; +import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @@ -44,10 +45,10 @@ public class XFactoryFlamer { public static BulletConfig flame_balefire; public static BulletConfig flame_digamma; - public static Consumer LAMBDA_FIRE = (bullet) -> { + public static Consumer LAMBDA_FIRE = (bullet) -> { if(bullet.worldObj.isRemote && MainRegistry.proxy.me().getDistanceToEntity(bullet) < 100) FlameCreator.composeEffectClient(bullet.worldObj, bullet.posX, bullet.posY - 0.125, bullet.posZ, FlameCreator.META_FIRE); }; - public static Consumer LAMBDA_BALEFIRE = (bullet) -> { + public static Consumer LAMBDA_BALEFIRE = (bullet) -> { if(bullet.worldObj.isRemote && MainRegistry.proxy.me().getDistanceToEntity(bullet) < 100) FlameCreator.composeEffectClient(bullet.worldObj, bullet.posX, bullet.posY - 0.125, bullet.posZ, FlameCreator.META_BALEFIRE); }; public static BiConsumer LAMBDA_IGNITE_FIRE = (bullet, mop) -> { diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryRocket.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryRocket.java index c6d4eb2d7..cbf9b835e 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryRocket.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactoryRocket.java @@ -31,6 +31,7 @@ import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.HbmAnimations.AnimType; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; @@ -48,10 +49,12 @@ public class XFactoryRocket { public static BulletConfig[] rocket_ml; // FLYING - public static Consumer LAMBDA_STANDARD_ACCELERATE = (bullet) -> { + public static Consumer LAMBDA_STANDARD_ACCELERATE = (entity) -> { + EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity; if(bullet.accel < 7) bullet.accel += 0.4D; }; - public static Consumer LAMBDA_STEERING_ACCELERATE = (bullet) -> { + public static Consumer LAMBDA_STEERING_ACCELERATE = (entity) -> { + EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity; if(bullet.accel < 4) bullet.accel += 0.4D; if(bullet.getThrower() == null || !(bullet.getThrower() instanceof EntityPlayer)) return; diff --git a/src/main/java/com/hbm/lib/ModDamageSource.java b/src/main/java/com/hbm/lib/ModDamageSource.java index 691de5b8f..287385c20 100644 --- a/src/main/java/com/hbm/lib/ModDamageSource.java +++ b/src/main/java/com/hbm/lib/ModDamageSource.java @@ -95,10 +95,6 @@ public class ModDamageSource extends DamageSource { return (new EntityDamageSourceIndirect(s_euthanized, ent, hit)).setDamageBypassesArmor(); } - public static DamageSource causePlasmaDamage(EntityPlasmaBeam ent, Entity hit) { - return (new EntityDamageSourceIndirect(s_immolator, ent, hit)).setDamageBypassesArmor(); - } - public static DamageSource causeIceDamage(EntityLN2 ent, Entity hit) { return (new EntityDamageSourceIndirect(s_cryolator, ent, hit)).setDamageBypassesArmor(); } diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 43c1764f8..7fd22abdc 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -624,9 +624,8 @@ public class ClientProxy extends ServerProxy { RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class, new RenderRocket()); RenderingRegistry.registerEntityRenderingHandler(EntityBulletBaseNT.class, new RenderBullet()); RenderingRegistry.registerEntityRenderingHandler(EntityBulletBaseMK4.class, new RenderBulletMK4()); + RenderingRegistry.registerEntityRenderingHandler(EntityBulletBeamBase.class, new RenderBeam()); RenderingRegistry.registerEntityRenderingHandler(EntityRainbow.class, new RenderRainbow()); - RenderingRegistry.registerEntityRenderingHandler(EntityNightmareBlast.class, new RenderOminousBullet()); - RenderingRegistry.registerEntityRenderingHandler(EntityPlasmaBeam.class, new RenderBeam()); RenderingRegistry.registerEntityRenderingHandler(EntityLaserBeam.class, new RenderBeam2()); RenderingRegistry.registerEntityRenderingHandler(EntityMinerBeam.class, new RenderBeam3()); RenderingRegistry.registerEntityRenderingHandler(EntitySparkBeam.class, new RenderBeam4()); diff --git a/src/main/java/com/hbm/render/entity/projectile/RenderBeam.java b/src/main/java/com/hbm/render/entity/projectile/RenderBeam.java index 6a0e4a6fe..10db6d628 100644 --- a/src/main/java/com/hbm/render/entity/projectile/RenderBeam.java +++ b/src/main/java/com/hbm/render/entity/projectile/RenderBeam.java @@ -1,80 +1,36 @@ package com.hbm.render.entity.projectile; -import java.util.Random; - import org.lwjgl.opengl.GL11; -import com.hbm.lib.RefStrings; -import net.minecraft.client.renderer.Tessellator; +import com.hbm.entity.projectile.EntityBulletBeamBase; +import com.hbm.main.ResourceManager; + import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; public class RenderBeam extends Render { - - Random rand = new Random(); @Override - public void doRender(Entity rocket, double x, double y, double z, float p_76986_8_, float p_76986_9_) { - float radius = 0.12F; - //float radius = 0.06F; - int distance = 4; - Tessellator tessellator = Tessellator.instance; - + public void doRender(Entity entity, double x, double y, double z, float f0, float interp) { + EntityBulletBeamBase bullet = (EntityBulletBeamBase) entity; + if(bullet.config == null) bullet.config = bullet.getBulletConfig(); + if(bullet.config == null) return; + GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); GL11.glTranslatef((float) x, (float) y, (float) z); - - GL11.glRotatef(rocket.rotationYaw, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-rocket.rotationPitch, 1.0F, 0.0F, 0.0F); - - boolean red = false; - boolean green = true; - boolean blue = false; - - for (float o = 0; o <= radius; o += radius / 8) { - float color = 1f - (o * 8.333f); - if (color < 0) - color = 0; - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); - tessellator.addVertex(0 + o, 0 - o, 0); - tessellator.addVertex(0 + o, 0 + o, 0); - tessellator.addVertex(0 + o, 0 + o, 0 + distance); - tessellator.addVertex(0 + o, 0 - o, 0 + distance); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); - tessellator.addVertex(0 - o, 0 - o, 0); - tessellator.addVertex(0 + o, 0 - o, 0); - tessellator.addVertex(0 + o, 0 - o, 0 + distance); - tessellator.addVertex(0 - o, 0 - o, 0 + distance); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); - tessellator.addVertex(0 - o, 0 + o, 0); - tessellator.addVertex(0 - o, 0 - o, 0); - tessellator.addVertex(0 - o, 0 - o, 0 + distance); - tessellator.addVertex(0 - o, 0 + o, 0 + distance); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); - tessellator.addVertex(0 + o, 0 + o, 0); - tessellator.addVertex(0 - o, 0 + o, 0); - tessellator.addVertex(0 - o, 0 + o, 0 + distance); - tessellator.addVertex(0 + o, 0 + o, 0 + distance); - tessellator.draw(); + + if(bullet.config.renderRotations) { + GL11.glRotatef(bullet.prevRotationYaw + (bullet.rotationYaw - bullet.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(bullet.prevRotationPitch + (bullet.rotationPitch - bullet.prevRotationPitch) * interp + 180, 0.0F, 0.0F, 1.0F); } - GL11.glDisable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_TEXTURE_2D); + + if(bullet.config.rendererBeam != null) { + bullet.config.rendererBeam.accept(bullet, interp); + } + GL11.glPopMatrix(); } - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return new ResourceLocation(RefStrings.MODID + ":textures/models/PlasmaBeam.png"); - } + @Override protected ResourceLocation getEntityTexture(Entity entity) { return ResourceManager.universal; } } diff --git a/src/main/java/com/hbm/render/entity/projectile/RenderOminousBullet.java b/src/main/java/com/hbm/render/entity/projectile/RenderOminousBullet.java deleted file mode 100644 index 09bec73a2..000000000 --- a/src/main/java/com/hbm/render/entity/projectile/RenderOminousBullet.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.hbm.render.entity.projectile; - -import java.util.Random; - -import org.lwjgl.opengl.GL11; - -import com.hbm.lib.RefStrings; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.entity.Entity; -import net.minecraft.util.ResourceLocation; - -public class RenderOminousBullet extends Render { - - Random rand = new Random(); - - @Override - public void doRender(Entity rocket, double x, double y, double z, float p_76986_8_, float p_76986_9_) { - float radius = 0.12F; - int distance = 4; - - radius = 0.03F; - - Tessellator tessellator = Tessellator.instance; - - GL11.glPushMatrix(); - GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); - GL11.glTranslatef((float) x, (float) y, (float) z); - - GL11.glRotatef(rocket.rotationYaw, 0.0F, 1.0F, 0.0F); - GL11.glRotatef(-rocket.rotationPitch, 1.0F, 0.0F, 0.0F); - - boolean red = false; - boolean green = false; - boolean blue = false; - - green = true; - red = true; - - //for (float o = 0; o <= radius; o += radius / 8) { - for (float o = 0; o <= radius; o += radius / 1) { - float color = 1f - (o * 8.333f); - if (color < 0) - color = 0; - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); - tessellator.addVertex(0 + o, 0 - o, 0); - tessellator.addVertex(0 + o, 0 + o, 0); - tessellator.addVertex(0 + o, 0 + o, 0 + distance); - tessellator.addVertex(0 + o, 0 - o, 0 + distance); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); - tessellator.addVertex(0 - o, 0 - o, 0); - tessellator.addVertex(0 + o, 0 - o, 0); - tessellator.addVertex(0 + o, 0 - o, 0 + distance); - tessellator.addVertex(0 - o, 0 - o, 0 + distance); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); - tessellator.addVertex(0 - o, 0 + o, 0); - tessellator.addVertex(0 - o, 0 - o, 0); - tessellator.addVertex(0 - o, 0 - o, 0 + distance); - tessellator.addVertex(0 - o, 0 + o, 0 + distance); - tessellator.draw(); - tessellator.startDrawingQuads(); - tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); - tessellator.addVertex(0 + o, 0 + o, 0); - tessellator.addVertex(0 - o, 0 + o, 0); - tessellator.addVertex(0 - o, 0 + o, 0 + distance); - tessellator.addVertex(0 + o, 0 + o, 0 + distance); - tessellator.draw(); - } - GL11.glDisable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glPopMatrix(); - } - - @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return new ResourceLocation(RefStrings.MODID + ":textures/models/Rainbow.png"); - } -} diff --git a/src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderTeslaCannon.java b/src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderTeslaCannon.java index 6a9b4f26d..d3192e3f0 100644 --- a/src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderTeslaCannon.java +++ b/src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderTeslaCannon.java @@ -6,6 +6,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT; import com.hbm.main.MainRegistry; import com.hbm.main.ResourceManager; import com.hbm.render.anim.HbmAnimations; +import com.hbm.render.tileentity.RenderPlushie; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; @@ -36,26 +37,41 @@ public class ItemRenderTeslaCannon extends ItemRenderWeaponBase { GL11.glScaled(scale, scale, scale); double[] equip = HbmAnimations.getRelevantTransformation("EQUIP"); + double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL"); + double[] cycle = HbmAnimations.getRelevantTransformation("CYCLE"); + double[] count = HbmAnimations.getRelevantTransformation("COUNT"); + double[] yomi = HbmAnimations.getRelevantTransformation("YOMI"); + double[] squeeze = HbmAnimations.getRelevantTransformation("SQUEEZE"); GL11.glTranslated(0, -2, -2); GL11.glRotated(equip[0], 1, 0, 0); GL11.glTranslated(0, 2, 2); + + GL11.glTranslated(0, 0, recoil[2]); + GL11.glRotated(recoil[2] * 2, 1, 0, 0); GL11.glShadeModel(GL11.GL_SMOOTH); - int amount = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory); + int amount = Math.max((int) count[0], gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory)); ResourceManager.tesla_cannon.renderPart("Gun"); ResourceManager.tesla_cannon.renderPart("Extension"); + double cogAngle = cycle[2]; + GL11.glPushMatrix(); - GL11.glTranslated(0, -1.875, 0); - GL11.glRotated(-22.5, 0, 0, 1); - GL11.glTranslated(0, 1.875, 0); + GL11.glTranslated(0, -1.625, 0); + GL11.glRotated(cogAngle, 0, 0, 1); + GL11.glTranslated(0, 1.625, 0); ResourceManager.tesla_cannon.renderPart("Cog"); GL11.glPopMatrix(); GL11.glPushMatrix(); + + GL11.glTranslated(0, -1.625, 0); + GL11.glRotated(cogAngle, 0, 0, 1); + GL11.glTranslated(0, 1.625, 0); + for(int i = 0; i < Math.min(amount, 8); i++) { ResourceManager.tesla_cannon.renderPart("Capacitor"); @@ -64,12 +80,26 @@ public class ItemRenderTeslaCannon extends ItemRenderWeaponBase { GL11.glRotated(-22.5, 0, 0, 1); GL11.glTranslated(0, 1.625, 0); } else { + if(i == 4) { + GL11.glTranslated(0, -1.625, 0); + GL11.glRotated(-cogAngle, 0, 0, 1); + GL11.glTranslated(0, 1.625, 0); + GL11.glTranslated(-cogAngle * 0.5 / 22.5, 0, 0); + } GL11.glTranslated(0.5, 0, 0); } } GL11.glPopMatrix(); GL11.glShadeModel(GL11.GL_FLAT); + + GL11.glPushMatrix(); + GL11.glTranslated(yomi[0], yomi[1], yomi[2]); + GL11.glRotated(135, 0, 1, 0); + GL11.glScaled(squeeze[0], squeeze[1], squeeze[2]); + Minecraft.getMinecraft().renderEngine.bindTexture(RenderPlushie.yomiTex); + RenderPlushie.yomiModel.renderAll(); + GL11.glPopMatrix(); } @Override diff --git a/src/main/resources/assets/hbm/textures/items/ammo.png b/src/main/resources/assets/hbm/textures/items/ammo.png index b899cb0fed298dd394d69f59eed4a1be58fe971d..59ddc335f24d1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zJ95@(vABs}hlDMAC@wGQ9sp_DX0J=VhEu_Mp$b61524 zJuq8A^4F&x9?L49DJw4j79j+U&AdmK2p+w9X&8xUzYUc^+h^Dz_yTz)gHV_N1+0fO z3l;y=KHvb(nyedZHUg^CGef?CSYQ0D-tqmtDdhU*X5hr1uK8x4FQqtvn=-6KO!s|J zL(Q!ASmtjj4UgbAc2XK&aAY;o{kTU}pEEu`Z3U}YMGPG6VeOJ1K6@jx=SgXb z@@OCiP0^w9jl1v<`A-evKVGcW2QvqYc*m+R{*do(V*oNxNI1OnOEnXNNSnYSqtavJ zP;*8GhJ>*qgWM|-@?nqr`pMS`PzX#-Q7$}@ZeClI_9UiR&@F2)3L=5%Ta;B|ib_?)%L|Fc=a`!K+} zTy{s#Jg@WdkxI_G5_xotCd)wr`pZaxEStux@75MIAIl)!$)3iWeCbHD=rjl4zZL^>*++2Dj70=ghIhIZi)$~edIV$KEJ56_2Sk>7W4tsOoP!XC3I zLxNB4Z`pvPE=?uN`Y_vHV~~zqsQYiwJuUn4>!JsUNM3W1uV7hce#nEgl|Obq>u>mF zLj#dkIW~iL5|<~;#0s#T>!iPo%w-u*ioGV&JcZs3W~y|=$y_%RjB}xYg=RlGB#q`> zC}c!Lt(@)U#>EG&K-8gkX`hj=5dzcxP2pIXY5cTRJkLAPW?4D)WW+f-*bpi|a&oyY Xpd?=tWYP!TBM7J}X)2b=TLk_;gb~29 diff --git a/src/main/resources/assets/hbm/textures/items/ammo_standard.capacitor.png b/src/main/resources/assets/hbm/textures/items/ammo_standard.capacitor.png new file mode 100644 index 0000000000000000000000000000000000000000..15184342e342b47c67d91e5c7caf5e12cd1779a6 GIT binary patch literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfnV t3=T+fxA)~8T6Oc>Eq-M&H%3tghP(BlbE>(ge+4?8!PC{xWt~$(696VOTG0Ri literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/items/ammo_standard.capacitor_blacklightning.png b/src/main/resources/assets/hbm/textures/items/ammo_standard.capacitor_blacklightning.png new file mode 100644 index 0000000000000000000000000000000000000000..00b4e57aeaa9c101ce24243282366aa2de23bb0e GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfrcT?k%X2&TDAx;%jbhW