mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
chromatic aberration
This commit is contained in:
parent
b60db5b911
commit
f74ce297f8
@ -5,6 +5,7 @@ import static com.hbm.items.weapon.sedna.factory.XFactory10ga.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory12ga.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory22lr.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory357.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory35800.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory40mm.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory44.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory50.*;
|
||||
@ -82,6 +83,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hangman, new ItemRenderHangman());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter, new ItemRenderBolter());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_folly, new ItemRenderFolly());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_aberrator, new ItemRenderAberrator());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_double_barrel, new ItemRenderDoubleBarrel(ResourceManager.double_barrel_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_double_barrel_sacred_dragon, new ItemRenderDoubleBarrel(ResourceManager.double_barrel_sacred_dragon_tex));
|
||||
//PROJECTILES
|
||||
@ -189,6 +191,8 @@ public class GunFactoryClient {
|
||||
|
||||
folly_sm.setRendererBeam(LegoClient.RENDER_FOLLY);
|
||||
folly_nuke.setRenderer(LegoClient.RENDER_BIG_NUKE);
|
||||
|
||||
p35800.setRendererBeam(LegoClient.RENDER_LASER_WHITE);
|
||||
|
||||
setRendererBulk(LegoClient.RENDER_GRENADE, shell_normal, shell_explosive, shell_ap, shell_du, shell_w9); //TODO: change the sabots
|
||||
|
||||
@ -236,6 +240,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_hangman) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_bolter) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_folly) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_aberrator) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_double_barrel) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_double_barrel_sacred_dragon) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
|
||||
@ -328,6 +328,9 @@ public class LegoClient {
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_LASER_PURPLE = (bullet, interp) -> {
|
||||
renderStandardLaser(bullet, interp, 0x60, 0x15, 0x80);
|
||||
};
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_LASER_WHITE = (bullet, interp) -> {
|
||||
renderStandardLaser(bullet, interp, 0x15, 0x15, 0x15);
|
||||
};
|
||||
|
||||
public static void renderStandardLaser(EntityBulletBeamBase bullet, float interp, int r, int g, int b) {
|
||||
|
||||
|
||||
@ -1284,5 +1284,24 @@ public class Orchestras {
|
||||
if(entity.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallRemove", 1F, 0.75F);
|
||||
if(timer == 32) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magSmallInsert", 1F, 0.75F);
|
||||
if(timer == 42) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.pistolCock", 1F, 0.75F);
|
||||
}
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 1) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.375, aiming ? 0 : -0.125, aiming ? -0.0625 : -0.25D, -0.075, 0.25, 0, 0.01, casing.getName());
|
||||
}
|
||||
}
|
||||
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
if(timer == 1) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 0.75F);
|
||||
if(timer == 9) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.pistolCock", 1F, 0.75F);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -11,9 +11,12 @@ import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
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 com.hbm.util.DamageResistanceHandler.DamageClass;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -23,21 +26,51 @@ public class XFactory35800 {
|
||||
|
||||
public static void init() {
|
||||
|
||||
p35800 = new BulletConfig().setItem(EnumAmmoSecret.P35_800).setupDamageClass(DamageClass.LASER).setBeam().setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
|
||||
p35800 = new BulletConfig().setItem(EnumAmmoSecret.P35_800).setArmorPiercing(0.5F).setThresholdNegation(50F).setBeam().setSpread(0.0F).setLife(3).setRenderRotations(false)
|
||||
.setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0xCEB78E).register("35-800")).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
|
||||
|
||||
ModItems.gun_aberrator = new ItemGunBaseNT(WeaponQuality.SECRET, new GunConfig()
|
||||
.dura(2_000).draw(10).inspect(26).reloadSequential(true).crosshair(Crosshair.CIRCLE)
|
||||
.dura(2_000).draw(10).inspect(26).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(50F).delay(8).reload(44).jam(36).sound("hbm:weapon.fire.laser", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 24).addConfigs(p35800))
|
||||
.dmg(50F).delay(13).dry(21).reload(51).sound("hbm:weapon.fire.aberrator", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 5).addConfigs(p35800))
|
||||
.offset(0.75, -0.0625 * 1.5, -0.1875)
|
||||
.setupStandardFire())
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_NOWEAR_FIRE))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_ABERRATOR).orchestra(Orchestras.ORCHESTRA_ABERRATOR)
|
||||
).setUnlocalizedName("gun_aberrator");
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_ABERRATOR = (stack, type) -> {
|
||||
boolean aim = ItemGunBaseNT.getIsAiming(stack);
|
||||
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null);
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(360, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
.addBus("RISE", new BusAnimationSequence().addPos(0, -3, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(aim ? -15 : -25, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
.addBus("SIGHT", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(aim ? 5 : 15, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -1.125, 50, IType.SIN_DOWN).addPos(0, 0, -1.125, 50).addPos(0, 0, 0, 150, IType.SIN_UP))
|
||||
.addBus(ammo <= 1 ? "NULL" : "BULLET", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0.375, 1.125, 150, IType.SIN_UP))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(45, 0, 0, 50).addPos(-45, 0, -1.125, 50, IType.SIN_DOWN).addPos(-20, 0, -1.125, 50).addPos(0, 0, 0, 150, IType.SIN_UP));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 700).addPos(-5, 0, 0, 100, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 550).addPos(0, 0, -1.125, 150, IType.SIN_FULL).addPos(0, 0, -1.125, 50).addPos(0, 0, 0, 150, IType.SIN_UP))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(45, 0, 0, 50).addPos(45, 0, 0, 500).addPos(-45, 0, -1.125, 150, IType.SIN_FULL).addPos(-20, 0, -1.125, 50).addPos(0, 0, 0, 150, IType.SIN_UP));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("ROLL", new BusAnimationSequence().addPos(0, 0, 20, 150, IType.SIN_FULL).addPos(0, 0, 20, 50).addPos(0, 0, -45, 150, IType.SIN_UP).addPos(0, 0, 0, 150, IType.SIN_FULL))
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, -2, 0, 0).addPos(-15, -5, 0, 350).addPos(-15, 0, 0, 0).addPos(-15, 0, 0, 700).addPos(3, 3, 0, 0).addPos(0, -2, 0, 250, IType.SIN_DOWN).addPos(0, -2, 0, 50).addPos(0, 0, 0, 150, IType.SIN_DOWN))
|
||||
.addBus("MAGROLL", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, -180, 250).addPos(0, 0, 0, 0))
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(5, 0, 0, 150, IType.SIN_FULL).addPos(-190, 0, 0, 500, IType.SIN_FULL).addPos(-190, 0, 0, 450).addPos(-360, 0, 0, 350, IType.SIN_DOWN).addPos(0, 0, 0, 0))
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 2350).addPos(-5, 0, 0, 100, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 2200).addPos(0, 0, -1.125, 150, IType.SIN_FULL).addPos(0, 0, -1.125, 50).addPos(0, 0, 0, 150, IType.SIN_UP))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 0, 2250).addPos(-45, 0, -1.125, 100, IType.SIN_FULL).addPos(-20, 0, -1.125, 50).addPos(0, 0, 0, 150, IType.SIN_UP))
|
||||
.addBus("BULLET", new BusAnimationSequence().addPos(ammo > 0 ? 0 : -100, 0, 0, 0).addPos(ammo > 0 ? 0 : -100, 0, 0, 2400).addPos(0, 0, 0, 0).addPos(0, 0.375, 1.125, 150, IType.SIN_UP));
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(0, 0, 0, 0).addPos(-720, 0, 0, 1000, IType.SIN_FULL).addPos(-720, 0, 0, 250).addPos(0, 0, 0, 1000, IType.SIN_FULL));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@ -886,6 +886,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom hangman = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/hangman.obj")).asVBO();
|
||||
public static final IModelCustom folly = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/folly.obj")).asVBO();
|
||||
public static final IModelCustom double_barrel = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/sacred_dragon.obj")).asVBO();
|
||||
public static final IModelCustom aberrator = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/aberrator.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"));
|
||||
@ -1034,6 +1035,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation folly_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/moonlight.png");
|
||||
public static final ResourceLocation double_barrel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/double_barrel.png");
|
||||
public static final ResourceLocation double_barrel_sacred_dragon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/double_barrel_sacred_dragon.png");
|
||||
public static final ResourceLocation aberrator_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/aberrator.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -0,0 +1,240 @@
|
||||
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.client.renderer.Tessellator;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemRenderAberrator extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@Override
|
||||
public float getViewFOV(ItemStack stack, float fov) {
|
||||
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
|
||||
return fov * (1 - aimingProgress * 0.33F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 1);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1.0F * offset, -1.25F * offset, 1.25F * offset,
|
||||
0, -5.25 / 8D, 0.125);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.aberrator_tex);
|
||||
double scale = 0.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] rise = HbmAnimations.getRelevantTransformation("RISE");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] slide = HbmAnimations.getRelevantTransformation("SLIDE");
|
||||
double[] bullet = HbmAnimations.getRelevantTransformation("BULLET");
|
||||
double[] hammer = HbmAnimations.getRelevantTransformation("HAMMER");
|
||||
double[] roll = HbmAnimations.getRelevantTransformation("ROLL");
|
||||
double[] mag = HbmAnimations.getRelevantTransformation("MAG");
|
||||
double[] magroll = HbmAnimations.getRelevantTransformation("MAGROLL");
|
||||
double[] sight = HbmAnimations.getRelevantTransformation("SIGHT");
|
||||
|
||||
GL11.glTranslated(0, rise[1], 0);
|
||||
|
||||
GL11.glTranslated(0, 1, -2.25);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -1, 2.25);
|
||||
|
||||
GL11.glTranslated(0, -1, -4);
|
||||
GL11.glRotated(recoil[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 4);
|
||||
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
GL11.glRotated(roll[2], 0, 0, 1);
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
ResourceManager.aberrator.renderPart("Gun");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 2.4375, -1.9375);
|
||||
GL11.glRotated(sight[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -2.4375, 1.9375);
|
||||
ResourceManager.aberrator.renderPart("Sight");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(mag[0], mag[1], mag[2]);
|
||||
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
GL11.glRotated(magroll[2], 0, 0, 1);
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
|
||||
ResourceManager.aberrator.renderPart("Magazine");
|
||||
GL11.glTranslated(bullet[0], bullet[1], bullet[2]);
|
||||
ResourceManager.aberrator.renderPart("Bullet");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, slide[2]);
|
||||
ResourceManager.aberrator.renderPart("Slide");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.25, -3.625);
|
||||
GL11.glRotated(-45 + hammer[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -1.25, 3.625);
|
||||
ResourceManager.aberrator.renderPart("Hammer");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double smokeScale = 0.5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 2, 4);
|
||||
GL11.glRotated(recoil[0], -1, 0, 0);
|
||||
GL11.glRotated(roll[2], 0, 0, -1);
|
||||
GL11.glRotated(90, 0, 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(0, 2, 4);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 75, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 2, -1.5);
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
this.renderFireball(gun.lastShot[0]);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Minecraft.getMinecraft().getTextureManager().getResourceLocation(Items.golden_sword.getSpriteNumber()));
|
||||
IIcon icon = Items.golden_sword.getIconFromDamage(0);
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
float minU = icon.getMinU();
|
||||
float maxU = icon.getMaxU();
|
||||
float minV = icon.getMinV();
|
||||
float maxV = icon.getMaxV();
|
||||
GL11.glTranslated(0, 2, 4.5);
|
||||
GL11.glRotated(roll[2], 0, 0, -1);
|
||||
GL11.glRotated(recoil[0], -1, 0, 0);
|
||||
GL11.glRotated(equip[0], -1, 0, 0);
|
||||
GL11.glRotated(System.currentTimeMillis() / 50D % 360D, 0, 0, 1);
|
||||
|
||||
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
|
||||
aimingProgress = Math.min(1F, aimingProgress * 2);
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
GL11.glPushMatrix();
|
||||
int amount = 16;
|
||||
for(int i = 0; i < amount; i++) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, -1.5 - aimingProgress, 0);
|
||||
GL11.glRotated(90 * aimingProgress, 1, 0, 0);
|
||||
GL11.glRotated(-45, 0, 0, 1);
|
||||
tess.startDrawingQuads();
|
||||
tess.setNormal(0F, 1F, 0F);
|
||||
tess.addVertexWithUV(-0.5, -0.5F, -0.5, maxU, maxV);
|
||||
tess.addVertexWithUV(0.5F, -0.5F, -0.5, minU, maxV);
|
||||
tess.addVertexWithUV(0.5F, 0.5F, -0.5, minU, minV);
|
||||
tess.addVertexWithUV(-0.5, 0.5F, -0.5, maxU, minV);
|
||||
tess.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glRotated(360D / amount, 0, 0, 1);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
GL11.glTranslated(0, -1, 4);
|
||||
double scale = 1.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 2.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-0.5,-1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.aberrator_tex);
|
||||
ResourceManager.aberrator.renderPart("Gun");
|
||||
ResourceManager.aberrator.renderPart("Hammer");
|
||||
ResourceManager.aberrator.renderPart("Magazine");
|
||||
ResourceManager.aberrator.renderPart("Slide");
|
||||
ResourceManager.aberrator.renderPart("Sight");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public static void renderFireball(long lastShot) {
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
int flash = 150;
|
||||
|
||||
if(System.currentTimeMillis() - lastShot < flash) {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glPushMatrix();
|
||||
|
||||
double fire = (System.currentTimeMillis() - lastShot) / (double) flash;
|
||||
double height = 5 * fire;
|
||||
double length = 10 * fire;
|
||||
double offset = 1 * fire;
|
||||
double lengthOffset = -1.125;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(flash_plume);
|
||||
tess.startDrawingQuads();
|
||||
tess.setNormal(0F, 1F, 0F);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F);
|
||||
|
||||
tess.addVertexWithUV(height, -offset, 0, 0, 1);
|
||||
tess.addVertexWithUV(-height, -offset, 0, 1, 1);
|
||||
tess.addVertexWithUV(-height, -offset + length, -lengthOffset, 1, 0);
|
||||
tess.addVertexWithUV(height, -offset + length, -lengthOffset, 0 ,0);
|
||||
|
||||
tess.addVertexWithUV(height, -offset, 0, 0, 1);
|
||||
tess.addVertexWithUV(-height, -offset, 0, 1, 1);
|
||||
tess.addVertexWithUV(-height, -offset + length, lengthOffset, 1, 0);
|
||||
tess.addVertexWithUV(height, -offset + length, lengthOffset, 0 ,0);
|
||||
|
||||
tess.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -121,7 +121,6 @@ public class ItemRenderGreasegun extends ItemRenderWeaponBase {
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
GL11.glTranslated(0, 1, 3);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1197,11 +1197,13 @@ item.ammo_shell.name=240mm Geschoss
|
||||
item.ammo_shell_apfsds_du.name=240mm APFSDS-DU
|
||||
item.ammo_shell_apfsds_t.name=240mm APFSDS-T
|
||||
item.ammo_shell_explosive.name=240mm HE-Geschoss
|
||||
item.ammo_shell_w9.name=240mm W9-Atomgeschoss
|
||||
item.ammo_secret.bmg50_equestrian.name=.50 BMG Zerstörer
|
||||
item.ammo_secret.folly_nuke.name=Silberne Kugel, Atomar
|
||||
item.ammo_secret.folly_sm.name=Silberne Kugel
|
||||
item.ammo_secret.g12_equestrian.name=Kaliber 12 Gleisnägel
|
||||
item.ammo_secret.m44_equestrian.name=.44 Magnum Schädelsprenger
|
||||
item.ammo_secret.p35_800.name=.35-800 V9
|
||||
item.ammo_standard.b75.name=.75 Bolzen
|
||||
item.ammo_standard.b75_exp.name=.75 Bolzen (Explosiv)
|
||||
item.ammo_standard.b75_inc.name=.75 Bolzen (Brand)
|
||||
@ -2197,6 +2199,7 @@ item.grenade_smart.name=Smart-Granate
|
||||
item.grenade_strong.name=Verbesserte Handgranate
|
||||
item.grenade_tau.name=Taugranate
|
||||
item.grenade_zomg.name=Negativenergie-Paarvernichtungsgranate
|
||||
item.gun_aberrator.name=Aberrator
|
||||
item.gun_am180.name=Schallgedämpfte Maschinenpistole
|
||||
item.gun_ar15.name=Josh
|
||||
item.gun_autoshotgun.name=Auto-Flinte
|
||||
|
||||
@ -1927,6 +1927,7 @@ item.ammo_secret.folly_nuke.name=Silver Bullet, Nuclear
|
||||
item.ammo_secret.folly_sm.name=Silver Bullet
|
||||
item.ammo_secret.g12_equestrian.name=12 Gauge Railway Spike Shot
|
||||
item.ammo_secret.m44_equestrian.name=.44 Magnum Head-Exploder
|
||||
item.ammo_secret.p35_800.name=.35-800 V9
|
||||
item.ammo_standard.b75.name=.75 Bolt
|
||||
item.ammo_standard.b75_exp.name=.75 Bolt (Explosive)
|
||||
item.ammo_standard.b75_inc.name=.75 Bolt (Incendiary)
|
||||
@ -3005,6 +3006,7 @@ item.grenade_tau.name=Tau Grenade
|
||||
item.grenade_zomg.name=Negative Energy Pair Annihilation Grenade
|
||||
item.glyphid_gland.name= Gland
|
||||
item.glyphid_gland_empty.name= Glyphid's Fluid Gland
|
||||
item.gun_aberrator.name=Aberrator
|
||||
item.gun_am180.name=Silenced Submachine Gun
|
||||
item.gun_ar15.name=Josh
|
||||
item.gun_autoshotgun.name=Auto Shotgun
|
||||
|
||||
@ -249,6 +249,7 @@
|
||||
"weapon.fire.greaseGun": {"category": "player", "sounds": ["weapon/fire/greaseGun"]},
|
||||
"weapon.fire.uzi": {"category": "player", "sounds": ["weapon/fire/uzi"]},
|
||||
"weapon.fire.tesla": {"category": "player", "sounds": ["weapon/fire/tesla"]},
|
||||
"weapon.fire.aberrator": {"category": "player", "sounds": ["weapon/fire/aberrator"]},
|
||||
|
||||
"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/aberrator.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/aberrator.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Loading…
x
Reference in New Issue
Block a user