mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
comically long pistol
This commit is contained in:
parent
a9838aedd9
commit
8e3df0cc22
@ -11,11 +11,12 @@ credits=HbMinecraft,\
|
||||
\ Alcater (GUI textures, porting),\
|
||||
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, better particle diodes),\
|
||||
\ Pheo (textures, various machines, models, weapons),\
|
||||
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide, new cyclotron),\
|
||||
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide, new cyclotron, weapon animations),\
|
||||
\ LePeep (coilgun model, BDCL QC),\
|
||||
\ Adam29 (liquid petroleum, ethanol, electric furnace),\
|
||||
\ Pvndols (thorium fuel recipe, gas turbine),\
|
||||
\ JamesH2 (blood mechanics, nitric acid, particle emitter),\
|
||||
\ PastaBaguette (coal horse decal),\
|
||||
\ Doctor17 (russian localization)),\
|
||||
\ Pashtet (russian localization),\
|
||||
\ Bismarck (chinese localization),\
|
||||
|
||||
@ -1634,6 +1634,7 @@ public class ModItems {
|
||||
public static Item gun_liberator;
|
||||
public static Item gun_congolake;
|
||||
public static Item gun_flamer;
|
||||
public static Item gun_lag;
|
||||
|
||||
public static Item ammo_standard;
|
||||
|
||||
@ -7023,6 +7024,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_liberator, gun_liberator.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_congolake, gun_congolake.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_flamer, gun_flamer.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_lag, gun_lag.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_liberator, new ItemRenderLiberator());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_congolake, new ItemRenderCongoLake());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flamer, new ItemRenderFlamer());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lag, new ItemRenderLAG());
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
ammo_debug_buckshot.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -79,6 +80,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_liberator) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_congolake) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_flamer) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO_NOCOUNTER);
|
||||
((ItemGunBaseNT) ModItems.gun_lag) .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);
|
||||
|
||||
@ -253,8 +253,12 @@ public class Orchestras {
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 0) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magSmallRemove", 1F, 0.8F);
|
||||
if(timer == 4) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.625, -0.125, aiming ? -0.125 : -0.375D, -0.12, 0.18, 0, 0.01, casing.getName(), true, 60, 0.5D, 20);
|
||||
IMagazine mag = ctx.config.getReceivers(stack)[0].getMagazine(stack);
|
||||
if(mag.getAmountAfterReload(stack) > 0) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.625, -0.125, aiming ? -0.125 : -0.375D, -0.12, 0.18, 0, 0.01, casing.getName(), true, 60, 0.5D, 20);
|
||||
mag.setAmountBeforeReload(stack, 0);
|
||||
}
|
||||
}
|
||||
if(timer == 16) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.insertCanister", 1F, 1F);
|
||||
if(timer == 24) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magSmallInsert", 1F, 1F);
|
||||
@ -431,7 +435,7 @@ public class Orchestras {
|
||||
if(timer == 0) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverCock", 1F, 0.75F);
|
||||
IMagazine mag = ctx.config.getReceivers(stack)[0].getMagazine(stack);
|
||||
int toEject = mag.getAmountAfterReload(stack) - mag.getAmount(stack);
|
||||
if(timer == 4 && toEject <= 0) {
|
||||
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);
|
||||
@ -503,4 +507,12 @@ public class Orchestras {
|
||||
if(timer == 85) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.pressureValve", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_LAG = (stack, ctx) -> {
|
||||
EntityPlayer player = ctx.player;
|
||||
if(player.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
};
|
||||
}
|
||||
|
||||
@ -50,6 +50,17 @@ public class XFactory9mm {
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_GREASEGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_GREASEGUN)
|
||||
).setUnlocalizedName("gun_greasegun").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
ModItems.gun_lag = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(1_700).draw(15).inspect(31).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(4).dry(40).spread(0.005F).reload(60).jam(55).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 17).addConfigs(p9_sp, p9_fmj, p9_jhp, p9_ap))
|
||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LAG_ANIMS).orchestra(Orchestras.ORCHESTRA_LAG)
|
||||
).setUnlocalizedName("gun_lag").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
@ -87,4 +98,8 @@ public class XFactory9mm {
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LAG_ANIMS = (stack, type) -> {
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@ -859,6 +859,7 @@ public class ResourceManager {
|
||||
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 IModelCustom flamethrower = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flamethrower.obj")).asVBO();
|
||||
public static final IModelCustom mike_hawk = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/mike_hawk.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"));
|
||||
@ -983,6 +984,7 @@ public class ResourceManager {
|
||||
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 flamethrower_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flamethrower.png");
|
||||
public static final ResourceLocation mike_hawk_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lag.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
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 net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderLAG extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1.5F * offset, -1F * offset, 1.5F * offset,
|
||||
0, -3.375 / 8D, 0.5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.mike_hawk_tex);
|
||||
double scale = 0.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.mike_hawk.renderPart("Grip");
|
||||
ResourceManager.mike_hawk.renderPart("Slide");
|
||||
ResourceManager.mike_hawk.renderPart("Hammer");
|
||||
ResourceManager.mike_hawk.renderPart("Bullet");
|
||||
ResourceManager.mike_hawk.renderPart("Magazine");
|
||||
|
||||
double smokeScale = 0.5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-10.25, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 0.5D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-10.25, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 75, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
GL11.glTranslated(0, 1, 1);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public 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(2.5, 1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.mike_hawk_tex);
|
||||
ResourceManager.mike_hawk.renderPart("Grip");
|
||||
ResourceManager.mike_hawk.renderPart("Slide");
|
||||
ResourceManager.mike_hawk.renderPart("Hammer");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.2 KiB |
Loading…
x
Reference in New Issue
Block a user