mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
trotty did nothing wrong
This commit is contained in:
parent
2a76a6af50
commit
24e0aff405
@ -61,7 +61,7 @@ public class EntityBulletBeamBase extends Entity implements IEntityAdditionalSpa
|
||||
this.headingZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
this.headingY = (double) (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI));
|
||||
|
||||
double range = 150D;
|
||||
double range = 250D;
|
||||
this.headingX *= range;
|
||||
this.headingY *= range;
|
||||
this.headingZ *= range;
|
||||
|
||||
@ -1523,7 +1523,6 @@ public class ModItems {
|
||||
public static Item gun_ar15;
|
||||
public static Item gun_calamity;
|
||||
public static Item gun_lacunae;
|
||||
public static Item gun_folly;
|
||||
public static Item gun_proto;
|
||||
public static Item gun_mirv;
|
||||
public static Item gun_bf;
|
||||
@ -1624,6 +1623,7 @@ public class ModItems {
|
||||
public static Item gun_coilgun;
|
||||
public static Item gun_hangman;
|
||||
public static Item gun_bolter;
|
||||
public static Item gun_folly;
|
||||
|
||||
public static Item ammo_standard;
|
||||
|
||||
@ -4064,7 +4064,6 @@ public class ModItems {
|
||||
gun_ar15 = new ItemGunBase(Gun50BMGFactory.getAR15Config(), Gun50BMGFactory.getAR15BurstConfig()).setUnlocalizedName("gun_ar15").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_ar15");
|
||||
gun_calamity = new ItemGunBase(Gun762mmFactory.getCalamityConfig()).setUnlocalizedName("gun_calamity").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity");
|
||||
gun_lacunae = new ItemGunLacunae(Gun5mmFactory.getLacunaeConfig()).setUnlocalizedName("gun_lacunae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae");
|
||||
gun_folly = new GunFolly().setUnlocalizedName("gun_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_folly");
|
||||
gun_proto = new ItemGunBase(GunFatmanFactory.getProtoConfig()).setUnlocalizedName("gun_proto").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
||||
gun_mirv = new ItemGunBase(GunFatmanFactory.getMIRVConfig()).setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mirv");
|
||||
gun_bf = new ItemGunBase(GunFatmanFactory.getBELConfig()).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf");
|
||||
@ -6878,7 +6877,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_ar15, gun_ar15.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_calamity, gun_calamity.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_lacunae, gun_lacunae.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_folly, gun_folly.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_b92, gun_b92.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_b93, gun_b93.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_rpg, gun_rpg.getUnlocalizedName());
|
||||
@ -6972,6 +6970,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_coilgun, gun_coilgun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_hangman, gun_hangman.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_bolter, gun_bolter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_folly, gun_folly.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ public class GunFactory {
|
||||
.mag(new MagazineFullReload(0, 12).addConfigs(ammo_debug, ammo_debug_buckshot))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY) .pr(Lego.LAMBDA_STANDARD_RELOAD) .pt(Lego.LAMBDA_TOGGLE_AIM)
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD).pt(Lego.LAMBDA_TOGGLE_AIM)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(Lego.LAMBDA_DEBUG_ANIMS)
|
||||
).setUnlocalizedName("gun_debug");
|
||||
@ -62,6 +62,7 @@ public class GunFactory {
|
||||
XFactoryAccelerator.init();
|
||||
XFactoryCatapult.init();
|
||||
XFactory75Bolt.init();
|
||||
XFactoryFolly.init();
|
||||
|
||||
/// PROXY BULLSHIT ///
|
||||
MainRegistry.proxy.registerGunCfg();
|
||||
|
||||
@ -15,6 +15,7 @@ import static com.hbm.items.weapon.sedna.factory.XFactoryAccelerator.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryBlackPowder.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryCatapult.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryEnergy.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryFolly.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactoryRocket.*;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
@ -71,6 +72,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_coilgun, new ItemRenderCoilgun());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hangman, new ItemRenderHangman());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter, new ItemRenderBolter());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_folly, new ItemRenderFolly());
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
ammo_debug_buckshot.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -159,6 +161,8 @@ public class GunFactoryClient {
|
||||
|
||||
setRendererBulk(LegoClient.RENDER_AP_BULLET, coil_tungsten, coil_ferrouranium);
|
||||
|
||||
folly_sm.setRendererBeam(LegoClient.RENDER_FOLLY);
|
||||
|
||||
//HUDS
|
||||
((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_pepperbox) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
@ -196,6 +200,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_coilgun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((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_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);
|
||||
|
||||
@ -319,6 +319,21 @@ public class LegoClient {
|
||||
RenderArcFurnace.fullbright(false);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBeamBase, Float> RENDER_FOLLY = (bullet, interp) -> {
|
||||
|
||||
RenderArcFurnace.fullbright(true);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0);
|
||||
GL11.glRotatef(-bullet.rotationPitch - 90, 1F, 0, 0);
|
||||
Vec3 delta = Vec3.createVectorHelper(0, bullet.beamLength, 0);
|
||||
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
||||
GL11.glScaled((1 - age) * 25 + 2.5, 1, (1 - age) * 25 + 2.5);
|
||||
int colorInner = ((int)(0x20 * age) << 16) | ((int)(0x20 * age) << 8) | (int) (0x20 * age);
|
||||
BeamPronter.prontBeam(delta, EnumWaveType.RANDOM, EnumBeamType.SOLID, colorInner, colorInner, bullet.ticksExisted / 3, (int)(bullet.beamLength / 2 + 1), 0F, 8, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
RenderArcFurnace.fullbright(false);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_NUKE = (bullet, interp) -> {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@ -1146,9 +1146,16 @@ public class Orchestras {
|
||||
}
|
||||
|
||||
if(type == AnimType.RELOAD) {
|
||||
|
||||
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 26) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_FOLLY = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
};
|
||||
}
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
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 net.minecraft.item.ItemStack;
|
||||
|
||||
public class XFactoryFolly {
|
||||
|
||||
public static BulletConfig folly_sm;
|
||||
|
||||
public static void init() {
|
||||
|
||||
folly_sm = new BulletConfig().setItem(EnumAmmo.G26_FLARE).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false);
|
||||
|
||||
ModItems.gun_folly = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(100).draw(40).crosshair(Crosshair.NONE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(26).dry(5).reload(160).jam(0).sound("hbm:weapon.fire.loudestNoiseOnEarth", 100.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 1).addConfigs(folly_sm))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.setupBeamFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration().pt(LAMBDA_TOGGLE_AIM)
|
||||
.anim(LAMBDA_FOLLY_ANIMS).orchestra(Orchestras.ORCHESTRA_FOLLY)
|
||||
).setUnlocalizedName("gun_folly");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TOGGLE_AIM = (stack, ctx) -> {
|
||||
if(ItemGunBaseNT.getState(stack, ctx.configIndex) == GunState.IDLE) {
|
||||
ItemGunBaseNT.setIsAiming(stack, !ItemGunBaseNT.getIsAiming(stack));
|
||||
}
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_FOLLY_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(5, 0, 0, 1500, IType.SIN_DOWN).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -4.5, 50).addPos(0, 0, -4.5, 500).addPos(0, 0, 0, 500, IType.SIN_UP))
|
||||
.addBus("LOAD", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(-25, 0, 0, 250, IType.SIN_DOWN).addPos(0, 0, 0, 1000, IType.SIN_FULL));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("LOAD", new BusAnimationSequence().addPos(60, 0, 0, 1000, IType.SIN_FULL).addPos(60, 0, 0, 6000).addPos(0, 0, 0, 1000, IType.SIN_FULL))
|
||||
.addBus("SCREW", new BusAnimationSequence().addPos(0, 0, 0, 1000).addPos(0, 0, -135, 1000, IType.SIN_FULL).addPos(0, 0, -135, 4000).addPos(0, 0, 0, 1000, IType.SIN_FULL))
|
||||
.addBus("BREECH", new BusAnimationSequence().addPos(0, 0, 0, 1000).addPos(0, 0, -0.5, 1000, IType.SIN_FULL).addPos(0, -4, -0.5, 1000, IType.SIN_FULL).addPos(0, -4, -0.5, 2000).addPos(0, 0, -0.5, 1000, IType.SIN_FULL).addPos(0, 0, 0, 1000, IType.SIN_FULL))
|
||||
.addBus("SHELL", new BusAnimationSequence().addPos(0, -4, -4.5, 0).addPos(0, -4, -4.5, 3000).addPos(0, 0, -4.5, 1000, IType.SIN_FULL).addPos(0, 0, 0, 500, IType.SIN_UP));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
@ -574,7 +574,6 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_uzi_saturnite_silencer, new ItemRenderUZI());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_calamity, new ItemRenderWeaponFFMG42());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lacunae, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_folly, new ItemRenderOverkill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hk69, new ItemRenderWeaponObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bio_revolver, new ItemRenderBioRevolver());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_deagle, new ItemRenderWeaponObj());
|
||||
|
||||
@ -865,6 +865,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom fatman = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/fatman.obj")).asVBO();
|
||||
public static final IModelCustom lasrifle = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lasrifle.obj")).asVBO();
|
||||
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 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"));
|
||||
@ -1003,6 +1004,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation fatman_mininuke_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fatman_mininuke.png");
|
||||
public static final ResourceLocation lasrifle_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lasrifle.png");
|
||||
public static final ResourceLocation hangman_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/hangman.png");
|
||||
public static final ResourceLocation folly_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/moonlight.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -20,6 +20,9 @@ public class RenderBeam extends Render {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
|
||||
boolean fog = GL11.glIsEnabled(GL11.GL_FOG);
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
|
||||
if(bullet.config.renderRotations) {
|
||||
GL11.glRotatef(bullet.prevRotationYaw + (bullet.rotationYaw - bullet.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(bullet.prevRotationPitch + (bullet.rotationPitch - bullet.prevRotationPitch) * interp + 180, 0.0F, 0.0F, 1.0F);
|
||||
@ -29,6 +32,8 @@ public class RenderBeam extends Render {
|
||||
bullet.config.rendererBeam.accept(bullet, interp);
|
||||
}
|
||||
|
||||
if(fog) GL11.glDisable(GL11.GL_FOG);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
@ -3,12 +3,10 @@ package com.hbm.render.item.weapon;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.GunFolly;
|
||||
import com.hbm.items.weapon.ItemGunBase;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelDefabricator;
|
||||
import com.hbm.render.model.ModelEuthanasia;
|
||||
import com.hbm.render.model.ModelFolly;
|
||||
import com.hbm.render.model.ModelHP;
|
||||
import com.hbm.render.model.ModelJack;
|
||||
import com.hbm.render.model.ModelLacunae;
|
||||
@ -29,7 +27,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
protected ModelEuthanasia euthanasia;
|
||||
protected ModelDefabricator defab;
|
||||
protected ModelLacunae lacunae;
|
||||
protected ModelFolly folly;
|
||||
|
||||
public ItemRenderOverkill() {
|
||||
powerJack = new ModelJack();
|
||||
@ -38,7 +35,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
euthanasia = new ModelEuthanasia();
|
||||
defab = new ModelDefabricator();
|
||||
lacunae = new ModelLacunae();
|
||||
folly = new ModelFolly();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -91,8 +87,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipRed.png"));
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
|
||||
if(item.getItem() == ModItems.gun_folly)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelFolly.png"));
|
||||
|
||||
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
|
||||
@ -122,12 +116,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
GL11.glTranslatef(0.5F, 0.3F, -0.2F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_folly) {
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
if(item.getItem() == ModItems.gun_spark)
|
||||
@ -142,12 +130,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ItemGunBase.readNBT(item, "rot"));
|
||||
|
||||
if(item.getItem() == ModItems.gun_folly) {
|
||||
int state = GunFolly.getState(item);
|
||||
int time = GunFolly.getTimer(item);
|
||||
folly.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, state, time);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:
|
||||
@ -175,8 +157,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipRed.png"));
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
|
||||
if(item.getItem() == ModItems.gun_folly)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelFolly.png"));
|
||||
|
||||
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
|
||||
@ -208,9 +188,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
GL11.glRotatef(185, 0, 1, 0);
|
||||
GL11.glTranslatef(0.5F, 0.6F, 0.2F);
|
||||
}
|
||||
if(item.getItem() == ModItems.gun_folly) {
|
||||
GL11.glTranslatef(0.6F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
@ -226,11 +203,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
|
||||
|
||||
if(item.getItem() == ModItems.gun_folly) {
|
||||
int state = GunFolly.getState(item);
|
||||
int time = GunFolly.getTimer(item);
|
||||
folly.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, state, time);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case ENTITY:
|
||||
@ -258,8 +230,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelPipRed.png"));
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
|
||||
if(item.getItem() == ModItems.gun_folly)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelFolly.png"));
|
||||
|
||||
|
||||
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
@ -293,11 +263,6 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
if(item.getItem() == ModItems.gun_lacunae)
|
||||
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
|
||||
|
||||
if(item.getItem() == ModItems.gun_folly) {
|
||||
int state = GunFolly.getState(item);
|
||||
int time = GunFolly.getTimer(item);
|
||||
folly.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, state, time);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
default: break;
|
||||
|
||||
@ -0,0 +1,237 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemRenderFolly extends ItemRenderWeaponBase {
|
||||
|
||||
public static long timeAiming;
|
||||
public static boolean jingle = false;
|
||||
public static boolean wasAiming = false;
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2F : 2.5F; }
|
||||
|
||||
@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, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
float aim = 0.75F;
|
||||
standardAimingTransform(stack,
|
||||
-2.5F * offset, -1.5F * offset, 2.75F * offset,
|
||||
-2 * aim, -1 * aim, 2.25F * offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.folly_tex);
|
||||
double scale = 0.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] load = HbmAnimations.getRelevantTransformation("LOAD");
|
||||
double[] shell = HbmAnimations.getRelevantTransformation("SHELL");
|
||||
double[] screw = HbmAnimations.getRelevantTransformation("SCREW");
|
||||
double[] breech = HbmAnimations.getRelevantTransformation("BREECH");
|
||||
|
||||
GL11.glTranslated(0, 1, -4);
|
||||
GL11.glRotated(-equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -1, 4);
|
||||
|
||||
GL11.glTranslated(0, -2, -2);
|
||||
GL11.glRotated(load[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 2, 2);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
ResourceManager.folly.renderPart("Cannon");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
|
||||
ResourceManager.folly.renderPart("Barrel");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(shell[0], shell[1], shell[2]);
|
||||
ResourceManager.folly.renderPart("Shell");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(breech[0], breech[1], breech[2]);
|
||||
ResourceManager.folly.renderPart("Breech");
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
GL11.glRotated(screw[2], 0, 0, 1);
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
ResourceManager.folly.renderPart("Cog");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
boolean isAiming = gun.prevAimingProgress >= 1F && gun.aimingProgress >= 1F;
|
||||
if(isAiming & !wasAiming) timeAiming = System.currentTimeMillis();
|
||||
|
||||
if(isAiming) {
|
||||
|
||||
String splash = getBootSplash();
|
||||
|
||||
if(!jingle && !splash.isEmpty()) {
|
||||
MainRegistry.proxy.playSoundClient(player.posX, player.posY, player.posZ, "hbm:weapon.fire.vstar", 0.5F, 1F);
|
||||
jingle = true;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
float variance = 0.85F + player.getRNG().nextFloat() * 0.15F;
|
||||
|
||||
if(System.currentTimeMillis() - timeAiming > 5000 && load[0] == 0) {
|
||||
IMagazine mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack);
|
||||
String msg = mag.getAmount(stack, player.inventory) > 0 ? "+" : "No ammo";
|
||||
GL11.glPushMatrix();
|
||||
float crosshairSize = 0.01F;
|
||||
GL11.glTranslatef((font.getStringWidth(msg) / 2) * crosshairSize + 2, 1F + font.FONT_HEIGHT * crosshairSize / 2F, -2.75F);
|
||||
GL11.glScalef(crosshairSize, -crosshairSize, crosshairSize);
|
||||
GL11.glRotated(180D, 0, 1, 0);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * crosshairSize);
|
||||
font.drawString(msg, 0, 0, new Color(variance, variance * 0.5F, 0F).getRGB());
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float splashSize = 0.02F;
|
||||
GL11.glTranslatef((font.getStringWidth(splash) / 2) * splashSize + 2, 1F + font.FONT_HEIGHT * splashSize / 2F, -2.75F);
|
||||
GL11.glScalef(splashSize, -splashSize, splashSize);
|
||||
GL11.glRotated(180D, 0, 1, 0);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * splashSize);
|
||||
font.drawString(splash, 0, 0, new Color(variance, variance * 0.5F, 0F).getRGB());
|
||||
GL11.glPopMatrix();
|
||||
|
||||
List<String> tty = getTTY();
|
||||
if(!tty.isEmpty()) {
|
||||
GL11.glPushMatrix();
|
||||
float fontSize = 0.005F;
|
||||
GL11.glTranslatef(2.5F, 1.375F, -2.75F);
|
||||
GL11.glScalef(fontSize, -fontSize, fontSize);
|
||||
GL11.glRotated(180D, 0, 1, 0);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * fontSize);
|
||||
for(String line : tty) {
|
||||
font.drawString(line, 0, 0, new Color(variance, variance * 0.5F, 0F).getRGB());
|
||||
GL11.glTranslated(0, (font.FONT_HEIGHT + 2), 0);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
int brightness = player.worldObj.getLightBrightnessForSkyBlocks(MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ), 0);
|
||||
int j = brightness % 65536;
|
||||
int k = brightness / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F);
|
||||
} else {
|
||||
jingle = false;
|
||||
}
|
||||
|
||||
wasAiming = isAiming;
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 3D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(-0.25, 0.5, 3);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 1.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(0, -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.folly_tex);
|
||||
ResourceManager.folly.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public static String getBootSplash() {
|
||||
long now = System.currentTimeMillis();
|
||||
if(timeAiming + 5000 < now) return "";
|
||||
if(timeAiming + 3000 > now) return "";
|
||||
int splashIndex = (int)((now - timeAiming - 3000) * 35 / 2000) - 10;
|
||||
//use the StringBuilder this, can't eat the drywall that, this used to be a free country
|
||||
char[] letters = "VStarOS".toCharArray();
|
||||
String splash = "";
|
||||
for(int i = 0; i < letters.length; i++) {
|
||||
if(i < splashIndex - 1) splash += EnumChatFormatting.LIGHT_PURPLE;
|
||||
if(i == splashIndex - 1) splash += EnumChatFormatting.AQUA;
|
||||
if(i == splashIndex) splash += EnumChatFormatting.WHITE;
|
||||
if(i == splashIndex + 1) splash += EnumChatFormatting.AQUA;
|
||||
if(i == splashIndex + 2) splash += EnumChatFormatting.LIGHT_PURPLE;
|
||||
if(i > splashIndex + 2) splash += EnumChatFormatting.BLACK;
|
||||
splash += letters[i];
|
||||
}
|
||||
return splash;
|
||||
}
|
||||
|
||||
public static List<String> getTTY() {
|
||||
List<String> tty = new ArrayList();
|
||||
long now = System.currentTimeMillis();
|
||||
int time = (int)((now - timeAiming));
|
||||
if(time > 3000) return tty;
|
||||
if(time > 250) tty.add(EnumChatFormatting.GREEN + "POST successful - Code 0");
|
||||
if(time > 500) tty.add(EnumChatFormatting.GREEN + "8,388,608 bytes of RAM installed");
|
||||
if(time > 500) tty.add(EnumChatFormatting.GREEN + "5,187,427 bytes available");
|
||||
if(time > 750) tty.add(EnumChatFormatting.GREEN + "Reticulating splines...");
|
||||
if(time > 1500) tty.add(EnumChatFormatting.GREEN + "No keyboard found!");
|
||||
if(time > 2000) tty.add(EnumChatFormatting.GREEN + "Booting from /dev/sda1...");
|
||||
return tty;
|
||||
}
|
||||
}
|
||||
@ -12,7 +12,7 @@ import net.minecraft.item.ItemStack;
|
||||
public class ItemRenderSTG77 extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 0.5F : -0.25F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
@ -21,7 +21,7 @@ public class ItemRenderSTG77 extends ItemRenderWeaponBase {
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1.5F * offset, -1F * offset, 2.5F * offset,
|
||||
0, -5.75 / 8D, 1);
|
||||
0, -5.75 / 8D, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -33,7 +33,7 @@ public class ItemRenderSTG77 extends ItemRenderWeaponBase {
|
||||
@Override
|
||||
protected float getBaseFOV(ItemStack stack) {
|
||||
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
|
||||
return 70F - aimingProgress * 55;
|
||||
return 70F - aimingProgress * 65;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -48,6 +48,7 @@ public abstract class ItemRenderWeaponBase implements IItemRenderer {
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
switch(type) {
|
||||
case EQUIPPED_FIRST_PERSON: setupFirstPerson(item); renderFirstPerson(item); break;
|
||||
case EQUIPPED: setupThirdPerson(item); renderEquipped(item); break;
|
||||
|
||||
@ -1,322 +0,0 @@
|
||||
// Date: 13.01.2019 13:32:43
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelFolly extends ModelBase {
|
||||
// fields
|
||||
ModelRenderer SB1;
|
||||
ModelRenderer SB2;
|
||||
ModelRenderer SB3;
|
||||
ModelRenderer SB4;
|
||||
ModelRenderer SB5;
|
||||
ModelRenderer SB6;
|
||||
ModelRenderer SB7;
|
||||
ModelRenderer SB8;
|
||||
ModelRenderer SP;
|
||||
ModelRenderer B1;
|
||||
ModelRenderer B2;
|
||||
ModelRenderer B3;
|
||||
ModelRenderer SF1;
|
||||
ModelRenderer SF2;
|
||||
ModelRenderer SF3;
|
||||
ModelRenderer SF4;
|
||||
ModelRenderer P1;
|
||||
ModelRenderer P2;
|
||||
ModelRenderer P3;
|
||||
ModelRenderer P4;
|
||||
ModelRenderer Grip;
|
||||
ModelRenderer SPointer;
|
||||
|
||||
public ModelFolly() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
SB1 = new ModelRenderer(this, 0, 0);
|
||||
SB1.addBox(-16F, -1F, 0F, 16, 1, 3);
|
||||
SB1.setRotationPoint(0F, 4F, -1.5F);
|
||||
SB1.setTextureSize(64, 32);
|
||||
SB1.mirror = true;
|
||||
setRotation(SB1, 0F, 0F, 0F);
|
||||
SB2 = new ModelRenderer(this, 0, 16);
|
||||
SB2.addBox(-16F, -1.5F, 0F, 16, 1, 1);
|
||||
SB2.setRotationPoint(0F, 4F, 1F);
|
||||
SB2.setTextureSize(64, 32);
|
||||
SB2.mirror = true;
|
||||
setRotation(SB2, 0F, 0F, 0F);
|
||||
SB3 = new ModelRenderer(this, 0, 18);
|
||||
SB3.addBox(-16F, -1.5F, 0F, 16, 1, 1);
|
||||
SB3.setRotationPoint(0F, 4F, -2F);
|
||||
SB3.setTextureSize(64, 32);
|
||||
SB3.mirror = true;
|
||||
setRotation(SB3, 0F, 0F, 0F);
|
||||
SB4 = new ModelRenderer(this, 0, 8);
|
||||
SB4.addBox(-16F, -4F, 0F, 16, 3, 1);
|
||||
SB4.setRotationPoint(0F, 4F, -2.5F);
|
||||
SB4.setTextureSize(64, 32);
|
||||
SB4.mirror = true;
|
||||
setRotation(SB4, 0F, 0F, 0F);
|
||||
SB5 = new ModelRenderer(this, 0, 12);
|
||||
SB5.addBox(-16F, -4F, 0F, 16, 3, 1);
|
||||
SB5.setRotationPoint(0F, 4F, 1.5F);
|
||||
SB5.setTextureSize(64, 32);
|
||||
SB5.mirror = true;
|
||||
setRotation(SB5, 0F, 0F, 0F);
|
||||
SB6 = new ModelRenderer(this, 0, 20);
|
||||
SB6.addBox(-16F, -4.5F, 0F, 16, 1, 1);
|
||||
SB6.setRotationPoint(0F, 4F, 1F);
|
||||
SB6.setTextureSize(64, 32);
|
||||
SB6.mirror = true;
|
||||
setRotation(SB6, 0F, 0F, 0F);
|
||||
SB7 = new ModelRenderer(this, 0, 22);
|
||||
SB7.addBox(-16F, -4.5F, 0F, 16, 1, 1);
|
||||
SB7.setRotationPoint(0F, 4F, -2F);
|
||||
SB7.setTextureSize(64, 32);
|
||||
SB7.mirror = true;
|
||||
setRotation(SB7, 0F, 0F, 0F);
|
||||
SB8 = new ModelRenderer(this, 0, 4);
|
||||
SB8.addBox(-16F, -5F, 0F, 16, 1, 3);
|
||||
SB8.setRotationPoint(0F, 4F, -1.5F);
|
||||
SB8.setTextureSize(64, 32);
|
||||
SB8.mirror = true;
|
||||
setRotation(SB8, 0F, 0F, 0F);
|
||||
SP = new ModelRenderer(this, 58, 0);
|
||||
SP.addBox(0F, -4F, 0F, 0, 3, 3);
|
||||
SP.setRotationPoint(-0.5F, 4F, -1.5F);
|
||||
SP.setTextureSize(64, 32);
|
||||
SP.mirror = true;
|
||||
setRotation(SP, 0F, 0F, 0F);
|
||||
B1 = new ModelRenderer(this, 0, 40);
|
||||
B1.addBox(0F, 0F, 0F, 5, 5, 3);
|
||||
B1.setRotationPoint(0F, -1F, -1.5F);
|
||||
B1.setTextureSize(64, 32);
|
||||
B1.mirror = true;
|
||||
setRotation(B1, 0F, 0F, 0F);
|
||||
B2 = new ModelRenderer(this, 0, 48);
|
||||
B2.addBox(0F, 0F, 0F, 5, 3, 5);
|
||||
B2.setRotationPoint(0F, 0F, -2.5F);
|
||||
B2.setTextureSize(64, 32);
|
||||
B2.mirror = true;
|
||||
setRotation(B2, 0F, 0F, 0F);
|
||||
B3 = new ModelRenderer(this, 0, 56);
|
||||
B3.addBox(0F, 0F, 0F, 5, 4, 4);
|
||||
B3.setRotationPoint(0F, -0.5F, -2F);
|
||||
B3.setTextureSize(64, 32);
|
||||
B3.mirror = true;
|
||||
setRotation(B3, 0F, 0F, 0F);
|
||||
SF1 = new ModelRenderer(this, 0, 24);
|
||||
SF1.addBox(-32F, -1.5F, 0F, 16, 1, 3);
|
||||
SF1.setRotationPoint(0F, 4F, -1.5F);
|
||||
SF1.setTextureSize(64, 32);
|
||||
SF1.mirror = true;
|
||||
setRotation(SF1, 0F, 0F, 0F);
|
||||
SF2 = new ModelRenderer(this, 0, 28);
|
||||
SF2.addBox(-32F, -4.5F, 0F, 16, 1, 3);
|
||||
SF2.setRotationPoint(0F, 4F, -1.5F);
|
||||
SF2.setTextureSize(64, 32);
|
||||
SF2.mirror = true;
|
||||
setRotation(SF2, 0F, 0F, 0F);
|
||||
SF3 = new ModelRenderer(this, 0, 32);
|
||||
SF3.addBox(-32F, -4F, 0F, 16, 3, 1);
|
||||
SF3.setRotationPoint(0F, 4F, -2F);
|
||||
SF3.setTextureSize(64, 32);
|
||||
SF3.mirror = true;
|
||||
setRotation(SF3, 0F, 0F, 0F);
|
||||
SF4 = new ModelRenderer(this, 0, 36);
|
||||
SF4.addBox(-32F, -4F, 0F, 16, 3, 1);
|
||||
SF4.setRotationPoint(0F, 4F, 1F);
|
||||
SF4.setTextureSize(64, 32);
|
||||
SF4.mirror = true;
|
||||
setRotation(SF4, 0F, 0F, 0F);
|
||||
P1 = new ModelRenderer(this, 58, 6);
|
||||
P1.addBox(0F, 0F, 0F, 1, 4, 2);
|
||||
P1.setRotationPoint(5F, 1F, -1F);
|
||||
P1.setTextureSize(64, 32);
|
||||
P1.mirror = true;
|
||||
setRotation(P1, 0F, 0F, 0F);
|
||||
P2 = new ModelRenderer(this, 52, 0);
|
||||
P2.addBox(-1F, -2F, 0F, 1, 2, 2);
|
||||
P2.setRotationPoint(6F, 1F, -1F);
|
||||
P2.setTextureSize(64, 32);
|
||||
P2.mirror = true;
|
||||
setRotation(P2, 0F, 0F, -0.5235988F);
|
||||
P3 = new ModelRenderer(this, 42, 0);
|
||||
P3.addBox(0F, 0F, 0F, 1, 1, 4);
|
||||
P3.setRotationPoint(4.5F, 1F, -2F);
|
||||
P3.setTextureSize(64, 32);
|
||||
P3.mirror = true;
|
||||
setRotation(P3, 0F, 0F, 0F);
|
||||
P4 = new ModelRenderer(this, 44, 5);
|
||||
P4.addBox(0F, 0F, 0F, 5, 1, 2);
|
||||
P4.setRotationPoint(0F, 4F, -1F);
|
||||
P4.setTextureSize(64, 32);
|
||||
P4.mirror = true;
|
||||
setRotation(P4, 0F, 0F, 0F);
|
||||
Grip = new ModelRenderer(this, 52, 8);
|
||||
Grip.addBox(0F, 0F, 0F, 2, 4, 1);
|
||||
Grip.setRotationPoint(2F, 5F, -0.5F);
|
||||
Grip.setTextureSize(64, 32);
|
||||
Grip.mirror = true;
|
||||
setRotation(Grip, 0F, 0F, -0.2617994F);
|
||||
SPointer = new ModelRenderer(this, 56, 13);
|
||||
SPointer.addBox(-32F, -0.5F, 0F, 3, 1, 1);
|
||||
SPointer.setRotationPoint(0F, 4F, -0.5F);
|
||||
SPointer.setTextureSize(64, 32);
|
||||
SPointer.mirror = true;
|
||||
setRotation(SPointer, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
SB1.render(f5);
|
||||
SB2.render(f5);
|
||||
SB3.render(f5);
|
||||
SB4.render(f5);
|
||||
SB5.render(f5);
|
||||
SB6.render(f5);
|
||||
SB7.render(f5);
|
||||
SB8.render(f5);
|
||||
SP.render(f5);
|
||||
B1.render(f5);
|
||||
B2.render(f5);
|
||||
B3.render(f5);
|
||||
SF1.render(f5);
|
||||
SF2.render(f5);
|
||||
SF3.render(f5);
|
||||
SF4.render(f5);
|
||||
P1.render(f5);
|
||||
P2.render(f5);
|
||||
P3.render(f5);
|
||||
P4.render(f5);
|
||||
Grip.render(f5);
|
||||
SPointer.render(f5);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, int state, int timer) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
float rotate = (float) (Math.PI * -70D / 180D);
|
||||
|
||||
if(state == 1 || state == 2) {
|
||||
SB1.rotateAngleZ = rotate;
|
||||
SB2.rotateAngleZ = rotate;
|
||||
SB3.rotateAngleZ = rotate;
|
||||
SB4.rotateAngleZ = rotate;
|
||||
SB5.rotateAngleZ = rotate;
|
||||
SB6.rotateAngleZ = rotate;
|
||||
SB7.rotateAngleZ = rotate;
|
||||
SB8.rotateAngleZ = rotate;
|
||||
SP.rotateAngleZ = rotate;
|
||||
SPointer.rotateAngleZ = rotate;
|
||||
SF1.rotateAngleZ = rotate;
|
||||
SF2.rotateAngleZ = rotate;
|
||||
SF3.rotateAngleZ = rotate;
|
||||
SF4.rotateAngleZ = rotate;
|
||||
} else {
|
||||
SB1.rotateAngleZ = 0;
|
||||
SB2.rotateAngleZ = 0;
|
||||
SB3.rotateAngleZ = 0;
|
||||
SB4.rotateAngleZ = 0;
|
||||
SB5.rotateAngleZ = 0;
|
||||
SB6.rotateAngleZ = 0;
|
||||
SB7.rotateAngleZ = 0;
|
||||
SB8.rotateAngleZ = 0;
|
||||
SP.rotateAngleZ = 0;
|
||||
SPointer.rotateAngleZ = 0;
|
||||
SF1.rotateAngleZ = 0;
|
||||
SF2.rotateAngleZ = 0;
|
||||
SF3.rotateAngleZ = 0;
|
||||
SF4.rotateAngleZ = 0;
|
||||
}
|
||||
|
||||
SB1.render(f5);
|
||||
SB2.render(f5);
|
||||
SB3.render(f5);
|
||||
SB4.render(f5);
|
||||
SB5.render(f5);
|
||||
SB6.render(f5);
|
||||
SB7.render(f5);
|
||||
SB8.render(f5);
|
||||
|
||||
if(state == 2 || state == 3) {
|
||||
SP.render(f5);
|
||||
}
|
||||
|
||||
B1.render(f5);
|
||||
B2.render(f5);
|
||||
B3.render(f5);
|
||||
SF1.render(f5);
|
||||
SF2.render(f5);
|
||||
SF3.render(f5);
|
||||
SF4.render(f5);
|
||||
P1.render(f5);
|
||||
P2.render(f5);
|
||||
P3.render(f5);
|
||||
P4.render(f5);
|
||||
Grip.render(f5);
|
||||
SPointer.render(f5);
|
||||
|
||||
if(state == 3 && timer > -1) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
int color = 0x00FF00;
|
||||
|
||||
if(timer == 0)
|
||||
color = 0xFF0000;
|
||||
|
||||
tessellator.startDrawing(3);
|
||||
tessellator.setColorOpaque_I(color);
|
||||
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
|
||||
tessellator.addVertex(-150, timer, 0);
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawing(3);
|
||||
tessellator.setColorOpaque_I(color);
|
||||
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
|
||||
tessellator.addVertex(-150, -timer, 0);
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawing(3);
|
||||
tessellator.setColorOpaque_I(color);
|
||||
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
|
||||
tessellator.addVertex(-150, 0, timer);
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawing(3);
|
||||
tessellator.setColorOpaque_I(color);
|
||||
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
|
||||
tessellator.addVertex(-150, 0, -timer);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -233,6 +233,8 @@
|
||||
"weapon.fire.tauRelease": {"category": "player", "sounds": ["weapon/fire/tauRelease1", "weapon/fire/tauRelease2", "weapon/fire/tauRelease3"]},
|
||||
"weapon.fire.fatman": {"category": "player", "sounds": ["weapon/fire/fatman"]},
|
||||
"weapon.fire.smack": {"category": "player", "sounds": ["weapon/fire/smack"]},
|
||||
"weapon.fire.vstar": {"category": "player", "sounds": ["weapon/fire/vstar"]},
|
||||
"weapon.fire.loudestNoiseOnEarth": {"category": "player", "sounds": ["weapon/fire/loudestNoiseOnEarth"]},
|
||||
|
||||
"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/vstar.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/vstar.ogg
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 5.1 KiB |
Loading…
x
Reference in New Issue
Block a user