mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
if you hold your foreskin shut while peeing you can do a charged shot
This commit is contained in:
parent
cb14ffc638
commit
287569fe45
@ -51,6 +51,7 @@
|
||||
* Existing oily coal can be mined risk-free
|
||||
* Reeds rendering into water can now be toggled with the RENDER_REEDS client config
|
||||
* This option is usually enabled by default, unless Angelica is installed
|
||||
* Microwave explosions no longer destroy blocks, only the microwave and nearby players
|
||||
|
||||
## Fixed
|
||||
* The conveyor grabber should no longer skip over items when used in long lines
|
||||
|
||||
@ -20,7 +20,7 @@ import net.minecraft.world.World;
|
||||
|
||||
public class EntityBulletBeamBase extends Entity implements IEntityAdditionalSpawnData {
|
||||
|
||||
protected EntityLivingBase thrower;
|
||||
public EntityLivingBase thrower;
|
||||
public BulletConfig config;
|
||||
public float damage;
|
||||
public double headingX;
|
||||
|
||||
@ -1621,6 +1621,7 @@ public class ModItems {
|
||||
public static Item gun_missile_launcher;
|
||||
public static Item gun_tesla_cannon;
|
||||
public static Item gun_stg77;
|
||||
public static Item gun_tau;
|
||||
|
||||
public static Item ammo_standard;
|
||||
|
||||
@ -6969,6 +6970,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_missile_launcher, gun_missile_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_tesla_cannon, gun_tesla_cannon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_stg77, gun_stg77.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_tau, gun_tau.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -211,6 +211,31 @@ public class BulletConfig implements Cloneable {
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBeamBase, MovingObjectPosition> LAMBDA_BEAM_HIT = (beam, mop) -> {
|
||||
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
|
||||
Entity entity = mop.entityHit;
|
||||
|
||||
if(entity instanceof EntityLivingBase && ((EntityLivingBase) entity).getHealth() <= 0) return;
|
||||
|
||||
DamageSource damageCalc = beam.config.getDamage(beam, beam.thrower, false);
|
||||
|
||||
if(!(entity instanceof EntityLivingBase)) {
|
||||
EntityDamageUtil.attackEntityFromIgnoreIFrame(entity, damageCalc, beam.damage);
|
||||
return;
|
||||
}
|
||||
|
||||
EntityLivingBase living = (EntityLivingBase) entity;
|
||||
|
||||
if(beam.config.armorPiercingPercent == 0) {
|
||||
EntityDamageUtil.attackEntityFromIgnoreIFrame(entity, damageCalc, beam.damage);
|
||||
} else {
|
||||
DamageSource damagePiercing = beam.config.getDamage(beam, beam.thrower, true);
|
||||
EntityDamageUtil.attackArmorPiercing(living, damageCalc, damagePiercing, beam.damage, beam.config.armorPiercingPercent);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public BulletConfig clone() {
|
||||
try {
|
||||
|
||||
@ -137,21 +137,7 @@ public class Receiver {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Receiver setupStandardFire() {
|
||||
return this
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE)
|
||||
.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)
|
||||
.fire(Lego.LAMBDA_STANDARD_FIRE);
|
||||
}
|
||||
public Receiver setupStandardFire() { return this.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE) .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) .fire(Lego.LAMBDA_STANDARD_FIRE); }
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@ public class GunFactory {
|
||||
XFactory556mm.init();
|
||||
XFactory50.init();
|
||||
XFactoryEnergy.init();
|
||||
XFactoryAccelerator.init();
|
||||
|
||||
/// PROXY BULLSHIT ///
|
||||
MainRegistry.proxy.registerGunCfg();
|
||||
@ -79,6 +80,7 @@ public class GunFactory {
|
||||
ROCKET_HE, ROCKET_HEAT, ROCKET_DEMO, ROCKET_INC, ROCKET_PHOSPHORUS,
|
||||
FLAME_DIESEL, FLAME_GAS, FLAME_NAPALM, FLAME_BALEFIRE,
|
||||
CAPACITOR, CAPACITOR_OVERCHARGE, CAPACITOR_BLACKLIGHTNING,
|
||||
TAU_URANIUM,
|
||||
M44_EQUESTRIAN, G12_EQUESTRIAN, BMG50_EQUESTRIAN
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import static com.hbm.items.weapon.sedna.factory.XFactory50.*;
|
||||
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.XFactoryAccelerator.*;
|
||||
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.*;
|
||||
@ -62,6 +63,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_missile_launcher, new ItemRenderMissileLauncher());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_tesla_cannon, new ItemRenderTeslaCannon());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_stg77, new ItemRenderSTG77());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_tau, new ItemRenderTau());
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
ammo_debug_buckshot.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -134,6 +136,8 @@ public class GunFactoryClient {
|
||||
setRendererBulk(LegoClient.RENDER_ML, rocket_ml);
|
||||
|
||||
setRendererBulkBeam(LegoClient.RENDER_LIGHTNING, energy_tesla, energy_tesla_overcharge);
|
||||
setRendererBulkBeam(LegoClient.RENDER_TAU, tau_uranium);
|
||||
setRendererBulkBeam(LegoClient.RENDER_TAU_CHARGE, tau_uranium_charge);
|
||||
//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);
|
||||
@ -165,6 +169,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_missile_launcher) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_tesla_cannon) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_stg77) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_tau) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_dani) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_dani) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
@ -246,4 +246,52 @@ public class LegoClient {
|
||||
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();
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_TAU = (bullet, interp) -> {
|
||||
|
||||
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0);
|
||||
GL11.glRotatef(-bullet.rotationPitch - 90, 1F, 0, 0);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Vec3 delta = Vec3.createVectorHelper(0, bullet.beamLength, 0);
|
||||
GL11.glScaled(age / 2 + 0.5, 1, age / 2 + 0.5);
|
||||
double scale = 0.075D;
|
||||
int colorInner = ((int)(0x30 * age) << 16) | ((int)(0x25 * age) << 8) | (int) (0x10 * age);
|
||||
BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorInner, colorInner, (bullet.ticksExisted + bullet.getEntityId()) / 2, (int)(bullet.beamLength / 2 + 1), (float)scale * 4F, 2, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glScaled(age * 2, 1, age * 2);
|
||||
GL11.glTranslated(0, bullet.beamLength, 0);
|
||||
GL11.glRotatef(-90, 0, 0, 1);
|
||||
renderBulletStandard(Tessellator.instance, 0xFFBF00, 0xFFFFFF, bullet.beamLength, true);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_TAU_CHARGE = (bullet, interp) -> {
|
||||
|
||||
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0);
|
||||
GL11.glRotatef(-bullet.rotationPitch - 90, 1F, 0, 0);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Vec3 delta = Vec3.createVectorHelper(0, bullet.beamLength, 0);
|
||||
GL11.glScaled(age / 2 + 0.5, 1, age / 2 + 0.5);
|
||||
double scale = 0.075D;
|
||||
int colorInner = ((int)(0x60 * age) << 16) | ((int)(0x50 * age) << 8) | (int) (0x30 * age);
|
||||
BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorInner, colorInner, (bullet.ticksExisted + bullet.getEntityId()) / 2, (int)(bullet.beamLength / 2 + 1), (float)scale * 4F, 2, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glScaled(age * 2, 1, age * 2);
|
||||
GL11.glTranslated(0, bullet.beamLength, 0);
|
||||
GL11.glRotatef(-90, 0, 0, 1);
|
||||
renderBulletStandard(Tessellator.instance, 0xFFF0A0, 0xFFFFFF, bullet.beamLength, true);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
};
|
||||
}
|
||||
|
||||
@ -8,14 +8,19 @@ import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.impl.ItemGunStinger;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.helper.CasingCreator;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
/** Orchestras are server-side components that run along client-side animations.
|
||||
* The orchestra only knows what animation is or was playing and how long it started, but not if it is still active.
|
||||
@ -898,4 +903,80 @@ public class Orchestras {
|
||||
if(timer == 124) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_TAU = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == AnimType.SPINUP && entity.worldObj.isRemote) {
|
||||
AudioWrapper runningAudio = ItemGunBaseNT.loopedSounds.get(entity);
|
||||
|
||||
if(timer < 300) {
|
||||
if(runningAudio == null || !runningAudio.isPlaying()) {
|
||||
AudioWrapper audio = MainRegistry.proxy.getLoopedSound("hbm:weapon.fire.tauLoop", (float) entity.posX, (float) entity.posY, (float) entity.posZ, 1F, 15F, 0.75F, 10);
|
||||
audio.updatePitch(0.75F);
|
||||
ItemGunBaseNT.loopedSounds.put(entity, audio);
|
||||
audio.startSound();
|
||||
}
|
||||
if(runningAudio != null && runningAudio.isPlaying()) {
|
||||
runningAudio.keepAlive();
|
||||
runningAudio.updatePosition((float) entity.posX, (float) entity.posY, (float) entity.posZ);
|
||||
runningAudio.updatePitch(0.75F + timer * 0.01F);
|
||||
}
|
||||
} else {
|
||||
if(runningAudio != null && runningAudio.isPlaying()) runningAudio.stopSound();
|
||||
}
|
||||
}
|
||||
//stop sound due to state change
|
||||
if(type != AnimType.SPINUP && entity.worldObj.isRemote) {
|
||||
AudioWrapper runningAudio = ItemGunBaseNT.loopedSounds.get(entity);
|
||||
if(runningAudio != null && runningAudio.isPlaying()) runningAudio.stopSound();
|
||||
}
|
||||
if(entity.worldObj.isRemote) return;
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.tau", 0.5F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
|
||||
if(type == AnimType.ALT_CYCLE) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.tau", 0.5F, 0.7F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
|
||||
if(type == AnimType.SPINUP) {
|
||||
if(timer % 10 == 0 && timer < 130) {
|
||||
IMagazine mag = ctx.config.getReceivers(stack)[0].getMagazine(stack);
|
||||
if(mag.getAmount(stack, ctx.inventory) <= 0) {
|
||||
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.CYCLE_DRY, ctx.configIndex);
|
||||
return;
|
||||
}
|
||||
mag.useUpAmmo(stack, ctx.inventory, 1);
|
||||
}
|
||||
|
||||
if(timer > 200) {
|
||||
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.CYCLE_DRY, ctx.configIndex);
|
||||
|
||||
entity.attackEntityFrom(ModDamageSource.tauBlast, 1_000F);
|
||||
|
||||
ItemGunBaseNT.setWear(stack, ctx.configIndex, Math.min(ItemGunBaseNT.getWear(stack, ctx.configIndex) + 10_000F, ctx.config.getDurability(stack)));
|
||||
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ, "hbm:entity.ufoBlast", 5.0F, 0.9F);
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ, "fireworks.blast", 5.0F, 0.5F);
|
||||
|
||||
float yaw = entity.worldObj.rand.nextFloat() * 180F;
|
||||
for(int i = 0; i < 3; i++) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "plasmablast");
|
||||
data.setFloat("r", 1.0F);
|
||||
data.setFloat("g", 0.8F);
|
||||
data.setFloat("b", 0.5F);
|
||||
data.setFloat("pitch", -60F + 60F * i);
|
||||
data.setFloat("yaw", yaw);
|
||||
data.setFloat("scale", 2F);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ),
|
||||
new TargetPoint(entity.dimension, entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ, 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -0,0 +1,122 @@
|
||||
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.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
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.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class XFactoryAccelerator {
|
||||
|
||||
public static MagazineBelt tauChargeMag = new MagazineBelt();
|
||||
|
||||
public static BulletConfig tau_uranium;
|
||||
public static BulletConfig tau_uranium_charge;
|
||||
|
||||
public static void init() {
|
||||
|
||||
tau_uranium = new BulletConfig().setItem(EnumAmmo.TAU_URANIUM).setLife(5).setRenderRotations(false).setDoesPenetrate(true).setDamageFalloutByPen(false)
|
||||
.setOnBeamImpact(BulletConfig.LAMBDA_BEAM_HIT);
|
||||
tau_uranium_charge = new BulletConfig().setItem(EnumAmmo.TAU_URANIUM).setLife(5).setRenderRotations(false).setDoesPenetrate(true).setDamageFalloutByPen(false).setSpectral(true)
|
||||
.setOnBeamImpact(BulletConfig.LAMBDA_BEAM_HIT);
|
||||
|
||||
tauChargeMag.addConfigs(tau_uranium_charge);
|
||||
|
||||
ModItems.gun_tau = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(6_400).draw(10).inspect(10).crosshair(Crosshair.CIRCLE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(10F).delay(4).auto(true).spread(0F)
|
||||
.mag(new MagazineBelt().addConfigs(tau_uranium))
|
||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||
.setupBeamFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY)
|
||||
.rp(LAMBDA_TAU_PRIMARY_RELEASE)
|
||||
.ps(LAMBDA_TAU_SECONDARY_PRESS)
|
||||
.rs(LAMBDA_TAU_SECONDARY_RELEASE)
|
||||
.pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_TAU_ANIMS).orchestra(Orchestras.ORCHESTRA_TAU)
|
||||
).setUnlocalizedName("gun_tau");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_PRIMARY_RELEASE = (stack, ctx) -> {
|
||||
if(ctx.getPlayer() == null) return;
|
||||
ctx.getPlayer().worldObj.playSoundEffect(ctx.getPlayer().posX, ctx.getPlayer().posY, ctx.getPlayer().posZ, "hbm:weapon.fire.tauRelease", 1F, 1F);
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_SECONDARY_PRESS = (stack, ctx) -> {
|
||||
if(ctx.getPlayer() == null) return;
|
||||
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.SPINUP, ctx.configIndex);
|
||||
tauChargeMag.getMagType(stack); //caches the last loaded ammo
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_SECONDARY_RELEASE = (stack, ctx) -> {
|
||||
if(ctx.getPlayer() == null) return;
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(timer >= 10) {
|
||||
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.ALT_CYCLE, ctx.configIndex);
|
||||
int unitsUsed = 1 + Math.min(12, timer / 10);
|
||||
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
int index = ctx.configIndex;
|
||||
|
||||
float aim = ItemGunBaseNT.getIsAiming(stack) ? 0.25F : 1F;
|
||||
Receiver primary = ctx.config.getReceivers(stack)[0];
|
||||
BulletConfig config = tauChargeMag.getFirstConfig(stack, ctx.inventory);
|
||||
|
||||
Vec3 offset = primary.getProjectileOffset(stack);
|
||||
double forwardOffset = offset.xCoord;
|
||||
double heightOffset = offset.yCoord;
|
||||
double sideOffset = offset.zCoord;
|
||||
|
||||
float damage = Lego.getStandardWearDamage(stack, ctx.config, index) * unitsUsed * 5;
|
||||
float spread = Lego.calcSpread(ctx, stack, primary, true, index, aim);
|
||||
EntityBulletBeamBase mk4 = new EntityBulletBeamBase(entity, config, damage, spread, sideOffset, heightOffset, forwardOffset);
|
||||
entity.worldObj.spawnEntityInWorld(mk4);
|
||||
|
||||
ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear * unitsUsed, ctx.config.getDurability(stack)));
|
||||
|
||||
} else {
|
||||
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.CYCLE_DRY, ctx.configIndex);
|
||||
}
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_TAU_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -0.5, 50).addPos(0, 0, 0, 150, IType.SIN_FULL))
|
||||
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, -5, 50, IType.SIN_DOWN).addPos(0, 0, 5, 100, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP));
|
||||
case ALT_CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -3, 100, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, -5, 50, IType.SIN_DOWN).addPos(0, 0, 5, 100, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP));
|
||||
case CYCLE_DRY: return new BusAnimation();
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(2, 0, 0, 150, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL))
|
||||
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, -360, 500, IType.SIN_DOWN));
|
||||
case SPINUP: return new BusAnimation()
|
||||
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 360 * 6, 3000, IType.SIN_UP).addPos(0, 0, 0, 0).addPos(0, 0, 360 * 40, 500 * 20));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
@ -830,7 +830,6 @@ public class ResourceManager {
|
||||
public static final IModelCustom glass_cannon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/glass_cannon.obj"));
|
||||
public static final IModelCustom novac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/novac.obj"));
|
||||
public static final IModelCustom lunatic_sniper = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lunatic_sniper.obj")).asVBO();
|
||||
public static final IModelCustom tau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/tau.obj"));
|
||||
public static final IModelCustom benelli = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/benelli_new.obj")).asVBO();
|
||||
public static final IModelCustom coilgun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/coilgun.obj")).asVBO();
|
||||
public static final IModelCustom cryocannon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/cryo_cannon.obj")).asVBO();
|
||||
@ -862,6 +861,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom missile_launcher = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/missile_launcher.obj")).asVBO();
|
||||
public static final IModelCustom tesla_cannon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/tesla_cannon.obj")).asVBO();
|
||||
public static final IModelCustom stg77 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/stg77.obj")).asVBO();
|
||||
public static final IModelCustom tau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/tau.obj")).asVBO();
|
||||
|
||||
public static final HashMap<String, BusAnimation> python_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/python.json"));
|
||||
public static final HashMap<String, BusAnimation> cursed_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/cursed.json"));
|
||||
@ -959,7 +959,6 @@ public class ResourceManager {
|
||||
public static final ResourceLocation red_key_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/red_key.png");
|
||||
public static final ResourceLocation m2_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/m2_browning.png");
|
||||
public static final ResourceLocation lunatic_sniper_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lunatic_sniper.png");
|
||||
public static final ResourceLocation tau_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tau.png");
|
||||
public static final ResourceLocation benelli_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/benelli_tex.png");
|
||||
public static final ResourceLocation coilgun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/coilgun.png");
|
||||
public static final ResourceLocation cryocannon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/cryo_cannon.png");
|
||||
@ -995,6 +994,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation missile_launcher_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/missile_launcher.png");
|
||||
public static final ResourceLocation tesla_cannon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tesla_cannon.png");
|
||||
public static final ResourceLocation stg77_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/stg77.png");
|
||||
public static final ResourceLocation tau_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tau.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderTau extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1.75F * offset, -1.75F * offset, 3.5F * offset,
|
||||
-1.75F * offset, -1.75F * offset, 3.5F * offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.tau_tex);
|
||||
double scale = 0.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] rotate = HbmAnimations.getRelevantTransformation("ROTATE");
|
||||
|
||||
GL11.glTranslated(0, -1, -4);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 4);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
GL11.glTranslated(0, 0, -2);
|
||||
GL11.glRotated(recoil[2] * 5, 1, 0, 0);
|
||||
GL11.glTranslated(0, 0, 2);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
ResourceManager.tau.renderPart("Body");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, -0.25, 0);
|
||||
GL11.glRotated(rotate[2], 0, 0, 1);
|
||||
GL11.glTranslated(0, 0.25, 0);
|
||||
ResourceManager.tau.renderPart("Rotor");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 2.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, 1, 2);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 2D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-0.25, 0.5, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.tau_tex);
|
||||
ResourceManager.tau.renderAll();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,9 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
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.handler.CompatHandler;
|
||||
import com.hbm.interfaces.ICopiable;
|
||||
import com.hbm.inventory.container.ContainerMicrowave;
|
||||
@ -61,7 +65,11 @@ public class TileEntityMicrowave extends TileEntityMachineBase implements IEnerg
|
||||
|
||||
if(speed >= maxSpeed) {
|
||||
worldObj.func_147480_a(xCoord, yCoord, zCoord, false);
|
||||
worldObj.newExplosion(null, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 7.5F, true, true);
|
||||
ExplosionVNT vnt = new ExplosionVNT(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 5);
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, 50));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(10, 2.5F, 1F));
|
||||
vnt.explode();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -228,6 +228,9 @@
|
||||
"weapon.fire.flameLoop": {"category": "player", "sounds": [{"name": "weapon/fire/flameLoop", "stream": false}]},
|
||||
"weapon.fire.lockon": {"category": "player", "sounds": [{"name": "weapon/fire/lockon", "stream": false}]},
|
||||
"weapon.fire.shredderCycle": {"category": "player", "sounds": [{"name": "weapon/fire/shredderCycle", "stream": false}]},
|
||||
"weapon.fire.tau": {"category": "player", "sounds": [{"name": "weapon/fire/tau", "stream": false}]},
|
||||
"weapon.fire.tauLoop": {"category": "player", "sounds": [{"name": "weapon/fire/tauLoop", "stream": false}]},
|
||||
"weapon.fire.tauRelease": {"category": "player", "sounds": ["weapon/fire/tauRelease1", "weapon/fire/tauRelease2", "weapon/fire/tauRelease3"]},
|
||||
|
||||
"weapon.reload.boltClose": {"category": "player", "sounds": ["weapon/reload/boltClose"]},
|
||||
"weapon.reload.boltOpen": {"category": "player", "sounds": ["weapon/reload/boltOpen"]},
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tau.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tau.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tauLoop.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tauLoop.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tauRelease1.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tauRelease1.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tauRelease2.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tauRelease2.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tauRelease3.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/tauRelease3.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 319 B |
Loading…
x
Reference in New Issue
Block a user