mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
2968d927bc
@ -1,8 +1,13 @@
|
||||
## Changed
|
||||
* Particle detectors now print an error for when the recipe could not be completed
|
||||
* Night Vision Goggles toggles with armor HUD
|
||||
* Removed "no ore dict data" line from tooltips with extended view enabled
|
||||
* Added a client config called `GUN_ANIMATION_SPEED` which allows the speed of gun animations to be changed
|
||||
* Mostly for debugging, since it only applies to the bus animation system, things like smoke trails and muzzle flashes are unaffected
|
||||
|
||||
## Fixed
|
||||
* Fixed items being annihilated when shift clicking them into the particle source
|
||||
* Fixed packet optimization not allowing packets to be sent when the day night cycle is halted
|
||||
* Fixed particle detectors not always using power when they should
|
||||
* Fixed rotary furnace voiding low pressure steam when dealing with input numbers not divisible by 100
|
||||
* Fixed state leak causing smoke from the right akimbo weapon to glow when the first one is fired
|
||||
|
||||
@ -32,6 +32,7 @@ public class ClientConfig {
|
||||
public static ConfigWrapper<Boolean> GUN_ANIMS_LEGACY = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Boolean> GUN_MODEL_FOV = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Boolean> GUN_VISUAL_RECOIL = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Double> GUN_ANIMATION_SPEED = new ConfigWrapper(1D);
|
||||
public static ConfigWrapper<Boolean> ITEM_TOOLTIP_SHOW_OREDICT = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> ITEM_TOOLTIP_SHOW_CUSTOM_NUKE = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> MAIN_MENU_WACKY_SPLASHES = new ConfigWrapper(true);
|
||||
@ -50,6 +51,7 @@ public class ClientConfig {
|
||||
configMap.put("GUN_ANIMS_LEGACY", GUN_ANIMS_LEGACY);
|
||||
configMap.put("GUN_MODEL_FOV", GUN_MODEL_FOV);
|
||||
configMap.put("GUN_VISUAL_RECOIL", GUN_VISUAL_RECOIL);
|
||||
configMap.put("GUN_ANIMATION_SPEED", GUN_ANIMATION_SPEED);
|
||||
configMap.put("ITEM_TOOLTIP_SHOW_OREDICT", ITEM_TOOLTIP_SHOW_OREDICT);
|
||||
configMap.put("ITEM_TOOLTIP_SHOW_CUSTOM_NUKE", ITEM_TOOLTIP_SHOW_CUSTOM_NUKE);
|
||||
configMap.put("MAIN_MENU_WACKY_SPLASHES", MAIN_MENU_WACKY_SPLASHES);
|
||||
|
||||
@ -109,7 +109,7 @@ public class ItemCustomLore extends Item {
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
if(stack.getItem() == ModItems.undefined && stack.getItemDamage() != 99) return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim();
|
||||
if(stack.getItem() != ModItems.undefined || stack.getItemDamage() != 99) return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim();
|
||||
|
||||
return name.getResult();
|
||||
}
|
||||
|
||||
@ -1501,6 +1501,7 @@ public class ModItems {
|
||||
public static Item gun_bolter;
|
||||
public static Item gun_folly;
|
||||
public static Item gun_aberrator;
|
||||
public static Item gun_aberrator_eott;
|
||||
public static Item gun_double_barrel;
|
||||
public static Item gun_double_barrel_sacred_dragon;
|
||||
|
||||
@ -6495,6 +6496,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_bolter, gun_bolter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_folly, gun_folly.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_aberrator, gun_aberrator.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_aberrator_eott, gun_aberrator_eott.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_double_barrel, gun_double_barrel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_double_barrel_sacred_dragon, gun_double_barrel_sacred_dragon.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -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,8 @@ 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_aberrator_eott, new ItemRenderEOTT());
|
||||
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 +192,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 +241,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);
|
||||
|
||||
@ -245,6 +251,8 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_maresleg_akimbo) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_uzi_akimbo) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_uzi_akimbo) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_aberrator_eott) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_aberrator_eott) .getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_AMMO);
|
||||
}
|
||||
|
||||
public static void setRendererBulk(BiConsumer<EntityBulletBaseMK4, Float> renderer, BulletConfig... configs) { for(BulletConfig config : configs) config.setRenderer(renderer); }
|
||||
|
||||
@ -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) {
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import com.hbm.config.ClientConfig;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.impl.ItemGunStinger;
|
||||
@ -1284,5 +1285,25 @@ 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) {
|
||||
int cba = (stack.getItem() == ModItems.gun_aberrator_eott && ctx.configIndex == 0) ? -1 : 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 * cba, -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
@ -8,12 +9,16 @@ 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.LambdaContext;
|
||||
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 +28,76 @@ 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).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(100F).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).recoil(LAMBDA_RECOIL_ABERRATOR))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_ABERRATOR).orchestra(Orchestras.ORCHESTRA_ABERRATOR)
|
||||
).setUnlocalizedName("gun_aberrator");
|
||||
|
||||
ModItems.gun_aberrator_eott = new ItemGunBaseNT(WeaponQuality.SECRET,
|
||||
new GunConfig().dura(2_000).draw(10).inspect(26).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(100F).spreadHipfire(0F).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)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_NOWEAR_FIRE).recoil(LAMBDA_RECOIL_ABERRATOR))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_ABERRATOR).orchestra(Orchestras.ORCHESTRA_ABERRATOR),
|
||||
new GunConfig().dura(2_000).draw(10).inspect(26).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(100F).spreadHipfire(0F).delay(13).dry(21).reload(51).sound("hbm:weapon.fire.aberrator", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(1, 5).addConfigs(p35800))
|
||||
.offset(0.75, -0.0625 * 1.5, -0.1875)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_NOWEAR_FIRE).recoil(LAMBDA_RECOIL_ABERRATOR))
|
||||
.ps(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_ABERRATOR).orchestra(Orchestras.ORCHESTRA_ABERRATOR)
|
||||
).setUnlocalizedName("gun_aberrator_eott");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_ABERRATOR = (stack, ctx) -> {
|
||||
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
|
||||
};
|
||||
|
||||
@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;
|
||||
};
|
||||
}
|
||||
|
||||
@ -160,6 +160,29 @@ public class ModEventHandlerClient {
|
||||
GL11.glDepthMask(true);
|
||||
return;
|
||||
}
|
||||
|
||||
/*if(event.type == ElementType.CROSSHAIRS && player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gun_aberrator) {
|
||||
int width = event.resolution.getScaledWidth();
|
||||
int height = event.resolution.getScaledHeight();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.0F);
|
||||
GL11.glDepthMask(false);
|
||||
tess.startDrawingQuads();
|
||||
float intensity = 0.2F;
|
||||
tess.setColorRGBA_F(intensity, intensity, intensity, 1F);
|
||||
tess.addVertex(width, 0, 0);
|
||||
tess.addVertex(0, 0, 0);
|
||||
tess.addVertex(0, height, 0);
|
||||
tess.addVertex(width, height, 0);
|
||||
tess.draw();
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glDepthMask(true);
|
||||
}*/
|
||||
|
||||
/// HANDLE GUN OVERLAYS ///
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemHUD) {
|
||||
@ -751,8 +774,6 @@ public class ModEventHandlerClient {
|
||||
for(String s : names) {
|
||||
list.add(EnumChatFormatting.AQUA + " -" + s);
|
||||
}
|
||||
} else {
|
||||
list.add(EnumChatFormatting.RED + "No Ore Dict data!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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,8 @@ 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 eott_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/eott.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.render.anim;
|
||||
|
||||
import com.hbm.config.ClientConfig;
|
||||
|
||||
//"pieces" that make up a bus
|
||||
public class BusAnimationKeyframe {
|
||||
|
||||
@ -84,7 +86,7 @@ public class BusAnimationKeyframe {
|
||||
public BusAnimationKeyframe(double value, int duration) {
|
||||
this();
|
||||
this.value = value;
|
||||
this.duration = duration;
|
||||
this.duration = (int) (duration / Math.max(0.001D, ClientConfig.GUN_ANIMATION_SPEED.get()));
|
||||
}
|
||||
|
||||
public BusAnimationKeyframe(double value, int duration, IType interpolation) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,281 @@
|
||||
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.item.ItemStack;
|
||||
|
||||
public class ItemRenderEOTT extends ItemRenderWeaponBase {
|
||||
|
||||
@Override public boolean isAkimbo() { return true; }
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
float offset = 0.8F;
|
||||
|
||||
for(int i = -1; i <= 1; i += 2) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.eott_tex);
|
||||
int index = i == -1 ? 0 : 1;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
standardAimingTransform(stack,
|
||||
-1.0F * offset * i, -1.25F * offset, 1.25F * offset,
|
||||
0, -5.25 / 8D, 0.125);
|
||||
|
||||
double scale = 0.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP", index);
|
||||
double[] rise = HbmAnimations.getRelevantTransformation("RISE", index);
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL", index);
|
||||
double[] slide = HbmAnimations.getRelevantTransformation("SLIDE", index);
|
||||
double[] bullet = HbmAnimations.getRelevantTransformation("BULLET", index);
|
||||
double[] hammer = HbmAnimations.getRelevantTransformation("HAMMER", index);
|
||||
double[] roll = HbmAnimations.getRelevantTransformation("ROLL", index);
|
||||
double[] mag = HbmAnimations.getRelevantTransformation("MAG", index);
|
||||
double[] magroll = HbmAnimations.getRelevantTransformation("MAGROLL", index);
|
||||
double[] sight = HbmAnimations.getRelevantTransformation("SIGHT", index);
|
||||
|
||||
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] * i, 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] * i, mag[1], mag[2]);
|
||||
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
GL11.glRotated(magroll[2] * i, 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] * i, 0, 0, -1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, index).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[index], 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[index]);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public void setupThirdPersonAkimbo(ItemStack stack) {
|
||||
super.setupThirdPersonAkimbo(stack);
|
||||
GL11.glTranslated(0, -1, 4);
|
||||
double scale = 1.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
GL11.glScaled(1, 1, -1);
|
||||
GL11.glTranslated(8, 8, 0);
|
||||
double scale = 2.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInv(ItemStack stack) {
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(225, 0, 0, 1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.eott_tex);
|
||||
ResourceManager.aberrator.renderPart("Gun");
|
||||
ResourceManager.aberrator.renderPart("Hammer");
|
||||
ResourceManager.aberrator.renderPart("Magazine");
|
||||
ResourceManager.aberrator.renderPart("Slide");
|
||||
ResourceManager.aberrator.renderPart("Sight");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glTranslated(0, 0, 5);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(225, 0, 0, 1);
|
||||
GL11.glRotated(-90, 0, 1, 0);
|
||||
GL11.glRotated(-90, 1, 0, 0);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(-45, 0, 1, 0);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.eott_tex);
|
||||
ResourceManager.aberrator.renderPart("Gun");
|
||||
ResourceManager.aberrator.renderPart("Hammer");
|
||||
ResourceManager.aberrator.renderPart("Magazine");
|
||||
ResourceManager.aberrator.renderPart("Slide");
|
||||
ResourceManager.aberrator.renderPart("Sight");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderEquipped(ItemStack stack) {
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.eott_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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderEquippedAkimbo(ItemStack stack) {
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.eott_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);
|
||||
}
|
||||
|
||||
@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.eott_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
|
||||
|
||||
@ -272,6 +272,7 @@ public abstract class ItemRenderWeaponBase implements IItemRenderer {
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
tess.startDrawingQuads();
|
||||
|
||||
@ -48,6 +48,7 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
|
||||
public float progress;
|
||||
public int burnTime;
|
||||
public int maxBurnTime;
|
||||
public int steamUsed = 0;
|
||||
public boolean isVenting;
|
||||
public MaterialStack output;
|
||||
public static final int maxOutput = MaterialShapes.BLOCK.q(16);
|
||||
@ -124,7 +125,7 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
|
||||
if(this.canProcess(recipe)) {
|
||||
this.progress += 1F / recipe.duration;
|
||||
tanks[1].setFill(tanks[1].getFill() - recipe.steam);
|
||||
tanks[2].setFill(tanks[2].getFill() + recipe.steam / 100);
|
||||
steamUsed += recipe.steam;
|
||||
this.isProgressing = true;
|
||||
|
||||
if(this.progress >= 1F) {
|
||||
@ -142,6 +143,15 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
|
||||
} else {
|
||||
this.progress = 0;
|
||||
}
|
||||
|
||||
if(this.steamUsed >= 100) {
|
||||
int steamReturn = this.steamUsed / 100;
|
||||
int canReturn = tanks[2].getMaxFill() - tanks[2].getFill();
|
||||
int doesReturn = Math.min(steamReturn, canReturn);
|
||||
this.steamUsed -= doesReturn * 100;
|
||||
tanks[2].setFill(tanks[2].getFill() + doesReturn);
|
||||
}
|
||||
|
||||
} else {
|
||||
this.progress = 0;
|
||||
}
|
||||
@ -273,6 +283,7 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
|
||||
|
||||
if(tanks[1].getFill() < recipe.steam) return false;
|
||||
if(tanks[2].getMaxFill() - tanks[2].getFill() < recipe.steam / 100) return false;
|
||||
if(this.steamUsed > 100) return false;
|
||||
|
||||
if(this.output != null) {
|
||||
if(this.output.material != recipe.output.material) return false;
|
||||
|
||||
@ -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,8 @@ 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_aberrator_eott.name=Eyes Of The Tempest
|
||||
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,8 @@ 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_aberrator_eott.name=Eyes Of The Tempest
|
||||
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 |
BIN
src/main/resources/assets/hbm/textures/models/weapons/eott.png
Normal file
BIN
src/main/resources/assets/hbm/textures/models/weapons/eott.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
Loading…
x
Reference in New Issue
Block a user