mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
pew pew
This commit is contained in:
parent
91e98a9013
commit
96a7058f38
@ -1,5 +1,7 @@
|
||||
## Added
|
||||
* Laser pistol
|
||||
* Saturnite-tier pistol using capacitors
|
||||
* Also has variants
|
||||
|
||||
## Changed
|
||||
* Trenchmaster armor now has the fast reload and more ammo traits again
|
||||
|
||||
@ -87,6 +87,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_missile_launcher, 1), new Object[] { " CM", "BBB", "G ", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'M', WEAPONSTEEL.mechanism(), 'B', ANY_RESISTANTALLOY.heavyBarrel(), 'G', ANY_PLASTIC.grip() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_tesla_cannon, 1), new Object[] { "CCC", "BRB", "MGE", 'C', ModItems.coil_advanced_alloy, 'B', ANY_RESISTANTALLOY.heavyBarrel(), 'R', ANY_RESISTANTALLOY.heavyReceiver(), 'M', WEAPONSTEEL.mechanism(), 'G', ANY_PLASTIC.grip(), 'E', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_laser_pistol, 1), new Object[] { "CRM", "GG ", 'C', ModItems.crystal_redstone, 'R', BIGMT.lightReceiver(), 'M', BIGMT.mechanism(), 'G', ANY_HARDPLASTIC.grip() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_laser_pistol_pew_pew, 1), new Object[] { " M ", "MPM", " M ", 'M', BIGMT.mechanism(), 'P', ModItems.gun_laser_pistol });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stg77, 1), new Object[] { " D ", "BRS", "GGM", 'D', DictFrame.fromOne(ModItems.weapon_mod_special, EnumModSpecial.SCOPE), 'B', BIGMT.lightBarrel(), 'R', BIGMT.lightReceiver(), 'S', ANY_HARDPLASTIC.stock(), 'G', ANY_HARDPLASTIC.grip(), 'M', BIGMT.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "PPP", "BSR", "G M", 'P', BIGMT.plate(), 'B', BIGMT.heavyBarrel(), 'S', BIGMT.shell(), 'R', BIGMT.heavyReceiver(), 'G', ANY_HARDPLASTIC.grip(), 'M', BIGMT.mechanism() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_tau, 1), new Object[] { " RD", "CTT", "GMS", 'D', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID), 'C', CU.pipe(), 'T', ModItems.coil_advanced_torus, 'G', ANY_HARDPLASTIC.grip(), 'R', BIGMT.lightReceiver(), 'M', BIGMT.mechanism(), 'S', ANY_HARDPLASTIC.stock() });
|
||||
|
||||
@ -72,6 +72,11 @@ public class PedestalRecipes extends SerializableRecipe {
|
||||
null, new ComparableStack(ModItems.powder_magic, 4), null)
|
||||
.extra(PedestalExtraCondition.FULL_MOON));
|
||||
|
||||
register(new PedestalRecipe(new ItemStack(ModItems.gun_laser_pistol_morning_glory),
|
||||
null, new ComparableStack(ModItems.morning_glory, 1), null,
|
||||
new ComparableStack(ModItems.item_secret, 2, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.gun_laser_pistol), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.SELENIUM_STEEL),
|
||||
null, new OreDictStack(STAR.ingot(), 4), null));
|
||||
|
||||
register(new PedestalRecipe(new ItemStack(ModItems.gun_folly),
|
||||
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.FOLLY), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.CONTROLLER), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.FOLLY),
|
||||
new OreDictStack(BSCCO.ingot(), 16), new OreDictStack(STAR.block(), 64), new OreDictStack(BSCCO.ingot(), 16),
|
||||
|
||||
@ -1476,6 +1476,8 @@ public class ModItems {
|
||||
public static Item gun_missile_launcher;
|
||||
public static Item gun_tesla_cannon;
|
||||
public static Item gun_laser_pistol;
|
||||
public static Item gun_laser_pistol_pew_pew;
|
||||
public static Item gun_laser_pistol_morning_glory;
|
||||
public static Item gun_stg77;
|
||||
public static Item gun_tau;
|
||||
public static Item gun_fatman;
|
||||
@ -6416,6 +6418,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_missile_launcher, gun_missile_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_tesla_cannon, gun_tesla_cannon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_laser_pistol, gun_laser_pistol.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_laser_pistol_pew_pew, gun_laser_pistol_pew_pew.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_laser_pistol_morning_glory, gun_laser_pistol_morning_glory.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_stg77, gun_stg77.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_tau, gun_tau.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_fatman, gun_fatman.getUnlocalizedName());
|
||||
|
||||
@ -78,6 +78,8 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_missile_launcher, new ItemRenderMissileLauncher());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_tesla_cannon, new ItemRenderTeslaCannon());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_laser_pistol, new ItemRenderLaserPistol(ResourceManager.laser_pistol_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_laser_pistol_pew_pew, new ItemRenderLaserPistol(ResourceManager.laser_pistol_pew_pew_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_laser_pistol_morning_glory, new ItemRenderLaserPistol(ResourceManager.laser_pistol_morning_glory_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_stg77, new ItemRenderSTG77());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_tau, new ItemRenderTau());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman, new ItemRenderFatMan());
|
||||
@ -200,6 +202,7 @@ public class GunFactoryClient {
|
||||
setRendererBulkBeam(LegoClient.RENDER_TAU_CHARGE, tau_uranium_charge);
|
||||
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);
|
||||
setRendererBulkBeam(LegoClient.RENDER_LASER_EMERALD, energy_emerald, energy_emerald_overcharge, energy_emerald_ir);
|
||||
|
||||
setRendererBulk(LegoClient.RENDER_AP_BULLET, coil_tungsten, coil_ferrouranium);
|
||||
|
||||
@ -247,6 +250,9 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_minigun_lacunae) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((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_laser_pistol) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_laser_pistol_pew_pew) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_laser_pistol_morning_glory) .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_fatman) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
@ -347,6 +347,9 @@ public class LegoClient {
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_LASER_RED = (bullet, interp) -> {
|
||||
renderStandardLaser(bullet, interp, 0x80, 0x15, 0x15);
|
||||
};
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_LASER_EMERALD = (bullet, interp) -> {
|
||||
renderStandardLaser(bullet, interp, 0x15, 0x80, 0x15);
|
||||
};
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_LASER_CYAN = (bullet, interp) -> {
|
||||
renderStandardLaser(bullet, interp, 0x15, 0x15, 0x80);
|
||||
};
|
||||
|
||||
@ -985,6 +985,18 @@ public class Orchestras {
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 1F);
|
||||
if(timer == 10) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallRemove", 1F, 1.25F);
|
||||
if(timer == 34) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallInsert", 1F, 1.25F);
|
||||
if(timer == 40) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.25F);
|
||||
}
|
||||
|
||||
if(type == AnimType.JAMMED) {
|
||||
if(timer == 10) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverCock", 1F, 1F);
|
||||
if(timer == 15) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1.25F);
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.impact", 0.25F, 1.5F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_STG77 = (stack, ctx) -> {
|
||||
|
||||
@ -53,6 +53,9 @@ public class XFactoryEnergy {
|
||||
public static BulletConfig energy_las;
|
||||
public static BulletConfig energy_las_overcharge;
|
||||
public static BulletConfig energy_las_ir;
|
||||
public static BulletConfig energy_emerald;
|
||||
public static BulletConfig energy_emerald_overcharge;
|
||||
public static BulletConfig energy_emerald_ir;
|
||||
|
||||
public static BiConsumer<EntityBulletBeamBase, MovingObjectPosition> LAMBDA_LIGHTNING_HIT = (beam, mop) -> {
|
||||
|
||||
@ -131,8 +134,12 @@ public class XFactoryEnergy {
|
||||
energy_las_overcharge = new BulletConfig().setItem(EnumAmmo.CAPACITOR_OVERCHARGE).setCasing(new ItemStack(ModItems.ingot_polymer, 2), 4).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).setCasing(new ItemStack(ModItems.ingot_polymer, 2), 4).setupDamageClass(DamageClass.FIRE).setBeam().setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(LAMBDA_IR_HIT);
|
||||
|
||||
energy_emerald = energy_las.clone().setArmorPiercing(0.5F).setThresholdNegation(5F);
|
||||
energy_emerald_overcharge = energy_las_overcharge.clone().setArmorPiercing(0.5F).setThresholdNegation(5F);
|
||||
energy_emerald_ir = energy_las_ir.clone().setArmorPiercing(0.5F).setThresholdNegation(5F);
|
||||
|
||||
ModItems.gun_tesla_cannon = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(2_000).draw(10).inspect(33).crosshair(Crosshair.CIRCLE)
|
||||
.dura(1_000).draw(10).inspect(33).crosshair(Crosshair.CIRCLE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(35F).delay(20).spreadHipfire(1.5F).reload(44).jam(19).sound("hbm:weapon.fire.tesla", 1.0F, 1.0F)
|
||||
.mag(new MagazineBelt().addConfigs(energy_tesla, energy_tesla_overcharge))
|
||||
@ -143,15 +150,35 @@ public class XFactoryEnergy {
|
||||
).setUnlocalizedName("gun_tesla_cannon");
|
||||
|
||||
ModItems.gun_laser_pistol = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(2_000).draw(10).inspect(26).crosshair(Crosshair.CIRCLE)
|
||||
.dura(500).draw(10).inspect(26).crosshair(Crosshair.CIRCLE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(50F).delay(8).spread(1F).spreadHipfire(2.5F).reload(44).jam(36).sound("hbm:weapon.fire.laser", 1.0F, 1.0F)
|
||||
.dmg(25F).delay(5).spread(1F).spreadHipfire(1F).reload(45).jam(37).sound("hbm:weapon.fire.laserPistol", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 30).addConfigs(energy_las, energy_las_overcharge, energy_las_ir))
|
||||
.offset(0.75, -0.0625 * 1.5, -0.1875)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_ENERGY))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LASER_PISTOL).orchestra(Orchestras.ORCHESTRA_LASER_PISTOL)
|
||||
).setUnlocalizedName("gun_laser_pistol");
|
||||
ModItems.gun_laser_pistol_pew_pew = new ItemGunBaseNT(WeaponQuality.B_SIDE, new GunConfig()
|
||||
.dura(500).draw(10).inspect(26).crosshair(Crosshair.CIRCLE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(20F).rounds(5).delay(10).spread(0.25F).spreadHipfire(1F).reload(45).jam(37).sound("hbm:weapon.fire.laserPistol", 1.0F, 0.8F)
|
||||
.mag(new MagazineFullReload(0, 10).addConfigs(energy_las, energy_las_overcharge, energy_las_ir))
|
||||
.offset(0.75, -0.0625 * 1.5, -0.1875)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_ENERGY))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LASER_PISTOL).orchestra(Orchestras.ORCHESTRA_LASER_PISTOL)
|
||||
).setUnlocalizedName("gun_laser_pistol_pew_pew");
|
||||
ModItems.gun_laser_pistol_morning_glory = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
|
||||
.dura(1_500).draw(10).inspect(26).crosshair(Crosshair.CIRCLE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(20F).delay(7).spread(0F).spreadHipfire(0.5F).reload(45).jam(37).sound("hbm:weapon.fire.laserPistol", 1.0F, 1.1F)
|
||||
.mag(new MagazineFullReload(0, 20).addConfigs(energy_emerald, energy_emerald_overcharge, energy_emerald_ir))
|
||||
.offset(0.75, -0.0625 * 1.5, -0.1875)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_ENERGY))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LASER_PISTOL).orchestra(Orchestras.ORCHESTRA_LASER_PISTOL)
|
||||
).setUnlocalizedName("gun_laser_pistol_morning_glory");
|
||||
|
||||
ModItems.gun_lasrifle = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(2_000).draw(10).inspect(26).crosshair(Crosshair.CIRCLE).scopeTexture(scope_luna)
|
||||
@ -187,18 +214,32 @@ public class XFactoryEnergy {
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LASER_PISTOL = (stack, type) -> {
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LASRIFLE = (stack, type) -> {
|
||||
int amount = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
|
||||
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, -0.5, 50, IType.SIN_DOWN).addPos(0, 0, 0, 150, IType.SIN_FULL))
|
||||
.addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 22.5, 350))
|
||||
.addBus("COUNT", new BusAnimationSequence().addPos(amount, 0, 0, 0));
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -0.5, 50, IType.SIN_DOWN).addPos(0, 0, 0, 150, IType.SIN_FULL));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(0, -20, 0, 100).hold(1900).addPos(0, 0, 0, 100))
|
||||
.addBus("LIFT", new BusAnimationSequence().hold(100).addPos(-45, 0, 0, 250, IType.SIN_FULL).hold(500).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
.addBus("JOLT", new BusAnimationSequence().hold(350).addPos(0, 0, 0.5, 100, IType.SIN_FULL).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 150, IType.SIN_FULL).holdUntil(2100).addPos(-0.0625, 0, 0, 50, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_FULL))
|
||||
.addBus("BATTERY", new BusAnimationSequence().hold(550).addPos(0, 0, 5, 250).hold(550).setPos(0, -2, -2).addPos(0, 0, -2, 250, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_UP));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().hold(500).addPos(0, -20, 0, 100).hold(250).addPos(0, 0, 0, 100))
|
||||
.addBus("JOLT", new BusAnimationSequence().hold(950).addPos(-0.0625, 0, 0, 50, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_FULL))
|
||||
.addBus("EQUIP", new BusAnimationSequence().hold(1500).addPos(7.5, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("SWIRL", new BusAnimationSequence().addPos(-720, 0, 0, 750, IType.SIN_FULL).hold(500).addPos(0, 0, 0, 750, IType.SIN_FULL));
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LASRIFLE = (stack, type) -> {
|
||||
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, -0.5, 50, IType.SIN_DOWN).addPos(0, 0, 0, 150, IType.SIN_FULL));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("LEVER", new BusAnimationSequence().addPos(-90, 0, 0, 350, IType.SIN_UP).addPos(-90, 0, 0, 1500).addPos(0, 0, 0, 350, IType.SIN_UP))
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, -5, 0, 350, IType.SIN_UP).addPos(0, -5, 0, 500).addPos(0, -0.25, 0, 500, IType.SIN_FULL).addPos(0, -0.25, 0, 150).addPos(0, 0, 0, 350))
|
||||
|
||||
@ -996,6 +996,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation tesla_cannon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tesla_cannon.png");
|
||||
public static final ResourceLocation laser_pistol_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/laser_pistol.png");
|
||||
public static final ResourceLocation laser_pistol_pew_pew_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/laser_pistol_pew_pew.png");
|
||||
public static final ResourceLocation laser_pistol_morning_glory_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/laser_pistol_morning_glory.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 fatman_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fatman.png");
|
||||
|
||||
@ -2,8 +2,10 @@ package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
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;
|
||||
@ -44,10 +46,51 @@ public class ItemRenderLaserPistol extends ItemRenderWeaponBase {
|
||||
double scale = 0.375D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] latch = HbmAnimations.getRelevantTransformation("LATCH");
|
||||
double[] lift = HbmAnimations.getRelevantTransformation("LIFT");
|
||||
double[] jolt = HbmAnimations.getRelevantTransformation("JOLT");
|
||||
double[] battery = HbmAnimations.getRelevantTransformation("BATTERY");
|
||||
double[] swirl = HbmAnimations.getRelevantTransformation("SWIRL");
|
||||
|
||||
GL11.glTranslated(0, -1, -6);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 6);
|
||||
|
||||
GL11.glTranslated(0, 2, -2);
|
||||
GL11.glRotated(lift[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -2, 2);
|
||||
|
||||
GL11.glTranslated(0, -1, -1);
|
||||
GL11.glRotated(swirl[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 1);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
GL11.glTranslated(jolt[0], jolt[1], jolt[2]);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
ResourceManager.laser_pistol.renderPart("Gun");
|
||||
if(hasCapacitors(stack)) ResourceManager.laser_pistol.renderPart("Capacitors");
|
||||
if(hasTape(stack)) ResourceManager.laser_pistol.renderPart("Tape");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(1.125, 0, -1.9125);
|
||||
GL11.glRotated(latch[1], 0, 1, 0);
|
||||
GL11.glTranslated(-1.125, 0, 1.9125);
|
||||
ResourceManager.laser_pistol.renderPart("Latch");
|
||||
GL11.glTranslated(battery[0], battery[1], battery[2]);
|
||||
ResourceManager.laser_pistol.renderPart("Battery");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 2, 4.75);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
renderLaserFlash(gun.lastShot[0], 150, 1.5D, hasEmerald(stack) ? 0x008000 : 0xff0000);
|
||||
GL11.glTranslated(0, 0, -0.25);
|
||||
renderLaserFlash(gun.lastShot[0], 150, 0.75D, hasEmerald(stack) ? 0x80ff00 : 0xff8000);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
@ -55,10 +98,9 @@ public class ItemRenderLaserPistol extends ItemRenderWeaponBase {
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 1.75D;
|
||||
double scale = 1.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, -3, 4);
|
||||
|
||||
GL11.glTranslated(0, -0.5, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -87,6 +129,20 @@ public class ItemRenderLaserPistol extends ItemRenderWeaponBase {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
ResourceManager.laser_pistol.renderPart("Gun");
|
||||
ResourceManager.laser_pistol.renderPart("Latch");
|
||||
if(hasCapacitors(stack)) ResourceManager.laser_pistol.renderPart("Capacitors");
|
||||
if(hasTape(stack)) ResourceManager.laser_pistol.renderPart("Tape");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean hasCapacitors(ItemStack stack) {
|
||||
return stack.getItem() == ModItems.gun_laser_pistol_pew_pew;
|
||||
}
|
||||
|
||||
public boolean hasTape(ItemStack stack) {
|
||||
return stack.getItem() == ModItems.gun_laser_pistol_pew_pew;
|
||||
}
|
||||
|
||||
public boolean hasEmerald(ItemStack stack) {
|
||||
return stack.getItem() == ModItems.gun_laser_pistol_morning_glory;
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,6 +42,7 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
if(hasScope(stack) && ItemGunBaseNT.prevAimingProgress == 1 && ItemGunBaseNT.aimingProgress == 1) return;
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lasrifle_tex);
|
||||
double scale = 0.3125D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
@ -80,6 +81,14 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
|
||||
if(hasShotgun(stack)) ResourceManager.lasrifle_mods.renderPart("BarrelShotgun");
|
||||
if(hasCapacitor(stack)) ResourceManager.lasrifle_mods.renderPart("UnderBarrel");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.5, 12);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
renderLaserFlash(gun.lastShot[0], 150, 1.5D, 0xff0000);
|
||||
GL11.glTranslated(0, 0, -0.25);
|
||||
renderLaserFlash(gun.lastShot[0], 150, 0.75D, 0xff8000);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ import net.minecraftforge.client.IItemRenderer;
|
||||
public abstract class ItemRenderWeaponBase implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation flash_plume = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac_plume.png");
|
||||
public static final ResourceLocation laser_flash = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/laser_flash.png");
|
||||
|
||||
public static float interp;
|
||||
|
||||
@ -430,4 +431,36 @@ public abstract class ItemRenderWeaponBase implements IItemRenderer {
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
public static void renderLaserFlash(long lastShot, int flash, double scale, int color) {
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
if(System.currentTimeMillis() - lastShot < flash) {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glPushMatrix();
|
||||
|
||||
double fire = (System.currentTimeMillis() - lastShot) / (double) flash;
|
||||
|
||||
double size = 4 * fire * scale;
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(laser_flash);
|
||||
tess.startDrawingQuads();
|
||||
tess.setBrightness(240);
|
||||
tess.setNormal(0F, 1F, 0F);
|
||||
|
||||
tess.setColorRGBA_I(color, 255);
|
||||
|
||||
tess.addVertexWithUV(0, -size, -size, 1, 1);
|
||||
tess.addVertexWithUV(0, size, -size, 0, 1);
|
||||
tess.addVertexWithUV(0, size, size, 0 ,0);
|
||||
tess.addVertexWithUV(0, -size, size, 1, 0);
|
||||
|
||||
tess.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2094,6 +2094,9 @@ item.gun_henry_lincoln.name=Lincolns Repetiergewehr
|
||||
item.gun_kit_1.name=Waffenöl
|
||||
item.gun_kit_2.name=Waffenreparatursatz
|
||||
item.gun_lag.name=Komisch lange Pistole
|
||||
item.gun_laser_pistol.name=Laserpistole
|
||||
item.gun_laser_pistol_morning_glory.name=Morning Glory
|
||||
item.gun_laser_pistol_pew_pew.name=Piu Piu
|
||||
item.gun_lasrifle.name=Lasergewehr
|
||||
item.gun_liberator.name=Liberator
|
||||
item.gun_light_revolver.name=Kipplaufrevolver
|
||||
|
||||
@ -2907,6 +2907,9 @@ item.gun_henry_lincoln.name=Lincoln's Repeater
|
||||
item.gun_kit_1.name=Gun Oil
|
||||
item.gun_kit_2.name=Gun Repair Kit
|
||||
item.gun_lag.name=Comically Long Pistol
|
||||
item.gun_laser_pistol.name=Laser Pistol
|
||||
item.gun_laser_pistol_morning_glory.name=Morning Glory
|
||||
item.gun_laser_pistol_pew_pew.name=Pew Pew
|
||||
item.gun_lasrifle.name=Laser Rifle
|
||||
item.gun_liberator.name=Liberator
|
||||
item.gun_light_revolver.name=Break-Action Revolver
|
||||
|
||||
@ -240,6 +240,7 @@
|
||||
"weapon.fire.loudestNoiseOnEarth": {"category": "player", "sounds": ["weapon/fire/loudestNoiseOnEarth"]},
|
||||
"weapon.fire.disintegration": {"category": "player", "sounds": ["weapon/fire/disintegration"]},
|
||||
"weapon.fire.laser": {"category": "player", "sounds": ["weapon/fire/laser"]},
|
||||
"weapon.fire.laserPistol": {"category": "player", "sounds": ["weapon/fire/laserPistol"]},
|
||||
"weapon.fire.laserGatling": {"category": "player", "sounds": ["weapon/fire/laserGatling"]},
|
||||
"weapon.fire.silenced": {"category": "player", "sounds": ["weapon/fire/silenced"]},
|
||||
"weapon.fire.assault": {"category": "player", "sounds": ["weapon/fire/assault"]},
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/laserPistol.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/laserPistol.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Loading…
x
Reference in New Issue
Block a user