infrared laser heat ray fuck

This commit is contained in:
Bob 2024-12-04 23:30:53 +01:00
parent 3e8000a166
commit 938d9935bf
11 changed files with 74 additions and 18 deletions

View File

@ -25,12 +25,14 @@ public class ConfettiUtil {
int amount = MathHelper.clamp_int((int) (entity.width * entity.height * entity.width * 25), 5, 50);
AshesCreator.composeEffect(entity.worldObj, entity, amount, 0.125F);
SkeletonCreator.composeEffect(entity.worldObj, entity, 1F);
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:weapon.fire.disintegration", 2.0F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
}
public static void cremate(EntityLivingBase entity) {
int amount = MathHelper.clamp_int((int) (entity.width * entity.height * entity.width * 25), 5, 50);
AshesCreator.composeEffect(entity.worldObj, entity, amount, 0.125F);
SkeletonCreator.composeEffect(entity.worldObj, entity, 0.25F);
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:weapon.fire.disintegration", 2.0F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
}
public static void gib(EntityLivingBase entity) {

View File

@ -84,7 +84,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, CAPACITOR_OVERCHARGE, CAPACITOR_IR,
TAU_URANIUM,
COIL_TUNGSTEN, COIL_FERROURANIUM,
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE

View File

@ -161,8 +161,8 @@ public class GunFactoryClient {
setRendererBulkBeam(LegoClient.RENDER_LIGHTNING, energy_tesla, energy_tesla_overcharge);
setRendererBulkBeam(LegoClient.RENDER_TAU, tau_uranium);
setRendererBulkBeam(LegoClient.RENDER_TAU_CHARGE, tau_uranium_charge);
setRendererBulkBeam(LegoClient.RENDER_LASER_RED, energy_las, energy_las_overcharge);
setRendererBulkBeam(LegoClient.RENDER_LASER_PURPLE, energy_lacunae, energy_lacunae_overcharge);
setRendererBulkBeam(LegoClient.RENDER_LASER_RED, energy_las, energy_las_overcharge, energy_las_ir);
setRendererBulkBeam(LegoClient.RENDER_LASER_PURPLE, energy_lacunae, energy_lacunae_overcharge, energy_lacunae_ir);
setRendererBulk(LegoClient.RENDER_AP_BULLET, coil_tungsten, coil_ferrouranium);

View File

@ -35,6 +35,7 @@ public class XFactory762mm {
public static BulletConfig energy_lacunae;
public static BulletConfig energy_lacunae_overcharge;
public static BulletConfig energy_lacunae_ir;
public static void init() {
SpentCasing casing762 = new SpentCasing(CasingType.BOTTLENECK).setColor(SpentCasing.COLOR_CASE_BRASS);
@ -51,6 +52,7 @@ public class XFactory762mm {
energy_lacunae = new BulletConfig().setItem(EnumAmmo.CAPACITOR).setupDamageClass(DamageClass.LASER).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
energy_lacunae_overcharge = new BulletConfig().setItem(EnumAmmo.CAPACITOR_OVERCHARGE).setupDamageClass(DamageClass.LASER).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setDoesPenetrate(true).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
energy_lacunae_ir = new BulletConfig().setItem(EnumAmmo.CAPACITOR_IR).setupDamageClass(DamageClass.FIRE).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(XFactoryEnergy.LAMBDA_IR_HIT);
ModItems.gun_carbine = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(3_000).draw(10).inspect(31).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
@ -77,7 +79,7 @@ public class XFactory762mm {
.dura(50_000).draw(20).inspect(20).crosshair(Crosshair.L_CIRCLE)
.rec(new Receiver(0)
.dmg(12F).delay(1).auto(true).dry(15).reload(15).spread(0.01F).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 200).addConfigs(energy_lacunae, energy_lacunae_overcharge))
.mag(new MagazineFullReload(0, 200).addConfigs(energy_lacunae, energy_lacunae_overcharge, energy_lacunae_ir))
.offset(1, -0.0625 * 2.5, -0.25D)
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
.setupStandardConfiguration()

View File

@ -3,10 +3,12 @@ package com.hbm.items.weapon.sedna.factory;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.entity.effect.EntityFireLingering;
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.extprop.HbmLivingProps;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.BulletConfig;
import com.hbm.items.weapon.sedna.Crosshair;
@ -28,13 +30,16 @@ import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class XFactoryEnergy {
@ -46,6 +51,7 @@ public class XFactoryEnergy {
public static BulletConfig energy_las;
public static BulletConfig energy_las_overcharge;
public static BulletConfig energy_las_ir;
public static BiConsumer<EntityBulletBeamBase, MovingObjectPosition> LAMBDA_LIGHTNING_HIT = (beam, mop) -> {
@ -85,6 +91,34 @@ public class XFactoryEnergy {
}
};
public static BiConsumer<EntityBulletBeamBase, MovingObjectPosition> LAMBDA_IR_HIT = (beam, mop) -> {
BulletConfig.LAMBDA_STANDARD_BEAM_HIT.accept(beam, mop);
if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
if(mop.entityHit instanceof EntityLivingBase) {
EntityLivingBase living = (EntityLivingBase) mop.entityHit;
HbmLivingProps props = HbmLivingProps.getData(living);
if(props.fire < 100) props.fire = 100;
}
}
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
World world = beam.worldObj;
Block b = world.getBlock(mop.blockX, mop.blockY, mop.blockZ);
ForgeDirection dir = ForgeDirection.getOrientation(mop.sideHit);
if(b.isFlammable(world, mop.blockX, mop.blockY, mop.blockZ, dir.getOpposite())) {
if(world.getBlock(mop.blockX + dir.offsetX, mop.blockY + dir.offsetY, mop.blockZ + dir.offsetZ).isAir(world, mop.blockX + dir.offsetX, mop.blockY + dir.offsetY, mop.blockZ + dir.offsetZ)) {
world.setBlock(mop.blockX + dir.offsetX, mop.blockY + dir.offsetY, mop.blockZ + dir.offsetZ, Blocks.fire);
return;
}
}
EntityFireLingering fire = new EntityFireLingering(beam.worldObj).setArea(2, 1).setDuration(100).setType(EntityFireLingering.TYPE_DIESEL);
fire.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
beam.worldObj.spawnEntityInWorld(fire);
}
};
public static void init() {
energy_tesla = new BulletConfig().setItem(EnumAmmo.CAPACITOR).setupDamageClass(DamageClass.ELECTRIC).setBeam().setSpread(0.0F).setLife(5).setRenderRotations(false).setDoesPenetrate(true)
@ -94,6 +128,7 @@ public class XFactoryEnergy {
energy_las = new BulletConfig().setItem(EnumAmmo.CAPACITOR).setupDamageClass(DamageClass.LASER).setBeam().setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
energy_las_overcharge = new BulletConfig().setItem(EnumAmmo.CAPACITOR_OVERCHARGE).setupDamageClass(DamageClass.LASER).setBeam().setSpread(0.0F).setLife(5).setRenderRotations(false).setDoesPenetrate(true).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
energy_las_ir = new BulletConfig().setItem(EnumAmmo.CAPACITOR_IR).setupDamageClass(DamageClass.FIRE).setBeam().setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(LAMBDA_IR_HIT);
ModItems.gun_tesla_cannon = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(2_000).draw(10).inspect(33).reloadSequential(true).crosshair(Crosshair.CIRCLE)
@ -110,7 +145,7 @@ public class XFactoryEnergy {
.dura(2_000).draw(10).inspect(26).reloadSequential(true).crosshair(Crosshair.CIRCLE).scopeTexture(scope_luna)
.rec(new Receiver(0)
.dmg(50F).delay(8).reload(44).jam(36).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 24).addConfigs(energy_las, energy_las_overcharge))
.mag(new MagazineFullReload(0, 24).addConfigs(energy_las, energy_las_overcharge, energy_las_ir))
.offset(0.75, -0.0625 * 1.5, -0.1875)
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
.setupStandardConfiguration()

View File

@ -73,13 +73,13 @@ public class ParticleAshes extends EntityFXRotating {
Vec3NT vec = new Vec3NT(particleScale, 0, particleScale).rotateAroundYDeg(this.rotationPitch);
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMaxU(), particleIcon.getMinV());
vec.rotateAroundYDeg(-90);
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMaxU(), particleIcon.getMaxV());
vec.rotateAroundYDeg(-90);
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMinU(), particleIcon.getMaxV());
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMaxU(), particleIcon.getMinV());
vec.rotateAroundYDeg(-90);
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMinU(), particleIcon.getMinV());
vec.rotateAroundYDeg(-90);
tess.addVertexWithUV(pX + vec.xCoord, pY + 0.05, pZ + vec.zCoord, particleIcon.getMinU(), particleIcon.getMaxV());
} else {
renderParticleRotated(tess, interp, sX, sY, sZ, dX, dZ, this.particleScale);
}

View File

@ -3,6 +3,7 @@ package com.hbm.particle;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.particle.helper.SkeletonCreator.EnumSkeletonType;
import com.hbm.render.loader.HFRWavefrontObject;
@ -69,7 +70,8 @@ public class ParticleSkeleton extends EntityFX {
if(this.particleAge++ >= this.particleMaxAge) {
this.setDead();
}
boolean wasOnGround = this.onGround;
this.motionY -= this.particleGravity;
this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.98D;
@ -83,6 +85,10 @@ public class ParticleSkeleton extends EntityFX {
this.motionX = 0;
this.motionY = 0;
this.motionZ = 0;
if(!wasOnGround) {
MainRegistry.proxy.playSoundClient(posX, posY, posZ, "mob.skeleton.hurt", 0.25F, 0.8F + rand.nextFloat() * 0.4F);
}
}
}

View File

@ -27,7 +27,7 @@ import net.minecraft.world.World;
public class SkeletonCreator implements IParticleCreator {
public static HashMap<Class, Function<EntityLivingBase, BoneDefinition[]>> skullanizer = new HashMap();
public static HashMap<String, Function<EntityLivingBase, BoneDefinition[]>> skullanizer = new HashMap();
public static void composeEffect(World world, Entity toSkeletonize, float brightness) {
@ -53,7 +53,7 @@ public class SkeletonCreator implements IParticleCreator {
float brightness = data.getFloat("brightness");
Function<EntityLivingBase, BoneDefinition[]> bonealizer = skullanizer.get(entity.getClass());
Function<EntityLivingBase, BoneDefinition[]> bonealizer = skullanizer.get(entity.getClass().getSimpleName());
if(bonealizer != null) {
BoneDefinition[] bones = bonealizer.apply(living);
@ -129,14 +129,24 @@ public class SkeletonCreator implements IParticleCreator {
};
public static void init() {
skullanizer.put(EntityOtherPlayerMP.class, BONES_BIPED);
skullanizer.put(EntityClientPlayerMP.class, BONES_BIPED);
skullanizer.put(EntityPlayerSP.class, BONES_BIPED);
skullanizer.put(EntityOtherPlayerMP.class.getSimpleName(), BONES_BIPED);
skullanizer.put(EntityClientPlayerMP.class.getSimpleName(), BONES_BIPED);
skullanizer.put(EntityPlayerSP.class.getSimpleName(), BONES_BIPED);
skullanizer.put(EntityZombie.class, BONES_ZOMBIE);
skullanizer.put(EntitySkeleton.class, BONES_ZOMBIE);
skullanizer.put(EntityPigZombie.class, BONES_ZOMBIE);
skullanizer.put(EntityZombie.class.getSimpleName(), BONES_ZOMBIE);
skullanizer.put(EntitySkeleton.class.getSimpleName(), BONES_ZOMBIE);
skullanizer.put(EntityPigZombie.class.getSimpleName(), BONES_ZOMBIE);
skullanizer.put(EntityDummy.class, BONES_DUMMY);
skullanizer.put(EntityDummy.class.getSimpleName(), BONES_DUMMY);
//techguns compat, for some reason
//not alwayss accurate because of variable arm position, but better than nothing
skullanizer.put("ArmySoldier", BONES_ZOMBIE);
skullanizer.put("PsychoSteve", BONES_ZOMBIE);
skullanizer.put("SkeletonSoldier", BONES_ZOMBIE);
skullanizer.put("ZombieFarmer", BONES_ZOMBIE);
skullanizer.put("ZombieMiner", BONES_ZOMBIE);
skullanizer.put("ZombiePigmanSoldier", BONES_ZOMBIE);
skullanizer.put("ZombieSoldier", BONES_ZOMBIE);
}
}

View File

@ -235,6 +235,7 @@
"weapon.fire.smack": {"category": "player", "sounds": ["weapon/fire/smack"]},
"weapon.fire.vstar": {"category": "player", "sounds": ["weapon/fire/vstar"]},
"weapon.fire.loudestNoiseOnEarth": {"category": "player", "sounds": ["weapon/fire/loudestNoiseOnEarth"]},
"weapon.fire.disintegration": {"category": "player", "sounds": ["weapon/fire/disintegration"]},
"weapon.reload.boltClose": {"category": "player", "sounds": ["weapon/reload/boltClose"]},
"weapon.reload.boltOpen": {"category": "player", "sounds": ["weapon/reload/boltOpen"]},

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B