mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
some very pissed off bees
This commit is contained in:
parent
41d8fa7478
commit
6b0835f19c
@ -39,6 +39,10 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_henry, 1), new Object[] { "BRP", "BMS", 'B', STEEL.lightBarrel(), 'R', GUNMETAL.lightReceiver(), 'M', GUNMETAL.mechanism(), 'S', WOOD.stock(), 'P', GUNMETAL.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_greasegun, 1), new Object[] { "BRS", "SMG", 'B', STEEL.lightBarrel(), 'R', STEEL.lightReceiver(), 'S', STEEL.bolt(), 'M', GUNMETAL.mechanism(), 'G', STEEL.grip() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_maresleg, 1), new Object[] { "BRM", "BGS", 'B', STEEL.lightBarrel(), 'R', STEEL.lightReceiver(), 'M', GUNMETAL.mechanism(), 'G', STEEL.bolt(), 'S', WOOD.stock() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_flaregun, 1), new Object[] { "BRM", " G", 'B', STEEL.heavyBarrel(), 'R', STEEL.lightReceiver(), 'M', GUNMETAL.mechanism(), 'B', STEEL.grip() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_heavy_revolver, 1), new Object[] { "BRM", " G", 'B', DURA.lightBarrel(), 'R', DURA.lightReceiver(), 'M', GUNMETAL.mechanism(), 'G', WOOD.grip() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_carbine, 1), new Object[] { "BRM", "G S", 'B', DURA.lightBarrel(), 'R', DURA.lightReceiver(), 'M', GUNMETAL.mechanism(), 'G', WOOD.grip(), 'S', WOOD.stock() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_am180, 1), new Object[] { "BBR", "GMS", 'B', DURA.lightBarrel(), 'R', DURA.lightReceiver(), 'M', GUNMETAL.mechanism(), 'G', WOOD.grip(), 'S', WOOD.stock() });
|
||||
|
||||
//SEDNA Ammo
|
||||
CraftingManager.addRecipeAuto(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.STONE, 6), new Object[] { "C", "P", "G", 'C', KEY_COBBLESTONE, 'P', Items.paper, 'G', Items.gunpowder });
|
||||
|
||||
@ -8,18 +8,16 @@ import net.minecraft.item.Item;
|
||||
|
||||
public class WeaponTab extends CreativeTabs {
|
||||
|
||||
public WeaponTab(int p_i1853_1_, String p_i1853_2_) {
|
||||
super(p_i1853_1_, p_i1853_2_);
|
||||
public WeaponTab(int index, String name) {
|
||||
super(index, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
|
||||
if(ModItems.gun_lever_action != null)
|
||||
{
|
||||
return ModItems.gun_lever_action;
|
||||
|
||||
if(ModItems.gun_maresleg != null) {
|
||||
return ModItems.gun_maresleg;
|
||||
}
|
||||
|
||||
return Items.iron_pickaxe;
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,10 +133,10 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_OSMIRIDIUM = makeSmeltable(7699, OSMIRIDIUM, 0xDBE3EF, 0x7891BE, 0xACBDD9).setShapes(NUGGET, INGOT, CASTPLATE, WELDEDPLATE).m();
|
||||
|
||||
//Alloys
|
||||
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setShapes(DUSTTINY, BOLT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT, LIGHTBARREL, LIGHTRECEIVER, GRIP).m();
|
||||
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setShapes(DUSTTINY, BOLT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, GRIP).m();
|
||||
public static final NTMMaterial MAT_MINGRADE = makeSmeltable(_AS + 1, MINGRADE, 0xFFBA7D, 0xAF1700, 0xE44C0F).setShapes(WIRE, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setShapes(WIRE, INGOT, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x183039, 0x030B0B, 0x376373).setShapes(BOLT, INGOT, DUST, PIPE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x183039, 0x030B0B, 0x376373).setShapes(BOLT, INGOT, DUST, PIPE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, GRIP).m();
|
||||
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setShapes(INGOT, DUST, CASTPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setShapes(INGOT, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setShapes(INGOT).m();
|
||||
|
||||
@ -1631,6 +1631,7 @@ public class ModItems {
|
||||
public static Item gun_flaregun;
|
||||
public static Item gun_heavy_revolver;
|
||||
public static Item gun_carbine;
|
||||
public static Item gun_am180;
|
||||
|
||||
public static Item ammo_standard;
|
||||
|
||||
@ -7046,6 +7047,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_flaregun, gun_flaregun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_heavy_revolver, gun_heavy_revolver.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_carbine, gun_carbine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_am180, gun_am180.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -54,6 +54,7 @@ public class GunFactory {
|
||||
XFactory12ga.init();
|
||||
XFactory40mm.init();
|
||||
XFactory762mm.init();
|
||||
XFactory22lr.init();
|
||||
|
||||
/// PROXY BULLSHIT ///
|
||||
MainRegistry.proxy.registerGunCfg();
|
||||
@ -63,6 +64,7 @@ public class GunFactory {
|
||||
STONE, STONE_AP, STONE_IRON, STONE_SHOT,
|
||||
M357_SP, M357_FMJ, M357_JHP, M357_AP, M357_EXPRESS,
|
||||
M44_SP, M44_FMJ, M44_JHP, M44_AP, M44_EXPRESS,
|
||||
P22_SP, P22_FMJ, P22_JHP, P22_AP,
|
||||
P9_SP, P9_FMJ, P9_JHP, P9_AP,
|
||||
G12_BP, G12_BP_MAGNUM, G12_BP_SLUG, G12,
|
||||
R762_SP, R762_FMJ, R762_JHP, R762_AP, R762_DU,
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import static com.hbm.items.weapon.sedna.factory.GunFactory.*;
|
||||
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.XFactory40mm.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory44.*;
|
||||
@ -38,6 +39,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flaregun, new ItemRenderFlaregun());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_heavy_revolver, new ItemRenderHeavyRevolver());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_carbine, new ItemRenderCarbine());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_am180, new ItemRenderAm180());
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(RENDER_STANDARD_BULLET);
|
||||
ammo_debug_buckshot.setRenderer(RENDER_STANDARD_BULLET);
|
||||
@ -65,6 +67,10 @@ public class GunFactoryClient {
|
||||
r762_jhp.setRenderer(RENDER_STANDARD_BULLET);
|
||||
r762_ap.setRenderer(RENDER_AP_BULLET);
|
||||
r762_du.setRenderer(RENDER_DU_BULLET);
|
||||
p22_sp.setRenderer(RENDER_STANDARD_BULLET);
|
||||
p22_fmj.setRenderer(RENDER_STANDARD_BULLET);
|
||||
p22_jhp.setRenderer(RENDER_STANDARD_BULLET);
|
||||
p22_ap.setRenderer(RENDER_AP_BULLET);
|
||||
//HUDS
|
||||
((ItemGunBaseNT) ModItems.gun_debug).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_pepperbox).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
@ -75,6 +81,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_flaregun).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_heavy_revolver).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_carbine).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_am180).config_DNA.hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
}
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_STANDARD_BULLET = (bullet, interp) -> {
|
||||
|
||||
@ -155,8 +155,8 @@ public class Lego {
|
||||
double heightOffset = offset.yCoord;
|
||||
double sideOffset = ItemGunBaseNT.getIsAiming(stack) ? 0 : offset.zCoord;
|
||||
|
||||
/*forwardOffset = 0.75;
|
||||
heightOffset = -0.0625;
|
||||
/*forwardOffset = 1;
|
||||
heightOffset = -0.0625 * 1.5;
|
||||
sideOffset = -0.1875D;*/
|
||||
|
||||
int projectiles = config.projectilesMin;
|
||||
|
||||
@ -130,7 +130,7 @@ public class Orchestras {
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 14) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.5, -0.125, aiming ? -0.125 : -0.375D, 0, 0.12, -0.12, 0.1, casing.getName(), true, 60, 0.5D, 20);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.5, -0.125, aiming ? -0.125 : -0.375D, 0, 0.12, -0.12, 0.01, casing.getName(), true, 60, 0.5D, 20);
|
||||
}
|
||||
if(timer == 12) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.leverCock", 1F, 1F);
|
||||
}
|
||||
@ -152,7 +152,7 @@ public class Orchestras {
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 2) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.55, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.1, casing.getName());
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.55, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.01, casing.getName());
|
||||
}
|
||||
}
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
@ -199,7 +199,7 @@ public class Orchestras {
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 14) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.3125, -0.125, aiming ? -0.125 : -0.375D, 0, 0.18, -0.12, 0.1, casing.getName(), true, 60, 0.5D, 20);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.3125, -0.125, aiming ? -0.125 : -0.375D, 0, 0.18, -0.12, 0.01, casing.getName(), true, 60, 0.5D, 20);
|
||||
}
|
||||
if(timer == 8) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.leverCock", 1F, 0.8F);
|
||||
}
|
||||
@ -219,7 +219,7 @@ public class Orchestras {
|
||||
if(timer == 0) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magSmallRemove", 1F, 0.8F);
|
||||
if(timer == 4) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.625, -0.125, aiming ? -0.125 : -0.375D, -0.12, 0.18, 0, 0.1, casing.getName(), true, 60, 0.5D, 20);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.625, -0.125, aiming ? -0.125 : -0.375D, -0.12, 0.18, 0, 0.01, casing.getName(), true, 60, 0.5D, 20);
|
||||
}
|
||||
if(timer == 16) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.insertCanister", 1F, 1F);
|
||||
if(timer == 24) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magSmallInsert", 1F, 1F);
|
||||
@ -252,7 +252,7 @@ public class Orchestras {
|
||||
Receiver rec = ctx.config.getReceivers(stack)[0];
|
||||
IMagazine mag = rec.getMagazine(stack);
|
||||
SpentCasing casing = mag.getCasing(stack);
|
||||
for(int i = 0; i < mag.getCapacity(stack); i++) CasingCreator.composeEffect(player.worldObj, player, 0.25, -0.125, -0.125, 0.05, 0, 0, 0.1, casing.getName());
|
||||
for(int i = 0; i < mag.getCapacity(stack); i++) CasingCreator.composeEffect(player.worldObj, player, 0.25, -0.125, -0.125, -0.05, 0, 0, 0.01, casing.getName());
|
||||
}
|
||||
}
|
||||
if(type == AnimType.CYCLE) {
|
||||
@ -277,7 +277,7 @@ public class Orchestras {
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 2) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.3125, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.06, 0.1, casing.getName(), true, 60, 0.5D, 20);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.3125, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.06, 0.01, casing.getName(), true, 60, 0.5D, 20);
|
||||
}
|
||||
}
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
@ -300,4 +300,34 @@ public class Orchestras {
|
||||
if(timer == 30) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_AM180 = (stack, ctx) -> {
|
||||
EntityPlayer player = ctx.player;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 0) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
CasingCreator.composeEffect(player.worldObj, player, 0.4375, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, -0.06, 0, 0.01, casing.getName());
|
||||
}
|
||||
}
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
if(timer == 0) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.dryFireClick", 1F, 1F);
|
||||
if(timer == 6) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.pistolCock", 1F, 0.9F);
|
||||
}
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 2) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 32) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
if(timer == 40) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.pistolCock", 1F, 0.9F);
|
||||
}
|
||||
if(type == AnimType.JAMMED) {
|
||||
if(timer == 15) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.pistolCock", 1F, 0.8F);
|
||||
}
|
||||
if(type == AnimType.INSPECT) {
|
||||
if(timer == 2) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 35) player.worldObj.playSoundAtEntity(player, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -0,0 +1,82 @@
|
||||
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.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
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 net.minecraft.item.ItemStack;
|
||||
|
||||
public class XFactory22lr {
|
||||
|
||||
public static BulletConfig p22_sp;
|
||||
public static BulletConfig p22_fmj;
|
||||
public static BulletConfig p22_jhp;
|
||||
public static BulletConfig p22_ap;
|
||||
|
||||
public static void init() {
|
||||
SpentCasing casing22 = new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(0.5F);
|
||||
p22_sp = new BulletConfig().setItem(EnumAmmo.P22_SP)
|
||||
.setCasing(casing22.clone().register("p22"));
|
||||
p22_fmj = new BulletConfig().setItem(EnumAmmo.P22_FMJ).setDamage(0.8F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing22.clone().register("p22fmj"));
|
||||
p22_jhp = new BulletConfig().setItem(EnumAmmo.P22_JHP).setDamage(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing22.clone().register("p22jhp"));
|
||||
p22_ap = new BulletConfig().setItem(EnumAmmo.P22_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing22.clone().setColor(SpentCasing.COLOR_CASE_44).register("p22ap"));
|
||||
|
||||
ModItems.gun_am180 = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(177 * 25).draw(15).inspect(38).jam(55).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE).orchestra(Orchestras.ORCHESTRA_AM180)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(5F).delay(1).dry(10).auto(true).spread(0.02F).reload(44).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 177).addConfigs(p22_sp, p22_fmj, p22_jhp, p22_ap))
|
||||
.offset(1, -0.0625 * 1.5, -0.1875D)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_STANDARD_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration().anim(LAMBDA_AM180_ANIMS)
|
||||
).setUnlocalizedName("gun_am180").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.player, stack, 3000, 0.05D, 1.1D);
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_AM180_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, ItemGunBaseNT.getIsAiming(stack) ? -0.125 : -0.25, 15, IType.SIN_DOWN).addPos(0, 0, 0, 35, IType.SIN_FULL));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 300).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_UP));
|
||||
case RELOAD:
|
||||
return new BusAnimation()
|
||||
.addBus("MAGTURN", new BusAnimationSequence().addPos(15, 0, 0, 250, IType.SIN_FULL).addPos(15, 0, 0, 250).addPos(15, 0, 70, 300, IType.SIN_FULL).addPos(15, 0, 0, 0).addPos(15, 0, 0, 750).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(2, 0, -4, 250, IType.SIN_FULL).addPos(-10, 2, -4, 300, IType.SIN_UP).addPos(3, -6, -4, 0).addPos(2, 0, -4, 500, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 2000).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_UP));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(0, 0, -1.5, 100, IType.SIN_UP).addPos(0, 0, 0, 100, IType.SIN_UP))
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, 45, 250, IType.SIN_FULL).addPos(0, 0, 45, 400).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("MAGTURN", new BusAnimationSequence().addPos(15, 0, 0, 250, IType.SIN_FULL).addPos(15, 0, 0, 1400).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(4, 0, -4, 250, IType.SIN_FULL).addPos(4, 0, -4, 100).addPos(4, 6, -4, 250, IType.SIN_FULL).addPos(4, 0, -4, 150, IType.SIN_UP).addPos(4, -1, -4, 100, IType.SIN_DOWN).addPos(4, -1, -4, 250).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("MAGSPIN", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(680, 0, 0, 500, IType.SIN_FULL).addPos(680, 0, 0, 250).addPos(720, 0, 0, 250));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
@ -857,6 +857,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom maresleg = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/maresleg.obj")).asVBO();
|
||||
public static final IModelCustom flaregun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flaregun.obj")).asVBO();
|
||||
public static final IModelCustom carbine = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/carbine.obj")).asVBO();
|
||||
public static final IModelCustom am180 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/am180.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"));
|
||||
@ -975,6 +976,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation flaregun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flaregun.png");
|
||||
public static final ResourceLocation heavy_revolver_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/heavy_revolver.png");
|
||||
public static final ResourceLocation carbine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/huntsman.png");
|
||||
public static final ResourceLocation am180_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/am180.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -0,0 +1,130 @@
|
||||
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.item.ItemStack;
|
||||
|
||||
public class ItemRenderAm180 extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
|
||||
|
||||
@Override
|
||||
protected void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1F * offset, -1F * offset, 1F * offset,
|
||||
0, -4.1875 / 8D, 0.25);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.am180_tex);
|
||||
double scale = 0.1875D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] magazine = HbmAnimations.getRelevantTransformation("MAG");
|
||||
double[] magTurn = HbmAnimations.getRelevantTransformation("MAGTURN");
|
||||
double[] magSpin = HbmAnimations.getRelevantTransformation("MAGSPIN");
|
||||
double[] bolt = HbmAnimations.getRelevantTransformation("BOLT");
|
||||
double[] turn = HbmAnimations.getRelevantTransformation("TURN");
|
||||
|
||||
GL11.glTranslated(0, -2, -6);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 2, 6);
|
||||
|
||||
GL11.glRotated(turn[2], 0, 0, 1);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
ResourceManager.am180.renderPart("Gun");
|
||||
ResourceManager.am180.renderPart("Silencer");
|
||||
ResourceManager.am180.renderPart("Trigger");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, bolt[2]);
|
||||
ResourceManager.am180.renderPart("Bolt");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(magazine[0], magazine[1], magazine[2]);
|
||||
|
||||
GL11.glTranslated(0, 2.0625, 3.75);
|
||||
GL11.glRotated(magTurn[0], 1, 0, 0);
|
||||
GL11.glRotated(magTurn[2], 0, 0, 1);
|
||||
GL11.glTranslated(0, -2.0625, -3.75);
|
||||
|
||||
GL11.glTranslated(0, 2.3125, 1.5);
|
||||
GL11.glRotated(magSpin[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -2.3125, -1.5);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
int mag = gun.getConfig(stack).getReceivers(stack)[0].getMagazine(stack).getAmount(stack);
|
||||
GL11.glTranslated(0, 0, 1.5);
|
||||
GL11.glRotated(mag / 59D * 360D, 0, -1, 0);
|
||||
GL11.glTranslated(0, 0, -1.5);
|
||||
ResourceManager.am180.renderPart("Mag");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
ResourceManager.am180.renderPart("MagPlate");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.875, 17);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
this.renderSmokeNodes(gun.smokeNodes, 0.25D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.875, 16.75);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
this.renderMuzzleFlash(gun.lastShot, 75, 5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 1D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, -0.5, 3);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 0.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(1.5, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.am180_tex);
|
||||
ResourceManager.am180.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -391,8 +391,8 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
tanks[0].readFromNBT(nbt, "t0");
|
||||
tanks[1].readFromNBT(nbt, "t1");
|
||||
rodCount = nbt.getInteger("rodCount");
|
||||
coreHeat = nbt.getInteger("coreHeat");
|
||||
hullHeat = nbt.getInteger("hullHeat");
|
||||
coreHeat = nbt.getLong("coreHeat");
|
||||
hullHeat = nbt.getLong("hullHeat");
|
||||
flux = nbt.getDouble("flux");
|
||||
processTime = nbt.getDouble("processTime");
|
||||
progress = nbt.getDouble("progress");
|
||||
@ -400,7 +400,7 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
amountLoaded = nbt.getInteger("amountLoaded");
|
||||
rodLevel = nbt.getDouble("rodLevel");
|
||||
rodTarget = nbt.getInteger("rodTarget");
|
||||
coreHeatCapacity = nbt.getInteger("coreHeatCapacity");
|
||||
coreHeatCapacity = nbt.getLong("coreHeatCapacity");
|
||||
}
|
||||
|
||||
protected void setupTanks() {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
4369
src/main/resources/assets/hbm/models/weapons/am180.obj
Normal file
4369
src/main/resources/assets/hbm/models/weapons/am180.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 187 B |
Binary file not shown.
|
After Width: | Height: | Size: 192 B |
Binary file not shown.
|
After Width: | Height: | Size: 195 B |
Binary file not shown.
|
After Width: | Height: | Size: 192 B |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Loading…
x
Reference in New Issue
Block a user