diff --git a/changelog b/changelog index 4c6ac8353..ca9f03dff 100644 --- a/changelog +++ b/changelog @@ -3,6 +3,9 @@ * Removed three old achievements which no longer work due to the gun changes * AJR armor plating now uses niobium instead of saturnite, and yields twice as many items per recipe * Due to the gating change, the saturnite anvil now has a tier equivalent to a bronze anvil +* Doubled the liberator's base damage to be on-par with the lever action shotgun in order to offset its poor performance due to the reload speed +* All non black powder shotgun shells now have some amount of damage threshold negation in order to not immediately become useless when used against early power armor + * Obviously shot will always fare worse against higher tier armor, in those cases either use flechettes, slugs, any of the high tier rounds or a different caliber entirely ## Fixed * Fixed 9mm soft points being called ".9mm" @@ -16,4 +19,8 @@ * Fixed survey scanners not picking up nether depth rock * Fixed FMJ, AP and DU rounds not having damage threshold negation, making them worse against most armored targets compared to JHP * Fixed autgen items made from unsmeltable materials being smeltable in the crucible -* Fixed 240mm shells not being visible in creative \ No newline at end of file +* Fixed 240mm shells not being visible in creative +* Fixed JHP's negative armor piercing value not being counted right, breaking the "armor is worth more" system +* Fixed the second UZI dealing more damage than it should +* Potentially fixed an issue where artillery rockets would sometimes get stuck mid-air +* Fixed the artillery rocket turret's grace range not being 250 as advertised \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index bee7541d3..c9c8d0ddc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_version=1.0.27 # Empty build number makes a release type -mod_build_number=5091 +mod_build_number=5180 credits=HbMinecraft,\ \ rodolphito (explosion algorithms),\ diff --git a/src/main/java/com/hbm/entity/EntityMappings.java b/src/main/java/com/hbm/entity/EntityMappings.java index 6e995ce01..2acf95a34 100644 --- a/src/main/java/com/hbm/entity/EntityMappings.java +++ b/src/main/java/com/hbm/entity/EntityMappings.java @@ -103,6 +103,7 @@ public class EntityMappings { addEntity(EntityVortex.class, "entity_vortex", 250); addEntity(EntityMeteor.class, "entity_meteor", 250); addEntity(EntityBoxcar.class, "entity_boxcar", 1000); + addEntity(EntityTorpedo.class, "entity_torpedo", 1000); addEntity(EntityMissileTaint.class, "entity_missile_taint", 1000); addEntity(EntityGrenadeGascan.class, "entity_grenade_gascan", 1000); addEntity(EntityNukeExplosionMK5.class, "entity_nuke_mk5", 1000); diff --git a/src/main/java/com/hbm/entity/projectile/EntityArtilleryRocket.java b/src/main/java/com/hbm/entity/projectile/EntityArtilleryRocket.java index 0115dbef3..1a04f5a2f 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityArtilleryRocket.java +++ b/src/main/java/com/hbm/entity/projectile/EntityArtilleryRocket.java @@ -97,13 +97,13 @@ public class EntityArtilleryRocket extends EntityThrowableInterp implements IChu if(!worldObj.isRemote) { - if(this.targetEntity == null) { + /*if(this.targetEntity == null) { Vec3 delta = Vec3.createVectorHelper(this.lastTargetPos.xCoord - this.posX, this.lastTargetPos.yCoord - this.posY, this.lastTargetPos.zCoord - this.posZ); if(delta.lengthVector() <= 15D) { this.targeting = null; this.steering = null; } - } + }*/ if(this.targeting != null && this.targetEntity != null) this.targeting.recalculateTargetPosition(this, this.targetEntity); if(this.steering != null) this.steering.adjustCourse(this, 25D, 15D); diff --git a/src/main/java/com/hbm/entity/projectile/EntityBoxcar.java b/src/main/java/com/hbm/entity/projectile/EntityBoxcar.java index 8871bd430..2df7eb030 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBoxcar.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBoxcar.java @@ -52,7 +52,7 @@ public class EntityBoxcar extends EntityThrowable { } if(!worldObj.isRemote) - worldObj.setBlock((int) (this.posX - 0.5), (int) (this.posY + 0.5), (int) (this.posZ - 0.5), ModBlocks.boxcar); + worldObj.setBlock((int) Math.floor(this.posX), (int) Math.floor(this.posY + 0.5), (int) Math.floor(this.posZ), ModBlocks.boxcar); } } diff --git a/src/main/java/com/hbm/entity/projectile/EntityTorpedo.java b/src/main/java/com/hbm/entity/projectile/EntityTorpedo.java new file mode 100644 index 000000000..9d459200d --- /dev/null +++ b/src/main/java/com/hbm/entity/projectile/EntityTorpedo.java @@ -0,0 +1,50 @@ +package com.hbm.entity.projectile; + +import com.hbm.explosion.vanillant.ExplosionVNT; +import com.hbm.particle.helper.ExplosionCreator; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.init.Blocks; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class EntityTorpedo extends EntityThrowable { + + public EntityTorpedo(World world) { + super(world); + this.ignoreFrustumCheck = true; + this.isImmuneToFire = true; + } + + @Override + public void onUpdate() { + + this.lastTickPosX = this.prevPosX = posX; + this.lastTickPosY = this.prevPosY = posY; + this.lastTickPosZ = this.prevPosZ = posZ; + + this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ); + + this.motionY -= 0.03; + if(motionY < -1.5) motionY = -1.5; + + if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air) { + this.setDead(); + ExplosionCreator.composeEffectStandard(worldObj, posX, posY + 1, posZ); + ExplosionVNT vnt = new ExplosionVNT(worldObj, posX, posY, posZ, 20F); + vnt.makeStandard(); + vnt.explode(); + } + } + + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) { } + + @Override + @SideOnly(Side.CLIENT) + public boolean isInRangeToRenderDist(double distance) { + return distance < 25000; + } +} diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory12ga.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory12ga.java index 47932b03c..7452523f6 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory12ga.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory12ga.java @@ -55,10 +55,10 @@ public class XFactory12ga { g12_bp = new BulletConfig().setItem(EnumAmmo.G12_BP).setBlackPowder(true).setProjectiles(8).setDamage(0.5F/8F).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP")); g12_bp_magnum = new BulletConfig().setItem(EnumAmmo.G12_BP_MAGNUM).setBlackPowder(true).setProjectiles(4).setDamage(0.5F/4F).setSpread(0.05F).setRicochetAngle(25).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP_MAGNUM")); g12_bp_slug = new BulletConfig().setItem(EnumAmmo.G12_BP_SLUG).setBlackPowder(true).setDamage(0.5F).setSpread(0.01F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP_SLUG")); - g12 = new BulletConfig().setItem(EnumAmmo.G12).setProjectiles(8).setDamage(1F/8F).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA")); - g12_slug = new BulletConfig().setItem(EnumAmmo.G12_SLUG).setSpread(0.0F).setRicochetAngle(25).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x393939, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_SLUG")); - g12_flechette = new BulletConfig().setItem(EnumAmmo.G12_FLECHETTE).setProjectiles(8).setDamage(1F/8F).setThresholdNegation(5F).setArmorPiercing(0.2F).setSpread(0.025F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x3C80F0, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_FLECHETTE")); - g12_magnum = new BulletConfig().setItem(EnumAmmo.G12_MAGNUM).setProjectiles(4).setDamage(2F/4F).setSpread(0.015F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x278400, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_MAGNUM")); + g12 = new BulletConfig().setItem(EnumAmmo.G12).setProjectiles(8).setDamage(1F/8F).setSpread(0.05F).setRicochetAngle(15).setThresholdNegation(2F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA")); + g12_slug = new BulletConfig().setItem(EnumAmmo.G12_SLUG).setSpread(0.0F).setRicochetAngle(25).setThresholdNegation(4F).setArmorPiercing(0.15F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x393939, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_SLUG")); + g12_flechette = new BulletConfig().setItem(EnumAmmo.G12_FLECHETTE).setProjectiles(8).setDamage(1F/8F).setThresholdNegation(5F).setThresholdNegation(3F).setArmorPiercing(0.2F).setSpread(0.025F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x3C80F0, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_FLECHETTE")); + g12_magnum = new BulletConfig().setItem(EnumAmmo.G12_MAGNUM).setProjectiles(4).setDamage(2F/4F).setSpread(0.015F).setRicochetAngle(15).setThresholdNegation(4F).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x278400, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_MAGNUM")); g12_explosive = new BulletConfig().setItem(EnumAmmo.G12_EXPLOSIVE).setDamage(2.5F).setOnImpact(LAMBDA_STANDARD_EXPLODE).setSpread(0F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xDA4127, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_EXPLOSIVE")); g12_phosphorus = new BulletConfig().setItem(EnumAmmo.G12_PHOSPHORUS).setProjectiles(8).setDamage(1F/8F).setSpread(0.015F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x910001, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_PHOSPHORUS")) .setOnImpact((bullet, mop) -> { if(mop.entityHit != null && mop.entityHit instanceof EntityLivingBase) { HbmLivingProps data = HbmLivingProps.getData((EntityLivingBase) mop.entityHit); if(data.phosphorus < 300) data.phosphorus = 300; } }); @@ -111,7 +111,7 @@ public class XFactory12ga { ModItems.gun_liberator = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig() .dura(200).draw(20).inspect(21).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE) .rec(new Receiver(0) - .dmg(8F).delay(20).rounds(4).reload(25, 15, 7, 0).jam(45).sound("hbm:weapon.fire.shotgunAlt", 1.0F, 1.0F) + .dmg(16F).delay(20).rounds(4).reload(25, 15, 7, 0).jam(45).sound("hbm:weapon.fire.shotgunAlt", 1.0F, 1.0F) .mag(new MagazineSingleReload(0, 4).addConfigs(all)) .offset(0.75, -0.0625, -0.1875) .setupStandardFire().recoil(LAMBDA_RECOIL_LIBERATOR)) diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory9mm.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory9mm.java index 177a36afd..36fd8780d 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory9mm.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory9mm.java @@ -87,7 +87,7 @@ public class XFactory9mm { .anim(LAMBDA_UZI_ANIMS).orchestra(Orchestras.ORCHESTRA_UZI_AKIMBO), new GunConfig().dura(3_000).draw(15).inspect(31).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE) .rec(new Receiver(0) - .dmg(7.5F).delay(2).dry(25).auto(true).spread(0.005F).reload(55).jam(50).sound("hbm:weapon.fire.uzi", 1.0F, 1.0F) + .dmg(3F).delay(2).dry(25).auto(true).spread(0.005F).reload(55).jam(50).sound("hbm:weapon.fire.uzi", 1.0F, 1.0F) .mag(new MagazineFullReload(1, 30).addConfigs(p9_sp, p9_fmj, p9_jhp, p9_ap)) .offset(1, -0.0625 * 2.5, -0.375D) .setupStandardFire().recoil(LAMBDA_RECOIL_UZI)) diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index 678d607e1..677dcd0d6 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -1489,9 +1489,9 @@ public class MainRegistry { ignoreMappings.add("hbm:item.clip_euthanasia"); ignoreMappings.add("hbm:item.clip_defabricator"); ignoreMappings.add("hbm:item.ammo_folly_du"); - ignoreMappings.add("hbm:tile.statue_elb"); - ignoreMappings.add("hbm:tile.statue_elb_g"); - ignoreMappings.add("hbm:tile.statue_elb_w"); + ignoreMappings.add("hbm:tile.#null"); + ignoreMappings.add("hbm:tile.#void"); + ignoreMappings.add("hbm:tile.#ngtv"); /// REMAP /// remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses); diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 17af73b0a..87b6df678 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -1117,6 +1117,7 @@ public class ResourceManager { public static final IModelCustom boxcar = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/boxcar.obj")); public static final IModelCustom duchessgambit = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/duchessgambit.obj")); public static final IModelCustom building = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/weapons/building.obj")); + public static final IModelCustom torpedo = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/torpedo.obj")); public static final IModelCustom rpc = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/rpc.obj")); public static final IModelCustom tom_main = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/weapons/tom_main.obj")); public static final IModelCustom tom_flame = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/weapons/tom_flame.hmf")); @@ -1240,6 +1241,7 @@ public class ResourceManager { public static final ResourceLocation boxcar_tex = new ResourceLocation(RefStrings.MODID, "textures/models/boxcar.png"); public static final ResourceLocation duchessgambit_tex = new ResourceLocation(RefStrings.MODID, "textures/models/duchessgambit.png"); public static final ResourceLocation building_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/building.png"); + public static final ResourceLocation torpedo_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/torpedo.png"); public static final ResourceLocation rpc_tex = new ResourceLocation(RefStrings.MODID, "textures/models/rpc.png"); public static final ResourceLocation tom_main_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tom_main.png"); public static final ResourceLocation tom_flame_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tom_flame.png"); diff --git a/src/main/java/com/hbm/render/entity/projectile/RenderBoxcar.java b/src/main/java/com/hbm/render/entity/projectile/RenderBoxcar.java index 275a6083d..2840cf000 100644 --- a/src/main/java/com/hbm/render/entity/projectile/RenderBoxcar.java +++ b/src/main/java/com/hbm/render/entity/projectile/RenderBoxcar.java @@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11; import com.hbm.entity.projectile.EntityBoxcar; import com.hbm.entity.projectile.EntityBuilding; import com.hbm.entity.projectile.EntityDuchessGambit; +import com.hbm.entity.projectile.EntityTorpedo; import com.hbm.main.ResourceManager; import net.minecraft.client.renderer.entity.Render; @@ -14,42 +15,48 @@ import net.minecraft.util.ResourceLocation; public class RenderBoxcar extends Render { @Override - public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, - float p_76986_9_) { + public void doRender(Entity entity, double x, double y, double z, float f0, float f1) { GL11.glPushMatrix(); - GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); - GL11.glEnable(GL11.GL_CULL_FACE); - GL11.glEnable(GL11.GL_LIGHTING); - - if(p_76986_1_ instanceof EntityBoxcar) { - GL11.glTranslatef(0, 0, -1.5F); - GL11.glRotated(180, 0, 0, 1); - GL11.glRotated(90, 1, 0, 0); - - bindTexture(ResourceManager.boxcar_tex); - ResourceManager.boxcar.renderAll(); - } - - if(p_76986_1_ instanceof EntityDuchessGambit) { - GL11.glTranslatef(0, 0, -1.0F); - - bindTexture(ResourceManager.duchessgambit_tex); - ResourceManager.duchessgambit.renderAll(); - } - - if(p_76986_1_ instanceof EntityBuilding) { - GL11.glDisable(GL11.GL_CULL_FACE); - bindTexture(ResourceManager.building_tex); - ResourceManager.building.renderAll(); - GL11.glEnable(GL11.GL_CULL_FACE); - } - + GL11.glTranslated(x, y, z); + GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glEnable(GL11.GL_LIGHTING); + + if(entity instanceof EntityBoxcar) { + GL11.glTranslatef(0, 0, -1.5F); + GL11.glRotated(180, 0, 0, 1); + GL11.glRotated(90, 1, 0, 0); + + bindTexture(ResourceManager.boxcar_tex); + ResourceManager.boxcar.renderAll(); + } + + if(entity instanceof EntityDuchessGambit) { + GL11.glTranslatef(0, 0, -1.0F); + + bindTexture(ResourceManager.duchessgambit_tex); + ResourceManager.duchessgambit.renderAll(); + } + + if(entity instanceof EntityBuilding) { + GL11.glDisable(GL11.GL_CULL_FACE); + bindTexture(ResourceManager.building_tex); + ResourceManager.building.renderAll(); + GL11.glEnable(GL11.GL_CULL_FACE); + } + + if(entity instanceof EntityTorpedo) { + GL11.glShadeModel(GL11.GL_SMOOTH); + bindTexture(ResourceManager.torpedo_tex); + ResourceManager.torpedo.renderAll(); + GL11.glShadeModel(GL11.GL_FLAT); + } + GL11.glPopMatrix(); } @Override - protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + protected ResourceLocation getEntityTexture(Entity entity) { return ResourceManager.boxcar_tex; } diff --git a/src/main/java/com/hbm/render/util/RenderInfoSystem.java b/src/main/java/com/hbm/render/util/RenderInfoSystem.java index a578f110a..28a775097 100644 --- a/src/main/java/com/hbm/render/util/RenderInfoSystem.java +++ b/src/main/java/com/hbm/render/util/RenderInfoSystem.java @@ -49,8 +49,9 @@ public class RenderInfoSystem { if(event.type != ElementType.CROSSHAIRS) return; - - //this.messages.put(-666, new InfoEntry("Your arteries are bad cable management, rip them out deluxe edition", 666_666)); + + //this.messages.put(-666, new InfoEntry(Minecraft.getMinecraft().theWorld.getCelestialAngle(0) + "", 666_666)); + //this.messages.put(-665, new InfoEntry(Minecraft.getMinecraft().theWorld.getCurrentMoonPhaseFactor() + "", 666_666)); if(this.messages.isEmpty()) return; diff --git a/src/main/java/com/hbm/tileentity/turret/TileEntityTurretHIMARS.java b/src/main/java/com/hbm/tileentity/turret/TileEntityTurretHIMARS.java index 85027c114..728fa523e 100644 --- a/src/main/java/com/hbm/tileentity/turret/TileEntityTurretHIMARS.java +++ b/src/main/java/com/hbm/tileentity/turret/TileEntityTurretHIMARS.java @@ -92,7 +92,7 @@ public class TileEntityTurretHIMARS extends TileEntityTurretBaseArtillery implem @Override public double getDecetorGrace() { - return 32D; + return 250D; } @Override diff --git a/src/main/java/com/hbm/util/DamageResistanceHandler.java b/src/main/java/com/hbm/util/DamageResistanceHandler.java index d9b169377..dc5efea0f 100644 --- a/src/main/java/com/hbm/util/DamageResistanceHandler.java +++ b/src/main/java/com/hbm/util/DamageResistanceHandler.java @@ -300,7 +300,7 @@ public class DamageResistanceHandler { dt = Math.max(0F, dt - pierceDT); if(dt >= amount) return 0F; amount -= dt; - dr *= MathHelper.clamp_float(1F - pierce, 0F, 1F); + dr *= MathHelper.clamp_float(1F - pierce, 0F, 2F /* we allow up to -1 armor piercing, which can double effective armor values */); return amount *= (1F - dr); }