folly prototype, more alt ammo, bolt action laser pointer

This commit is contained in:
HbmMods 2019-01-13 15:13:27 +01:00
parent 706e5731e3
commit 6f3212ec0a
42 changed files with 669 additions and 22 deletions

View File

@ -129,6 +129,7 @@ chem.NITAN=NITAN-Supertreibstoff mischen
chem.DYN_SCHRAB=Schrabidium-Dynosynthese
chem.DYN_EUPH=Euphemium-Dynosynthese
chem.DYN_DNT=Dineutronium-Dynosynthese
chem.CORDITE=Korditherstellung
item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core
item.record.ss.desc=Valve - Sector Sweep
@ -1361,9 +1362,14 @@ item.ammo_50bmg_incendiary.name=.50 BMG Patrone (Brand)
item.ammo_50bmg_explosive.name=.50 BMG Patrone (Explosiv)
item.ammo_9mm.name=9mm Patrone
item.ammo_9mm_ap.name=9mm Patrone (Panzerbrechend)
item.gun_folly_ammo_taint.name=Silbernes Geschoss (Original)
item.gun_folly_ammo_nuclear.name=Silbernes Geschoss (Atomar)
item.gun_folly_ammo_du.name=Silbernes Geschoss (DU, Nicht-Explosiv)
item.ammo_22lr.name=.22 LR Patrone
item.ammo_22lr_ap.name=.22 LR Patrone (Panzerbrechend)
item.ammo_folly_taint.name=Silbernes Geschoss (Original)
item.ammo_folly_nuclear.name=Silbernes Geschoss (Atomar)
item.ammo_folly_du.name=Silbernes Geschoss (DU, Nicht-Explosiv)
item.ammo_44.name=.44 Magnum Patrone
item.ammo_44_ap.name=.44 Magnum Patrone (Panzerbrechend)
item.ammo_44_pip.name=.44 Magnum Patrone (Güterwagon)
item.cordite.name=Kordit

View File

@ -129,6 +129,7 @@ chem.NITAN=NITAN Super Fuel Mixing
chem.DYN_SCHRAB=Schrabidium Dynosynthesis
chem.DYN_EUPH=Euphemium Dynosynthesis
chem.DYN_DNT=Dineutronium Dynosynthesis
chem.CORDITE=Cordite Production
item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core
item.record.ss.desc=Valve - Sector Sweep
@ -1361,9 +1362,14 @@ item.ammo_50bmg_incendiary.name=.50 BMG Round (Incendiary)
item.ammo_50bmg_explosive.name=.50 BMG Round (Explosive)
item.ammo_9mm.name=9mm Round
item.ammo_9mm_ap.name=9mm Round (Armor Piercing)
item.gun_folly_ammo_taint.name=Silver Bullet (Original)
item.gun_folly_ammo_nuclear.name=Silver Bullet (Nuclear)
item.gun_folly_ammo_du.name=Silver Bullet (DU, Non-Explosive)
item.ammo_22lr.name=.22 LR Round
item.ammo_22lr_ap.name=.22 LR Round (Armor Piercing)
item.ammo_folly.name=Silver Bullet (Original)
item.ammo_folly_nuclear.name=Silver Bullet (Nuclear)
item.ammo_folly_du.name=Silver Bullet (DU, Non-Explosive)
item.ammo_44.name=.44 Magnum Bullet
item.ammo_44_ap.name=.44 Magnum Bullet (Armor Piercing)
item.ammo_44_pip.name=.44 Magnum Bullet (Boxcar)
item.cordite.name=Cordite

View File

@ -93,6 +93,12 @@
"weapon.lacunaeSpinup": {"category": "player", "sounds": [{"name": "weapon/lacunaeSpinup", "stream": false}]},
"weapon.lacunaeSpindown": {"category": "player", "sounds": [{"name": "weapon/lacunaeSpindown", "stream": false}]},
"weapon.lacunaeShoot": {"category": "player", "sounds": [{"name": "weapon/lacunaeShoot", "stream": false}]},
"weapon.follyOpen": {"category": "player", "sounds": [{"name": "weapon/follyOpen", "stream": false}]},
"weapon.follyClose": {"category": "player", "sounds": [{"name": "weapon/follyClose", "stream": false}]},
"weapon.follyReload": {"category": "player", "sounds": [{"name": "weapon/follyReload", "stream": false}]},
"weapon.follyBuzzer": {"category": "player", "sounds": [{"name": "weapon/follyBuzzer", "stream": false}]},
"weapon.follyAquired": {"category": "player", "sounds": [{"name": "weapon/follyAquiredAlt", "stream": false}]},
"weapon.follyFire": {"category": "player", "sounds": [{"name": "weapon/follyFire", "stream": false}]},
"weapon.reloadTurret": {"category": "player", "sounds": [{"name": "weapon/reloadTurret", "stream": false}]},
"weapon.switchmode1": {"category": "player", "sounds": [{"name": "weapon/switchmode1", "stream": false}]},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

View File

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 562 B

View File

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 436 B

View File

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

View File

@ -40,6 +40,9 @@ public class EntityBulletBase extends Entity implements IProjectile {
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
this.setSize(0.5F, 0.5F);
this.dataWatcher.updateObject(16, (byte)config.style);
this.dataWatcher.updateObject(17, (byte)config.trail);
}
@Override
@ -74,6 +77,8 @@ public class EntityBulletBase extends Entity implements IProjectile {
protected void entityInit() {
//style
this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
//trail
this.dataWatcher.addObject(17, Byte.valueOf((byte) 0));
}
@Override

View File

@ -45,7 +45,9 @@ public class BulletConfiguration {
//appearance
public int style;
//0: no plinking, 1: bullet plink, 2: grenade plink
//additional appearance data, i.e. particle effects
public int trail;
//0: no plinking, 1: bullet plink, 2: grenade plink, 3: sing boink
public int plink;
}

View File

@ -1,3 +1,8 @@
package com.hbm.interfaces;
public interface IHoldableWeapon { }
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
public interface IHoldableWeapon {
public Crosshair getCrosshair();
}

View File

@ -4932,6 +4932,11 @@ public class MachineRecipes {
list.add(new ItemStack(ModItems.ingot_starmetal, 1));
list.add(new ItemStack(ModItems.catalyst_clay, 32));
break;
case CORDITE:
list.add(new ItemStack(ModItems.niter, 2));
list.add(new ItemStack(Blocks.planks, 1));
list.add(new ItemStack(Items.sugar, 1));
break;
default:
break;
}
@ -5107,6 +5112,9 @@ public class MachineRecipes {
case OIL_SAND:
input[0] = new FluidStack(400, FluidType.BITUMEN);
break;
case CORDITE:
input[0] = new FluidStack(250, FluidType.HEATINGOIL);
break;
default:
break;
}
@ -5212,6 +5220,9 @@ public class MachineRecipes {
case DYN_DNT:
output[0] = new ItemStack(ModItems.ingot_dineutronium, 1);
break;
case CORDITE:
output[0] = new ItemStack(ModItems.cordite, 4);
break;
default:
break;
}

View File

@ -318,6 +318,11 @@ public class ModItems {
public static Item assembly_calamity;
public static Item assembly_lacunae;
public static Item folly_shell;
public static Item folly_bullet;
public static Item folly_bullet_nuclear;
public static Item folly_bullet_du;
public static Item circuit_targeting_tier1;
public static Item circuit_targeting_tier2;
public static Item circuit_targeting_tier3;
@ -735,6 +740,7 @@ public class ModItems {
public static Item pellet_gas;
public static Item magnetron;
public static Item pellet_buckshot;
public static Item pellet_flechette;
public static Item designator;
public static Item designator_range;
@ -799,13 +805,21 @@ public class ModItems {
public static Item ammo_20gauge_caustic;
public static Item ammo_20gauge_shock;
public static Item ammo_20gauge_wither;
public static Item ammo_44;
public static Item ammo_44_ap;
public static Item ammo_44_pip;
public static Item ammo_5mm;
public static Item ammo_5mm_explosive;
public static Item ammo_9mm;
public static Item ammo_9mm_ap;
public static Item ammo_22lr;
public static Item ammo_22lr_ap;
public static Item ammo_50bmg;
public static Item ammo_50bmg_incendiary;
public static Item ammo_50bmg_explosive;
public static Item ammo_folly;
public static Item ammo_folly_nuclear;
public static Item ammo_folly_du;
public static Item gun_rpg;
public static Item gun_rpg_ammo;
@ -842,9 +856,7 @@ public class ModItems {
public static Item gun_avenger;
public static Item gun_lacunae;
public static Item gun_lacunae_ammo;
public static Item gun_folly_ammo_taint;
public static Item gun_folly_ammo_nuclear;
public static Item gun_folly_ammo_du;
public static Item gun_folly;
public static Item gun_fatman;
public static Item gun_proto;
public static Item gun_fatman_ammo;
@ -1845,6 +1857,10 @@ public class ModItems {
assembly_uzi = new Item().setUnlocalizedName("assembly_uzi").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_uzi");
assembly_calamity = new Item().setUnlocalizedName("assembly_calamity").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_calamity");
assembly_lacunae = new Item().setUnlocalizedName("assembly_lacunae").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_lacunae");
folly_shell = new Item().setUnlocalizedName("folly_shell").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_shell");
folly_bullet = new Item().setUnlocalizedName("folly_bullet").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet");
folly_bullet_nuclear = new Item().setUnlocalizedName("folly_bullet_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet_nuclear");
folly_bullet_du = new Item().setUnlocalizedName("folly_bullet_du").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet_du");
wiring_red_copper = new ItemWiring().setUnlocalizedName("wiring_red_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wiring_red_copper");
@ -2146,6 +2162,7 @@ public class ModItems {
pellet_gas = new ItemCustomLore().setUnlocalizedName("pellet_gas").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellet_gas");
magnetron = new ItemCustomLore().setUnlocalizedName("magnetron").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":magnetron_alt");
pellet_buckshot = new Item().setUnlocalizedName("pellet_buckshot").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_lead");
pellet_flechette = new Item().setUnlocalizedName("pellet_flechette").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pellets_flechette");
pellet_schrabidium = new WatzFuel(50000, 140000, 0.975F, 200, 1.05F, 1.05F).setUnlocalizedName("pellet_schrabidium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_schrabidium").setMaxStackSize(1);
pellet_hes = new WatzFuel(108000, 65000, 1F, 85, 1, 1.025F).setUnlocalizedName("pellet_hes").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_hes").setMaxStackSize(1);
@ -2210,6 +2227,14 @@ public class ModItems {
ammo_50bmg = new Item().setUnlocalizedName("ammo_50bmg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg");
ammo_50bmg_incendiary = new Item().setUnlocalizedName("ammo_50bmg_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_incendiary");
ammo_50bmg_explosive = new Item().setUnlocalizedName("ammo_50bmg_explosive").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_explosive");
ammo_44 = new Item().setUnlocalizedName("ammo_44").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44");
ammo_44_ap = new Item().setUnlocalizedName("ammo_44_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_ap");
ammo_44_pip = new Item().setUnlocalizedName("ammo_44_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_pip");
ammo_22lr = new Item().setUnlocalizedName("ammo_22lr").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_22lr");
ammo_22lr_ap = new Item().setUnlocalizedName("ammo_22lr_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_22lr_ap");
ammo_folly = new ItemCustomLore().setUnlocalizedName("ammo_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly");
ammo_folly_nuclear = new ItemCustomLore().setUnlocalizedName("ammo_folly_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly_nuclear");
ammo_folly_du = new ItemCustomLore().setUnlocalizedName("ammo_folly_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly_du");
gun_rpg = new GunRpg().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_new");
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt");
@ -2247,9 +2272,7 @@ public class ModItems {
gun_minigun = new GunLacunae().setUnlocalizedName("gun_minigun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_minigun");
gun_avenger = new GunLacunae().setUnlocalizedName("gun_avenger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_avenger");
gun_lacunae = new GunLacunae().setUnlocalizedName("gun_lacunae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae");
gun_folly_ammo_taint = new ItemCustomLore().setUnlocalizedName("gun_folly_ammo_taint").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_folly_ammo_taint");
gun_folly_ammo_nuclear = new ItemCustomLore().setUnlocalizedName("gun_folly_ammo_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_folly_ammo_nuclear");
gun_folly_ammo_du = new ItemCustomLore().setUnlocalizedName("gun_folly_ammo_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_folly_ammo_du");
gun_folly = new GunFolly().setUnlocalizedName("gun_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_folly");
gun_fatman_ammo = new Item().setUnlocalizedName("gun_fatman_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman_ammo");
gun_fatman = new GunFatman().setMaxDamage(2500).setUnlocalizedName("gun_fatman").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
gun_proto = new GunProtoMirv().setMaxDamage(2500).setUnlocalizedName("gun_proto").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
@ -3310,6 +3333,12 @@ public class ModItems {
GameRegistry.registerItem(assembly_lacunae, assembly_lacunae.getUnlocalizedName());
GameRegistry.registerItem(assembly_calamity, assembly_calamity.getUnlocalizedName());
//Folly Parts
GameRegistry.registerItem(folly_shell, folly_shell.getUnlocalizedName());
GameRegistry.registerItem(folly_bullet, folly_bullet.getUnlocalizedName());
GameRegistry.registerItem(folly_bullet_nuclear, folly_bullet_nuclear.getUnlocalizedName());
GameRegistry.registerItem(folly_bullet_du, folly_bullet_du.getUnlocalizedName());
//Wiring
GameRegistry.registerItem(wiring_red_copper, wiring_red_copper.getUnlocalizedName());
@ -3325,6 +3354,7 @@ public class ModItems {
GameRegistry.registerItem(tritium_deuterium_cake, tritium_deuterium_cake.getUnlocalizedName());
GameRegistry.registerItem(pellet_cluster, pellet_cluster.getUnlocalizedName());
GameRegistry.registerItem(pellet_buckshot, pellet_buckshot.getUnlocalizedName());
GameRegistry.registerItem(pellet_flechette, pellet_flechette.getUnlocalizedName());
GameRegistry.registerItem(pellet_gas, pellet_gas.getUnlocalizedName());
GameRegistry.registerItem(magnetron, magnetron.getUnlocalizedName());
@ -3805,6 +3835,7 @@ public class ModItems {
GameRegistry.registerItem(gun_minigun, gun_minigun.getUnlocalizedName());
GameRegistry.registerItem(gun_avenger, gun_avenger.getUnlocalizedName());
GameRegistry.registerItem(gun_lacunae, gun_lacunae.getUnlocalizedName());
GameRegistry.registerItem(gun_folly, gun_folly.getUnlocalizedName());
GameRegistry.registerItem(gun_b92, gun_b92.getUnlocalizedName());
GameRegistry.registerItem(gun_b93, gun_b93.getUnlocalizedName());
GameRegistry.registerItem(gun_rpg, gun_rpg.getUnlocalizedName());
@ -3859,9 +3890,6 @@ public class ModItems {
GameRegistry.registerItem(gun_revolver_nopip_ammo, gun_revolver_nopip_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_calamity_ammo, gun_calamity_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_lacunae_ammo, gun_lacunae_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_folly_ammo_taint, gun_folly_ammo_taint.getUnlocalizedName());
GameRegistry.registerItem(gun_folly_ammo_nuclear, gun_folly_ammo_nuclear.getUnlocalizedName());
GameRegistry.registerItem(gun_folly_ammo_du, gun_folly_ammo_du.getUnlocalizedName());
GameRegistry.registerItem(gun_b92_ammo, gun_b92_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_rpg_ammo, gun_rpg_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_stinger_ammo, gun_stinger_ammo.getUnlocalizedName());
@ -3896,13 +3924,21 @@ public class ModItems {
GameRegistry.registerItem(ammo_20gauge_caustic, ammo_20gauge_caustic.getUnlocalizedName());
GameRegistry.registerItem(ammo_20gauge_shock, ammo_20gauge_shock.getUnlocalizedName());
GameRegistry.registerItem(ammo_20gauge_wither, ammo_20gauge_wither.getUnlocalizedName());
GameRegistry.registerItem(ammo_44, ammo_44.getUnlocalizedName());
GameRegistry.registerItem(ammo_44_ap, ammo_44_ap.getUnlocalizedName());
GameRegistry.registerItem(ammo_44_pip, ammo_44_pip.getUnlocalizedName());
GameRegistry.registerItem(ammo_5mm, ammo_5mm.getUnlocalizedName());
GameRegistry.registerItem(ammo_5mm_explosive, ammo_5mm_explosive.getUnlocalizedName());
GameRegistry.registerItem(ammo_9mm, ammo_9mm.getUnlocalizedName());
GameRegistry.registerItem(ammo_9mm_ap, ammo_9mm_ap.getUnlocalizedName());
GameRegistry.registerItem(ammo_22lr, ammo_22lr.getUnlocalizedName());
GameRegistry.registerItem(ammo_22lr_ap, ammo_22lr_ap.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg, ammo_50bmg.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_incendiary, ammo_50bmg_incendiary.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_explosive, ammo_50bmg_explosive.getUnlocalizedName());
GameRegistry.registerItem(ammo_folly, ammo_folly.getUnlocalizedName());
GameRegistry.registerItem(ammo_folly_nuclear, ammo_folly_nuclear.getUnlocalizedName());
GameRegistry.registerItem(ammo_folly_du, ammo_folly_du.getUnlocalizedName());
//Turret Ammo
GameRegistry.registerItem(turret_light_ammo, turret_light_ammo.getUnlocalizedName());

View File

@ -76,7 +76,8 @@ public class ItemChemistryTemplate extends Item {
SAS3,
DYN_SCHRAB,
DYN_EUPH,
DYN_DNT;
DYN_DNT,
CORDITE;
public static EnumChemistryTemplate getEnum(int i) {
if(i < EnumChemistryTemplate.values().length)
@ -232,6 +233,8 @@ public class ItemChemistryTemplate extends Item {
return 3*60*20;
case DYN_DNT:
return 5*60*20;
case CORDITE:
return 40;
default:
return 100;
}

View File

@ -0,0 +1,118 @@
package com.hbm.items.weapon;
import com.hbm.interfaces.IHoldableWeapon;
import com.hbm.items.ModItems;
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class GunFolly extends Item implements IHoldableWeapon {
@Override
public Crosshair getCrosshair() {
return Crosshair.L_SPLIT;
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
int state = getState(stack);
if(state == 0) {
world.playSoundAtEntity(player, "hbm:weapon.follyOpen", 1.0F, 1.0F);
setState(stack, 1);
} else if(state == 1) {
if(player.inventory.hasItem(ModItems.ammo_folly)) {
world.playSoundAtEntity(player, "hbm:weapon.follyReload", 1.0F, 1.0F);
player.inventory.consumeInventoryItem(ModItems.ammo_folly);
setState(stack, 2);
} else {
world.playSoundAtEntity(player, "hbm:weapon.follyClose", 1.0F, 1.0F);
setState(stack, 0);
}
} else if(state == 2) {
world.playSoundAtEntity(player, "hbm:weapon.follyClose", 1.0F, 1.0F);
setState(stack, 3);
setTimer(stack, 100);
} else if(state == 3) {
if(getTimer(stack) == 0) {
setState(stack, 0);
world.playSoundAtEntity(player, "hbm:weapon.follyFire", 1.0F, 1.0F);
}
}
return stack;
}
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isCurrentItem) {
if(getState(stack) == 3 && isCurrentItem) {
int timer = getTimer(stack);
if(timer > 0) {
timer--;
if(timer % 20 == 0 && timer != 0)
world.playSoundAtEntity(entity, "hbm:weapon.follyBuzzer", 1.0F, 1.0F);
if(timer == 0)
world.playSoundAtEntity(entity, "hbm:weapon.follyAquired", 1.0F, 1.0F);
setTimer(stack, timer);
}
}
}
//0: closed, empty,
//1: open, empty
//2: open, full
//3: closed, full
public static void setState(ItemStack stack, int i) {
writeNBT(stack, "state", i);
}
public static int getState(ItemStack stack) {
return readNBT(stack, "state");
}
public static void setTimer(ItemStack stack, int i) {
writeNBT(stack, "timer", i);
}
public static int getTimer(ItemStack stack) {
return readNBT(stack, "timer");
}
private static void writeNBT(ItemStack stack, String key, int value) {
if(!stack.hasTagCompound())
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setInteger(key, value);
}
private static int readNBT(ItemStack stack, String key) {
if(!stack.hasTagCompound())
return 0;
return stack.stackTagCompound.getInteger(key);
}
}

View File

@ -8,6 +8,7 @@ import com.hbm.entity.projectile.EntityBullet;
import com.hbm.interfaces.IHoldableWeapon;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
@ -142,4 +143,9 @@ public class GunLacunae extends Item implements IHoldableWeapon {
return multimap;
}
@Override
public Crosshair getCrosshair() {
return Crosshair.L_CIRCLE;
}
}

View File

@ -7,6 +7,7 @@ import com.google.common.collect.Multimap;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.interfaces.IHoldableWeapon;
import com.hbm.items.ModItems;
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
@ -126,4 +127,9 @@ public class GunUZI extends Item implements IHoldableWeapon {
new AttributeModifier(field_111210_e, "Weapon modifier", 2.5D, 0));
return multimap;
}
@Override
public Crosshair getCrosshair() {
return Crosshair.L_CROSS;
}
}

View File

@ -9,6 +9,7 @@ import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IHoldableWeapon;
import com.hbm.packet.GunButtonPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -250,4 +251,9 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
return stack.stackTagCompound.getInteger(key);
}
@Override
public Crosshair getCrosshair() {
return Crosshair.L_CLASSIC;
}
}

View File

@ -253,6 +253,7 @@ public class ClientProxy extends ServerProxy
MinecraftForgeClient.registerItemRenderer(ModItems.gun_minigun, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_avenger, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lacunae, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_folly, new ItemRenderOverkill());
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool());
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_silk, new ItemRenderMultitool());

View File

@ -10,6 +10,7 @@ import com.hbm.lib.Library;
import com.hbm.packet.GunButtonPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.render.misc.RenderScreenOverlay;
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
import com.hbm.saveddata.RadEntitySavedData;
import com.hbm.saveddata.RadiationSavedData;
import com.hbm.sound.MovingSoundChopper;
@ -36,7 +37,7 @@ import net.minecraftforge.client.event.sound.PlaySoundEvent17;
public class ModEventHandlerClient {
@SubscribeEvent
public void onOverlayRender(RenderGameOverlayEvent event) {
public void onOverlayRender(RenderGameOverlayEvent.Pre event) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
@ -54,6 +55,8 @@ public class ModEventHandlerClient {
}
} else if(event.type == ElementType.CROSSHAIRS && player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IHoldableWeapon) {
event.setCanceled(true);
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, ((IHoldableWeapon)player.getHeldItem().getItem()).getCrosshair());
}
}
@ -82,12 +85,12 @@ public class ModEventHandlerClient {
if(event.button == 0 && !item.m1 && !item.m2) {
item.m1 = true;
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(true, (byte) 0));
System.out.println("M1");
//System.out.println("M1");
}
else if(event.button == 1 && !item.m2 && !item.m1) {
item.m2 = true;
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(true, (byte) 1));
System.out.println("M2");
//System.out.println("M2");
}
}

View File

@ -1,5 +1,7 @@
package com.hbm.render.entity;
import java.util.Random;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
@ -32,6 +34,10 @@ public class RenderRocket extends Render {
GL11.glRotatef(rocket.prevRotationPitch + (rocket.rotationPitch - rocket.prevRotationPitch) * p_76986_9_ + 180,
0.0F, 0.0F, 1.0F);
GL11.glScalef(1.5F, 1.5F, 1.5F);
GL11.glRotatef(new Random(rocket.getEntityId()).nextInt(360),
1.0F, 0.0F, 0.0F);
if (rocket instanceof EntityBullet && ((EntityBullet) rocket).getIsChopper()) {
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/emplacer.png"));
@ -156,7 +162,7 @@ public class RenderRocket extends Render {
Tessellator tess = Tessellator.instance;
float red = 0.125F;
float red = 0.25F;
float green = 0.0F;
float blue = 1.0F;

View File

@ -3,6 +3,7 @@ package com.hbm.render.item;
import org.lwjgl.opengl.GL11;
import com.hbm.items.ModItems;
import com.hbm.items.weapon.GunFolly;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.render.model.ModelCalBarrel;
@ -11,6 +12,7 @@ import com.hbm.render.model.ModelCalStock;
import com.hbm.render.model.ModelDash;
import com.hbm.render.model.ModelDefabricator;
import com.hbm.render.model.ModelEuthanasia;
import com.hbm.render.model.ModelFolly;
import com.hbm.render.model.ModelGun;
import com.hbm.render.model.ModelHP;
import com.hbm.render.model.ModelJack;
@ -38,6 +40,7 @@ public class ItemRenderOverkill implements IItemRenderer {
protected ModelTwiGun rgottp;
protected ModelPip pip;
protected ModelLacunae lacunae;
protected ModelFolly folly;
protected ModelCalBarrel barrel;
protected ModelCalStock stock;
@ -56,6 +59,7 @@ public class ItemRenderOverkill implements IItemRenderer {
stock = new ModelCalStock();
saddle = new ModelCalDualStock();
lacunae = new ModelLacunae();
folly = new ModelFolly();
}
@Override
@ -114,6 +118,8 @@ public class ItemRenderOverkill implements IItemRenderer {
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeAvenger.png"));
if(item.getItem() == ModItems.gun_lacunae)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
if(item.getItem() == ModItems.gun_folly)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelFolly.png"));
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
@ -141,6 +147,12 @@ public class ItemRenderOverkill implements IItemRenderer {
GL11.glTranslatef(0.5F, 0.3F, -0.2F);
}
if(item.getItem() == ModItems.gun_folly) {
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(5.0F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-0.2F, 0.0F, -0.2F);
}
if(item.getItem() == ModItems.gun_jack)
powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
if(item.getItem() == ModItems.gun_spark)
@ -182,6 +194,12 @@ public class ItemRenderOverkill implements IItemRenderer {
item.getItem() == ModItems.gun_avenger)
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
if(item.getItem() == ModItems.gun_folly) {
int state = GunFolly.getState(item);
int time = GunFolly.getTimer(item);
folly.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, state, time);
}
GL11.glPopMatrix();
break;
case EQUIPPED:
@ -215,6 +233,8 @@ public class ItemRenderOverkill implements IItemRenderer {
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeAvenger.png"));
if(item.getItem() == ModItems.gun_lacunae)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
if(item.getItem() == ModItems.gun_folly)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelFolly.png"));
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
@ -296,6 +316,12 @@ public class ItemRenderOverkill implements IItemRenderer {
item.getItem() == ModItems.gun_minigun ||
item.getItem() == ModItems.gun_avenger)
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
if(item.getItem() == ModItems.gun_folly) {
int state = GunFolly.getState(item);
int time = GunFolly.getTimer(item);
folly.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, state, time);
}
GL11.glPopMatrix();
break;
case ENTITY:
@ -329,6 +355,8 @@ public class ItemRenderOverkill implements IItemRenderer {
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeAvenger.png"));
if(item.getItem() == ModItems.gun_lacunae)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelLacunaeReal.png"));
if(item.getItem() == ModItems.gun_folly)
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelFolly.png"));
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
@ -392,6 +420,12 @@ public class ItemRenderOverkill implements IItemRenderer {
item.getItem() == ModItems.gun_minigun ||
item.getItem() == ModItems.gun_avenger)
lacunae.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f);
if(item.getItem() == ModItems.gun_folly) {
int state = GunFolly.getState(item);
int time = GunFolly.getTimer(item);
folly.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, state, time);
}
GL11.glPopMatrix();
break;
default: break;

View File

@ -1,5 +1,7 @@
package com.hbm.render.misc;
import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.CROSSHAIRS;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
@ -82,4 +84,48 @@ public class RenderScreenOverlay {
return (int) Math.min(cur / max * scale, scale);
}
public static void renderCustomCrosshairs(ScaledResolution resolution, Gui gui, Crosshair cross) {
int size = cross.size;
Minecraft.getMinecraft().renderEngine.bindTexture(misc);
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0);
gui.drawTexturedModalRect(resolution.getScaledWidth() / 2 - (size / 2), resolution.getScaledHeight() / 2 - (size / 2), cross.x, cross.y, size, size);
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
GL11.glDisable(GL11.GL_BLEND);
}
public enum Crosshair {
CROSS(1, 55, 16),
CIRCLE(19, 55, 16),
SEMI(37, 55, 16),
KRUCK(55, 55, 16),
DUAL(1, 73, 16),
SPLIT(19, 73, 16),
CLASSIC(37, 73, 16),
BOX(55, 73, 16),
L_CROSS(0, 90, 32),
L_KRUCK(32, 90, 32),
L_CLASSIC(64, 90, 32),
L_CIRCLE(96, 90, 32),
L_SPLIT(0, 122, 32),
L_ARROWS(32, 122, 32),
L_BOX(64, 122, 32),
L_CIRCUMFLEX(96, 122, 32),
L_RAD(0, 154, 32);
public int x;
public int y;
public int size;
private Crosshair(int x, int y, int size) {
this.x = x;
this.y = y;
this.size = size;
}
}
}

View File

@ -201,6 +201,25 @@ public class ModelBoltAction extends ModelBase {
Pointer.render(f5);
HandleBottom.render(f5);
HandleGrip.render(f5);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator tessellator = Tessellator.instance;
int color = 0x00FF00;
tessellator.startDrawing(3);
tessellator.setColorOpaque_I(color);
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
tessellator.addVertex(-150, 0, 0);
tessellator.draw();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
}
public void renderAnim(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, float rot, float tran) {

View File

@ -0,0 +1,322 @@
// Date: 13.01.2019 13:32:43
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package com.hbm.render.model;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.Entity;
public class ModelFolly extends ModelBase {
// fields
ModelRenderer SB1;
ModelRenderer SB2;
ModelRenderer SB3;
ModelRenderer SB4;
ModelRenderer SB5;
ModelRenderer SB6;
ModelRenderer SB7;
ModelRenderer SB8;
ModelRenderer SP;
ModelRenderer B1;
ModelRenderer B2;
ModelRenderer B3;
ModelRenderer SF1;
ModelRenderer SF2;
ModelRenderer SF3;
ModelRenderer SF4;
ModelRenderer P1;
ModelRenderer P2;
ModelRenderer P3;
ModelRenderer P4;
ModelRenderer Grip;
ModelRenderer SPointer;
public ModelFolly() {
textureWidth = 64;
textureHeight = 64;
SB1 = new ModelRenderer(this, 0, 0);
SB1.addBox(-16F, -1F, 0F, 16, 1, 3);
SB1.setRotationPoint(0F, 4F, -1.5F);
SB1.setTextureSize(64, 32);
SB1.mirror = true;
setRotation(SB1, 0F, 0F, 0F);
SB2 = new ModelRenderer(this, 0, 16);
SB2.addBox(-16F, -1.5F, 0F, 16, 1, 1);
SB2.setRotationPoint(0F, 4F, 1F);
SB2.setTextureSize(64, 32);
SB2.mirror = true;
setRotation(SB2, 0F, 0F, 0F);
SB3 = new ModelRenderer(this, 0, 18);
SB3.addBox(-16F, -1.5F, 0F, 16, 1, 1);
SB3.setRotationPoint(0F, 4F, -2F);
SB3.setTextureSize(64, 32);
SB3.mirror = true;
setRotation(SB3, 0F, 0F, 0F);
SB4 = new ModelRenderer(this, 0, 8);
SB4.addBox(-16F, -4F, 0F, 16, 3, 1);
SB4.setRotationPoint(0F, 4F, -2.5F);
SB4.setTextureSize(64, 32);
SB4.mirror = true;
setRotation(SB4, 0F, 0F, 0F);
SB5 = new ModelRenderer(this, 0, 12);
SB5.addBox(-16F, -4F, 0F, 16, 3, 1);
SB5.setRotationPoint(0F, 4F, 1.5F);
SB5.setTextureSize(64, 32);
SB5.mirror = true;
setRotation(SB5, 0F, 0F, 0F);
SB6 = new ModelRenderer(this, 0, 20);
SB6.addBox(-16F, -4.5F, 0F, 16, 1, 1);
SB6.setRotationPoint(0F, 4F, 1F);
SB6.setTextureSize(64, 32);
SB6.mirror = true;
setRotation(SB6, 0F, 0F, 0F);
SB7 = new ModelRenderer(this, 0, 22);
SB7.addBox(-16F, -4.5F, 0F, 16, 1, 1);
SB7.setRotationPoint(0F, 4F, -2F);
SB7.setTextureSize(64, 32);
SB7.mirror = true;
setRotation(SB7, 0F, 0F, 0F);
SB8 = new ModelRenderer(this, 0, 4);
SB8.addBox(-16F, -5F, 0F, 16, 1, 3);
SB8.setRotationPoint(0F, 4F, -1.5F);
SB8.setTextureSize(64, 32);
SB8.mirror = true;
setRotation(SB8, 0F, 0F, 0F);
SP = new ModelRenderer(this, 58, 0);
SP.addBox(0F, -4F, 0F, 0, 3, 3);
SP.setRotationPoint(-0.5F, 4F, -1.5F);
SP.setTextureSize(64, 32);
SP.mirror = true;
setRotation(SP, 0F, 0F, 0F);
B1 = new ModelRenderer(this, 0, 40);
B1.addBox(0F, 0F, 0F, 5, 5, 3);
B1.setRotationPoint(0F, -1F, -1.5F);
B1.setTextureSize(64, 32);
B1.mirror = true;
setRotation(B1, 0F, 0F, 0F);
B2 = new ModelRenderer(this, 0, 48);
B2.addBox(0F, 0F, 0F, 5, 3, 5);
B2.setRotationPoint(0F, 0F, -2.5F);
B2.setTextureSize(64, 32);
B2.mirror = true;
setRotation(B2, 0F, 0F, 0F);
B3 = new ModelRenderer(this, 0, 56);
B3.addBox(0F, 0F, 0F, 5, 4, 4);
B3.setRotationPoint(0F, -0.5F, -2F);
B3.setTextureSize(64, 32);
B3.mirror = true;
setRotation(B3, 0F, 0F, 0F);
SF1 = new ModelRenderer(this, 0, 24);
SF1.addBox(-32F, -1.5F, 0F, 16, 1, 3);
SF1.setRotationPoint(0F, 4F, -1.5F);
SF1.setTextureSize(64, 32);
SF1.mirror = true;
setRotation(SF1, 0F, 0F, 0F);
SF2 = new ModelRenderer(this, 0, 28);
SF2.addBox(-32F, -4.5F, 0F, 16, 1, 3);
SF2.setRotationPoint(0F, 4F, -1.5F);
SF2.setTextureSize(64, 32);
SF2.mirror = true;
setRotation(SF2, 0F, 0F, 0F);
SF3 = new ModelRenderer(this, 0, 32);
SF3.addBox(-32F, -4F, 0F, 16, 3, 1);
SF3.setRotationPoint(0F, 4F, -2F);
SF3.setTextureSize(64, 32);
SF3.mirror = true;
setRotation(SF3, 0F, 0F, 0F);
SF4 = new ModelRenderer(this, 0, 36);
SF4.addBox(-32F, -4F, 0F, 16, 3, 1);
SF4.setRotationPoint(0F, 4F, 1F);
SF4.setTextureSize(64, 32);
SF4.mirror = true;
setRotation(SF4, 0F, 0F, 0F);
P1 = new ModelRenderer(this, 58, 6);
P1.addBox(0F, 0F, 0F, 1, 4, 2);
P1.setRotationPoint(5F, 1F, -1F);
P1.setTextureSize(64, 32);
P1.mirror = true;
setRotation(P1, 0F, 0F, 0F);
P2 = new ModelRenderer(this, 52, 0);
P2.addBox(-1F, -2F, 0F, 1, 2, 2);
P2.setRotationPoint(6F, 1F, -1F);
P2.setTextureSize(64, 32);
P2.mirror = true;
setRotation(P2, 0F, 0F, -0.5235988F);
P3 = new ModelRenderer(this, 42, 0);
P3.addBox(0F, 0F, 0F, 1, 1, 4);
P3.setRotationPoint(4.5F, 1F, -2F);
P3.setTextureSize(64, 32);
P3.mirror = true;
setRotation(P3, 0F, 0F, 0F);
P4 = new ModelRenderer(this, 44, 5);
P4.addBox(0F, 0F, 0F, 5, 1, 2);
P4.setRotationPoint(0F, 4F, -1F);
P4.setTextureSize(64, 32);
P4.mirror = true;
setRotation(P4, 0F, 0F, 0F);
Grip = new ModelRenderer(this, 52, 8);
Grip.addBox(0F, 0F, 0F, 2, 4, 1);
Grip.setRotationPoint(2F, 5F, -0.5F);
Grip.setTextureSize(64, 32);
Grip.mirror = true;
setRotation(Grip, 0F, 0F, -0.2617994F);
SPointer = new ModelRenderer(this, 56, 13);
SPointer.addBox(-32F, -0.5F, 0F, 3, 1, 1);
SPointer.setRotationPoint(0F, 4F, -0.5F);
SPointer.setTextureSize(64, 32);
SPointer.mirror = true;
setRotation(SPointer, 0F, 0F, 0F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
SB1.render(f5);
SB2.render(f5);
SB3.render(f5);
SB4.render(f5);
SB5.render(f5);
SB6.render(f5);
SB7.render(f5);
SB8.render(f5);
SP.render(f5);
B1.render(f5);
B2.render(f5);
B3.render(f5);
SF1.render(f5);
SF2.render(f5);
SF3.render(f5);
SF4.render(f5);
P1.render(f5);
P2.render(f5);
P3.render(f5);
P4.render(f5);
Grip.render(f5);
SPointer.render(f5);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, int state, int timer) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
float rotate = (float) (Math.PI * -70D / 180D);
if(state == 1 || state == 2) {
SB1.rotateAngleZ = rotate;
SB2.rotateAngleZ = rotate;
SB3.rotateAngleZ = rotate;
SB4.rotateAngleZ = rotate;
SB5.rotateAngleZ = rotate;
SB6.rotateAngleZ = rotate;
SB7.rotateAngleZ = rotate;
SB8.rotateAngleZ = rotate;
SP.rotateAngleZ = rotate;
SPointer.rotateAngleZ = rotate;
SF1.rotateAngleZ = rotate;
SF2.rotateAngleZ = rotate;
SF3.rotateAngleZ = rotate;
SF4.rotateAngleZ = rotate;
} else {
SB1.rotateAngleZ = 0;
SB2.rotateAngleZ = 0;
SB3.rotateAngleZ = 0;
SB4.rotateAngleZ = 0;
SB5.rotateAngleZ = 0;
SB6.rotateAngleZ = 0;
SB7.rotateAngleZ = 0;
SB8.rotateAngleZ = 0;
SP.rotateAngleZ = 0;
SPointer.rotateAngleZ = 0;
SF1.rotateAngleZ = 0;
SF2.rotateAngleZ = 0;
SF3.rotateAngleZ = 0;
SF4.rotateAngleZ = 0;
}
SB1.render(f5);
SB2.render(f5);
SB3.render(f5);
SB4.render(f5);
SB5.render(f5);
SB6.render(f5);
SB7.render(f5);
SB8.render(f5);
if(state == 2 || state == 3) {
SP.render(f5);
}
B1.render(f5);
B2.render(f5);
B3.render(f5);
SF1.render(f5);
SF2.render(f5);
SF3.render(f5);
SF4.render(f5);
P1.render(f5);
P2.render(f5);
P3.render(f5);
P4.render(f5);
Grip.render(f5);
SPointer.render(f5);
if(state == 3 && timer > -1) {
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
Tessellator tessellator = Tessellator.instance;
int color = 0x00FF00;
if(timer == 0)
color = 0xFF0000;
tessellator.startDrawing(3);
tessellator.setColorOpaque_I(color);
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
tessellator.addVertex(-150, timer, 0);
tessellator.draw();
tessellator.startDrawing(3);
tessellator.setColorOpaque_I(color);
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
tessellator.addVertex(-150, -timer, 0);
tessellator.draw();
tessellator.startDrawing(3);
tessellator.setColorOpaque_I(color);
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
tessellator.addVertex(-150, 0, timer);
tessellator.draw();
tessellator.startDrawing(3);
tessellator.setColorOpaque_I(color);
tessellator.addVertex(-32F / 16F, 0 + 4F / 16F, 0);
tessellator.addVertex(-150, 0, -timer);
tessellator.draw();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
}
}
private void setRotation(ModelRenderer model, float x, float y, float z) {
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}