From 04708e8c90157be08443176a17f41f779f0fda3d Mon Sep 17 00:00:00 2001 From: Boblet Date: Mon, 23 Feb 2026 13:13:07 +0100 Subject: [PATCH] ok that's enough --- changelog | 5 ++++ .../com/hbm/items/armor/ArmorNCRPAMelee.java | 2 +- .../com/hbm/items/armor/ArmorRPAMelee.java | 2 +- .../weapon/sedna/factory/ConfettiUtil.java | 26 +++++++++++++++--- src/main/java/com/hbm/main/ClientProxy.java | 3 +- .../java/com/hbm/particle/ParticleGiblet.java | 17 +++++++++--- .../assets/hbm/textures/particle/metal.png | Bin 0 -> 278 bytes .../assets/hbm/textures/particle/slime.png | Bin 0 -> 222 bytes 8 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 src/main/resources/assets/hbm/textures/particle/metal.png create mode 100644 src/main/resources/assets/hbm/textures/particle/slime.png diff --git a/changelog b/changelog index 786bd11d7..63239426d 100644 --- a/changelog +++ b/changelog @@ -35,6 +35,11 @@ * Reduced mask man's projectile resistance from 75% to 50% * Reduced maskman's resistance to damage above 50 from 75% to 50% * Remnants power armor can now use the melee controller, allowing Sergeant Arch Dornan to beat the snot out of people +* Improved gibbing + * All cybercrab variants can now be gibbed, turning into metal fragments + * Iron golems now also turn into metal instead of fleshy chunks + * Slimes can now be gibbed, turning into slime globs + * Creepers now also gib into slime instead of blood # Fixed * Fixed proxy tiles that do not use electricity at all visually connecting to cables diff --git a/src/main/java/com/hbm/items/armor/ArmorNCRPAMelee.java b/src/main/java/com/hbm/items/armor/ArmorNCRPAMelee.java index b06e48471..276f19c93 100644 --- a/src/main/java/com/hbm/items/armor/ArmorNCRPAMelee.java +++ b/src/main/java/com/hbm/items/armor/ArmorNCRPAMelee.java @@ -40,7 +40,7 @@ public class ArmorNCRPAMelee implements IPAMelee { MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D); if(mop != null) { - if(mop.typeOfHit == mop.typeOfHit.ENTITY) { + if(mop.typeOfHit == mop.typeOfHit.ENTITY && mop.entityHit.isEntityAlive()) { float damage = swings ? 15F : 35F; float knockback = swings ? 0F : 1.5F; float dt = swings ? 5F : 15F; diff --git a/src/main/java/com/hbm/items/armor/ArmorRPAMelee.java b/src/main/java/com/hbm/items/armor/ArmorRPAMelee.java index c047cdf43..3bddccdda 100644 --- a/src/main/java/com/hbm/items/armor/ArmorRPAMelee.java +++ b/src/main/java/com/hbm/items/armor/ArmorRPAMelee.java @@ -34,7 +34,7 @@ public class ArmorRPAMelee implements IPAMelee { int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex); boolean swings = type == GunAnimation.CYCLE && (timer == 3 || timer == 9); - boolean slap = type == GunAnimation.ALT_CYCLE && timer == 3; + boolean slap = type == GunAnimation.ALT_CYCLE && timer == 8; if((swings || slap) && ctx.getPlayer() != null) { MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D); diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/ConfettiUtil.java b/src/main/java/com/hbm/items/weapon/sedna/factory/ConfettiUtil.java index c7fb51289..f223b6202 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/ConfettiUtil.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/ConfettiUtil.java @@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.factory; import java.util.Locale; import com.hbm.entity.mob.*; +import com.hbm.entity.mob.botprime.EntityBOTPrimeBase; import com.hbm.handler.threading.PacketThreading; import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.particle.helper.AshesCreator; @@ -11,8 +12,13 @@ import com.hbm.util.DamageResistanceHandler.DamageClass; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.monster.EntityMagmaCube; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntitySlime; +import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; @@ -42,10 +48,21 @@ public class ConfettiUtil { } public static void gib(EntityLivingBase entity) { - if(entity instanceof EntityCyberCrab) return; - if(entity instanceof EntityTeslaCrab) return; - if(entity instanceof EntityTaintCrab) return; - if(entity instanceof EntitySlime) return; + if(entity instanceof EntityOcelot) return; + + int type = 0; + if(entity instanceof EntitySlime) type = 1; + if(entity instanceof EntityMagmaCube) type = 1; + if(entity instanceof EntityCreeper) type = 1; + if(entity instanceof EntityIronGolem) type = 2; + if(entity instanceof EntityCyberCrab) type = 2; + if(entity instanceof EntityTeslaCrab) type = 2; + if(entity instanceof EntityTaintCrab) type = 2; + if(entity instanceof EntityBlaze) type = 2; + if(entity instanceof EntityFBIDrone) type = 2; + if(entity instanceof EntityRADBeast) type = 2; + if(entity instanceof EntityUFO) type = 2; + if(entity instanceof EntityBOTPrimeBase) type = 2; SkeletonCreator.composeEffectGib(entity.worldObj, entity, 0.25F); @@ -54,6 +71,7 @@ public class ConfettiUtil { NBTTagCompound vdat = new NBTTagCompound(); vdat.setString("type", "giblets"); vdat.setInteger("ent", entity.getEntityId()); + vdat.setInteger("gibType", type); PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(vdat, entity.posX, entity.posY + entity.height * 0.5, entity.posZ), new TargetPoint(entity.dimension, entity.posX, entity.posY + entity.height * 0.5, entity.posZ, 150)); entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.zombie.woodbreak", 2.0F, 0.95F + entity.getRNG().nextFloat() * 0.2F); } diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 366757216..a66e39ccd 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -1817,6 +1817,7 @@ public class ClientProxy extends ServerProxy { if("giblets".equals(type)) { int ent = data.getInteger("ent"); + int gibType = data.getInteger("gibType"); this.vanish(ent); Entity e = world.getEntityByID(ent); @@ -1840,7 +1841,7 @@ public class ClientProxy extends ServerProxy { mult *= 10; for(int i = 0; i < count; i++) { - Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleGiblet(man, world, x, y, z, rand.nextGaussian() * 0.25 * mult, rand.nextDouble() * mult, rand.nextGaussian() * 0.25 * mult)); + Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleGiblet(man, world, x, y, z, rand.nextGaussian() * 0.25 * mult, rand.nextDouble() * mult, rand.nextGaussian() * 0.25 * mult, gibType)); } } diff --git a/src/main/java/com/hbm/particle/ParticleGiblet.java b/src/main/java/com/hbm/particle/ParticleGiblet.java index a5fdd3439..f15d73d0a 100644 --- a/src/main/java/com/hbm/particle/ParticleGiblet.java +++ b/src/main/java/com/hbm/particle/ParticleGiblet.java @@ -21,14 +21,17 @@ import net.minecraft.world.World; @SideOnly(Side.CLIENT) public class ParticleGiblet extends EntityFX { - private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/particle/meat.png"); + private static final ResourceLocation textureMeat = new ResourceLocation(RefStrings.MODID + ":textures/particle/meat.png"); + private static final ResourceLocation textureSlime = new ResourceLocation(RefStrings.MODID + ":textures/particle/slime.png"); + private static final ResourceLocation textureMetal = new ResourceLocation(RefStrings.MODID + ":textures/particle/metal.png"); private TextureManager theRenderEngine; private float momentumYaw; private float momentumPitch; + private int gibType; - public ParticleGiblet(TextureManager texman, World world, double x, double y, double z, double mX, double mY, double mZ) { + public ParticleGiblet(TextureManager texman, World world, double x, double y, double z, double mX, double mY, double mZ, int gibType) { super(world, x, y, z); this.motionX = mX; this.motionY = mY; @@ -36,6 +39,9 @@ public class ParticleGiblet extends EntityFX { this.theRenderEngine = texman; this.particleMaxAge = 140 + rand.nextInt(20); this.particleGravity = 2F; + this.gibType = gibType; + + if(gibType == 2) this.particleGravity *= 2; this.momentumYaw = (float) rand.nextGaussian() * 15F; this.momentumPitch = (float) rand.nextGaussian() * 15F; @@ -57,7 +63,9 @@ public class ParticleGiblet extends EntityFX { this.rotationPitch += this.momentumPitch; this.rotationYaw += this.momentumYaw; - EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(worldObj, posX, posY, posZ, 0, 0, 0, Blocks.redstone_block, 0); + if(gibType == 2) return; + + EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(worldObj, posX, posY, posZ, 0, 0, 0, gibType == 1 ? Blocks.melon_block : Blocks.redstone_block, 0); ReflectionHelper.setPrivateValue(EntityFX.class, fx, 20 + rand.nextInt(20), "particleMaxAge", "field_70547_e"); Minecraft.getMinecraft().effectRenderer.addEffect(fx); } @@ -69,7 +77,8 @@ public class ParticleGiblet extends EntityFX { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_BLEND); - this.theRenderEngine.bindTexture(texture); + + this.theRenderEngine.bindTexture(gibType == 2 ? textureMetal : gibType == 1 ? textureSlime : textureMeat); /* use this instead of EntityFX.interpPosN since interpPosN isn't set up correctly for the current tick for layer 3 particles */ EntityPlayer player = Minecraft.getMinecraft().thePlayer; diff --git a/src/main/resources/assets/hbm/textures/particle/metal.png b/src/main/resources/assets/hbm/textures/particle/metal.png new file mode 100644 index 0000000000000000000000000000000000000000..06d2f163fdec008873121a459e8c554665bff980 GIT binary patch literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#Vf3*GV&pW#KILmsO$rabRxO;O)R)ZSFi9n2ZKd7(GoN`Hiuu-> Z+P5xtlglr5p8@n3gQu&X%Q~loCIIx*aEAZ@ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/particle/slime.png b/src/main/resources/assets/hbm/textures/particle/slime.png new file mode 100644 index 0000000000000000000000000000000000000000..f3b2125e07e9194a0f420e2f66b818587ae0e908 GIT binary patch literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfK{Y0wy<~Mp;I#o3{Im8kb|jn{!N=S&^&O$AA3#cjmI0#gq4T9&fLx zPA|DRd)9L|krs`q9P6C>&Xuls@I$prr03k8An}$}vR~AGtG+t4$!L92*6sopjj#S%{x% Uoa1kMpaU5^UHx3vIVCg!06dpj_W%F@ literal 0 HcmV?d00001