mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
cursed 60s quad barrel shotgun from hell
This commit is contained in:
parent
7b127888c8
commit
f2b64a82fe
@ -1632,6 +1632,7 @@ public class ModItems {
|
||||
public static Item gun_heavy_revolver;
|
||||
public static Item gun_carbine;
|
||||
public static Item gun_am180;
|
||||
public static Item gun_liberator;
|
||||
|
||||
public static Item ammo_standard;
|
||||
|
||||
@ -7048,6 +7049,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_heavy_revolver, gun_heavy_revolver.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_carbine, gun_carbine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_am180, gun_am180.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_liberator, gun_liberator.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -40,6 +40,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_heavy_revolver, new ItemRenderHeavyRevolver());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_carbine, new ItemRenderCarbine());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_am180, new ItemRenderAm180());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_liberator, new ItemRenderLiberator());
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(RENDER_STANDARD_BULLET);
|
||||
ammo_debug_buckshot.setRenderer(RENDER_STANDARD_BULLET);
|
||||
@ -82,6 +83,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_heavy_revolver).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_carbine).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_am180).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_liberator).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
}
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_STANDARD_BULLET = (bullet, interp) -> {
|
||||
|
||||
@ -80,6 +80,8 @@ public class GunStateDecider {
|
||||
ItemGunBaseNT.playAnimation(player, stack, AnimType.RELOAD_END);
|
||||
}
|
||||
}
|
||||
|
||||
mag.setAmountAfterReload(stack, mag.getAmount(stack));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -319,6 +319,7 @@ public class Orchestras {
|
||||
}
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 2) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 20) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.impact", 0.25F, 1F);
|
||||
if(timer == 32) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
if(timer == 40) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.pistolCock", 1F, 0.9F);
|
||||
}
|
||||
@ -330,4 +331,50 @@ public class Orchestras {
|
||||
if(timer == 35) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_LIBERATOR = (stack, ctx) -> {
|
||||
EntityPlayer player = ctx.player;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack);
|
||||
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 0) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverCock", 1F, 0.75F);
|
||||
if(timer == 4) {
|
||||
IMagazine mag = ctx.config.getReceivers(stack)[0].getMagazine(stack);
|
||||
int ammo = mag.getAmount(stack);
|
||||
int prev = mag.getAmountAfterReload(stack);
|
||||
int toEject = prev - ammo;
|
||||
SpentCasing casing = mag.getCasing(stack);
|
||||
for(int i = 0; i < toEject; i++) CasingCreator.composeEffect(player.worldObj, player, 0.625, -0.1875, -0.375D, -0.12, 0.18, 0, 0.01, casing.getName(), true, 60, 0.5D, 20);
|
||||
}
|
||||
if(timer == 15) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magSmallInsert", 1F, 1F);
|
||||
}
|
||||
if(type == AnimType.RELOAD_CYCLE) {
|
||||
if(timer == 5) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magSmallInsert", 1F, 1F);
|
||||
}
|
||||
if(type == AnimType.RELOAD_END) {
|
||||
if(timer == 2) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||
}
|
||||
if(type == AnimType.JAMMED) {
|
||||
if(timer == 2) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||
if(timer == 12) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverCock", 1F, 0.75F);
|
||||
if(timer == 26) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||
}
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
if(timer == 0) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.dryFireClick", 1F, 1F);
|
||||
}
|
||||
if(type == AnimType.INSPECT) {
|
||||
if(timer == 0) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverCock", 1F, 0.75F);
|
||||
IMagazine mag = ctx.config.getReceivers(stack)[0].getMagazine(stack);
|
||||
int ammo = mag.getAmount(stack);
|
||||
int prev = mag.getAmountAfterReload(stack);
|
||||
int toEject = prev - ammo;
|
||||
if(timer == 4 && toEject <= 0) {
|
||||
SpentCasing casing = mag.getCasing(stack);
|
||||
for(int i = 0; i < toEject; i++) CasingCreator.composeEffect(player.worldObj, player, 0.625, -0.1875, -0.375D, -0.12, 0.18, 0, 0.01, casing.getName(), true, 60, 0.5D, 20);
|
||||
mag.setAmountAfterReload(stack, 0);
|
||||
}
|
||||
if(timer == 20) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -35,14 +35,24 @@ public class XFactory12ga {
|
||||
g12 = new BulletConfig().setItem(EnumAmmo.G12).setProjectiles(8, 8).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA"));
|
||||
|
||||
ModItems.gun_maresleg = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(300).draw(20).inspect(39).jam(45).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE).orchestra(Orchestras.ORCHESTRA_MARESLEG)
|
||||
.dura(600).draw(20).inspect(39).jam(24).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE).orchestra(Orchestras.ORCHESTRA_MARESLEG)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).reload(22, 10, 13, 0).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.dmg(12F).delay(20).reload(22, 10, 13, 39).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration().anim(LAMBDA_MARESLEG_ANIMS)
|
||||
).setUnlocalizedName("gun_maresleg").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
ModItems.gun_liberator = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(200).draw(20).inspect(21).jam(45).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE).orchestra(Orchestras.ORCHESTRA_LIBERATOR)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).rounds(4).reload(25, 15, 7, 0).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 4).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration().anim(LAMBDA_LIBERATOR_ANIMS)
|
||||
).setUnlocalizedName("gun_liberator").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MARESLEG_ANIMS = (stack, type) -> {
|
||||
@ -87,4 +97,102 @@ public class XFactory12ga {
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/** This fucking sucks */
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LIBERATOR_ANIMS = (stack, type) -> {
|
||||
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack).getReceivers(stack)[0].getMagazine(stack).getAmount(stack);
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -2.5, 50, IType.SIN_DOWN).addPos(0, 0, 0, 350, IType.SIN_FULL));
|
||||
case CYCLE_DRY: return new BusAnimation();
|
||||
case RELOAD: if(ammo == 0) return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(0, 0, 0, 100).addPos(60, 0, 0, 350, IType.SIN_DOWN))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(2, -4, -2, 0))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(2, -4, -2, 0))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0));
|
||||
if(ammo == 1) return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(0, 0, 0, 100).addPos(60, 0, 0, 350, IType.SIN_DOWN))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(2, -4, -2, 0))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0));
|
||||
if(ammo == 2) return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(0, 0, 0, 100).addPos(60, 0, 0, 350, IType.SIN_DOWN))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0));
|
||||
if(ammo == 3) return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(0, 0, 0, 100).addPos(60, 0, 0, 350, IType.SIN_DOWN))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP));
|
||||
case RELOAD_CYCLE:
|
||||
if(ammo == 0) return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(2, -4, -2, 0))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0));
|
||||
if(ammo == 1) return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0));
|
||||
if(ammo == 2) return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP));
|
||||
return null;
|
||||
case RELOAD_END: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0).addPos(15, 0, 0, 250).addPos(0, 0, 0, 50))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_UP))
|
||||
.addBus(ammo >= 0 ? "SHELL1" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo >= 1 ? "SHELL2" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo >= 2 ? "SHELL3" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo >= 3 ? "SHELL4" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo < 0 ? "SHELL1" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 1 ? "SHELL2" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 2 ? "SHELL3" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 3 ? "SHELL4" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0).addPos(15, 0, 0, 250).addPos(0, 0, 0, 50).addPos(0, 0, 0, 550).addPos(15, 0, 0, 100).addPos(15, 0, 0, 600).addPos(0, 0, 0, 50))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_UP).addPos(0, 0, 0, 600).addPos(45, 0, 0, 250, IType.SIN_DOWN).addPos(45, 0, 0, 300).addPos(0, 0, 0, 150, IType.SIN_UP))
|
||||
.addBus(ammo >= 0 ? "SHELL1" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo >= 1 ? "SHELL2" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo >= 2 ? "SHELL3" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo >= 3 ? "SHELL4" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo < 0 ? "SHELL1" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 1 ? "SHELL2" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 2 ? "SHELL3" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 3 ? "SHELL4" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0));
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100).addPos(15, 0, 0, 1100).addPos(0, 0, 0, 50))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(0, 0, 0, 100).addPos(60, 0, 0, 350, IType.SIN_DOWN).addPos(60, 0, 0, 500).addPos(0, 0, 0, 250, IType.SIN_UP))
|
||||
.addBus(ammo > 0 ? "SHELL1" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo > 1 ? "SHELL2" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo > 2 ? "SHELL3" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo > 3 ? "SHELL4" : "NULL", new BusAnimationSequence().addPos(0, 0, 0, 0))
|
||||
.addBus(ammo < 1 ? "SHELL1" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 2 ? "SHELL2" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 3 ? "SHELL3" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
|
||||
.addBus(ammo < 4 ? "SHELL4" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ public class XFactory22lr {
|
||||
ModItems.gun_am180 = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(177 * 25).draw(15).inspect(38).jam(55).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE).orchestra(Orchestras.ORCHESTRA_AM180)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(5F).delay(1).dry(10).auto(true).spread(0.02F).reload(44).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.dmg(5F).delay(1).dry(10).auto(true).spread(0.02F).reload(53).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 177).addConfigs(p22_sp, p22_fmj, p22_jhp, p22_ap))
|
||||
.offset(1, -0.0625 * 1.5, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
@ -62,19 +62,21 @@ public class XFactory22lr {
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, ItemGunBaseNT.getIsAiming(stack) ? -0.125 : -0.25, 15, IType.SIN_DOWN).addPos(0, 0, 0, 35, IType.SIN_FULL));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 300).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_UP));
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 550).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_UP))
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 300).addPos(0, 0, 15, 250, IType.SIN_FULL).addPos(0, 0, 15, 400).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
case RELOAD:
|
||||
return new BusAnimation()
|
||||
.addBus("MAGTURN", new BusAnimationSequence().addPos(15, 0, 0, 250, IType.SIN_FULL).addPos(15, 0, 0, 250).addPos(15, 0, 70, 300, IType.SIN_FULL).addPos(15, 0, 0, 0).addPos(15, 0, 0, 750).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(2, 0, -4, 250, IType.SIN_FULL).addPos(-10, 2, -4, 300, IType.SIN_UP).addPos(3, -6, -4, 0).addPos(2, 0, -4, 500, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 2000).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_UP));
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 2250).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_UP))
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 2000).addPos(0, 0, 15, 250, IType.SIN_FULL).addPos(0, 0, 15, 400).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_UP))
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, 45, 250, IType.SIN_FULL).addPos(0, 0, 45, 400).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("MAGTURN", new BusAnimationSequence().addPos(15, 0, 0, 250, IType.SIN_FULL).addPos(15, 0, 0, 1400).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(4, 0, -4, 250, IType.SIN_FULL).addPos(4, 0, -4, 100).addPos(4, 6, -4, 250, IType.SIN_FULL).addPos(4, 0, -4, 150, IType.SIN_UP).addPos(4, -1, -4, 100, IType.SIN_DOWN).addPos(4, -1, -4, 250).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("MAGSPIN", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(680, 0, 0, 500, IType.SIN_FULL).addPos(680, 0, 0, 250).addPos(720, 0, 0, 250));
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 200).addPos(4, -1, -4, 200, IType.SIN_FULL).addPos(4, -1.5, -4, 50).addPos(4, 0, -4, 100).addPos(4, 6, -4, 250, IType.SIN_DOWN).addPos(4, 0, -4, 150, IType.SIN_UP).addPos(4, -1, -4, 100, IType.SIN_DOWN).addPos(4, -1, -4, 250).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("MAGSPIN", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(-400, 0, 0, 500, IType.SIN_FULL).addPos(-400, 0, 0, 250).addPos(-360, 0, 0, 250));
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -35,7 +35,11 @@ public interface IMagazine<T> {
|
||||
public SpentCasing getCasing(ItemStack stack);
|
||||
/** When reloading, remember the amount before reload is initiated */
|
||||
public void setAmountBeforeReload(ItemStack stack, int amount);
|
||||
/** Amount of rouns before reload has started. Do note that the NBT stack sync likely arrives
|
||||
/** Amount of rounds before reload has started. Do note that the NBT stack sync likely arrives
|
||||
* after the animation packets, so for RELOAD type anims, use the live ammo count instead! */
|
||||
public int getAmountBeforeReload(ItemStack stack);
|
||||
/** Sets amount of ammo after each reload operation */
|
||||
public void setAmountAfterReload(ItemStack stack, int amount);
|
||||
/** Cached amount of ammo after the most recent reload */
|
||||
public int getAmountAfterReload(ItemStack stack);
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@ public abstract class MagazineSingleTypeBase implements IMagazine<BulletConfig>
|
||||
public static final String KEY_MAG_COUNT = "magcount";
|
||||
public static final String KEY_MAG_TYPE = "magtype";
|
||||
public static final String KEY_MAG_PREV = "magprev";
|
||||
public static final String KEY_MAG_AFTER = "magafter";
|
||||
|
||||
protected List<BulletConfig> acceptedBullets = new ArrayList();
|
||||
|
||||
@ -70,6 +71,8 @@ public abstract class MagazineSingleTypeBase implements IMagazine<BulletConfig>
|
||||
|
||||
@Override public void setAmountBeforeReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_PREV + index, amount); }
|
||||
@Override public int getAmountBeforeReload(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_PREV + index); }
|
||||
@Override public void setAmountAfterReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_AFTER + index, amount); }
|
||||
@Override public int getAmountAfterReload(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_AFTER + index); }
|
||||
|
||||
// MAG TYPE //
|
||||
public static int getMagType(ItemStack stack, int index) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_TYPE + index); } //TODO: replace with named tags to avoid ID shifting
|
||||
|
||||
@ -858,6 +858,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom flaregun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flaregun.obj")).asVBO();
|
||||
public static final IModelCustom carbine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/carbine.obj")).asVBO();
|
||||
public static final IModelCustom am180 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/am180.obj")).asVBO();
|
||||
public static final IModelCustom liberator = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/liberator.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"));
|
||||
@ -977,6 +978,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation heavy_revolver_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/heavy_revolver.png");
|
||||
public static final ResourceLocation carbine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/huntsman.png");
|
||||
public static final ResourceLocation am180_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/am180.png");
|
||||
public static final ResourceLocation liberator_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/liberator.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -84,6 +84,7 @@ public class ItemRenderAm180 extends ItemRenderWeaponBase {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.875, 17);
|
||||
GL11.glRotated(turn[2], 0, 0, -1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
this.renderSmokeNodes(gun.smokeNodes, 0.25D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -0,0 +1,145 @@
|
||||
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 ItemRenderLiberator extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@Override
|
||||
protected void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1.5F * offset, -1.25F * offset, 1.25F * offset,
|
||||
0, -4.625 / 8D, 0.25);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.liberator_tex);
|
||||
double scale = 0.375D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] lift = HbmAnimations.getRelevantTransformation("LIFT");
|
||||
double[] latch = HbmAnimations.getRelevantTransformation("LATCH");
|
||||
double[] brk = HbmAnimations.getRelevantTransformation("BREAK");
|
||||
double[] shell1 = HbmAnimations.getRelevantTransformation("SHELL1");
|
||||
double[] shell2 = HbmAnimations.getRelevantTransformation("SHELL2");
|
||||
double[] shell3 = HbmAnimations.getRelevantTransformation("SHELL3");
|
||||
double[] shell4 = HbmAnimations.getRelevantTransformation("SHELL4");
|
||||
|
||||
GL11.glTranslated(0, -1, -3);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 3);
|
||||
|
||||
GL11.glTranslated(0, -3, -3);
|
||||
GL11.glRotated(lift[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 3, 3);
|
||||
|
||||
GL11.glTranslated(recoil[0] * 2, recoil[1], recoil[2]);
|
||||
GL11.glRotated(recoil[2] * 10, 1, 0, 0);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
ResourceManager.liberator.renderPart("Gun");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(0, -0.5, 0.75);
|
||||
GL11.glRotated(brk[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 0.5, -0.75);
|
||||
ResourceManager.liberator.renderPart("Barrel");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(shell1[0], shell1[1], shell1[2]);
|
||||
ResourceManager.liberator.renderPart("Shell1");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(shell2[0], shell2[1], shell2[2]);
|
||||
ResourceManager.liberator.renderPart("Shell2");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(shell3[0], shell3[1], shell3[2]);
|
||||
ResourceManager.liberator.renderPart("Shell3");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(shell4[0], shell4[1], shell4[2]);
|
||||
ResourceManager.liberator.renderPart("Shell4");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.15625, 0.75);
|
||||
GL11.glRotated(latch[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -1.15625, -0.75);
|
||||
ResourceManager.liberator.renderPart("Latch");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double smokeScale = 0.375;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.25, 7.25);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
GL11.glTranslated(0, 0, 0.25 / smokeScale);
|
||||
this.renderSmokeNodes(gun.smokeNodes, 1D);
|
||||
GL11.glTranslated(0, 0, -0.5 / smokeScale);
|
||||
this.renderSmokeNodes(gun.smokeNodes, 1D);
|
||||
GL11.glTranslated(0, 0.5 / smokeScale, 0);
|
||||
this.renderSmokeNodes(gun.smokeNodes, 1D);
|
||||
GL11.glTranslated(0, 0, 0.5 / smokeScale);
|
||||
this.renderSmokeNodes(gun.smokeNodes, 1D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.5, 8);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
this.renderMuzzleFlash(gun.lastShot, 75, 5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
GL11.glTranslated(0, 1, 3);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 1.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-0.5, 0.5, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.liberator_tex);
|
||||
ResourceManager.liberator.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.interfaces.ICopiable;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
@ -12,12 +13,14 @@ import api.hbm.tile.IHeatSource;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityHeaterElectric extends TileEntityLoadedBase implements IHeatSource, IEnergyReceiverMK2, INBTPacketReceiver, IInfoProviderEC {
|
||||
public class TileEntityHeaterElectric extends TileEntityLoadedBase implements IHeatSource, IEnergyReceiverMK2, INBTPacketReceiver, ICopiable, IInfoProviderEC {
|
||||
|
||||
public long power;
|
||||
public int heatEnergy;
|
||||
@ -209,4 +212,16 @@ public class TileEntityHeaterElectric extends TileEntityLoadedBase implements IH
|
||||
data.setLong(CompatEnergyControl.L_ENERGY_TU, getHeatStored());
|
||||
data.setLong(CompatEnergyControl.D_OUTPUT_TU, getHeatGen());
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getSettings(World world, int x, int y, int z) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setInteger("setting", setting);
|
||||
return nbt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pasteSettings(NBTTagCompound nbt, int index, World world, EntityPlayer player, int x, int y, int z) {
|
||||
this.setting = nbt.getInteger("setting");
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -245,6 +245,7 @@
|
||||
"weapon.reload.shotgunCock": {"category": "player", "sounds": ["weapon/reload/shotgunCock"]},
|
||||
"weapon.reload.shotgunReload": {"category": "player", "sounds": ["weapon/reload/shotgunReload1", "weapon/reload/shotgunReload2", "weapon/reload/shotgunReload3"]},
|
||||
"weapon.reload.tubeFwoomp": {"category": "player", "sounds": ["weapon/reload/tubeFwoomp"]},
|
||||
"weapon.reload.impact": {"category": "player", "sounds": ["weapon/reload/impact1", "weapon/reload/impact2", "weapon/reload/impact3"]},
|
||||
|
||||
"turret.chekhov_fire": {"category": "block", "sounds": [{"name": "turret/chekhov_fire", "stream": false}]},
|
||||
"turret.jeremy_fire": {"category": "block", "sounds": ["turret/jeremy_fire1", "turret/jeremy_fire2", "turret/jeremy_fire3", "turret/jeremy_fire4", "turret/jeremy_fire5"]},
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/weapon/reload/impact1.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/reload/impact1.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/sounds/weapon/reload/impact2.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/reload/impact2.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/sounds/weapon/reload/impact3.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/reload/impact3.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 8.2 KiB |
Loading…
x
Reference in New Issue
Block a user