mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
add Steyr animations
This commit is contained in:
parent
08a72afecc
commit
586d71911b
@ -894,6 +894,7 @@ public class Orchestras {
|
|||||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||||
|
|
||||||
|
if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
|
||||||
if(type == AnimType.CYCLE) {
|
if(type == AnimType.CYCLE) {
|
||||||
if(timer == 40) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 0.25F, 1.25F);
|
if(timer == 40) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 0.25F, 1.25F);
|
||||||
}
|
}
|
||||||
@ -915,6 +916,30 @@ public class Orchestras {
|
|||||||
if(timer == 114) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallInsert", 1F, 1F);
|
if(timer == 114) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallInsert", 1F, 1F);
|
||||||
if(timer == 124) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
if(timer == 124) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if(type == AnimType.CYCLE) {
|
||||||
|
if(timer == 40) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 0.25F, 1.25F);
|
||||||
|
}
|
||||||
|
if(type == AnimType.CYCLE_DRY) {
|
||||||
|
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 0.8F);
|
||||||
|
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.pistolCock", 1F, 0.9F);
|
||||||
|
if(timer == 40) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 0.25F, 1.25F);
|
||||||
|
}
|
||||||
|
if(type == AnimType.RELOAD) {
|
||||||
|
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||||
|
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||||
|
if(timer == 28) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.impact", 0.25F, 1F);
|
||||||
|
if(timer == 38) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||||
|
if(timer == 43) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||||
|
}
|
||||||
|
if(type == AnimType.INSPECT) {
|
||||||
|
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||||
|
if(timer == 11) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallRemove", 1F, 1F);
|
||||||
|
|
||||||
|
if(timer == 72) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallInsert", 1F, 1F);
|
||||||
|
if(timer == 84) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_TAU = (stack, ctx) -> {
|
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_TAU = (stack, ctx) -> {
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public class XFactory12ga {
|
|||||||
ModItems.gun_spas12 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
ModItems.gun_spas12 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||||
.dura(600).draw(20).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
.dura(600).draw(20).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||||
.rec(new Receiver(0)
|
.rec(new Receiver(0)
|
||||||
.dmg(12F).delay(20).reload(5, 10, 10, 10, 0).jam(24).sound("hbm:weapon.shotgunShoot", 1.0F, 1.0F)
|
.dmg(12F).delay(20).reload(5, 10, 10, 10, 0).jam(36).sound("hbm:weapon.shotgunShoot", 1.0F, 1.0F)
|
||||||
.mag(new MagazineSingleReload(0, 8).addConfigs(all))
|
.mag(new MagazineSingleReload(0, 8).addConfigs(all))
|
||||||
.offset(0.75, -0.0625, -0.1875)
|
.offset(0.75, -0.0625, -0.1875)
|
||||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.factory;
|
|||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
|
|
||||||
|
import com.hbm.config.ClientConfig;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||||
import com.hbm.items.weapon.sedna.Crosshair;
|
import com.hbm.items.weapon.sedna.Crosshair;
|
||||||
@ -15,6 +16,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
|||||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.main.ResourceManager;
|
||||||
import com.hbm.particle.SpentCasing;
|
import com.hbm.particle.SpentCasing;
|
||||||
import com.hbm.particle.SpentCasing.CasingType;
|
import com.hbm.particle.SpentCasing.CasingType;
|
||||||
import com.hbm.render.anim.BusAnimation;
|
import com.hbm.render.anim.BusAnimation;
|
||||||
@ -56,7 +58,7 @@ public class XFactory556mm {
|
|||||||
ModItems.gun_stg77 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
ModItems.gun_stg77 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||||
.dura(3_000).draw(10).inspect(125).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
.dura(3_000).draw(10).inspect(125).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||||
.rec(new Receiver(0)
|
.rec(new Receiver(0)
|
||||||
.dmg(15F).delay(2).dry(15).auto(true).spread(0.0F).reload(37).jam(0).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
.dmg(15F).delay(2).dry(15).auto(true).spread(0.0F).reload(46).jam(0).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||||
.mag(new MagazineFullReload(0, 30).addConfigs(r556_sp, r556_fmj, r556_jhp, r556_ap))
|
.mag(new MagazineFullReload(0, 30).addConfigs(r556_sp, r556_fmj, r556_jhp, r556_ap))
|
||||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||||
@ -132,6 +134,7 @@ public class XFactory556mm {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_STG77_ANIMS = (stack, type) -> {
|
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_STG77_ANIMS = (stack, type) -> {
|
||||||
|
if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case EQUIP: return new BusAnimation()
|
case EQUIP: return new BusAnimation()
|
||||||
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||||
@ -153,6 +156,19 @@ public class XFactory556mm {
|
|||||||
.addBus("INSPECT_MOVE", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(0, 0, 6, 1000).addPos(2, 0, 3, 500, IType.SIN_FULL).addPos(2, 0.75, 0, 500, IType.SIN_FULL).addPos(2, 0.75, 0, 1000).addPos(2, 0, 3, 500, IType.SIN_FULL).addPos(0, 0, 6, 500).addPos(0, 0, 0, 1000))
|
.addBus("INSPECT_MOVE", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(0, 0, 6, 1000).addPos(2, 0, 3, 500, IType.SIN_FULL).addPos(2, 0.75, 0, 500, IType.SIN_FULL).addPos(2, 0.75, 0, 1000).addPos(2, 0, 3, 500, IType.SIN_FULL).addPos(0, 0, 6, 500).addPos(0, 0, 0, 1000))
|
||||||
.addBus("INSPECT_GUN", new BusAnimationSequence().addPos(0, 0, 0, 1750).addPos(15, 0, -70, 500, IType.SIN_FULL).addPos(15, 0, -70, 1500).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
.addBus("INSPECT_GUN", new BusAnimationSequence().addPos(0, 0, 0, 1750).addPos(15, 0, -70, 500, IType.SIN_FULL).addPos(15, 0, -70, 1500).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
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, ItemGunBaseNT.getIsAiming(stack) ? -0.125 : -0.375, 25, IType.SIN_DOWN).addPos(0, 0, 0, 75, IType.SIN_FULL))
|
||||||
|
.addBus("SAFETY", new BusAnimationSequence().addPos(0.25, 0, 0, 0).addPos(0.25, 0, 0, 2000).addPos(0, 0, 0, 50));
|
||||||
|
case CYCLE_DRY: return ResourceManager.stg77_anim.get("FireDry");
|
||||||
|
case RELOAD: return ResourceManager.stg77_anim.get("Reload");
|
||||||
|
case INSPECT: return ResourceManager.stg77_anim.get("Inspect");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -874,6 +874,7 @@ public class ResourceManager {
|
|||||||
public static final HashMap<String, BusAnimation> congolake_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/congolake.json"));
|
public static final HashMap<String, BusAnimation> congolake_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/congolake.json"));
|
||||||
public static final HashMap<String, BusAnimation> am180_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/am180.json"));
|
public static final HashMap<String, BusAnimation> am180_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/am180.json"));
|
||||||
public static final HashMap<String, BusAnimation> flamethrower_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/flamethrower.json"));
|
public static final HashMap<String, BusAnimation> flamethrower_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/flamethrower.json"));
|
||||||
|
public static final HashMap<String, BusAnimation> stg77_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/stg77.json"));
|
||||||
|
|
||||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||||
|
|
||||||
|
|||||||
@ -63,25 +63,36 @@ public class ItemRenderSTG77 extends ItemRenderWeaponBase {
|
|||||||
GL11.glRotated(inspectGun[2], 0, 0, 1);
|
GL11.glRotated(inspectGun[2], 0, 0, 1);
|
||||||
GL11.glRotated(inspectGun[0], 1, 0, 0);
|
GL11.glRotated(inspectGun[0], 1, 0, 0);
|
||||||
|
|
||||||
|
HbmAnimations.applyRelevantTransformation("Gun");
|
||||||
ResourceManager.stg77.renderPart("Gun");
|
ResourceManager.stg77.renderPart("Gun");
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
HbmAnimations.applyRelevantTransformation("Magazine");
|
||||||
ResourceManager.stg77.renderPart("Magazine");
|
ResourceManager.stg77.renderPart("Magazine");
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glRotated(inspectLever[2], 0, 0, 1);
|
GL11.glRotated(inspectLever[2], 0, 0, 1);
|
||||||
|
HbmAnimations.applyRelevantTransformation("Lever");
|
||||||
ResourceManager.stg77.renderPart("Lever");
|
ResourceManager.stg77.renderPart("Lever");
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslated(0, 0, bolt[2]);
|
GL11.glTranslated(0, 0, bolt[2]);
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
HbmAnimations.applyRelevantTransformation("Breech");
|
||||||
ResourceManager.stg77.renderPart("Breech");
|
ResourceManager.stg77.renderPart("Breech");
|
||||||
|
GL11.glPopMatrix();
|
||||||
GL11.glTranslated(0.125, 0, 0);
|
GL11.glTranslated(0.125, 0, 0);
|
||||||
GL11.glRotated(handle[2], 0, 0, 1);
|
GL11.glRotated(handle[2], 0, 0, 1);
|
||||||
GL11.glTranslated(-0.125, 0, 0);
|
GL11.glTranslated(-0.125, 0, 0);
|
||||||
|
HbmAnimations.applyRelevantTransformation("Handle");
|
||||||
ResourceManager.stg77.renderPart("Handle");
|
ResourceManager.stg77.renderPart("Handle");
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslated(safety[0], 0, 0);
|
GL11.glTranslated(safety[0], 0, 0);
|
||||||
|
HbmAnimations.applyRelevantTransformation("Safety");
|
||||||
ResourceManager.stg77.renderPart("Safety");
|
ResourceManager.stg77.renderPart("Safety");
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
@ -95,6 +106,8 @@ public class ItemRenderSTG77 extends ItemRenderWeaponBase {
|
|||||||
GL11.glTranslated(inspectMove[0], inspectMove[1], inspectMove[2]);
|
GL11.glTranslated(inspectMove[0], inspectMove[1], inspectMove[2]);
|
||||||
GL11.glRotated(inspectBarrel[0], 1, 0, 0);
|
GL11.glRotated(inspectBarrel[0], 1, 0, 0);
|
||||||
GL11.glRotated(inspectBarrel[2], 0, 0, 1);
|
GL11.glRotated(inspectBarrel[2], 0, 0, 1);
|
||||||
|
HbmAnimations.applyRelevantTransformation("Gun");
|
||||||
|
HbmAnimations.applyRelevantTransformation("Barrel");
|
||||||
ResourceManager.stg77.renderPart("Barrel");
|
ResourceManager.stg77.renderPart("Barrel");
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user