mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
four cheese pizza
This commit is contained in:
parent
f4018248f1
commit
b57102e4ce
@ -97,9 +97,7 @@ public class WeaponRecipes {
|
||||
|
||||
//Guns
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', STEEL.shell(), 'W', IRON.plate(), 'M', ModItems.mechanism_launcher_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_panzerschreck, 1), new Object[] { "SSS", " MW", 'S', STEEL.shell(), 'W', CU.plate(), 'M', ModItems.mechanism_launcher_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_karl, 1), new Object[] { "SSW", " MW", 'S', STEEL.shell(), 'W', ALLOY.plate(), 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_quadro, 1), new Object[] { "SSS", "SSS", "CM ", 'S', STEEL.pipe(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', STEEL.shell(), 'I', IRON.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', STEEL.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', AL.wireFine(), 'M', ModItems.mechanism_revolver_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_saturnite, 1), new Object[] { "SSM", " RW", 'S', BIGMT.plate(), 'W', KEY_PLANKS, 'R', W.wireFine(), 'M', ModItems.mechanism_revolver_2 });
|
||||
|
||||
@ -1503,7 +1503,6 @@ public class ModItems {
|
||||
|
||||
public static Item gun_rpg;
|
||||
public static Item gun_karl;
|
||||
public static Item gun_quadro;
|
||||
public static Item gun_hk69;
|
||||
public static Item gun_skystinger;
|
||||
public static Item gun_revolver;
|
||||
@ -1615,6 +1614,7 @@ public class ModItems {
|
||||
public static Item gun_chemthrower;
|
||||
public static Item gun_m2;
|
||||
public static Item gun_autoshotgun;
|
||||
public static Item gun_quadro;
|
||||
|
||||
public static Item ammo_standard;
|
||||
|
||||
@ -4034,7 +4034,6 @@ public class ModItems {
|
||||
gun_rpg = new ItemGunBase(GunRocketFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
|
||||
gun_karl = new ItemGunBase(GunRocketFactory.getKarlConfig()).setUnlocalizedName("gun_karl").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_karl");
|
||||
gun_panzerschreck = new ItemGunBase(GunRocketFactory.getPanzConfig()).setUnlocalizedName("gun_panzerschreck").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_panzerschreck");
|
||||
gun_quadro = new ItemGunBase(GunRocketFactory.getQuadroConfig()).setUnlocalizedName("gun_quadro").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_quadro");
|
||||
gun_hk69 = new ItemGunBase(GunGrenadeFactory.getHK69Config()).setUnlocalizedName("gun_hk69").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hk69");
|
||||
//gun_congolake = new ItemGunBase(GunGrenadeFactory.getCongoConfig()).setUnlocalizedName("gun_congolake").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_congolake");
|
||||
gun_skystinger = new ItemGunBase(GunRocketHomingFactory.getSkyStingerConfig()).setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
|
||||
@ -6880,7 +6879,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_b93, gun_b93.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_rpg, gun_rpg.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_karl, gun_karl.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_quadro, gun_quadro.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_hk69, gun_hk69.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_fatman, gun_fatman.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_proto, gun_proto.getUnlocalizedName());
|
||||
@ -6959,6 +6957,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_chemthrower, gun_chemthrower.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_m2, gun_m2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_autoshotgun, gun_autoshotgun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_quadro, gun_quadro.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ public class GunConfig {
|
||||
public static final String I_DRAWDURATION = "I_DRAWDURATION";
|
||||
public static final String I_INSPECTDURATION = "I_INSPECTDURATION";
|
||||
public static final String O_CROSSHAIR = "O_CROSSHAIR";
|
||||
public static final String B_HIDECROSSHAIR = "B_HIDECROSSHAIR";
|
||||
public static final String B_RELOADANIMATIONSEQUENTIAL = "B_RELOADANIMATIONSEQUENTIAL";
|
||||
public static final String CON_SMOKE = "CON_SMOKE";
|
||||
public static final String CON_ORCHESTRA = "CON_ORCHESTRA";
|
||||
@ -53,6 +54,7 @@ public class GunConfig {
|
||||
protected int drawDuration_DNA = 0;
|
||||
protected int inspectDuration_DNA = 0;
|
||||
protected Crosshair crosshair_DNA;
|
||||
protected boolean hideCrosshair_DNA = true;
|
||||
protected boolean reloadAnimationsSequential_DNA;
|
||||
/** Handles smoke clientside */
|
||||
protected BiConsumer<ItemStack, LambdaContext> smokeHandler_DNA;
|
||||
@ -81,6 +83,7 @@ public class GunConfig {
|
||||
public int getDrawDuration(ItemStack stack) { return WeaponUpgradeManager.eval(drawDuration_DNA, stack, I_DRAWDURATION, this); }
|
||||
public int getInspectDuration(ItemStack stack) { return WeaponUpgradeManager.eval(inspectDuration_DNA, stack, I_INSPECTDURATION, this); }
|
||||
public Crosshair getCrosshair(ItemStack stack) { return WeaponUpgradeManager.eval(crosshair_DNA, stack, O_CROSSHAIR, this); }
|
||||
public boolean getHideCrosshair(ItemStack stack) { return WeaponUpgradeManager.eval(hideCrosshair_DNA, stack, B_HIDECROSSHAIR, this); }
|
||||
public boolean getReloadAnimSequential(ItemStack stack) { return WeaponUpgradeManager.eval(reloadAnimationsSequential_DNA, stack, B_RELOADANIMATIONSEQUENTIAL, this); }
|
||||
public BiConsumer<ItemStack, LambdaContext> getSmokeHandler(ItemStack stack) { return WeaponUpgradeManager.eval(smokeHandler_DNA, stack, CON_SMOKE, this); }
|
||||
public BiConsumer<ItemStack, LambdaContext> getOrchestra(ItemStack stack) { return WeaponUpgradeManager.eval(this.orchestra_DNA, stack, CON_ORCHESTRA, this); }
|
||||
@ -107,6 +110,7 @@ public class GunConfig {
|
||||
public GunConfig draw(int draw) { this.drawDuration_DNA = draw; return this; }
|
||||
public GunConfig inspect(int inspect) { this.inspectDuration_DNA = inspect; return this; }
|
||||
public GunConfig crosshair(Crosshair crosshair) { this.crosshair_DNA = crosshair; return this; }
|
||||
public GunConfig hideCrosshair(boolean flag) { this.hideCrosshair_DNA = flag; return this; }
|
||||
public GunConfig reloadSequential(boolean flag) { this.reloadAnimationsSequential_DNA = flag; return this; }
|
||||
|
||||
public GunConfig smoke(BiConsumer<ItemStack, LambdaContext> smoke) { this.smokeHandler_DNA = smoke; return this; }
|
||||
|
||||
@ -301,8 +301,9 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
|
||||
if(type == ElementType.CROSSHAIRS) {
|
||||
event.setCanceled(true);
|
||||
if(aimingProgress >= 1F) return;
|
||||
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, gun.getConfig(stack, 0).getCrosshair(stack));
|
||||
GunConfig config = gun.getConfig(stack, 0);
|
||||
if(config.getHideCrosshair(stack) && aimingProgress >= 1F) return;
|
||||
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, config.getCrosshair(stack));
|
||||
}
|
||||
|
||||
int confNo = this.configs_DNA.length;
|
||||
|
||||
@ -24,7 +24,9 @@ public class Receiver {
|
||||
public static final String I_ROUNDSPERCYCLE = "I_ROUNDSPERCYCLE";
|
||||
public static final String F_SPREADMOD = "F_SPREADMOD";
|
||||
public static final String B_REFIREONHOLD = "B_REFIREONHOLD";
|
||||
public static final String B_REFIREAFTERDRY = "B_REFIREAFTERDRY";
|
||||
public static final String B_DOESDRYFIRE = "B_DOESDRYFIRE";
|
||||
public static final String B_DOESDRYFIREAFTERAUTO = "B_DOESDRYFIREAFTERAUTO";
|
||||
public static final String B_EJECTONFIRE = "B_EJECTONFIRE";
|
||||
public static final String I_RELOADBEGINDURATION = "I_RELOADBEGINDURATION";
|
||||
public static final String I_RELOADCYCLEDURATION = "I_RELOADCYCLEDURATION";
|
||||
@ -52,7 +54,9 @@ public class Receiver {
|
||||
protected int roundsPerCycle_DNA = 1;
|
||||
protected float spreadModExtra_DNA = 0F;
|
||||
protected boolean refireOnHold_DNA = false;
|
||||
protected boolean refireAfterDry_DNA = false;
|
||||
protected boolean doesDryFire_DNA = true;
|
||||
protected boolean doesDryFireAfterAuto_DNA = false;
|
||||
protected boolean ejectOnFire_DNA = true;
|
||||
protected int reloadBeginDuration_DNA;
|
||||
protected int reloadCycleDuration_DNA;
|
||||
@ -70,25 +74,27 @@ public class Receiver {
|
||||
protected BiConsumer<ItemStack, LambdaContext> onRecoil_DNA;
|
||||
|
||||
/* GETTERS */
|
||||
public float getBaseDamage(ItemStack stack) { return WeaponUpgradeManager.eval(this.baseDamage_DNA, stack, F_BASEDAMAGE, this); }
|
||||
public int getDelayAfterFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.delayAfterFire_DNA, stack, I_DELAYAFTERFIRE, this); }
|
||||
public int getDelayAfterDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.delayAfterDryFire_DNA, stack, I_DELAYAFTERDRYFIRE, this); }
|
||||
public int getRoundsPerCycle(ItemStack stack) { return WeaponUpgradeManager.eval(this.roundsPerCycle_DNA, stack, I_ROUNDSPERCYCLE, this); }
|
||||
public float getGunSpread(ItemStack stack) { return WeaponUpgradeManager.eval(this.spreadModExtra_DNA, stack, F_SPREADMOD, this); }
|
||||
public boolean getRefireOnHold(ItemStack stack) { return WeaponUpgradeManager.eval(this.refireOnHold_DNA, stack, B_REFIREONHOLD, this); }
|
||||
public boolean getDoesDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.doesDryFire_DNA, stack, B_DOESDRYFIRE, this); }
|
||||
public boolean getEjectOnFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.ejectOnFire_DNA, stack, B_EJECTONFIRE, this); }
|
||||
public int getReloadBeginDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadBeginDuration_DNA, stack, I_RELOADBEGINDURATION, this); }
|
||||
public int getReloadCycleDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCycleDuration_DNA, stack, I_RELOADCYCLEDURATION, this); }
|
||||
public int getReloadEndDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadEndDuration_DNA, stack, I_RELOADENDDURATION, this); }
|
||||
public int getReloadCockOnEmptyPre(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCockOnEmptyPre_DNA, stack, I_RELOADCOCKONEMPTYPRE, this); }
|
||||
public int getReloadCockOnEmptyPost(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCockOnEmptyPost_DNA, stack, I_RELOADCOCKONEMPTYPOST, this); }
|
||||
public int getJamDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.jamDuration_DNA, stack, I_JAMDURATION, this); }
|
||||
public String getFireSound(ItemStack stack) { return WeaponUpgradeManager.eval(this.fireSound_DNA, stack, S_FIRESOUND, this); }
|
||||
public float getFireVolume(ItemStack stack) { return WeaponUpgradeManager.eval(this.fireVolume_DNA, stack, F_FIREVOLUME, this); }
|
||||
public float getFirePitch(ItemStack stack) { return WeaponUpgradeManager.eval(this.firePitch_DNA, stack, F_FIREPITCH, this); }
|
||||
public IMagazine getMagazine(ItemStack stack) { return WeaponUpgradeManager.eval(this.magazine_DNA, stack, O_MAGAZINE, this); }
|
||||
public Vec3 getProjectileOffset(ItemStack stack) { return WeaponUpgradeManager.eval(this.projectileOffset_DNA, stack, O_PROJECTILEOFFSET, this); }
|
||||
public float getBaseDamage(ItemStack stack) { return WeaponUpgradeManager.eval(this.baseDamage_DNA, stack, F_BASEDAMAGE, this); }
|
||||
public int getDelayAfterFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.delayAfterFire_DNA, stack, I_DELAYAFTERFIRE, this); }
|
||||
public int getDelayAfterDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.delayAfterDryFire_DNA, stack, I_DELAYAFTERDRYFIRE, this); }
|
||||
public int getRoundsPerCycle(ItemStack stack) { return WeaponUpgradeManager.eval(this.roundsPerCycle_DNA, stack, I_ROUNDSPERCYCLE, this); }
|
||||
public float getGunSpread(ItemStack stack) { return WeaponUpgradeManager.eval(this.spreadModExtra_DNA, stack, F_SPREADMOD, this); }
|
||||
public boolean getRefireOnHold(ItemStack stack) { return WeaponUpgradeManager.eval(this.refireOnHold_DNA, stack, B_REFIREONHOLD, this); }
|
||||
public boolean getRefireAfterDry(ItemStack stack) { return WeaponUpgradeManager.eval(this.refireAfterDry_DNA, stack, B_REFIREAFTERDRY, this); }
|
||||
public boolean getDoesDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.doesDryFire_DNA, stack, B_DOESDRYFIRE, this); }
|
||||
public boolean getDoesDryFireAfterAuto(ItemStack stack) { return WeaponUpgradeManager.eval(this.doesDryFireAfterAuto_DNA, stack, B_DOESDRYFIREAFTERAUTO, this); }
|
||||
public boolean getEjectOnFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.ejectOnFire_DNA, stack, B_EJECTONFIRE, this); }
|
||||
public int getReloadBeginDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadBeginDuration_DNA, stack, I_RELOADBEGINDURATION, this); }
|
||||
public int getReloadCycleDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCycleDuration_DNA, stack, I_RELOADCYCLEDURATION, this); }
|
||||
public int getReloadEndDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadEndDuration_DNA, stack, I_RELOADENDDURATION, this); }
|
||||
public int getReloadCockOnEmptyPre(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCockOnEmptyPre_DNA, stack, I_RELOADCOCKONEMPTYPRE, this); }
|
||||
public int getReloadCockOnEmptyPost(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCockOnEmptyPost_DNA, stack, I_RELOADCOCKONEMPTYPOST, this); }
|
||||
public int getJamDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.jamDuration_DNA, stack, I_JAMDURATION, this); }
|
||||
public String getFireSound(ItemStack stack) { return WeaponUpgradeManager.eval(this.fireSound_DNA, stack, S_FIRESOUND, this); }
|
||||
public float getFireVolume(ItemStack stack) { return WeaponUpgradeManager.eval(this.fireVolume_DNA, stack, F_FIREVOLUME, this); }
|
||||
public float getFirePitch(ItemStack stack) { return WeaponUpgradeManager.eval(this.firePitch_DNA, stack, F_FIREPITCH, this); }
|
||||
public IMagazine getMagazine(ItemStack stack) { return WeaponUpgradeManager.eval(this.magazine_DNA, stack, O_MAGAZINE, this); }
|
||||
public Vec3 getProjectileOffset(ItemStack stack) { return WeaponUpgradeManager.eval(this.projectileOffset_DNA, stack, O_PROJECTILEOFFSET, this); }
|
||||
|
||||
public BiFunction<ItemStack, LambdaContext, Boolean> getCanFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.canFire_DNA, stack, FUN_CANFIRE, this); }
|
||||
public BiConsumer<ItemStack, LambdaContext> getOnFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.onFire_DNA, stack, CON_ONFIRE, this); }
|
||||
@ -101,7 +107,9 @@ public class Receiver {
|
||||
public Receiver rounds(int rounds) { this.roundsPerCycle_DNA = rounds; return this; }
|
||||
public Receiver spread(float spread) { this.spreadModExtra_DNA = spread; return this; }
|
||||
public Receiver auto(boolean auto) { this.refireOnHold_DNA = auto; return this; }
|
||||
public Receiver autoAfterDry(boolean auto) { this.refireAfterDry_DNA = auto; return this; }
|
||||
public Receiver dryfire(boolean dryfire) { this.doesDryFire_DNA = dryfire; return this; }
|
||||
public Receiver dryfireAfterAuto(boolean dryfire) { this.doesDryFireAfterAuto_DNA = dryfire; return this; }
|
||||
public Receiver ejectOnFire(boolean eject) { this.ejectOnFire_DNA = eject; return this; }
|
||||
public Receiver mag(IMagazine magazine) { this.magazine_DNA = magazine; return this; }
|
||||
public Receiver offset(double f, double u, double s) { this.projectileOffset_DNA = Vec3.createVectorHelper(f, u, s); return this; }
|
||||
|
||||
@ -46,6 +46,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_chemthrower, new ItemRenderChemthrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_m2, new ItemRenderM2());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_autoshotgun, new ItemRenderShredder());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_quadro, new ItemRenderQuadro());
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
ammo_debug_buckshot.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -67,6 +68,12 @@ public class GunFactoryClient {
|
||||
g12_bp_magnum.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_bp_slug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_slug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_flechette.setRenderer(LegoClient.RENDER_FLECHETTE_BULLET);
|
||||
g12_magnum.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_explosive.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_phosphorus.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_anthrax.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r762_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r762_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r762_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -80,6 +87,8 @@ public class GunFactoryClient {
|
||||
g40.setRenderer(LegoClient.RENDER_GRENADE);
|
||||
rocket_rpzb_he.setRenderer(LegoClient.RENDER_RPZB);
|
||||
rocket_rpzb_heat.setRenderer(LegoClient.RENDER_RPZB);
|
||||
rocket_qd_he.setRenderer(LegoClient.RENDER_QD);
|
||||
rocket_qd_heat.setRenderer(LegoClient.RENDER_QD);
|
||||
r556_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r556_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r556_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -112,6 +121,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_chemthrower) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_m2) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_autoshotgun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_quadro) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_dani).getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_dani).getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
@ -100,6 +100,7 @@ public class GunStateDecider {
|
||||
if(lastState == GunState.COOLDOWN) {
|
||||
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
GunConfig cfg = ctx.config;
|
||||
Receiver rec = cfg.getReceivers(stack)[recIndex];
|
||||
|
||||
@ -115,12 +116,14 @@ public class GunStateDecider {
|
||||
|
||||
int remaining = rec.getRoundsPerCycle(stack) - 1;
|
||||
for(int i = 0; i < remaining; i++) if(rec.getCanFire(stack).apply(stack, ctx)) rec.getOnFire(stack).accept(stack, ctx);
|
||||
//if not, revert to idle
|
||||
} else /*if(rec.getDoesDryFire(stack)) {
|
||||
ItemGunBaseNT.setState(stack, gunIndex, GunState.DRAWING);
|
||||
//if not, check if dry firing is allowed for refires
|
||||
} else if(rec.getDoesDryFireAfterAuto(stack)) {
|
||||
//if refire after dry is allowed, switch to COOLDOWN which will trigger a refire, otherwise switch to DRAWING
|
||||
ItemGunBaseNT.setState(stack, gunIndex, rec.getRefireAfterDry(stack) ? GunState.COOLDOWN : GunState.DRAWING);
|
||||
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getDelayAfterDryFire(stack));
|
||||
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE_DRY, gunIndex);
|
||||
} else*/ {
|
||||
//if not, revert to idle
|
||||
} else {
|
||||
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
|
||||
ItemGunBaseNT.setTimer(stack, gunIndex, 0);
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ public class Lego {
|
||||
|
||||
if(rec.getDoesDryFire(stack)) {
|
||||
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE_DRY, index);
|
||||
ItemGunBaseNT.setState(stack, index, GunState.DRAWING);
|
||||
ItemGunBaseNT.setState(stack, index, rec.getDoesDryFireAfterAuto(stack) ? GunState.COOLDOWN : GunState.DRAWING);
|
||||
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack));
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,6 +30,12 @@ public class LegoClient {
|
||||
renderBulletStandard(Tessellator.instance, 0xFFBF00, 0xFFFFFF, length, false);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_FLECHETTE_BULLET = (bullet, interp) -> {
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
if(length <= 0) return;
|
||||
renderBulletStandard(Tessellator.instance, 0x8C8C8C, 0xCACACA, length, false);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_AP_BULLET = (bullet, interp) -> {
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
if(length <= 0) return;
|
||||
@ -175,4 +181,19 @@ public class LegoClient {
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
if(length > 0) renderBulletStandard(Tessellator.instance, 0x808080, 0xFFF2A7, length * 2, true);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_QD = (bullet, interp) -> {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.rocket_tex);
|
||||
ResourceManager.projectiles.renderPart("Rocket");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glTranslatef(0.375F, 0, 0);
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
if(length > 0) renderBulletStandard(Tessellator.instance, 0x808080, 0xFFF2A7, length * 2, true);
|
||||
};
|
||||
}
|
||||
|
||||
@ -741,5 +741,32 @@ public class Orchestras {
|
||||
if(entity.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.shredderCycle", 0.25F, 1.5F);
|
||||
}
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 1F);
|
||||
if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.fire.shredderCycle", 0.25F, 1.5F);
|
||||
}
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 32) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
}
|
||||
if(type == AnimType.INSPECT) {
|
||||
if(timer == 2) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magRemove", 1F, 1F);
|
||||
if(timer == 28) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.magInsert", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_QUADRO = (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);
|
||||
|
||||
if(type == AnimType.RELOAD) {
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.insertCanister", 1F, 1F);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ public class XFactory12ga {
|
||||
ModItems.gun_autoshotgun = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(2_000).draw(10).inspect(33).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(10).auto(true).reload(44).jam(19).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.dmg(15F).delay(10).auto(true).autoAfterDry(true).dryfireAfterAuto(true).reload(44).jam(19).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 20).addConfigs(all))
|
||||
.offset(0.75, -0.125, -0.25)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
@ -339,6 +339,8 @@ public class XFactory12ga {
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -1, 50, IType.SIN_DOWN).addPos(0, 0, 0, 150, IType.SIN_FULL))
|
||||
.addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 18, 100));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 18, 100));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, -8, 0, 250, IType.SIN_UP).addPos(0, -8, 0, 1000).addPos(0, 0, 0, 300))
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(-25, 0, 0, 300, IType.SIN_FULL).addPos(-25, 0, 0, 500).addPos(-27, 0, 0, 100, IType.SIN_DOWN).addPos(-25, 0, 0, 100, IType.SIN_FULL).addPos(-25, 0, 0, 150).addPos(0, 0, 0, 300, IType.SIN_FULL));
|
||||
|
||||
@ -43,7 +43,7 @@ public class XFactoryFlamer {
|
||||
ModItems.gun_flamer = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(20_000).draw(10).inspect(17).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(10F).delay(1).auto(true).reload(90).jam(0)
|
||||
.dmg(10F).delay(1).auto(true).reload(90).jam(17)
|
||||
.mag(new MagazineFullReload(0, 300).addConfigs(flame_diesel))
|
||||
.offset(0.75, -0.0625, -0.25D)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
@ -68,9 +68,9 @@ public class XFactoryFlamer {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
case RELOAD: return ResourceManager.flamethrower_anim.get("Reload");
|
||||
case INSPECT: return new BusAnimation()
|
||||
case INSPECT:
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 45, 250, IType.SIN_FULL).addPos(0, 0, 45, 350).addPos(0, 0, -15, 150, IType.SIN_FULL).addPos(0, 0, 0, 100, IType.SIN_FULL));
|
||||
case JAMMED: return new BusAnimation();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -14,24 +14,52 @@ 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.impl.ItemGunStinger;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.RefStrings;
|
||||
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.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class XFactoryRocket {
|
||||
|
||||
public static BulletConfig rocket_rpzb_he;
|
||||
public static BulletConfig rocket_rpzb_heat;
|
||||
|
||||
public static BulletConfig rocket_qd_he;
|
||||
public static BulletConfig rocket_qd_heat;
|
||||
|
||||
public static Consumer<EntityBulletBaseMK4> LAMBDA_STANDARD_ACCELERATE = (bullet) -> {
|
||||
if(bullet.accel < 7) bullet.accel += 0.4D;
|
||||
};
|
||||
public static Consumer<EntityBulletBaseMK4> LAMBDA_STEERING_ACCELERATE = (bullet) -> {
|
||||
if(bullet.accel < 4) bullet.accel += 0.4D;
|
||||
|
||||
if(bullet.getThrower() == null || !(bullet.getThrower() instanceof EntityPlayer)) return;
|
||||
EntityPlayer player = (EntityPlayer) bullet.getThrower();
|
||||
if(Vec3.createVectorHelper(bullet.posX - player.posX, bullet.posY - player.posY, bullet.posZ - player.posZ).lengthVector() > 100) return;
|
||||
|
||||
if(player.getHeldItem() == null || !(player.getHeldItem().getItem() instanceof ItemGunBaseNT) || !ItemGunBaseNT.getIsAiming(player.getHeldItem())) return;
|
||||
|
||||
MovingObjectPosition mop = Library.rayTrace(player, 200, 1);
|
||||
if(mop == null || mop.hitVec == null) return;
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(mop.hitVec.xCoord - bullet.posX, mop.hitVec.yCoord - bullet.posY, mop.hitVec.zCoord - bullet.posZ);
|
||||
if(vec.lengthVector() < 3) return;
|
||||
vec = vec.normalize();
|
||||
|
||||
double speed = Vec3.createVectorHelper(bullet.motionX, bullet.motionY, bullet.motionZ).lengthVector();
|
||||
|
||||
bullet.motionX = vec.xCoord * speed;
|
||||
bullet.motionY = vec.yCoord * speed;
|
||||
bullet.motionZ = vec.zCoord * speed;
|
||||
};
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
|
||||
Lego.standardExplode(bullet, mop, 5F); bullet.setDead();
|
||||
@ -47,6 +75,10 @@ public class XFactoryRocket {
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STANDARD_ACCELERATE);
|
||||
rocket_rpzb_heat = new BulletConfig().setItem(EnumAmmo.ROCKET_HEAT).setLife(300).setDamage(1.5F).setSelfDamageDelay(10).setVel(0F).setGrav(0D)
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE_HEAT).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STANDARD_ACCELERATE);
|
||||
rocket_qd_he = new BulletConfig().setItem(EnumAmmo.ROCKET_HE).setLife(400).setSelfDamageDelay(10).setVel(0F).setGrav(0D)
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STEERING_ACCELERATE);
|
||||
rocket_qd_heat = new BulletConfig().setItem(EnumAmmo.ROCKET_HEAT).setLife(400).setDamage(1.5F).setSelfDamageDelay(10).setVel(0F).setGrav(0D)
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE_HEAT).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STEERING_ACCELERATE);
|
||||
|
||||
ModItems.gun_panzerschreck = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(300).draw(7).inspect(40).crosshair(Crosshair.L_CIRCUMFLEX)
|
||||
@ -69,6 +101,17 @@ public class XFactoryRocket {
|
||||
.setupStandardConfiguration().ps(LAMBDA_STINGER_SECONDARY_PRESS).rs(LAMBDA_STINGER_SECONDARY_RELEASE)
|
||||
.anim(LAMBDA_PANZERSCHRECK_ANIMS).orchestra(Orchestras.ORCHESTRA_STINGER)
|
||||
).setUnlocalizedName("gun_stinger").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
|
||||
ModItems.gun_quadro = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(300).draw(7).inspect(40).crosshair(Crosshair.L_CIRCUMFLEX).hideCrosshair(false)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(25F).delay(10).reload(55).jam(40).sound("hbm:weapon.rpgShoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 4).addConfigs(rocket_qd_he, rocket_qd_heat))
|
||||
.offset(1, -0.0625 * 1.5, -0.1875D)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_QUADRO_ANIMS).orchestra(Orchestras.ORCHESTRA_QUADRO)
|
||||
).setUnlocalizedName("gun_quadro").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STINGER_SECONDARY_PRESS = (stack, ctx) -> { ItemGunStinger.setIsLockingOn(stack, true); };
|
||||
@ -90,4 +133,20 @@ public class XFactoryRocket {
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_QUADRO_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -0.5, 50).addPos(0, 0, 0, 50));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("RELOAD_ROTATE", new BusAnimationSequence().addPos(0, 0, 60, 500, IType.SIN_FULL).addPos(0, 0, 60, 1500).addPos(0, 0, 0, 750, IType.SIN_FULL))
|
||||
.addBus("RELOAD_PUSH", new BusAnimationSequence().addPos(-1, -1, 0, 0).addPos(-1, -1, 0, 500).addPos(-1, 0, 0, 350).addPos(0, 0, 0, 1000));
|
||||
case JAMMED:
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("RELOAD_ROTATE", new BusAnimationSequence().addPos(0, 0, 60, 750, IType.SIN_FULL).addPos(0, 0, 60, 500).addPos(0, 0, 0, 750, IType.SIN_FULL));
|
||||
}
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@ -578,7 +578,6 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_supershotgun, new ItemRenderWeaponShotty());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_ks23, new ItemRenderWeaponKS23());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flechette, new ItemRenderWeaponObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_quadro, new ItemRenderWeaponQuadro());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_sauer, new ItemRenderWeaponSauer());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_vortex, new ItemRenderWeaponVortex());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_thompson, new ItemRenderWeaponThompson());
|
||||
|
||||
@ -810,7 +810,6 @@ public class ResourceManager {
|
||||
public static final IModelCustom shotty = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/supershotty.obj"));
|
||||
public static final IModelCustom ks23 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/ks23.obj"));
|
||||
public static final IModelCustom flechette = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flechette.obj"));
|
||||
public static final IModelCustom quadro = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/quadro.obj"));
|
||||
public static final IModelCustom sauergun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/sauergun.obj"));
|
||||
public static final IModelCustom vortex = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/vortex.obj"));
|
||||
public static final IModelCustom thompson = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/thompson.obj"));
|
||||
@ -858,6 +857,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom panzerschreck = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/panzerschreck.obj")).asVBO();
|
||||
public static final IModelCustom g3 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/g3.obj")).asVBO();
|
||||
public static final IModelCustom shredder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/shredder.obj")).asVBO();
|
||||
public static final IModelCustom quadro = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/quadro.obj"));
|
||||
|
||||
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"));
|
||||
@ -929,8 +929,6 @@ public class ResourceManager {
|
||||
public static final ResourceLocation flechette_drum = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_drum.png");
|
||||
public static final ResourceLocation flechette_trigger = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_trigger.png");
|
||||
public static final ResourceLocation flechette_stock = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_stock.png");
|
||||
public static final ResourceLocation quadro_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/quadro.png");
|
||||
public static final ResourceLocation quadro_rocket_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/quadro_rocket.png");
|
||||
public static final ResourceLocation sauergun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/sauergun.png");
|
||||
public static final ResourceLocation vortex_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/vortex.png");
|
||||
public static final ResourceLocation thompson_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/thompson.png");
|
||||
@ -987,6 +985,8 @@ public class ResourceManager {
|
||||
public static final ResourceLocation panzerschreck_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/panzerschreck.png");
|
||||
public static final ResourceLocation g3_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3.png");
|
||||
public static final ResourceLocation shredder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/shredder.png");
|
||||
public static final ResourceLocation quadro_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/quadro.png");
|
||||
public static final ResourceLocation quadro_rocket_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/quadro_rocket.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
case INVENTORY:
|
||||
return item.getItem() == ModItems.gun_hk69
|
||||
|| item.getItem() == ModItems.gun_deagle
|
||||
|| item.getItem() == ModItems.gun_flechette || item.getItem() == ModItems.gun_quadro;
|
||||
|| item.getItem() == ModItems.gun_flechette;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
@ -50,9 +50,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
if(item.getItem() == ModItems.gun_deagle)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.universal_bright);
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_tex);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
@ -100,25 +97,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glTranslatef(0.75F, 0.0F, -0.15F);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-25F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
|
||||
if(player.isSneaking()) {
|
||||
GL11.glRotatef(5F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(1.0F, 0.5F, 0.3F);
|
||||
}
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("QUADRO_RECOIL");
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
double[] reload = HbmAnimations.getRelevantTransformation("QUADRO_RELOAD_ROTATE");
|
||||
GL11.glRotated(reload[2], 1, 0, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -144,13 +122,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glTranslatef(-1.4F, -0.55F, 0.0F);
|
||||
GL11.glScaled(0.125, 0.125, 0.125);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glRotatef(20F, 1.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.4F, -0.35F, -0.4F);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -173,12 +144,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glScaled(0.125, 0.125, 0.125);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
@ -208,14 +173,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glRotatef(-45F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glScaled(4.5, 4.5, -4.5);
|
||||
GL11.glTranslatef(1.0F, 2.5F, 0.0F);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-45F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
@ -236,12 +193,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
if(item.getItem() == ModItems.gun_flechette) {
|
||||
renderFlechette();
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.quadro.renderPart("Launcher");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -0,0 +1,142 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
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.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemRenderQuadro extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-2.5F * offset, -3.5F * offset, 2.5F * offset,
|
||||
-1.5F * offset, -3F * offset, 2.5F * offset);
|
||||
}
|
||||
|
||||
protected static String label = ">> <<";
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
double scale = 1.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] reloadPush = HbmAnimations.getRelevantTransformation("RELOAD_PUSH");
|
||||
double[] reloadRotate = HbmAnimations.getRelevantTransformation("RELOAD_ROTATE");
|
||||
|
||||
GL11.glTranslated(0, -1, -1);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 1);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
GL11.glTranslated(0, -1, -1);
|
||||
GL11.glRotated(reloadRotate[2], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 1);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_tex);
|
||||
ResourceManager.quadro.renderPart("Launcher");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
GL11.glTranslated(0, 3, 0);
|
||||
GL11.glRotated(reloadPush[1] * 30, 1, 0, 0);
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glTranslated(0, 0, reloadPush[0] * 3);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_rocket_tex);
|
||||
ResourceManager.quadro.renderPart("Rockets");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(gun.prevAimingProgress >= 1F && gun.aimingProgress >= 1F) {
|
||||
|
||||
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 f3 = 0.04F;
|
||||
GL11.glTranslatef(-0.375F, 2.25F, 0.875F);
|
||||
GL11.glRotated(180D + (System.currentTimeMillis() / 2) % 360D, 0, -1, 0);
|
||||
GL11.glTranslated(-(font.getStringWidth(label) / 2) * f3, 0, 0);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
float variance = 0.7F + player.getRNG().nextFloat() * 0.3F;
|
||||
font.drawString(label, 0, 0, new Color(0F, variance, variance).getRGB());
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
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);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-1, 0.75, 6.5);
|
||||
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], 150, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 7.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, -0.5, -0.25);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 4.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_tex);
|
||||
ResourceManager.quadro.renderPart("Launcher");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -18,7 +18,7 @@ import net.minecraft.util.MathHelper;
|
||||
public class ItemRenderShredder 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) ? 2.5F : -0.5F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
|
||||
@ -4672,9 +4672,9 @@ vt 0.346614 0.210938
|
||||
vt 0.410359 0.273438
|
||||
vt 0.394422 0.304688
|
||||
vt 0.362550 0.304688
|
||||
vt 0.237696 0.108441
|
||||
vt 0.237699 0.233606
|
||||
vt 0.209955 0.233606
|
||||
vt 0.233068 0.109375
|
||||
vt 0.237052 0.234375
|
||||
vt 0.209163 0.234375
|
||||
vt 0.041833 0.109375
|
||||
vt 0.045817 0.234375
|
||||
vt 0.021912 0.109375
|
||||
@ -4880,17 +4880,17 @@ vt 0.286853 0.167969
|
||||
vt 0.286853 0.105469
|
||||
vt 0.362550 0.000000
|
||||
vt 0.410359 0.210938
|
||||
vt 0.213919 0.109255
|
||||
vt 0.209955 0.109255
|
||||
vt 0.204076 0.072280
|
||||
vt 0.246875 0.070815
|
||||
vt 0.213255 0.034654
|
||||
vt 0.237032 0.033840
|
||||
vt 0.231754 0.280238
|
||||
vt 0.215901 0.280238
|
||||
vt 0.237699 0.109255
|
||||
vt 0.255534 0.144228
|
||||
vt 0.255534 0.198632
|
||||
vt 0.213147 0.109375
|
||||
vt 0.209163 0.109375
|
||||
vt 0.205179 0.078125
|
||||
vt 0.241036 0.078125
|
||||
vt 0.213147 0.046875
|
||||
vt 0.233068 0.046875
|
||||
vt 0.231076 0.281250
|
||||
vt 0.215139 0.281250
|
||||
vt 0.237052 0.109375
|
||||
vt 0.254980 0.144531
|
||||
vt 0.254980 0.199219
|
||||
vt 0.039841 0.281250
|
||||
vt 0.023904 0.281250
|
||||
vt 0.017928 0.234375
|
||||
@ -5014,7 +5014,7 @@ vt 0.191235 0.523438
|
||||
vt 0.063745 0.554688
|
||||
vt 0.191235 0.000000
|
||||
vt 0.063745 0.039062
|
||||
vt 0.063745 -0.000000
|
||||
vt 0.063745 0.000000
|
||||
vt 0.545817 0.523438
|
||||
vt 0.561753 0.367188
|
||||
vt 0.561753 0.523438
|
||||
|
||||
@ -227,6 +227,7 @@
|
||||
"weapon.fire.blackPowder": {"category": "player", "sounds": [{"name": "weapon/fire/blackPowder", "stream": false}]},
|
||||
"weapon.fire.flameLoop": {"category": "player", "sounds": [{"name": "weapon/fire/flameLoop", "stream": false}]},
|
||||
"weapon.fire.lockon": {"category": "player", "sounds": [{"name": "weapon/fire/lockon", "stream": false}]},
|
||||
"weapon.fire.shredderCycle": {"category": "player", "sounds": [{"name": "weapon/fire/shredderCycle", "stream": false}]},
|
||||
|
||||
"weapon.reload.boltClose": {"category": "player", "sounds": ["weapon/reload/boltClose"]},
|
||||
"weapon.reload.boltOpen": {"category": "player", "sounds": ["weapon/reload/boltOpen"]},
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user