new bullet assembly textures, more 5.56 variants, updated PMG

This commit is contained in:
HbmMods 2020-06-01 19:43:32 +02:00
parent 0fa447c774
commit b5f093b474
97 changed files with 3657 additions and 246 deletions

View File

@ -763,16 +763,16 @@ item.mechanism_launcher_1.name=Werfermechanismus
item.mechanism_launcher_2.name=Fortgeschrittener Werfermechanismus
item.mechanism_special.name=High-Tech Waffenmechanismus
item.primer_357.name=.357 Magnum-Zündhütchen (x16)
item.primer_44.name=.44 Magnum-Zündhütchen (x16)
item.primer_9.name=Kleinkaliber-Zündhütchen (x24)
item.primer_50.name=Großkaliber-Zündhütchen (x8)
item.primer_buckshot.name=Schrot-Zündhütchen (x8)
item.casing_357.name=.357 Magnum-Hülse (x16)
item.casing_44.name=.44 Magnum-Hülse (x16)
item.casing_9.name=Kleinkaliberhülse (x24)
item.casing_50.name=Großkaliberhülse (x8)
item.casing_buckshot.name=Schrothülse (x8)
item.primer_357.name=.357 Magnum-Zündhütchen (x24)
item.primer_44.name=.44 Magnum-Zündhütchen (x24)
item.primer_9.name=Kleinkaliber-Zündhütchen (x32)
item.primer_50.name=Großkaliber-Zündhütchen (x12)
item.primer_buckshot.name=Schrot-Zündhütchen (x12)
item.casing_357.name=.357 Magnum-Hülse (x24)
item.casing_44.name=.44 Magnum-Hülse (x24)
item.casing_9.name=Kleinkaliberhülse (x32)
item.casing_50.name=Großkaliberhülse (x12)
item.casing_buckshot.name=Schrothülse (x12)
item.assembly_iron.name=Eisenpatronensatz
item.assembly_steel.name=Bleipatronensatz
item.assembly_lead.name=Glaspatronensatz
@ -783,6 +783,7 @@ item.assembly_desh.name=Desh-Patronensatz
item.assembly_pip.name=Verdorbener .44er Patronensatz
item.assembly_nopip.name=.44er Patronensatz
item.assembly_smg.name=9mm Patronensatz
item.assembly_556.name=5.56mm Patronensatz
item.assembly_uzi.name=.22 LR Patronensatz
item.assembly_actionexpress.name=.50 AE Patronensatz
item.assembly_calamity.name=.50 BMG Patronensatz
@ -1466,6 +1467,7 @@ item.gun_proto.name=M42 Nukleares Katapult "Proto MIRV"
item.gun_mirv.name=M42 Nukleares Katapult "Experimentelles MIRV"
item.gun_bf.name=BEL
item.gun_mp40.name=Maschinenpistole
item.gun_flechette.name=Flechet-Gewehr
item.gun_uzi.name=IMI Uzi
item.gun_uzi_silencer.name=IMI Uzi mit Schalldämpfer
item.gun_uzi_saturnite.name=Saturnit-Uzi
@ -1563,15 +1565,27 @@ item.ammo_50bmg.name=.50 BMG Patrone
item.ammo_50bmg_incendiary.name=.50 BMG Patrone (Brand)
item.ammo_50bmg_phosphorus.name=.50 BMG Patrone (WP)
item.ammo_50bmg_explosive.name=.50 BMG Patrone (Explosiv)
item.ammo_50bmg_ap.name=.50 BMG Patrone (AP)
item.ammo_50bmg_du.name=.50 BMG Patrone (DU)
item.ammo_50bmg_star.name=.50 BMG Patrone (Sternenmetall)
item.ammo_9mm.name=9mm Patrone
item.ammo_9mm_ap.name=9mm Patrone (Panzerbrechend)
item.ammo_9mm_du.name=9mm Patrone (DU)
item.ammo_9mm_rocket.name=9mm Rakete
item.ammo_556.name=5.56mm Patrone
item.ammo_556_phosphorus.name=5.56mm Patrone (WP)
item.ammo_556_ap.name=5.56mm Patrone (AP)
item.ammo_556_du.name=5.56mm Patrone (DU)
item.ammo_556_star.name=5.56mm Patrone (Sternenmetall)
item.ammo_556_flechette.name=5.56mm Patrone (Flechet)
item.ammo_556_flechette_incendiary.name=5.56mm Flechetpatrone (Brand)
item.ammo_556_flechette_phosphorus.name=5.56mm Flechetpatrone (Phosphorspitze)
item.ammo_556_flechette_du.name=5.56mm Flechetpatrone (Uran-Penetrator)
item.ammo_556_tracer.name=5.56mm Patrone (Leuchtspur)
item.ammo_556_k.name=5.56mm K-Patrone
item.ammo_22lr.name=.22 lfB Patrone
item.ammo_22lr_ap.name=.22 lfB Patrone (Panzerbrechend)
item.ammo_folly_taint.name=Silbernes Geschoss (Original)
item.ammo_folly.name=Silbernes Geschoss (Original)
item.ammo_folly_nuclear.name=Silbernes Geschoss (Atomar)
item.ammo_folly_du.name=Silbernes Geschoss (DU, Nicht-Explosiv)
item.ammo_357_desh.name=.357 Magnum Deshkugel
@ -1604,6 +1618,8 @@ item.ammo_grenade_concussion.name=40mm Granate (Erschütterung)
item.ammo_grenade_finned.name=40mm Granate (Geflügelt)
item.ammo_grenade_nuclear.name=40mm Granate (Привет)
item.ammo_grenade_sleek.name=40mm Granate (IF-F&E)
item.ammo_grenade_tracer.name=40mm Übungsgranate
item.ammo_grenade_kampf.name=40mm Rakete
item.ammo_fuel.name=Dieselkatusche
item.ammo_fuel_napalm.name=Napalmkatusche
item.ammo_fuel_phosphorus.name=WP-Katusche

View File

@ -763,16 +763,16 @@ item.mechanism_launcher_1.name=Launcher Mechanism
item.mechanism_launcher_2.name=Advanced Launcher Mechanism
item.mechanism_special.name=High-Tech Weapon Mechanism
item.primer_357.name=.357 Magnum Primer (x16)
item.primer_44.name=.44 Magnum Primer (x16)
item.primer_9.name=Small Caliber Primer (x24)
item.primer_50.name=Large Caliber Primer (x8)
item.primer_buckshot.name=Buckshot Primer (x8)
item.casing_357.name=.357 Magnum Casing (x16)
item.casing_44.name=.44 Magnum Casing (x16)
item.casing_9.name=Small Caliber Casing (x24)
item.casing_50.name=Large Caliber Casing (x8)
item.casing_buckshot.name=Buckshot Casing (x8)
item.primer_357.name=.357 Magnum Primer (x24)
item.primer_44.name=.44 Magnum Primer (x24)
item.primer_9.name=Small Caliber Primer (x32)
item.primer_50.name=Large Caliber Primer (x12)
item.primer_buckshot.name=Buckshot Primer (x12)
item.casing_357.name=.357 Magnum Casing (x24)
item.casing_44.name=.44 Magnum Casing (x24)
item.casing_9.name=Small Caliber Casing (x32)
item.casing_50.name=Large Caliber Casing (x12)
item.casing_buckshot.name=Buckshot Casing (x12)
item.assembly_iron.name=Iron Bullet Assembly
item.assembly_steel.name=Lead Bullet Assembly
item.assembly_lead.name=Glass Bullet Assembly
@ -783,6 +783,7 @@ item.assembly_desh.name=Desh Bullet Assembly
item.assembly_pip.name=Tainted Bullet Assembly
item.assembly_nopip.name=.44 Magnum Assembly
item.assembly_smg.name=9mm Assembly
item.assembly_556.name=5.56mm Assembly
item.assembly_uzi.name=.22 LR Assembly
item.assembly_actionexpress.name=.50 AE Assembly
item.assembly_calamity.name=.50 BMG Assembly
@ -1466,6 +1467,7 @@ item.gun_proto.name=M42 Nuclear Catapult "Proto MIRV"
item.gun_mirv.name=M42 Nuclear Catapult "Experimental MIRV"
item.gun_bf.name=BEL
item.gun_mp40.name=Submachine Gun
item.gun_flechette.name=Flechette Rifle
item.gun_uzi.name=IMI Uzi
item.gun_uzi_silencer.name=IMI Uzi with Silencer
item.gun_uzi_saturnite.name=Saturnite Uzi
@ -1563,12 +1565,24 @@ item.ammo_50bmg.name=.50 BMG Round
item.ammo_50bmg_incendiary.name=.50 BMG Round (Incendiary)
item.ammo_50bmg_phosphorus.name=.50 BMG Round (WP)
item.ammo_50bmg_explosive.name=.50 BMG Round (Explosive)
item.ammo_50bmg_ap.name=.50 BMG Round (AP)
item.ammo_50bmg_du.name=.50 BMG Round (DU)
item.ammo_50bmg_star.name=.50 BMG Round (Starmetal)
item.ammo_9mm.name=9mm Round
item.ammo_9mm_ap.name=9mm Round (Armor Piercing)
item.ammo_9mm_du.name=9mm Round (DU)
item.ammo_9mm_rocket.name=9mm Rocket
item.ammo_556.name=5.56mm Round
item.ammo_556_phosphorus.name=5.56mm Round (WP)
item.ammo_556_ap.name=5.56mm Round (AP)
item.ammo_556_du.name=5.56mm Round (DU)
item.ammo_556_star.name=5.56mm Round (Starmetal)
item.ammo_556_flechette.name=5.56mm Flechette Round
item.ammo_556_flechette_incendiary.name=5.56mm Flechette Round (Incendiary)
item.ammo_556_flechette_phosphorus.name=5.56mm Flechette Round (Phosphorus-Tipped)
item.ammo_556_flechette_du.name=5.56mm Flechette Round (Uranium Penetrator)
item.ammo_556_tracer.name=5.56mm Round (Tracer)
item.ammo_556_k.name=5.56mm K-Round
item.ammo_22lr.name=.22 LR Round
item.ammo_22lr_ap.name=.22 LR Round (Armor Piercing)
item.ammo_folly.name=Silver Bullet (Original)
@ -1604,6 +1618,8 @@ item.ammo_grenade_concussion.name=40mm Grenade (Concussion)
item.ammo_grenade_finned.name=40mm Grenade (Finned)
item.ammo_grenade_nuclear.name=40mm Grenade (Привет)
item.ammo_grenade_sleek.name=40mm Grenade (IF-R&D)
item.ammo_grenade_tracer.name=40mm Training Grenade
item.ammo_grenade_kampf.name=40mm Rocket
item.ammo_fuel.name=Diesel Tank
item.ammo_fuel_napalm.name=Napalm Tank
item.ammo_fuel_phosphorus.name=WP Tank

View File

@ -0,0 +1,80 @@
# Blender v2.76 (sub 0) OBJ File: ''
# www.blender.org
o Plane
v -0.250000 0.125000 -0.500000
v 0.250000 0.125000 -0.500000
v 0.500000 0.125000 0.000000
v 0.000000 0.125000 0.500000
v 0.000000 0.000000 0.500000
v -0.500000 0.000000 0.000000
v 0.500000 0.000000 0.000000
v 0.250000 0.000000 -0.500000
v -0.500000 0.125000 0.000000
v -0.250000 0.000000 -0.500000
v 0.250000 0.000000 0.000000
v -0.250000 0.125000 0.000000
v -0.250000 0.000000 0.000000
v 0.250000 0.125000 0.000000
vt 0.494975 0.819349
vt 0.424264 0.819349
vt 0.424264 0.638698
vt 0.141422 1.000000
vt 0.070711 1.000000
vt 0.070711 0.638698
vt 0.700000 0.510958
vt 0.900000 0.255479
vt 1.000000 0.638698
vt 0.353554 1.000000
vt 0.282843 1.000000
vt 0.282843 0.638698
vt 0.000000 1.000000
vt 0.000000 0.638698
vt 0.353554 0.819349
vt 0.353554 0.638698
vt 0.400000 0.255479
vt 0.500000 0.638698
vt 0.200000 0.510958
vt 0.212132 1.000000
vt 0.141422 0.638698
vt 0.212132 0.638698
vt 0.494975 0.638698
vt 0.500000 0.255479
vt 0.700000 0.000000
vt 0.600000 0.638698
vt 1.000000 0.127740
vt 0.500000 0.127740
vt 0.000000 0.255479
vt 0.200000 0.000000
vt 0.100000 0.638698
vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 1.000000 0.000000
vn -0.707100 0.000000 0.707100
vn 0.707100 0.000000 0.707100
vn 0.000000 -1.000000 0.000000
vn -1.000000 0.000000 0.000000
s off
f 6/1/1 9/2/1 12/3/1
f 8/4/2 2/5/2 14/6/2
f 14/7/3 12/8/3 4/9/3
f 5/10/4 4/11/4 9/12/4
f 7/5/5 3/13/5 4/14/5
f 11/2/1 14/15/1 3/16/1
f 11/17/6 5/18/6 13/19/6
f 13/20/7 12/4/7 1/21/7
f 10/22/1 1/12/1 2/11/1
f 13/23/1 6/1/1 12/3/1
f 11/21/2 8/4/2 14/6/2
f 14/7/3 2/24/3 1/25/3
f 4/9/3 3/26/3 14/7/3
f 12/8/3 9/27/3 4/9/3
f 14/7/3 1/25/3 12/8/3
f 6/16/4 5/10/4 9/12/4
f 5/6/5 7/5/5 4/14/5
f 7/3/1 11/2/1 3/16/1
f 11/17/6 7/28/6 5/18/6
f 10/29/6 8/30/6 11/17/6
f 5/18/6 6/31/6 13/19/6
f 13/19/6 10/29/6 11/17/6
f 10/22/7 13/20/7 1/21/7
f 8/20/1 10/22/1 2/11/1

File diff suppressed because it is too large Load Diff

View File

@ -124,6 +124,8 @@
"weapon.flamerReload": {"category": "player", "sounds": [{"name": "weapon/flamerReload", "stream": false}]},
"weapon.stop": {"category": "player", "sounds": ["weapon/stop1", "weapon/stop2"]},
"weapon.bonk": {"category": "player", "sounds": [{"name": "weapon/bonk", "stream": false}]},
"weapon.hksShoot": {"category": "player", "sounds": ["weapon/hksShoot1", "weapon/hksShoot2", "weapon/hksShoot3"]},
"weapon.glauncher": {"category": "player", "sounds": ["weapon/glauncher1", "weapon/glauncher2"]},
"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.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

View File

@ -4,6 +4,13 @@ import com.hbm.blocks.generic.*;
import com.hbm.blocks.bomb.*;
import com.hbm.blocks.fluid.*;
import com.hbm.blocks.machine.*;
import com.hbm.blocks.network.BlockCable;
import com.hbm.blocks.network.BlockConveyor;
import com.hbm.blocks.network.BlockFluidDuct;
import com.hbm.blocks.network.BlockGasDuct;
import com.hbm.blocks.network.BlockOilDuct;
import com.hbm.blocks.network.BlockRFCable;
import com.hbm.blocks.network.CableSwitch;
import com.hbm.blocks.test.*;
import com.hbm.items.block.ItemBlockLore;
import com.hbm.items.block.ItemTaintBlock;
@ -428,6 +435,8 @@ public class ModBlocks {
public static Block gas_duct;
public static Block fluid_duct;
public static Block conveyor;
public static Block barrel_plastic;
public static Block barrel_corroded;
public static Block barrel_iron;
@ -1088,6 +1097,7 @@ public class ModBlocks {
gas_duct_solid = new GasDuctSolid(Material.iron).setBlockName("gas_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_duct_solid");
gas_duct = new BlockGasDuct(Material.iron).setBlockName("gas_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_duct_icon");
fluid_duct = new BlockFluidDuct(Material.iron).setBlockName("fluid_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_icon");
conveyor = new BlockConveyor(Material.iron).setBlockName("conveyor").setHardness(0.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_reiium");
barrel_plastic = new BlockFluidBarrel(Material.iron, 12000).setBlockName("barrel_plastic").setStepSound(Block.soundTypeStone).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_plastic");
barrel_corroded = new BlockFluidBarrel(Material.iron, 6000).setBlockName("barrel_corroded").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_corroded");
@ -1715,13 +1725,7 @@ public class ModBlocks {
GameRegistry.registerBlock(machine_minirtg, machine_minirtg.getUnlocalizedName());
GameRegistry.registerBlock(machine_spp_bottom, machine_spp_bottom.getUnlocalizedName());
GameRegistry.registerBlock(machine_spp_top, machine_spp_top.getUnlocalizedName());
//GameRegistry.registerBlock(machine_rtg_red, machine_rtg_red.getUnlocalizedName());
//GameRegistry.registerBlock(machine_rtg_orange, machine_rtg_orange.getUnlocalizedName());
//GameRegistry.registerBlock(machine_rtg_yellow, machine_rtg_yellow.getUnlocalizedName());
//GameRegistry.registerBlock(machine_rtg_green, machine_rtg_green.getUnlocalizedName());
//GameRegistry.registerBlock(machine_rtg_cyan, machine_rtg_cyan.getUnlocalizedName());
//GameRegistry.registerBlock(machine_rtg_blue, machine_rtg_blue.getUnlocalizedName());
//GameRegistry.registerBlock(machine_rtg_purple, machine_rtg_purple.getUnlocalizedName());
GameRegistry.registerBlock(red_cable, red_cable.getUnlocalizedName());
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
GameRegistry.registerBlock(red_pylon, red_pylon.getUnlocalizedName());
@ -1732,6 +1736,8 @@ public class ModBlocks {
GameRegistry.registerBlock(gas_duct, gas_duct.getUnlocalizedName());
GameRegistry.registerBlock(gas_duct_solid, gas_duct_solid.getUnlocalizedName());
GameRegistry.registerBlock(fluid_duct, fluid_duct.getUnlocalizedName());
GameRegistry.registerBlock(conveyor, conveyor.getUnlocalizedName());
GameRegistry.registerBlock(barrel_plastic, ItemBlockLore.class, barrel_plastic.getUnlocalizedName());
GameRegistry.registerBlock(barrel_corroded, ItemBlockLore.class, barrel_corroded.getUnlocalizedName());
GameRegistry.registerBlock(barrel_iron, ItemBlockLore.class, barrel_iron.getUnlocalizedName());

View File

@ -3,6 +3,7 @@ package com.hbm.blocks.generic;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.MainRegistry;
import com.hbm.world.feature.HugeMush;
import net.minecraft.block.Block;
@ -124,7 +125,7 @@ public class BlockMush extends Block implements IGrowable {
public void updateTick(World world, int x, int y, int z, Random rand)
{
this.checkAndDropBlock(world, x, y, z);
if(world.getBlock(x, y - 1, z) == ModBlocks.waste_earth && rand.nextInt(5) == 0)
if(MainRegistry.enableMycelium && world.getBlock(x, y - 1, z) == ModBlocks.waste_earth && rand.nextInt(5) == 0)
{
world.setBlock(x, y - 1, z, ModBlocks.waste_mycelium);
}

View File

@ -1,6 +1,7 @@
package com.hbm.blocks.machine;
import com.hbm.saveddata.RadiationSavedData;
import com.hbm.tileentity.machine.TileEntityGeiger;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;

View File

@ -1,4 +1,4 @@
package com.hbm.blocks.machine;
package com.hbm.blocks.network;
import com.hbm.tileentity.conductor.TileEntityCable;

View File

@ -0,0 +1,92 @@
package com.hbm.blocks.network;
import com.hbm.entity.item.EntityMovingItem;
import com.hbm.tileentity.machine.TileEntityMachineEPress;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockConveyor extends Block {
public BlockConveyor(Material p_i45394_1_) {
super(p_i45394_1_);
}
@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
if(!world.isRemote) {
if(entity instanceof EntityItem && entity.ticksExisted > 10 && !entity.isDead) {
EntityMovingItem item = new EntityMovingItem(world);
item.setItemStack(((EntityItem)entity).getEntityItem());
item.setPositionAndRotation(x + 0.5, y + 0.125, z + 0.5, 0, 0);
world.spawnEntityInWorld(item);
entity.setDead();
}
}
}
@Override
public int getRenderType() {
return 334086;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
return null;
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
if(i == 0)
{
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
if(i == 1)
{
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}
if(i == 2)
{
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
}
if(i == 3)
{
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
if(itemStack.hasDisplayName())
{
((TileEntityMachineEPress)world.getTileEntity(x, y, z)).setCustomName(itemStack.getDisplayName());
}
}
}

View File

@ -1,4 +1,4 @@
package com.hbm.blocks.machine;
package com.hbm.blocks.network;
import com.hbm.tileentity.conductor.TileEntityFluidDuct;

View File

@ -1,4 +1,4 @@
package com.hbm.blocks.machine;
package com.hbm.blocks.network;
import com.hbm.tileentity.conductor.TileEntityGasDuct;

View File

@ -1,4 +1,4 @@
package com.hbm.blocks.machine;
package com.hbm.blocks.network;
import com.hbm.tileentity.conductor.TileEntityOilDuct;

View File

@ -1,4 +1,4 @@
package com.hbm.blocks.machine;
package com.hbm.blocks.network;
import com.hbm.tileentity.conductor.TileEntityRFDuct;

View File

@ -1,4 +1,4 @@
package com.hbm.blocks.machine;
package com.hbm.blocks.network;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.conductor.TileEntityCableSwitch;

View File

@ -0,0 +1,142 @@
package com.hbm.entity.item;
import com.hbm.blocks.ModBlocks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class EntityMovingItem extends Entity {
public EntityMovingItem(World p_i1582_1_) {
super(p_i1582_1_);
this.setSize(0.5F, 0.25F);
this.noClip = true;
}
public void setItemStack(ItemStack stack) {
this.getDataWatcher().updateObject(10, stack);
this.getDataWatcher().setObjectWatched(10);
}
public ItemStack getItemStack() {
ItemStack stack = this.getDataWatcher().getWatchableObjectItemStack(10);
return stack == null ? new ItemStack(Blocks.stone) : stack;
}
public boolean canBeCollidedWith() {
return true;
}
public boolean interactFirst(EntityPlayer player) {
if(!worldObj.isRemote && player.inventory.addItemStackToInventory(this.getItemStack().copy())) {
this.setDead();
}
return false;
}
public boolean attackEntityFrom(DamageSource source, float amount) {
if(!worldObj.isRemote) {
worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY, posZ, this.getItemStack()));
this.setDead();
}
return true;
}
public boolean canAttackWithItem() {
return true;
}
public boolean hitByEntity(Entity attacker) {
if(attacker instanceof EntityPlayer) {
}
this.setDead();
return false;
}
protected boolean canTriggerWalking() {
return true;
}
private int schedule = 0;
public void onUpdate() {
if(!worldObj.isRemote) {
if(worldObj.getBlock((int)Math.floor(posX), (int)Math.floor(posY), (int)Math.floor(posZ)) != ModBlocks.conveyor) {
this.setDead();
worldObj.spawnEntityInWorld(new EntityItem(worldObj, posX, posY, posZ, this.getItemStack()));
return;
}
}
if(worldObj.getBlock((int)Math.floor(posX), (int)Math.floor(posY), (int)Math.floor(posZ)) == ModBlocks.conveyor) {
if(schedule <= 0) {
ForgeDirection dir = ForgeDirection.getOrientation(worldObj.getBlockMetadata((int)Math.floor(posX), (int)Math.floor(posY), (int)Math.floor(posZ)));
if(worldObj.getBlock((int)Math.floor(posX), (int)Math.floor(posY) + 1, (int)Math.floor(posZ)) == ModBlocks.conveyor && motionY >= 0) {
dir = ForgeDirection.DOWN;
}
if(worldObj.getBlock((int)Math.floor(posX), (int)Math.floor(posY) - 1, (int)Math.floor(posZ)) == ModBlocks.conveyor && motionY <= 0) {
dir = ForgeDirection.UP;
}
double speed = 0.1;
schedule = (int) (1 / speed);
motionX = -speed * dir.offsetX;
motionY = -speed * dir.offsetY;
motionZ = -speed * dir.offsetZ;
}
this.moveEntity(motionX, motionY, motionZ);
schedule--;
}
}
@Override
protected void entityInit() {
this.getDataWatcher().addObjectByDataType(10, 5);
}
@Override
protected void readEntityFromNBT(NBTTagCompound nbt) {
NBTTagCompound compound = nbt.getCompoundTag("Item");
this.setItemStack(ItemStack.loadItemStackFromNBT(compound));
ItemStack stack = getDataWatcher().getWatchableObjectItemStack(10);
schedule = nbt.getInteger("schedule");
if (stack == null || stack.stackSize <= 0)
this.setDead();
}
@Override
protected void writeEntityToNBT(NBTTagCompound nbt) {
if (this.getItemStack() != null)
nbt.setTag("Item", this.getItemStack().writeToNBT(new NBTTagCompound()));
nbt.setInteger("schedule", schedule);
}
}

View File

@ -57,7 +57,7 @@ public class EntityMissileAntiBallistic extends Entity {
List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5));
for(Entity e : list) {
if(e instanceof EntityMissileBaseAdvanced) {
if(e instanceof EntityMissileBaseAdvanced || e instanceof EntityMissileCustom) {
ExplosionLarge.explode(worldObj, posX, posY, posZ, 15F, true, false, true);
this.setDead();
return;
@ -113,7 +113,7 @@ public class EntityMissileAntiBallistic extends Entity {
double closest = 1000D;
for(Entity e : list) {
if(e instanceof EntityMissileBaseAdvanced) {
if(e instanceof EntityMissileBaseAdvanced || e instanceof EntityMissileCustom) {
double dis = Math.sqrt(Math.pow(e.posX - posX, 2) + Math.pow(e.posY - posY, 2) + Math.pow(e.posZ - posZ, 2));
if(dis < closest) {

View File

@ -151,6 +151,11 @@ public class EntityBulletBase extends Entity implements IProjectile {
if(config == null)
config = BulletConfigSyncingUtil.pullConfig(dataWatcher.getWatchableObjectInt(18));
if(config.maxAge == 0) {
this.setDead();
return;
}
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);

View File

@ -55,6 +55,8 @@ public class BulletConfigSyncingUtil {
public static int GRENADE_FINNED = i++;
public static int GRENADE_NUCLEAR = i++;
public static int GRENADE_PHOSPHORUS = i++;
public static int GRENADE_TRACER = i++;
public static int GRENADE_KAMPF = i++;
public static int G12_NORMAL = i++;
public static int G12_INCENDIARY = i++;
@ -85,6 +87,7 @@ public class BulletConfigSyncingUtil {
public static int BMG50_NORMAL = i++;
public static int BMG50_INCENDIARY = i++;
public static int BMG50_EXPLOSIVE = i++;
public static int BMG50_AP = i++;
public static int BMG50_DU = i++;
public static int BMG50_STAR = i++;
public static int BMG50_PHOSPHORUS = i++;
@ -108,6 +111,7 @@ public class BulletConfigSyncingUtil {
public static int G4_EXPLOSIVE = i++;
public static int SPECIAL_OSIPR = i++;
public static int SPECIAL_OSIPR_CHARGED = i++;
public static int SPECIAL_GAUSS = i++;
public static int SPECIAL_GAUSS_CHARGED = i++;
public static int SPECIAL_EMP = i++;
@ -117,6 +121,19 @@ public class BulletConfigSyncingUtil {
public static int FLAMER_WP = i++;
public static int FLAMER_GAS = i++;
public static int R556_NORMAL = i++;
public static int R556_GOLD = i++;
public static int R556_PHOSPHORUS = i++;
public static int R556_AP = i++;
public static int R556_DU = i++;
public static int R556_STAR = i++;
public static int R556_TRACER = i++;
public static int R556_FLECHETTE = i++;
public static int R556_FLECHETTE_INCENDIARY = i++;
public static int R556_FLECHETTE_PHOSPHORUS = i++;
public static int R556_FLECHETTE_DU = i++;
public static int R556_K = i++;
public static int G20_NORMAL_FIRE = i++;
public static int G20_SHRAPNEL_FIRE = i++;
public static int G20_SLUG_FIRE = i++;
@ -177,6 +194,8 @@ public class BulletConfigSyncingUtil {
configSet.put(GRENADE_CONCUSSION, GunGrenadeFactory.getGrenadeConcussionConfig());
configSet.put(GRENADE_FINNED, GunGrenadeFactory.getGrenadeFinnedConfig());
configSet.put(GRENADE_NUCLEAR, GunGrenadeFactory.getGrenadeNuclearConfig());
configSet.put(GRENADE_TRACER, GunGrenadeFactory.getGrenadeTracerConfig());
configSet.put(GRENADE_KAMPF, GunGrenadeFactory.getGrenadeKampfConfig());
configSet.put(G12_NORMAL, Gun12GaugeFactory.get12GaugeConfig());
configSet.put(G12_INCENDIARY, Gun12GaugeFactory.get12GaugeFireConfig());
@ -208,6 +227,7 @@ public class BulletConfigSyncingUtil {
configSet.put(BMG50_INCENDIARY, Gun50BMGFactory.get50BMGFireConfig());
configSet.put(BMG50_PHOSPHORUS, Gun50BMGFactory.get50BMGPhosphorusConfig());
configSet.put(BMG50_EXPLOSIVE, Gun50BMGFactory.get50BMGExplosiveConfig());
configSet.put(BMG50_AP, Gun50BMGFactory.get50BMGAPConfig());
configSet.put(BMG50_DU, Gun50BMGFactory.get50BMGDUConfig());
configSet.put(BMG50_STAR, Gun50BMGFactory.get50BMGStarConfig());
@ -230,6 +250,7 @@ public class BulletConfigSyncingUtil {
configSet.put(G4_EXPLOSIVE, Gun4GaugeFactory.get4GaugeExplosiveConfig());
configSet.put(SPECIAL_OSIPR, GunOSIPRFactory.getPulseConfig());
configSet.put(SPECIAL_OSIPR_CHARGED, GunOSIPRFactory.getPulseChargedConfig());
configSet.put(SPECIAL_GAUSS, GunGaussFactory.getGaussConfig());
configSet.put(SPECIAL_GAUSS_CHARGED, GunGaussFactory.getAltConfig());
configSet.put(SPECIAL_EMP, GunEnergyFactory.getOrbusConfig());
@ -239,6 +260,19 @@ public class BulletConfigSyncingUtil {
configSet.put(FLAMER_WP, GunEnergyFactory.getPhosphorusConfig());
configSet.put(FLAMER_GAS, GunEnergyFactory.getGasConfig());
configSet.put(R556_NORMAL, Gun556mmFactory.get556Config());
configSet.put(R556_GOLD, Gun556mmFactory.get556GoldConfig());
configSet.put(R556_PHOSPHORUS, Gun556mmFactory.get556PhosphorusConfig());
configSet.put(R556_AP, Gun556mmFactory.get556APConfig());
configSet.put(R556_DU, Gun556mmFactory.get556DUConfig());
configSet.put(R556_STAR, Gun556mmFactory.get556StarConfig());
configSet.put(R556_TRACER, Gun556mmFactory.get556TracerConfig());
configSet.put(R556_FLECHETTE, Gun556mmFactory.get556FlechetteConfig());
configSet.put(R556_FLECHETTE_INCENDIARY, Gun556mmFactory.get556FlechetteIncendiaryConfig());
configSet.put(R556_FLECHETTE_PHOSPHORUS, Gun556mmFactory.get556FlechettePhosphorusConfig());
configSet.put(R556_FLECHETTE_DU, Gun556mmFactory.get556FlechetteDUConfig());
configSet.put(R556_K, Gun556mmFactory.get556KConfig());
configSet.put(G20_NORMAL_FIRE, Gun20GaugeFactory.get20GaugeConfig().setToFire(3));
configSet.put(G20_SHRAPNEL_FIRE, Gun20GaugeFactory.get20GaugeShrapnelConfig().setToFire(3));
configSet.put(G20_SLUG_FIRE, Gun20GaugeFactory.get20GaugeSlugConfig().setToFire(3));

View File

@ -62,7 +62,7 @@ public class GunConfiguration {
public List<String> comment = new ArrayList();
//bullet configs for main and alt fire
public List<Integer> config;
public List<Integer> config = new ArrayList();
//crosshair
public Crosshair crosshair;

View File

@ -9,6 +9,7 @@ import java.util.Set;
import com.hbm.inventory.MachineRecipes;
import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemToolAbility;
import com.hbm.main.MainRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.resources.I18n;
@ -39,6 +40,13 @@ public abstract class ToolAbility {
@Override
public void onDig(World world, int x, int y, int z, EntityPlayer player, Block block, int meta, ItemToolAbility tool) {
Block b = world.getBlock(x, y, z);
if(b == Blocks.stone && !MainRegistry.recursiveStone)
return;
if(b == Blocks.netherrack && !MainRegistry.recursiveNetherrack)
return;
List<Integer> indices = Arrays.asList(new Integer[] {0, 1, 2, 3, 4, 5});
Collections.shuffle(indices);
@ -46,21 +54,26 @@ public abstract class ToolAbility {
for(Integer i : indices) {
switch(i) {
case 0: breakExtra(world, x + 1, y, z, x, y, z, player, tool); break;
case 1: breakExtra(world, x - 1, y, z, x, y, z, player, tool); break;
case 2: breakExtra(world, x, y + 1, z, x, y, z, player, tool); break;
case 3: breakExtra(world, x, y - 1, z, x, y, z, player, tool); break;
case 4: breakExtra(world, x, y, z + 1, x, y, z, player, tool); break;
case 5: breakExtra(world, x, y, z - 1, x, y, z, player, tool); break;
case 0: breakExtra(world, x + 1, y, z, x, y, z, player, tool, 0); break;
case 1: breakExtra(world, x - 1, y, z, x, y, z, player, tool, 0); break;
case 2: breakExtra(world, x, y + 1, z, x, y, z, player, tool, 0); break;
case 3: breakExtra(world, x, y - 1, z, x, y, z, player, tool, 0); break;
case 4: breakExtra(world, x, y, z + 1, x, y, z, player, tool, 0); break;
case 5: breakExtra(world, x, y, z - 1, x, y, z, player, tool, 0); break;
}
}
}
private void breakExtra(World world, int x, int y, int z, int refX, int refY, int refZ, EntityPlayer player, ItemToolAbility tool) {
private void breakExtra(World world, int x, int y, int z, int refX, int refY, int refZ, EntityPlayer player, ItemToolAbility tool, int depth) {
if(pos.contains(new ThreeInts(x, y, z)))
return;
depth += 1;
if(depth > MainRegistry.recursionDepth)
return;
pos.add(new ThreeInts(x, y, z));
//don't lose the ref block just yet
@ -91,12 +104,12 @@ public abstract class ToolAbility {
for(Integer i : indices) {
switch(i) {
case 0: breakExtra(world, x + 1, y, z, refX, refY, refZ, player, tool); break;
case 1: breakExtra(world, x - 1, y, z, refX, refY, refZ, player, tool); break;
case 2: breakExtra(world, x, y + 1, z, refX, refY, refZ, player, tool); break;
case 3: breakExtra(world, x, y - 1, z, refX, refY, refZ, player, tool); break;
case 4: breakExtra(world, x, y, z + 1, refX, refY, refZ, player, tool); break;
case 5: breakExtra(world, x, y, z - 1, refX, refY, refZ, player, tool); break;
case 0: breakExtra(world, x + 1, y, z, refX, refY, refZ, player, tool, depth); break;
case 1: breakExtra(world, x - 1, y, z, refX, refY, refZ, player, tool, depth); break;
case 2: breakExtra(world, x, y + 1, z, refX, refY, refZ, player, tool, depth); break;
case 3: breakExtra(world, x, y - 1, z, refX, refY, refZ, player, tool, depth); break;
case 4: breakExtra(world, x, y, z + 1, refX, refY, refZ, player, tool, depth); break;
case 5: breakExtra(world, x, y, z - 1, refX, refY, refZ, player, tool, depth); break;
}
}
}

View File

@ -152,6 +152,7 @@ public class BulletConfigFactory {
bullet.explosive = 2.5F;
bullet.style = BulletConfiguration.STYLE_GRENADE;
bullet.plink = BulletConfiguration.PLINK_GRENADE;
bullet.vPFX = "smoke";
return bullet;
}

View File

@ -50,6 +50,7 @@ public class Gun50BMGFactory {
config.config.add(BulletConfigSyncingUtil.BMG50_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.BMG50_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.BMG50_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.BMG50_AP);
config.config.add(BulletConfigSyncingUtil.BMG50_DU);
config.config.add(BulletConfigSyncingUtil.BMG50_STAR);
@ -86,6 +87,7 @@ public class Gun50BMGFactory {
config.config.add(BulletConfigSyncingUtil.BMG50_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.BMG50_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.BMG50_EXPLOSIVE);
config.config.add(BulletConfigSyncingUtil.BMG50_AP);
config.config.add(BulletConfigSyncingUtil.BMG50_DU);
config.config.add(BulletConfigSyncingUtil.BMG50_STAR);
@ -168,14 +170,28 @@ public class Gun50BMGFactory {
return bullet;
}
public static BulletConfiguration get50BMGAPConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_ap;
bullet.spread *= inaccuracy;
bullet.dmgMin = 30;
bullet.dmgMax = 25;
bullet.wear = 15;
bullet.leadChance = 10;
return bullet;
}
public static BulletConfiguration get50BMGDUConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_50bmg_du;
bullet.spread *= inaccuracy;
bullet.dmgMin = 25;
bullet.dmgMax = 35;
bullet.dmgMin = 40;
bullet.dmgMax = 45;
bullet.wear = 25;
bullet.leadChance = 50;

View File

@ -0,0 +1,329 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletImpactBehavior;
import com.hbm.items.ModItems;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
public class Gun556mmFactory {
public static GunConfiguration getEuphieConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 2;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.hasReloadAnim = false;
config.hasFiringAnim = false;
config.hasSpinup = false;
config.hasSpindown = false;
config.hasSights = false;
config.reloadDuration = 20;
config.firingDuration = 0;
config.ammoCap = 40;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_BOX;
config.durability = 10000;
config.reloadSound = GunConfiguration.RSOUND_MAG;
config.firingSound = "hbm:weapon.hksShoot";
config.reloadSoundEnd = false;
config.name = "Britannian Standard Issue Assault Rifle";
config.manufacturer = "BAE Systems plc";
config.comment.add("Why is this gun so sticky?");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.R556_NORMAL);
config.config.add(BulletConfigSyncingUtil.R556_GOLD);
config.config.add(BulletConfigSyncingUtil.R556_TRACER);
config.config.add(BulletConfigSyncingUtil.R556_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.R556_AP);
config.config.add(BulletConfigSyncingUtil.R556_DU);
config.config.add(BulletConfigSyncingUtil.R556_STAR);
config.config.add(BulletConfigSyncingUtil.R556_K);
return config;
}
public static GunConfiguration getSPIWConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 3;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.hasReloadAnim = false;
config.hasFiringAnim = false;
config.hasSpinup = false;
config.hasSpindown = false;
config.hasSights = true;
config.reloadDuration = 25;
config.firingDuration = 0;
config.ammoCap = 20;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_BOX;
config.durability = 7000;
config.reloadSound = GunConfiguration.RSOUND_MAG;
config.firingSound = "hbm:weapon.hksShoot";
config.reloadSoundEnd = false;
config.name = "H&R SPIW";
config.manufacturer = "Harrington & Richardson";
config.comment.add("Launch some flechettes in the breeze");
config.comment.add("Find his arms nailed to the trees");
config.comment.add("Napalm sticks to kids");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE);
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.R556_FLECHETTE_DU);
config.config.add(BulletConfigSyncingUtil.R556_K);
return config;
}
public static GunConfiguration getGLauncherConfig() {
GunConfiguration config = new GunConfiguration();
config.rateOfFire = 60;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_MANUAL;
config.hasReloadAnim = false;
config.hasFiringAnim = false;
config.hasSpinup = false;
config.hasSpindown = false;
config.hasSights = true;
config.reloadDuration = 40;
config.firingDuration = 0;
config.ammoCap = 0;
config.reloadType = GunConfiguration.RELOAD_NONE;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_CIRCUMFLEX;
config.firingSound = "hbm:weapon.glauncher";
config.reloadSound = GunConfiguration.RSOUND_GRENADE;
config.reloadSoundEnd = false;
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.GRENADE_NORMAL);
config.config.add(BulletConfigSyncingUtil.GRENADE_HE);
config.config.add(BulletConfigSyncingUtil.GRENADE_INCENDIARY);
config.config.add(BulletConfigSyncingUtil.GRENADE_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.GRENADE_CHEMICAL);
config.config.add(BulletConfigSyncingUtil.GRENADE_CONCUSSION);
config.config.add(BulletConfigSyncingUtil.GRENADE_FINNED);
config.config.add(BulletConfigSyncingUtil.GRENADE_SLEEK);
config.config.add(BulletConfigSyncingUtil.GRENADE_NUCLEAR);
config.config.add(BulletConfigSyncingUtil.GRENADE_TRACER);
config.config.add(BulletConfigSyncingUtil.GRENADE_KAMPF);
return config;
}
static float inaccuracy = 2.5F;
public static BulletConfiguration get556Config() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_556;
bullet.spread *= inaccuracy;
bullet.dmgMin = 2;
bullet.dmgMax = 4;
return bullet;
}
public static BulletConfiguration get556GoldConfig() {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_566_gold;
bullet.spread = 0.0F;
return bullet;
}
public static BulletConfiguration get556PhosphorusConfig() {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_phosphorus;
bullet.wear = 15;
bullet.incendiary = 5;
bullet.doesPenetrate = false;
PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true);
eff.getCurativeItems().clear();
bullet.effects = new ArrayList();
bullet.effects.add(new PotionEffect(eff));
bullet.bImpact = new IBulletImpactBehavior() {
@Override
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "vanillaburst");
data.setString("mode", "flame");
data.setInteger("count", 15);
data.setDouble("motion", 0.05D);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bullet.posX, bullet.posY, bullet.posZ), new TargetPoint(bullet.dimension, bullet.posX, bullet.posY, bullet.posZ, 50));
}
};
return bullet;
}
public static BulletConfiguration get556APConfig() {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_ap;
bullet.dmgMin = 4;
bullet.dmgMax = 6;
bullet.wear = 15;
bullet.leadChance = 10;
return bullet;
}
public static BulletConfiguration get556DUConfig() {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_du;
bullet.dmgMin = 8;
bullet.dmgMax = 10;
bullet.wear = 25;
bullet.leadChance = 50;
return bullet;
}
public static BulletConfiguration get556StarConfig() {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_star;
bullet.dmgMin = 15;
bullet.dmgMax = 20;
bullet.wear = 25;
bullet.leadChance = 100;
return bullet;
}
public static BulletConfiguration get556TracerConfig() {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_tracer;
bullet.vPFX = "reddust";
return bullet;
}
public static BulletConfiguration get556FlechetteConfig() {
BulletConfiguration bullet = get556Config();
bullet.ammo = ModItems.ammo_556_flechette;
bullet.dmgMin = 6;
bullet.dmgMax = 8;
bullet.HBRC = 2;
bullet.LBRC = 95;
bullet.wear = 15;
bullet.style = BulletConfiguration.STYLE_FLECHETTE;
bullet.doesPenetrate = false;
return bullet;
}
public static BulletConfiguration get556FlechetteIncendiaryConfig() {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = ModItems.ammo_556_flechette_incendiary;
bullet.incendiary = 5;
return bullet;
}
public static BulletConfiguration get556FlechettePhosphorusConfig() {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = ModItems.ammo_556_flechette_phosphorus;
bullet.incendiary = 5;
PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true);
eff.getCurativeItems().clear();
bullet.effects = new ArrayList();
bullet.effects.add(new PotionEffect(eff));
bullet.bImpact = new IBulletImpactBehavior() {
@Override
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "vanillaburst");
data.setString("mode", "flame");
data.setInteger("count", 15);
data.setDouble("motion", 0.05D);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, bullet.posX, bullet.posY, bullet.posZ), new TargetPoint(bullet.dimension, bullet.posX, bullet.posY, bullet.posZ, 50));
}
};
return bullet;
}
public static BulletConfiguration get556FlechetteDUConfig() {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = ModItems.ammo_556_flechette_du;
bullet.dmgMin = 12;
bullet.dmgMax = 16;
bullet.wear = 25;
bullet.leadChance = 50;
bullet.doesPenetrate = true;
return bullet;
}
public static BulletConfiguration get556KConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_556_k;
bullet.dmgMin = 0;
bullet.dmgMax = 0;
bullet.maxAge = 0;
return bullet;
}
}

View File

@ -47,11 +47,10 @@ public class GunGaussFactory {
config.rateOfFire = 10;
config.roundsPerCycle = 1;
config.gunMode = GunConfiguration.MODE_NORMAL;
config.firingMode = GunConfiguration.FIRE_AUTO;
config.reloadDuration = 20;
config.reloadDuration = 1;
config.firingDuration = 0;
config.ammoCap = 30;
config.reloadType = GunConfiguration.RELOAD_FULL;
config.ammoCap = 0;
config.reloadType = GunConfiguration.RELOAD_NONE;
config.allowsInfinity = true;
config.crosshair = Crosshair.L_ARROWS;

View File

@ -46,7 +46,9 @@ public class GunGrenadeFactory {
config.config.add(BulletConfigSyncingUtil.GRENADE_FINNED);
config.config.add(BulletConfigSyncingUtil.GRENADE_SLEEK);
config.config.add(BulletConfigSyncingUtil.GRENADE_NUCLEAR);
config.durability = 140;
config.config.add(BulletConfigSyncingUtil.GRENADE_TRACER);
config.config.add(BulletConfigSyncingUtil.GRENADE_KAMPF);
config.durability = 300;
return config;
}
@ -166,6 +168,7 @@ public class GunGrenadeFactory {
bullet.ammo = ModItems.ammo_grenade_finned;
bullet.gravity = 0.02;
bullet.explosive = 1.5F;
bullet.trail = 5;
return bullet;
}
@ -181,4 +184,34 @@ public class GunGrenadeFactory {
return bullet;
}
public static BulletConfiguration getGrenadeTracerConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardGrenadeConfig();
bullet.ammo = ModItems.ammo_grenade_tracer;
bullet.velocity = 2.0F;
bullet.wear = 10;
bullet.explosive = 0F;
bullet.trail = 5;
bullet.vPFX = "bluedust";
return bullet;
}
public static BulletConfiguration getGrenadeKampfConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardRocketConfig();
bullet.ammo = ModItems.ammo_grenade_kampf;
bullet.spread = 0.0F;
bullet.gravity = 0.0D;
bullet.wear = 15;
bullet.explosive = 3.5F;
bullet.style = BulletConfiguration.STYLE_GRENADE;
bullet.trail = 4;
bullet.vPFX = "smoke";
return bullet;
}
}

View File

@ -56,11 +56,14 @@ public class GunOSIPRFactory {
config.hasSpindown = false;
config.reloadDuration = 20;
config.firingDuration = 0;
config.ammoCap = 1;
config.ammoCap = 0;
config.reloadType = GunConfiguration.RELOAD_NONE;
config.allowsInfinity = true;
config.firingSound = "hbm:weapon.singFlyby";
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.SPECIAL_OSIPR_CHARGED);
return config;
}
@ -75,6 +78,14 @@ public class GunOSIPRFactory {
bullet.dmgMax = 5;
bullet.trail = 2;
return bullet;
}
public static BulletConfiguration getPulseChargedConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.gun_osipr_ammo2;
return bullet;
}
}

View File

@ -670,9 +670,11 @@ public class MachineRecipes {
if(input.getItem() == ModItems.assembly_uzi)
return new ItemStack(ModItems.ammo_22lr);
if(mODE(input, "ingotGold"))
return new ItemStack(ModItems.gun_mp_ammo);
return new ItemStack(ModItems.ammo_566_gold);
if(input.getItem() == ModItems.assembly_lacunae)
return new ItemStack(ModItems.ammo_5mm);
if(input.getItem() == ModItems.assembly_556)
return new ItemStack(ModItems.ammo_556);
}
if(stamp.getItem() == ModItems.stamp_50) {
@ -753,14 +755,12 @@ public class MachineRecipes {
recipes.put(new Object[] { i_stamps_357, new ItemStack(ModItems.assembly_desh) }, getPressResultNN(i_stamps_357.get(0).getItem(), ModItems.assembly_desh));
recipes.put(new Object[] { i_stamps_44, new ItemStack(ModItems.assembly_nopip) }, getPressResultNN(i_stamps_44.get(0).getItem(), ModItems.assembly_nopip));
//recipes.put(new Object[] { i_stamps_44, new ItemStack(ModItems.assembly_pip) }, getPressResultNN(i_stamps_44.get(0).getItem(), ModItems.assembly_pip));
//recipes.put(new Object[] { i_stamps_44, new ItemStack(ModItems.ammo_rocket) }, getPressResultNN(i_stamps_44.get(0).getItem(), ModItems.ammo_rocket));
recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_smg) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_smg));
recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_uzi) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_uzi));
recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_lacunae) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_lacunae));
recipes.put(new Object[] { i_stamps_9, new ItemStack(Items.gold_ingot) }, getPressResultNN(i_stamps_9.get(0).getItem(), Items.gold_ingot));
//recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.ammo_rocket) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.ammo_rocket));
recipes.put(new Object[] { i_stamps_9, new ItemStack(ModItems.assembly_556) }, getPressResultNN(i_stamps_9.get(0).getItem(), ModItems.assembly_556));
recipes.put(new Object[] { i_stamps_50, new ItemStack(ModItems.assembly_actionexpress) }, getPressResultNN(i_stamps_50.get(0).getItem(), ModItems.assembly_actionexpress));
recipes.put(new Object[] { i_stamps_50, new ItemStack(ModItems.assembly_calamity) }, getPressResultNN(i_stamps_50.get(0).getItem(), ModItems.assembly_calamity));

View File

@ -12,6 +12,7 @@ import com.hbm.handler.guncfg.Gun44MagnumFactory;
import com.hbm.handler.guncfg.Gun4GaugeFactory;
import com.hbm.handler.guncfg.Gun50AEFactory;
import com.hbm.handler.guncfg.Gun50BMGFactory;
import com.hbm.handler.guncfg.Gun556mmFactory;
import com.hbm.handler.guncfg.Gun5mmFactory;
import com.hbm.handler.guncfg.Gun9mmFactory;
import com.hbm.handler.guncfg.GunEnergyFactory;
@ -375,6 +376,7 @@ public class ModItems {
//public static Item assembly_pip;
public static Item assembly_nopip;
public static Item assembly_smg;
public static Item assembly_556;
public static Item assembly_uzi;
public static Item assembly_actionexpress;
public static Item assembly_calamity;
@ -1105,6 +1107,18 @@ public class ModItems {
public static Item ammo_9mm_ap;
public static Item ammo_9mm_du;
public static Item ammo_9mm_rocket;
public static Item ammo_556;
public static Item ammo_566_gold;
public static Item ammo_556_phosphorus;
public static Item ammo_556_ap;
public static Item ammo_556_du;
public static Item ammo_556_star;
public static Item ammo_556_tracer;
public static Item ammo_556_flechette;
public static Item ammo_556_flechette_incendiary;
public static Item ammo_556_flechette_phosphorus;
public static Item ammo_556_flechette_du;
public static Item ammo_556_k;
public static Item ammo_22lr;
public static Item ammo_22lr_ap;
public static Item ammo_50ae;
@ -1115,6 +1129,7 @@ public class ModItems {
public static Item ammo_50bmg_incendiary;
public static Item ammo_50bmg_phosphorus;
public static Item ammo_50bmg_explosive;
public static Item ammo_50bmg_ap;
public static Item ammo_50bmg_du;
public static Item ammo_50bmg_star;
public static Item ammo_folly;
@ -1140,6 +1155,8 @@ public class ModItems {
public static Item ammo_grenade_finned;
public static Item ammo_grenade_sleek;
public static Item ammo_grenade_nuclear;
public static Item ammo_grenade_tracer;
public static Item ammo_grenade_kampf;
public static Item ammo_fuel;
public static Item ammo_fuel_napalm;
public static Item ammo_fuel_phosphorus;
@ -1178,6 +1195,7 @@ public class ModItems {
public static Item gun_revolver_red;
public static Item gun_revolver_nopip_ammo;
public static Item gun_deagle;
public static Item gun_flechette;
public static Item gun_calamity;
public static Item gun_calamity_dual;
public static Item gun_calamity_ammo;
@ -1226,7 +1244,6 @@ public class ModItems {
public static Item gun_cryolator;
public static Item gun_cryolator_ammo;
public static Item gun_mp;
public static Item gun_mp_ammo;
public static Item gun_brimstone;
public static Item gun_zomg;
public static Item gun_super_shotgun;
@ -2255,6 +2272,7 @@ public class ModItems {
//assembly_pip = new Item().setUnlocalizedName("assembly_pip").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_pip");
assembly_nopip = new Item().setUnlocalizedName("assembly_nopip").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nopip");
assembly_smg = new Item().setUnlocalizedName("assembly_smg").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_smg");
assembly_556 = new Item().setUnlocalizedName("assembly_556").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_556");
assembly_uzi = new Item().setUnlocalizedName("assembly_uzi").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_uzi");
assembly_actionexpress = new Item().setUnlocalizedName("assembly_actionexpress").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_actionexpress");
assembly_calamity = new Item().setUnlocalizedName("assembly_calamity").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_calamity");
@ -2843,6 +2861,17 @@ public class ModItems {
ammo_9mm_ap = new ItemAmmo().setUnlocalizedName("ammo_9mm_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_9mm_ap");
ammo_9mm_du = new ItemAmmo().setUnlocalizedName("ammo_9mm_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_9mm_du");
ammo_9mm_rocket = new ItemAmmo().setUnlocalizedName("ammo_9mm_rocket").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_9mm_rocket");
ammo_556 = new ItemAmmo().setUnlocalizedName("ammo_556").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556");
ammo_556_phosphorus = new ItemAmmo().setUnlocalizedName("ammo_556_phosphorus").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_phosphorus");
ammo_556_ap = new ItemAmmo().setUnlocalizedName("ammo_556_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_ap");
ammo_556_du = new ItemAmmo().setUnlocalizedName("ammo_556_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_du");
ammo_556_star = new ItemAmmo().setUnlocalizedName("ammo_556_star").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_star");
ammo_556_tracer = new ItemAmmo().setUnlocalizedName("ammo_556_tracer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_tracer");
ammo_556_flechette = new ItemAmmo().setUnlocalizedName("ammo_556_flechette").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_flechette");
ammo_556_flechette_incendiary = new ItemAmmo().setUnlocalizedName("ammo_556_flechette_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_flechette_incendiary");
ammo_556_flechette_phosphorus = new ItemAmmo().setUnlocalizedName("ammo_556_flechette_phosphorus").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_flechette_phosphorus");
ammo_556_flechette_du = new ItemAmmo().setUnlocalizedName("ammo_556_flechette_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_flechette_du");
ammo_556_k = new ItemAmmo().setUnlocalizedName("ammo_556_k").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_556_k");
ammo_50ae = new ItemAmmo().setUnlocalizedName("ammo_50ae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50ae");
ammo_50ae_ap = new ItemAmmo().setUnlocalizedName("ammo_50ae_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50ae_ap");
ammo_50ae_du = new ItemAmmo().setUnlocalizedName("ammo_50ae_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50ae_du");
@ -2851,6 +2880,7 @@ public class ModItems {
ammo_50bmg_incendiary = new ItemAmmo().setUnlocalizedName("ammo_50bmg_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_incendiary");
ammo_50bmg_phosphorus = new ItemAmmo().setUnlocalizedName("ammo_50bmg_phosphorus").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_phosphorus");
ammo_50bmg_explosive = new ItemAmmo().setUnlocalizedName("ammo_50bmg_explosive").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_explosive");
ammo_50bmg_ap = new ItemAmmo().setUnlocalizedName("ammo_50bmg_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_ap");
ammo_50bmg_du = new ItemAmmo().setUnlocalizedName("ammo_50bmg_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_du");
ammo_50bmg_star = new ItemAmmo().setUnlocalizedName("ammo_50bmg_star").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_50bmg_star");
ammo_357_desh = new ItemAmmo().setUnlocalizedName("ammo_357_desh").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_357_desh");
@ -2888,6 +2918,8 @@ public class ModItems {
ammo_grenade_finned = new ItemAmmo().setUnlocalizedName("ammo_grenade_finned").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_finned");
ammo_grenade_sleek = new ItemAmmo().setUnlocalizedName("ammo_grenade_sleek").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_sleek");
ammo_grenade_nuclear = new ItemAmmo().setUnlocalizedName("ammo_grenade_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_nuclear");
ammo_grenade_tracer = new ItemAmmo().setUnlocalizedName("ammo_grenade_tracer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_tracer");
ammo_grenade_kampf = new ItemAmmo().setUnlocalizedName("ammo_grenade_kampf").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_kampf");
ammo_fuel = new ItemAmmo().setUnlocalizedName("ammo_fuel").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel");
ammo_fuel_napalm = new ItemAmmo().setUnlocalizedName("ammo_fuel_napalm").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_napalm");
ammo_fuel_phosphorus = new ItemAmmo().setUnlocalizedName("ammo_fuel_phosphorus").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_phosphorus");
@ -2926,6 +2958,7 @@ public class ModItems {
gun_revolver_silver = new ItemGunBase(Gun44MagnumFactory.getSilverConfig()).setUnlocalizedName("gun_revolver_silver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_silver");
gun_revolver_red = new ItemGunBase(Gun44MagnumFactory.getRedConfig()).setUnlocalizedName("gun_revolver_red").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_red");
gun_deagle = new ItemGunBase(Gun50AEFactory.getDeagleConfig()).setUnlocalizedName("gun_deagle").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_deagle");
gun_flechette = new ItemGunBase(Gun556mmFactory.getSPIWConfig(), Gun556mmFactory.getGLauncherConfig()).setUnlocalizedName("gun_flechette").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_flechette");
gun_calamity_ammo = new ItemCustomLore().setUnlocalizedName("gun_calamity_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_calamity_ammo");
gun_calamity = new ItemGunBase(Gun50BMGFactory.getCalamityConfig()).setUnlocalizedName("gun_calamity").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity");
gun_calamity_dual = new ItemGunBase(Gun50BMGFactory.getSaddleConfig()).setUnlocalizedName("gun_calamity_dual").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity_dual");
@ -2973,8 +3006,8 @@ public class ModItems {
gun_flamer = new ItemGunBase(GunEnergyFactory.getFlamerConfig()).setUnlocalizedName("gun_flamer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_flamer");
gun_cryolator_ammo = new Item().setUnlocalizedName("gun_cryolator_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator_ammo");
gun_cryolator = new GunCryolator().setUnlocalizedName("gun_cryolator").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_cryolator");
gun_mp_ammo = new ItemCustomLore().setUnlocalizedName("gun_mp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm_ammo");
gun_mp = new GunMP().setUnlocalizedName("gun_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm");
ammo_566_gold = new ItemCustomLore().setUnlocalizedName("gun_mp_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm_ammo");
gun_mp = new ItemGunBase(Gun556mmFactory.getEuphieConfig()).setUnlocalizedName("gun_mp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_pm");
gun_brimstone = new GunBrimstone().setUnlocalizedName("gun_brimstone").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_brimstone");
gun_zomg = new GunZOMG().setUnlocalizedName("gun_zomg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_zomg");
gun_revolver_inverted = new GunSuicide().setUnlocalizedName("gun_revolver_inverted").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_inverted");
@ -4145,6 +4178,7 @@ public class ModItems {
//GameRegistry.registerItem(assembly_pip, assembly_pip.getUnlocalizedName());
GameRegistry.registerItem(assembly_nopip, assembly_nopip.getUnlocalizedName());
GameRegistry.registerItem(assembly_smg, assembly_smg.getUnlocalizedName());
GameRegistry.registerItem(assembly_556, assembly_556.getUnlocalizedName());
GameRegistry.registerItem(assembly_uzi, assembly_uzi.getUnlocalizedName());
GameRegistry.registerItem(assembly_lacunae, assembly_lacunae.getUnlocalizedName());
GameRegistry.registerItem(assembly_actionexpress, assembly_actionexpress.getUnlocalizedName());
@ -4812,6 +4846,7 @@ public class ModItems {
GameRegistry.registerItem(gun_revolver_silver, gun_revolver_silver.getUnlocalizedName());
GameRegistry.registerItem(gun_revolver_red, gun_revolver_red.getUnlocalizedName());
GameRegistry.registerItem(gun_deagle, gun_deagle.getUnlocalizedName());
GameRegistry.registerItem(gun_flechette, gun_flechette.getUnlocalizedName());
GameRegistry.registerItem(gun_calamity, gun_calamity.getUnlocalizedName());
GameRegistry.registerItem(gun_calamity_dual, gun_calamity_dual.getUnlocalizedName());
GameRegistry.registerItem(gun_minigun, gun_minigun.getUnlocalizedName());
@ -4895,7 +4930,6 @@ public class ModItems {
GameRegistry.registerItem(gun_osipr_ammo2, gun_osipr_ammo2.getUnlocalizedName());
GameRegistry.registerItem(gun_immolator_ammo, gun_immolator_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_cryolator_ammo, gun_cryolator_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_mp_ammo, gun_mp_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_emp_ammo, gun_emp_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_jack_ammo, gun_jack_ammo.getUnlocalizedName());
GameRegistry.registerItem(gun_spark_ammo, gun_spark_ammo.getUnlocalizedName());
@ -4937,6 +4971,18 @@ public class ModItems {
GameRegistry.registerItem(ammo_9mm_ap, ammo_9mm_ap.getUnlocalizedName());
GameRegistry.registerItem(ammo_9mm_du, ammo_9mm_du.getUnlocalizedName());
GameRegistry.registerItem(ammo_9mm_rocket, ammo_9mm_rocket.getUnlocalizedName());
GameRegistry.registerItem(ammo_556, ammo_556.getUnlocalizedName());
GameRegistry.registerItem(ammo_566_gold, ammo_566_gold.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_phosphorus, ammo_556_phosphorus.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_ap, ammo_556_ap.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_du, ammo_556_du.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_star, ammo_556_star.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_tracer, ammo_556_tracer.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_flechette, ammo_556_flechette.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_flechette_incendiary, ammo_556_flechette_incendiary.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_flechette_phosphorus, ammo_556_flechette_phosphorus.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_flechette_du, ammo_556_flechette_du.getUnlocalizedName());
GameRegistry.registerItem(ammo_556_k, ammo_556_k.getUnlocalizedName());
GameRegistry.registerItem(ammo_22lr, ammo_22lr.getUnlocalizedName());
GameRegistry.registerItem(ammo_22lr_ap, ammo_22lr_ap.getUnlocalizedName());
GameRegistry.registerItem(ammo_50ae, ammo_50ae.getUnlocalizedName());
@ -4947,6 +4993,7 @@ public class ModItems {
GameRegistry.registerItem(ammo_50bmg_incendiary, ammo_50bmg_incendiary.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_phosphorus, ammo_50bmg_phosphorus.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_explosive, ammo_50bmg_explosive.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_ap, ammo_50bmg_ap.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_du, ammo_50bmg_du.getUnlocalizedName());
GameRegistry.registerItem(ammo_50bmg_star, ammo_50bmg_star.getUnlocalizedName());
GameRegistry.registerItem(ammo_fuel, ammo_fuel.getUnlocalizedName());
@ -4973,6 +5020,8 @@ public class ModItems {
GameRegistry.registerItem(ammo_grenade_finned, ammo_grenade_finned.getUnlocalizedName());
GameRegistry.registerItem(ammo_grenade_sleek, ammo_grenade_sleek.getUnlocalizedName());
GameRegistry.registerItem(ammo_grenade_nuclear, ammo_grenade_nuclear.getUnlocalizedName());
GameRegistry.registerItem(ammo_grenade_tracer, ammo_grenade_tracer.getUnlocalizedName());
GameRegistry.registerItem(ammo_grenade_kampf, ammo_grenade_kampf.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());

View File

@ -771,7 +771,7 @@ public class ItemCustomLore extends Item {
}
if(this == ModItems.gun_revolver_cursed_ammo || this == ModItems.plate_paa ||
this == ModItems.gun_mp_ammo || this == ModItems.powder_power ||
this == ModItems.ammo_566_gold || this == ModItems.powder_power ||
this == ModItems.ingot_australium || this == ModItems.ingot_weidanium ||
this == ModItems.ingot_reiium || this == ModItems.ingot_unobtainium ||
this == ModItems.ingot_daffergon || this == ModItems.ingot_verticium ||

View File

@ -52,7 +52,7 @@ public class GunBrimstone extends Item {
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_mp_ammo)) && count % 1 == 0) {
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.ammo_566_gold)) && count % 1 == 0) {
EntityLaser laser = new EntityLaser(world, player);

View File

@ -52,7 +52,7 @@ public class GunMP extends Item {
boolean flag = player.capabilities.isCreativeMode
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_mp_ammo)) && count % 3 == 0) {
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.ammo_566_gold)) && count % 3 == 0) {
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 100, 150, false, false);
entityarrow.setDamage(100 + rand.nextInt(50));
@ -63,7 +63,7 @@ public class GunMP extends Item {
if (flag) {
entityarrow.canBePickedUp = 2;
} else {
player.inventory.consumeInventoryItem(ModItems.gun_mp_ammo);
player.inventory.consumeInventoryItem(ModItems.ammo_566_gold);
}
if (!world.isRemote) {

View File

@ -197,6 +197,10 @@ public class ItemAmmo extends Item {
list.add(EnumChatFormatting.BLUE + "+ Increased damage");
list.add(EnumChatFormatting.RED + "- Highly increased wear");
}
if(this == ModItems.ammo_50bmg_ap) {
list.add(EnumChatFormatting.BLUE + "+ Increased damage");
list.add(EnumChatFormatting.RED + "- Increased wear");
}
if(this == ModItems.ammo_50bmg_du) {
list.add(EnumChatFormatting.BLUE + "+ Highly increased damage");
list.add(EnumChatFormatting.YELLOW + "* Heavy metal");
@ -309,6 +313,12 @@ public class ItemAmmo extends Item {
list.add(EnumChatFormatting.BLUE + "+ Increased range");
list.add(EnumChatFormatting.RED + "- Highly increased wear");
}
if(this == ModItems.ammo_grenade_kampf) {
list.add(EnumChatFormatting.BLUE + "+ Rocket Propelled");
list.add(EnumChatFormatting.BLUE + "+ Increased blast radius");
list.add(EnumChatFormatting.BLUE + "+ Increased accuracy");
list.add(EnumChatFormatting.RED + "- Increased wear");
}
//FUEL
if(this == ModItems.ammo_fuel_napalm) {
@ -332,6 +342,62 @@ public class ItemAmmo extends Item {
list.add(EnumChatFormatting.RED + "- Not incendiary");
}
//5.56mm
if(this == ModItems.ammo_556_phosphorus) {
list.add(EnumChatFormatting.BLUE + "+ Induces phosphorus burns");
list.add(EnumChatFormatting.YELLOW + "* Technically a warcrime");
list.add(EnumChatFormatting.RED + "- Increased wear");
list.add(EnumChatFormatting.RED + "- Not penetrating");
}
if(this == ModItems.ammo_556_ap) {
list.add(EnumChatFormatting.BLUE + "+ Increased damage");
list.add(EnumChatFormatting.RED + "- Increased wear");
}
if(this == ModItems.ammo_556_du) {
list.add(EnumChatFormatting.BLUE + "+ Highly increased damage");
list.add(EnumChatFormatting.YELLOW + "* Heavy metal");
list.add(EnumChatFormatting.RED + "- Highly increased wear");
}
if(this == ModItems.ammo_556_star) {
list.add(EnumChatFormatting.BLUE + "+ Highly increased damage");
list.add(EnumChatFormatting.YELLOW + "* Starmetal");
list.add(EnumChatFormatting.RED + "- Highly increased wear");
}
if(this == ModItems.ammo_556_flechette) {
list.add(EnumChatFormatting.BLUE + "+ Increased damage");
list.add(EnumChatFormatting.YELLOW + "* Less bouncy");
list.add(EnumChatFormatting.RED + "- Increased wear");
list.add(EnumChatFormatting.RED + "- Not penetrating");
}
if(this == ModItems.ammo_556_flechette_incendiary) {
list.add(EnumChatFormatting.BLUE + "+ Increased damage");
list.add(EnumChatFormatting.BLUE + "+ Incendiary");
list.add(EnumChatFormatting.YELLOW + "* Less bouncy");
list.add(EnumChatFormatting.RED + "- Increased wear");
list.add(EnumChatFormatting.RED + "- Not penetrating");
}
if(this == ModItems.ammo_556_flechette_phosphorus) {
list.add(EnumChatFormatting.BLUE + "+ Increased damage");
list.add(EnumChatFormatting.BLUE + "+ Induces phosphorus burns");
list.add(EnumChatFormatting.YELLOW + "* Twice the warcrime in a single round!");
list.add(EnumChatFormatting.YELLOW + "* Less bouncy");
list.add(EnumChatFormatting.RED + "- Increased wear");
list.add(EnumChatFormatting.RED + "- Not penetrating");
}
if(this == ModItems.ammo_556_flechette_du) {
list.add(EnumChatFormatting.BLUE + "+ Highly increased damage");
list.add(EnumChatFormatting.BLUE + "+ Penetrating");
list.add(EnumChatFormatting.YELLOW + "* Heavy metal");
list.add(EnumChatFormatting.YELLOW + "* Less bouncy");
list.add(EnumChatFormatting.RED + "- Highly increased wear");
}
if(this == ModItems.ammo_556_tracer) {
list.add(EnumChatFormatting.YELLOW + "* Tracer");
}
if(this == ModItems.ammo_556_k) {
list.add(EnumChatFormatting.YELLOW + "* It's a blank");
}
//FOLLY
if(this == ModItems.ammo_folly) {
list.add(EnumChatFormatting.BLUE + "+ Focused starmetal reaction blast");

View File

@ -108,7 +108,7 @@ public class ItemClip extends Item {
if(this == ModItems.clip_mp)
{
if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mp_ammo, 30)))
if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_566_gold, 30)))
{
//player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp_ammo, 30), false);
}
@ -366,7 +366,7 @@ public class ItemClip extends Item {
if(player.inventory.hasItem(ModItems.gun_cryolator))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_cryolator_ammo, 40));
if(player.inventory.hasItem(ModItems.gun_mp))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mp_ammo, 34));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_566_gold, 34));
if(player.inventory.hasItem(ModItems.gun_zomg))
player.inventory.addItemStackToInventory(new ItemStack(ModItems.nugget_euphemium, 1));
if(player.inventory.hasItem(ModItems.gun_emp))

View File

@ -53,9 +53,6 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isCurrentItem) {
//if(!isCurrentItem)
// return;
if(entity instanceof EntityPlayer) {
isCurrentItem = ((EntityPlayer)entity).getHeldItem() == stack;
@ -81,35 +78,18 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
if(left && right) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(false, (byte) 0));
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(false, (byte) 1));
//setIsMouseDown(stack, false);
//setIsAltDown(stack, false);
m1 = false;
m2 = false;
}
/// HANDLED IN MODEVENTHANDLERCLIENT.JAVA ///
/*if(!left && !right) {
if(clickLeft) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(true, (byte) 0));
//setIsMouseDown(stack, true);
m1 = true;
} else if(clickRight) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(true, (byte) 1));
//setIsAltDown(stack, true);
m2 = true;
}
}*/
if(left && !clickLeft) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(false, (byte) 0));
//setIsMouseDown(stack, false);
m1 = false;
endActionClient(stack, world, entity, true);
}
if(right && !clickRight) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(false, (byte) 1));
//setIsAltDown(stack, false);
m2 = false;
endActionClient(stack, world, entity, false);
}
@ -122,18 +102,6 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
resetReloadCycle(stack);
}
}
} else {
/*if(left) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(false, (byte) 0));
m1 = false;
endActionClient(stack, world, entity, true);
}
if(right) {
PacketDispatcher.wrapper.sendToServer(new GunButtonPacket(false, (byte) 1));
m2 = false;
endActionClient(stack, world, entity, false);
}*/
}
}
@ -154,7 +122,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
fire(stack, world, player);
setDelay(stack, mainConfig.rateOfFire);
useUpAmmo(player, stack);
useUpAmmo(player, stack, true);
}
if(getIsReloading(stack) && isCurrentItem) {
@ -168,17 +136,21 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
if(main && getDelay(stack) == 0 && !getIsReloading(stack) && getItemWear(stack) < mainConfig.durability) {
if(mainConfig.reloadType == mainConfig.RELOAD_NONE) {
return getBeltSize(player, getBeltType(player, stack)) > 0;
return getBeltSize(player, getBeltType(player, stack, main)) > 0;
} else {
return getMag(stack) > 0;
}
}
if(!main && getDelay(stack) == 0 && !getIsReloading(stack) && getItemWear(stack) < mainConfig.durability) {
if(!main && altConfig != null && getDelay(stack) == 0 && !getIsReloading(stack) && getItemWear(stack) < mainConfig.durability) {
//no extra conditions, alt fire has to be handled by every weapon individually in the altFire() method
return true;
if(altConfig.reloadType == mainConfig.RELOAD_NONE) {
return getBeltSize(player, getBeltType(player, stack, main)) > 0;
} else {
return getMag(stack) > 0;
}
}
return false;
@ -190,7 +162,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
BulletConfiguration config = null;
if(mainConfig.reloadType == mainConfig.RELOAD_NONE) {
config = getBeltCfg(player, stack);
config = getBeltCfg(player, stack, true);
} else {
config = BulletConfigSyncingUtil.pullConfig(mainConfig.config.get(getMagType(stack)));
}
@ -213,8 +185,25 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
//unlike fire(), being called does not automatically imply success, some things may still have to be handled before spawning the projectile
protected void altFire(ItemStack stack, World world, EntityPlayer player) {
if(!altConfig.firingSound.isEmpty())
world.playSoundAtEntity(player, altConfig.firingSound, 1.0F, altConfig.firingPitch);
if(altConfig == null)
return;
BulletConfiguration config = getBeltCfg(player, stack, false);
int bullets = config.bulletsMin;
for(int k = 0; k < altConfig.roundsPerCycle; k++) {
if(config.bulletsMax > config.bulletsMin)
bullets += world.rand.nextInt(config.bulletsMax - config.bulletsMin);
for(int i = 0; i < bullets; i++) {
spawnProjectile(world, player, stack, BulletConfigSyncingUtil.getKey(config));
}
setItemWear(stack, getItemWear(stack) + config.wear);
}
world.playSoundAtEntity(player, altConfig.firingSound, 1.0F, altConfig.firingPitch);
}
//spawns the actual projectile, can be overridden to change projectile entity
@ -231,11 +220,14 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
fire(stack, world, player);
setDelay(stack, mainConfig.rateOfFire);
//setMag(stack, getMag(stack) - 1);
useUpAmmo(player, stack);
useUpAmmo(player, stack, main);
}
if(!main && altConfig != null)
if(!main && altConfig != null && tryShoot(stack, world, player, main)) {
altFire(stack, world, player);
setDelay(stack, altConfig.rateOfFire);
useUpAmmo(player, stack, main);
}
}
//called on click (client side, called by update cylce)
@ -474,6 +466,12 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
list.add("Ammo Type: " + I18n.format(ammo.getUnlocalizedName() + ".name"));
if(altConfig != null && altConfig.ammoCap == 0) {
Item ammo2 = BulletConfigSyncingUtil.pullConfig(altConfig.config.get(0)).ammo;
if(ammo != ammo2)
list.add("Secondary Ammo: " + I18n.format(ammo2.getUnlocalizedName() + ".name"));
}
int dura = mainConfig.durability - getItemWear(stack);
if(dura < 0)
@ -503,12 +501,13 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
}
//returns ammo item of belt-weapons
public static Item getBeltType(EntityPlayer player, ItemStack stack) {
public static Item getBeltType(EntityPlayer player, ItemStack stack, boolean main) {
ItemGunBase gun = (ItemGunBase)stack.getItem();
Item ammo = BulletConfigSyncingUtil.pullConfig(gun.mainConfig.config.get(0)).ammo;
GunConfiguration guncfg = main ? gun.mainConfig : (gun.altConfig != null ? gun.altConfig : gun.mainConfig);
Item ammo = BulletConfigSyncingUtil.pullConfig(guncfg.config.get(0)).ammo;
for(Integer config : gun.mainConfig.config) {
for(Integer config : guncfg.config) {
BulletConfiguration cfg = BulletConfigSyncingUtil.pullConfig(config);
@ -522,12 +521,13 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
}
//returns BCFG of belt-weapons
public static BulletConfiguration getBeltCfg(EntityPlayer player, ItemStack stack) {
public static BulletConfiguration getBeltCfg(EntityPlayer player, ItemStack stack, boolean main) {
ItemGunBase gun = (ItemGunBase)stack.getItem();
getBeltType(player, stack);
GunConfiguration guncfg = main ? gun.mainConfig : (gun.altConfig != null ? gun.altConfig : gun.mainConfig);
getBeltType(player, stack, main);
for(Integer config : gun.mainConfig.config) {
for(Integer config : guncfg.config) {
BulletConfiguration cfg = BulletConfigSyncingUtil.pullConfig(config);
@ -536,7 +536,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
}
}
return BulletConfigSyncingUtil.pullConfig(gun.mainConfig.config.get(0));
return BulletConfigSyncingUtil.pullConfig(guncfg.config.get(0));
}
//returns ammo capacity of belt-weapons for current ammo
@ -553,16 +553,26 @@ public class ItemGunBase extends Item implements IHoldableWeapon {
}
//reduces ammo count for mag and belt-based weapons, should be called AFTER firing
public void useUpAmmo(EntityPlayer player, ItemStack stack) {
public void useUpAmmo(EntityPlayer player, ItemStack stack, boolean main) {
if(mainConfig.allowsInfinity && EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0)
if(!main && altConfig == null)
return;
for(int k = 0; k < mainConfig.roundsPerCycle; k++) {
if(mainConfig.reloadType != mainConfig.RELOAD_NONE)
GunConfiguration config = mainConfig;
if(!main)
config = altConfig;
if(config.allowsInfinity && EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0)
return;
for(int k = 0; k < config.roundsPerCycle; k++) {
if(config.reloadType != mainConfig.RELOAD_NONE) {
setMag(stack, getMag(stack) - 1);
else
player.inventory.consumeInventoryItem(getBeltType(player, stack));
} else {
player.inventory.consumeInventoryItem(getBeltType(player, stack, main));
player.inventoryContainer.detectAndSendChanges();
}
}
}

View File

@ -80,7 +80,7 @@ public class ItemGunGauss extends ItemGunBase {
if(c > 0) {
setCharge(stack, c + 1);
if(c % 10 == 1 && c < 140) {
if(c % 10 == 1 && c < 140 && c > 2) {
if(player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) {
player.inventory.consumeInventoryItem(ModItems.gun_xvl1456_ammo);

View File

@ -2,7 +2,6 @@ package com.hbm.items.weapon;
import com.hbm.entity.projectile.EntityCombineBall;
import com.hbm.handler.GunConfiguration;
import com.hbm.items.ModItems;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@ -16,16 +15,14 @@ public class ItemGunOSIPR extends ItemGunBase {
@Override
protected void altFire(ItemStack stack, World world, EntityPlayer player) {
if(player.inventory.hasItem(ModItems.gun_osipr_ammo2)) {
setCharge(stack, 1);
world.playSoundAtEntity(player, "hbm:weapon.osiprCharging", 1.0F, 1F);
}
setCharge(stack, 1);
world.playSoundAtEntity(player, "hbm:weapon.osiprCharging", 1.0F, 1F);
}
protected void updateServer(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {
super.updateServer(stack, world, player, slot, isCurrentItem);
if(!isCurrentItem || !player.inventory.hasItem(ModItems.gun_osipr_ammo2)) {
if(!isCurrentItem) {
setCharge(stack, 0);
return;
}
@ -39,7 +36,6 @@ public class ItemGunOSIPR extends ItemGunBase {
world.playSoundAtEntity(player, altConfig.firingSound, 1.0F, 1F);
setCharge(stack, 0);
setDelay(stack, altConfig.rateOfFire);
player.inventory.consumeInventoryItem(ModItems.gun_osipr_ammo2);
} else if(i > 0)
setCharge(stack, i + 1);

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (3519)";
public static final String VERSION = "1.0.27 BETA (3522)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -21,10 +21,10 @@ import java.util.Map;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.*;
import com.hbm.entity.effect.*;
import com.hbm.entity.grenade.*;
import com.hbm.entity.item.EntityMinecartTest;
import com.hbm.entity.item.EntityMovingItem;
import com.hbm.entity.logic.*;
import com.hbm.entity.missile.*;
import com.hbm.entity.mob.*;
@ -60,6 +60,7 @@ import com.hbm.render.entity.effect.SpillRenderer;
import com.hbm.render.entity.effect.TSmokeRenderer;
import com.hbm.render.entity.item.RenderBomber;
import com.hbm.render.entity.item.RenderMinecartTest;
import com.hbm.render.entity.item.RenderMovingItem;
import com.hbm.render.entity.mob.RenderCyberCrab;
import com.hbm.render.entity.mob.RenderHunterChopper;
import com.hbm.render.entity.mob.RenderNuclearCreeper;
@ -139,6 +140,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerBlockHandler(new RenderBarbedWire());
RenderingRegistry.registerBlockHandler(new RenderAntennaTop());
RenderingRegistry.registerBlockHandler(new RenderConserve());
RenderingRegistry.registerBlockHandler(new RenderConveyor());
MinecraftForgeClient.registerItemRenderer(ModItems.assembly_template, new ItemRenderTemplate());
MinecraftForgeClient.registerItemRenderer(ModItems.chemistry_template, new ItemRenderTemplate());
@ -227,6 +229,7 @@ public class ClientProxy extends ServerProxy
MinecraftForgeClient.registerItemRenderer(ModItems.gun_supershotgun, new ItemRenderWeaponObj());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_ks23, new ItemRenderWeaponObj());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flamer, new ItemRenderWeaponObj());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flechette, new ItemRenderWeaponObj());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBombMulti.class, new RenderBombMulti());
@ -405,6 +408,8 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityMinecartTest.class, new RenderMinecartTest());
RenderingRegistry.registerEntityRenderingHandler(EntityMovingItem.class, new RenderMovingItem());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukePrototype.class, new RenderNukePrototype());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLaunchPad.class, new RenderLaunchPadTier1());
@ -800,6 +805,14 @@ public class ClientProxy extends ServerProxy
fx = new net.minecraft.client.particle.EntityCloudFX(world, x, y, z, mX, mY, mZ);
}
if("reddust".equals(data.getString("mode"))) {
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, (float)mX, (float)mY, (float)mZ);
}
if("bluedust".equals(data.getString("mode"))) {
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.01F, 1F);
}
if(fx != null)
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
}

View File

@ -696,6 +696,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bf, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_paa, 'L', "plateDenseLead", 'W', ModItems.wire_advanced_alloy, 'F', ModItems.gun_mirv }));
GameRegistry.addRecipe(new ItemStack(ModItems.gun_bf_ammo, 1), new Object[] { "AEA", "SHS", "AEA", 'H', ModItems.hull_small_steel, 'A', ModItems.cell_antimatter, 'S', ModItems.cell_anti_schrabidium, 'E', ModItems.powder_power });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp40, 1), new Object[] { "IIM", " SW", " S ", 'S', "plateSteel", 'I', "ingotSteel", 'W', "plankWood", 'M', ModItems.mechanism_rifle_2 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_flechette, 1), new Object[] { "PPM", "TIS", "G ", 'P', "plateSteel", 'M', ModItems.mechanism_rifle_2, 'T', ModItems.hull_small_steel, 'I', "ingotSteel", 'S', ModItems.ingot_polymer, 'G', ModItems.mechanism_launcher_1 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_uboinik, 1), new Object[] { "IIM", "SPW", 'P', "plateSteel", 'I', "ingotSteel", 'W', "plankWood", 'S', Items.stick, 'M', ModItems.mechanism_revolver_2 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_ks23, 1), new Object[] { "PPM", "SWL", 'P', "plateSteel", 'M', ModItems.mechanism_rifle_1, 'S', Items.stick, 'W', ModItems.wire_tungsten, 'L', "logWood" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456, 1), new Object[] { "PBB", "ACC", "PRY", 'P', "plateSteel", 'R', ModItems.redcoil_capacitor, 'A', ModItems.coil_advanced_alloy, 'B', ModItems.battery_generic, 'C', ModItems.coil_advanced_torus, 'Y', ModItems.mechanism_special }));
@ -753,44 +754,47 @@ public class CraftingManager {
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 1), new Object[] { ModItems.gun_bolt_action_ammo });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pellet_flechette, 1), new Object[] { " L ", " L ", "LLL", 'L', "nuggetLead" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_iron, 16), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_iron, 16), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', ModItems.ballistite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_steel, 16), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_steel, 16), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 16), new Object[] { " I", "GC", " P", 'I', ModItems.ingot_u235, 'G', ModItems.cordite, 'C', "paneGlassColorless", 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 16), new Object[] { " I", "GC", " P", 'I', ModItems.ingot_pu239, 'G', ModItems.cordite, 'C', "paneGlassColorless", 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 16), new Object[] { " I", "GC", " P", 'I', ModItems.trinitite, 'G', ModItems.cordite, 'C', "paneGlassColorless", 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 16), new Object[] { " I", "GC", " P", 'I', ModItems.nuclear_waste_tiny, 'G', ModItems.cordite, 'C', "paneGlassColorless", 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_gold, 16), new Object[] { " I", "GC", " P", 'I', "ingotGold", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_schrabidium, 16), new Object[] { " I ", "GCN", " P ", 'I', "ingotSchrabidium", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357, 'N', Items.nether_star }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_nightmare, 16), new Object[] { " I", "GC", " P", 'I', "ingotTungsten", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_desh, 16), new Object[] { " I", "GC", " P", 'I', "ingotDesh", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_smg, 24), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_smg, 24), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_uzi, 24), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_uzi, 24), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lacunae, 24), new Object[] { " I", "GC", " P", 'I', "ingotCopper", 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_nopip, 16), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_44, 'P', ModItems.primer_44 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_nopip, 16), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_44, 'P', ModItems.primer_44 }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_12gauge, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_12gauge, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_4gauge_slug, 8), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_4gauge_slug, 8), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_iron, 24), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_iron, 24), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', ModItems.ballistite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_steel, 24), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_steel, 24), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 24), new Object[] { " I", "GC", " P", 'I', ModItems.ingot_u235, 'G', ModItems.cordite, 'C', "paneGlassColorless", 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 24), new Object[] { " I", "GC", " P", 'I', ModItems.ingot_pu239, 'G', ModItems.cordite, 'C', "paneGlassColorless", 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 24), new Object[] { " I", "GC", " P", 'I', ModItems.trinitite, 'G', ModItems.cordite, 'C', "paneGlassColorless", 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lead, 24), new Object[] { " I", "GC", " P", 'I', ModItems.nuclear_waste_tiny, 'G', ModItems.cordite, 'C', "paneGlassColorless", 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_gold, 24), new Object[] { " I", "GC", " P", 'I', "ingotGold", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_schrabidium, 6), new Object[] { " I ", "GCN", " P ", 'I', "ingotSchrabidium", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357, 'N', Items.nether_star }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_nightmare, 24), new Object[] { " I", "GC", " P", 'I', "ingotTungsten", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_desh, 24), new Object[] { " I", "GC", " P", 'I', "ingotDesh", 'G', ModItems.cordite, 'C', ModItems.casing_357, 'P', ModItems.primer_357 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_smg, 32), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_smg, 32), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_556, 32), new Object[] { " I", "GC", " P", 'I', "ingotSteel", 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_k, 32), new Object[] { "G", "C", "P", 'G', Items.gunpowder, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_k, 32), new Object[] { "G", "C", "P", 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_uzi, 32), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_uzi, 32), new Object[] { " I", "GC", " P", 'I', "ingotIron", 'G', ModItems.ballistite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_lacunae, 32), new Object[] { " I", "GC", " P", 'I', "ingotCopper", 'G', ModItems.cordite, 'C', ModItems.casing_9, 'P', ModItems.primer_9 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_nopip, 24), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_44, 'P', ModItems.primer_44 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_nopip, 24), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_44, 'P', ModItems.primer_44 }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_12gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_12gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_4gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_4gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge_explosive, 4), new Object[] { " I ", "GCL", " P ", 'I', Blocks.tnt, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_4gauge_explosive, 4), new Object[] { " I ", "GCL", " P ", 'I', Blocks.tnt, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'L', ModItems.plate_polymer });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 8), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 8), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_explosive, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_cluster, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_explosive, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_cluster, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_flechette, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_flechette, 8), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_nightmare2_ammo, 8), new Object[] { "I", "C", "P", 'I', ModItems.powder_power, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_calamity, 8), new Object[] { " I ", "GCG", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_actionexpress, 8), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 12), new Object[] { " I ", "GCL", " P ", 'I', "ingotLead", 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_explosive, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_cluster, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_explosive, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_cluster, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_flechette, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_20gauge_flechette, 12), new Object[] { " I ", "GCL", " P ", 'I', ModItems.pellet_flechette, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot, 'L', "plateCopper" }));
GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_nightmare2_ammo, 6), new Object[] { "I", "C", "P", 'I', ModItems.powder_power, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_calamity, 12), new Object[] { " I ", "GCG", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50 }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_actionexpress, 12), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50 }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_12gauge_incendiary, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_12gauge, 'A', ModItems.powder_fire });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_12gauge_shrapnel, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_12gauge, 'A', ModBlocks.gravel_obsidian });
@ -816,11 +820,21 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_incendiary, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.powder_fire });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_phosphorus, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_phosphorus });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_explosive, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', Blocks.tnt });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_dura_steel });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50bmg, 'A', ModItems.ingot_u238 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50bmg_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_50bmg_du, 'A', ModItems.ingot_starmetal });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50ae_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50ae, 'A', ModItems.ingot_dura_steel });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50ae_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_50ae, 'A', ModItems.ingot_u238 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_50ae_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_50ae_du, 'A', ModItems.ingot_starmetal });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_phosphorus, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_556, 'A', ModItems.ingot_phosphorus });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_ap, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_556, 'A', ModItems.ingot_dura_steel });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_556, 'A', ModItems.ingot_u238 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_556_du, 'A', ModItems.ingot_starmetal });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_tracer, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_556, 'A', Items.redstone });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_flechette, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_556, 'A', ModItems.pellet_flechette });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_flechette_incendiary, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_556_flechette, 'A', ModItems.powder_fire });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_flechette_phosphorus, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_556_flechette, 'A', ModItems.ingot_phosphorus });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_556_flechette_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_556_flechette, 'A', ModItems.ingot_u238 });
GameRegistry.addRecipe(new ItemStack(ModItems.folly_bullet, 1), new Object[] { " S ", "STS", "SMS", 'S', ModItems.ingot_starmetal, 'T', ModItems.powder_magic, 'M', ModBlocks.block_meteor });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.folly_bullet_nuclear, 1), new Object[] { " N ", "UTU", "UTU", 'N', ModItems.gun_fatman_ammo, 'U', "ingotIron", 'T', "blockTungsten" }));
@ -846,6 +860,8 @@ public class CraftingManager {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', Items.gunpowder, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', Items.gunpowder, 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade_tracer, 2), new Object[] { " T ", "GCI", " P ", 'T', "dustLapis", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade_tracer, 2), new Object[] { " T ", "GCI", " P ", 'T', "dustLapis", 'G', ModItems.ballistite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_he, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', Blocks.tnt });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_incendiary, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.powder_fire });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_phosphorus, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', ModItems.ingot_phosphorus });
@ -853,6 +869,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_concussion, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', Items.glowstone_dust });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_nuclear, 2), new Object[] { " P ", "GIG", " P ", 'G', ModItems.ammo_grenade, 'I', ModItems.neutron_reflector, 'P', ModItems.nugget_pu239 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_finned, 1), new Object[] { "G", "R", 'G', Items.feather, 'R', ModItems.ammo_grenade });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_kampf, 2), new Object[] { "G", "R", 'G', ModItems.ammo_rocket, 'R', ModItems.ammo_grenade });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_fuel, 1), new Object[] { " P ", "BDB", " P ", 'P', "plateSteel", 'B', ModItems.bolt_tungsten, 'D', ModItems.canister_fuel }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_fuel_napalm, 1), new Object[] { " P ", "BDB", " P ", 'P', "plateSteel", 'B', ModItems.bolt_tungsten, 'D', ModItems.canister_napalm }));

View File

@ -37,11 +37,11 @@ import java.util.Random;
import org.apache.logging.log4j.Logger;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.*;
import com.hbm.creativetabs.*;
import com.hbm.entity.effect.*;
import com.hbm.entity.grenade.*;
import com.hbm.entity.item.EntityMinecartTest;
import com.hbm.entity.item.EntityMovingItem;
import com.hbm.entity.logic.*;
import com.hbm.entity.missile.*;
import com.hbm.entity.mob.*;
@ -327,6 +327,10 @@ public class MainRegistry
public static boolean dropCrys = true;
public static boolean dropDead = true;
public static int recursionDepth = 500;
public static boolean recursiveStone = true;
public static boolean recursiveNetherrack = true;
public static int taintID = 62;
public static int radiationID = 63;
public static int bangID = 64;
@ -703,6 +707,7 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityBuilding.class, "entity_falling_building", 143, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntitySoyuz.class, "entity_soyuz", 144, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntitySoyuzCapsule.class, "entity_soyuz_capsule", 145, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityMovingItem.class, "entity_c_item", 146, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
@ -1854,6 +1859,11 @@ public class MainRegistry
dropCrys = createConfigBool(config, CATEGORY_DROPS, "10.04_dropCrys", "Whether xen crystals should move blocks when dropped", true);
dropDead = createConfigBool(config, CATEGORY_DROPS, "10.05_dropDead", "Whether dead man's explosives should explode when dropped", true);
final String CATEGORY_TOOLS = "11_tools";
recursionDepth = createConfigInt(config, CATEGORY_TOOLS, "11.00_recursionDepth", "Limits veinminer's recursive function. Usually not an issue, unless you're using bukkit which is especially sensitive for some reason.", 1000);
recursiveStone = createConfigBool(config, CATEGORY_TOOLS, "11.01_recursionDepth", "Determines whether veinminer can break stone", true);
recursiveNetherrack = createConfigBool(config, CATEGORY_TOOLS, "11.02_recursionDepth", "Determines whether veinminer can break netherrack", true);
config.save();
radioStructure = setDef(radioStructure, 1000);

View File

@ -283,10 +283,13 @@ public class ModEventHandler
if(eRad < 200 || entity instanceof EntityNuclearCreeper || entity instanceof EntityMooshroom || entity instanceof EntityZombie || entity instanceof EntitySkeleton)
continue;
if(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode)
continue;
if(eRad > 2500)
entity.getEntityData().setFloat("hfr_radiation", 2500);
if(eRad >= 1000 && !(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode)) {
if(eRad >= 1000) {
if(entity.attackEntityFrom(ModDamageSource.radiation, entity.getMaxHealth() * 100)) {
entity.getEntityData().setFloat("hfr_radiation", 0);
@ -351,13 +354,6 @@ public class ModEventHandler
}
}
/// RADIATION STUFF END ///
//////////////////////
/*} catch(Exception x) {
MainRegistry.logger.error("Ouchie, something has happened in the NTM world tick event.");
}*/
//////////////////////
}
@SubscribeEvent
@ -386,9 +382,9 @@ public class ModEventHandler
if((helmet != null || noHelmet) && plate != null && legs != null && boots != null) {
if((noHelmet || chestplate.getArmorMaterial() == ((ArmorFSB)helmet.getItem()).getArmorMaterial()) &&
chestplate.getArmorMaterial() == ((ArmorFSB)legs.getItem()).getArmorMaterial() &&
chestplate.getArmorMaterial() == ((ArmorFSB)boots.getItem()).getArmorMaterial()) {
if((noHelmet || chestplate.getArmorMaterial() == ((ItemArmor)helmet.getItem()).getArmorMaterial()) &&
chestplate.getArmorMaterial() == ((ItemArmor)legs.getItem()).getArmorMaterial() &&
chestplate.getArmorMaterial() == ((ItemArmor)boots.getItem()).getArmorMaterial()) {
if(chestplate.fireproof && event.source.isFireDamage()) {
player.extinguish();
@ -421,9 +417,9 @@ public class ModEventHandler
if((helmet != null || noHelmet) && plate != null && legs != null && boots != null) {
if((noHelmet || chestplate.getArmorMaterial() == ((ArmorFSB)helmet.getItem()).getArmorMaterial()) &&
chestplate.getArmorMaterial() == ((ArmorFSB)legs.getItem()).getArmorMaterial() &&
chestplate.getArmorMaterial() == ((ArmorFSB)boots.getItem()).getArmorMaterial()) {
if((noHelmet || chestplate.getArmorMaterial() == ((ItemArmor)helmet.getItem()).getArmorMaterial()) &&
chestplate.getArmorMaterial() == ((ItemArmor)legs.getItem()).getArmorMaterial() &&
chestplate.getArmorMaterial() == ((ItemArmor)boots.getItem()).getArmorMaterial()) {
if(chestplate.damageMod != -1) {
event.ammount *= chestplate.damageMod;

View File

@ -62,8 +62,8 @@ public class ModEventHandlerClient {
int count = ItemGunBase.getMag(player.getHeldItem());
int max = gcfg.ammoCap;
if(gcfg.reloadType == gcfg.RELOAD_NONE) {
ammo = ItemGunBase.getBeltType(player, player.getHeldItem());
if(gcfg.reloadType == GunConfiguration.RELOAD_NONE) {
ammo = ItemGunBase.getBeltType(player, player.getHeldItem(), true);
count = ItemGunBase.getBeltSize(player, ammo);
max = -1;
}
@ -71,6 +71,16 @@ public class ModEventHandlerClient {
int dura = ItemGunBase.getItemWear(player.getHeldItem()) * 50 / gcfg.durability;
RenderScreenOverlay.renderAmmo(event.resolution, Minecraft.getMinecraft().ingameGUI, ammo, count, max, dura);
if(gun.altConfig != null && gun.altConfig.reloadType == GunConfiguration.RELOAD_NONE) {
Item oldAmmo = ammo;
ammo = ItemGunBase.getBeltType(player, player.getHeldItem(), false);
if(ammo != oldAmmo) {
count = ItemGunBase.getBeltSize(player, ammo);
RenderScreenOverlay.renderAmmoAlt(event.resolution, Minecraft.getMinecraft().ingameGUI, ammo, count);
}
}
}
if(event.type == ElementType.HOTBAR) {

View File

@ -153,6 +153,9 @@ public class ResourceManager {
public static final IModelCustom teslacrab = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mobs/teslacrab.obj"));
public static final IModelCustom taintcrab = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mobs/taintcrab.obj"));
//Belt
public static final IModelCustom arrow = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/arrow.obj"));
////Textures TEs
public static final ResourceLocation universal = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png");
@ -299,6 +302,7 @@ 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 flamer = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flamer.obj"));
public static final IModelCustom flechette = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flechette.obj"));
////Texture Items
@ -313,6 +317,17 @@ public class ResourceManager {
public static final ResourceLocation deagle_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/deagle.png");
public static final ResourceLocation ks23_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/ks23.png");
public static final ResourceLocation flamer_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flamer.png");
public static final ResourceLocation flechette_body = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_body.png");
public static final ResourceLocation flechette_barrel = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_barrel.png");
public static final ResourceLocation flechette_gren_tube = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_gren_tube.png");
public static final ResourceLocation flechette_grenades = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_grenades.png");
public static final ResourceLocation flechette_pivot = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_pivot.png");
public static final ResourceLocation flechette_top = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_top.png");
public static final ResourceLocation flechette_chamber = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_chamber.png");
public static final ResourceLocation flechette_base = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_base.png");
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");

View File

@ -0,0 +1,80 @@
package com.hbm.render.block;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.model.obj.WavefrontObject;
public class RenderConveyor implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
GL11.glPushMatrix();
Tessellator tessellator = Tessellator.instance;
IIcon iicon = block.getIcon(0, 0);
tessellator.setColorOpaque_F(1, 1, 1);
if (renderer.hasOverrideBlockTexture())
{
iicon = renderer.overrideBlockTexture;
}
GL11.glTranslated(0, -0.125, 0);
tessellator.startDrawingQuads();
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.arrow, iicon, tessellator, 0, false);
tessellator.draw();
GL11.glPopMatrix();
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
Tessellator tessellator = Tessellator.instance;
IIcon iicon = block.getIcon(0, world.getBlockMetadata(x, y, z));
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
tessellator.setColorOpaque_F(1, 1, 1);
if (renderer.hasOverrideBlockTexture())
{
iicon = renderer.overrideBlockTexture;
}
float rotation = 0;
if(world.getBlockMetadata(x, y, z) == 3)
rotation = 180F / 180F * (float)Math.PI;
if(world.getBlockMetadata(x, y, z) == 4)
rotation = 90F / 180F * (float)Math.PI;
if(world.getBlockMetadata(x, y, z) == 5)
rotation = 270F / 180F * (float)Math.PI;
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.arrow, iicon, tessellator, rotation, true);
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
return true;
}
@Override
public boolean shouldRender3DInInventory(int modelId) {
return true;
}
@Override
public int getRenderId() {
return 334086;
}
}

View File

@ -0,0 +1,48 @@
package com.hbm.render.entity.item;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.item.EntityMovingItem;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
public class RenderMovingItem extends Render {
@Override
public void doRender(Entity entity, double x, double y, double z, float f1, float f2) {
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
EntityMovingItem item = (EntityMovingItem)entity;
ItemStack stack = item.getItemStack();
if(!(stack.getItem() instanceof ItemBlock)) {
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
GL11.glTranslated(0.0, -0.1875, 0.0);
}
EntityItem dummy = new EntityItem(entity.worldObj, 0, 0, 0, stack);
dummy.getEntityItem().stackSize = 1;
dummy.hoverStart = 0.0F;
RenderItem.renderInFrame = true;
RenderManager.instance.renderEntityWithPosYaw(dummy, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return null;
}
}

View File

@ -146,6 +146,8 @@ public class RenderBullet extends Render {
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelGrenadeToxic.png")); break;
case 4:
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelGrenadeSleek.png")); break;
case 5:
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/ModelGrenadeTraining.png")); break;
}
grenade.renderAll(0.0625F);

View File

@ -32,40 +32,42 @@ public class ItemRenderMP implements IItemRenderer {
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
return false;
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
GL11.glPushMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelMP.png"));
switch(type) {
case EQUIPPED_FIRST_PERSON:
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelMP.png"));
GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(-0.5F, 0.0F, -0.2F);
//GL11.glScalef(2.0F, 2.0F, 2.0F);
GL11.glScalef(0.5F, 0.5F, 0.5F);
GL11.glTranslatef(-0.4F, -0.1F, 0.1F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
GL11.glTranslatef(1.0F, 0.75F, 0.0F);
GL11.glRotatef(150F, 0.0F, 0.0F, -1.0F);
GL11.glScalef(0.75F, 0.75F, 0.75F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
break;
case EQUIPPED:
GL11.glTranslatef(0.35F, 0.5F, 0.0F);
GL11.glRotatef(100F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(170F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(15F, 0.0F, 0.0F, -1.0F);
GL11.glScalef(0.75F, 0.75F, 0.75F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
break;
case ENTITY:
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelMP.png"));
GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
GL11.glTranslatef(0.0F, -0.2F, -0.5F);
GL11.glRotatef(-5.0F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(0.5F, -0.2F, 0.0F);
GL11.glScalef(0.75F, 0.75F, 0.75F);
GL11.glTranslatef(-0.8F, -0.1F, 0.0F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
GL11.glScalef(0.75F, 0.75F, 0.75F);
swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
break;
default: break;
}
GL11.glPopMatrix();
}
}

View File

@ -21,7 +21,9 @@ public class ItemRenderWeaponObj implements IItemRenderer {
case ENTITY:
return true;
case INVENTORY:
return item.getItem() == ModItems.gun_ks23 || item.getItem() == ModItems.gun_hk69 || item.getItem() == ModItems.gun_flamer;
return item.getItem() == ModItems.gun_ks23 || item.getItem() == ModItems.gun_hk69
|| item.getItem() == ModItems.gun_flamer || item.getItem() == ModItems.gun_deagle
|| item.getItem() == ModItems.gun_flechette;
default: return false;
}
}
@ -122,6 +124,19 @@ public class ItemRenderWeaponObj implements IItemRenderer {
}
}
if(item.getItem() == ModItems.gun_flechette) {
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(1.0F, -1.0F, -0.0F);
GL11.glRotatef(170F, 0.0F, 1.0F, 0.0F);
GL11.glScaled(0.25, 0.25, 0.25);
if(player.isSneaking()) {
GL11.glRotatef(5F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-2F, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef(-2.0F, 1.2F, 3.7F);
}
}
break;
case EQUIPPED:
@ -161,18 +176,26 @@ public class ItemRenderWeaponObj implements IItemRenderer {
GL11.glScaled(0.35, 0.35, 0.35);
}
if(item.getItem() == ModItems.gun_flechette) {
GL11.glRotatef(35F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(-1.4F, -0.55F, 0.0F);
GL11.glScaled(0.125, 0.125, 0.125);
}
break;
case ENTITY:
if(item.getItem() == ModItems.gun_hk69) {
GL11.glTranslatef(0.0F, 0.2F, 0.0F);
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
GL11.glScaled(0.75, 0.75, 0.75);
}
if(item.getItem() == ModItems.gun_deagle) {
GL11.glTranslatef(0.0F, 0.2F, 0.0F);
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
GL11.glScaled(0.25, 0.25, 0.25);
}
@ -181,17 +204,22 @@ public class ItemRenderWeaponObj implements IItemRenderer {
}
if(item.getItem() == ModItems.gun_ks23) {
GL11.glTranslatef(0.5F, 0.2F, 0.0F);
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.0F, 0.2F, 0.5F);
GL11.glScaled(0.75, 0.75, 0.75);
}
if(item.getItem() == ModItems.gun_flamer) {
GL11.glTranslatef(-0.25F, 0.2F, 0.0F);
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
GL11.glTranslatef(0.25F, 0.2F, 0.0F);
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
GL11.glScaled(0.25, 0.25, 0.25);
}
if(item.getItem() == ModItems.gun_flechette) {
GL11.glTranslatef(-0.25F, 0.0F, 0.0F);
GL11.glScaled(0.125, 0.125, 0.125);
}
break;
case INVENTORY:
@ -206,6 +234,14 @@ public class ItemRenderWeaponObj implements IItemRenderer {
GL11.glRotatef(-45F, 1.0F, 0.0F, 0.0F);
}
if(item.getItem() == ModItems.gun_deagle) {
GL11.glScaled(2.5, 2.5, -2.5);
GL11.glTranslatef(3.5F, 3F, 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);
}
if(item.getItem() == ModItems.gun_ks23) {
GL11.glScaled(7.5, 7.5, -7.5);
GL11.glTranslatef(0.65F, 0.4F, 0.0F);
@ -222,6 +258,13 @@ public class ItemRenderWeaponObj implements IItemRenderer {
GL11.glRotatef(-45F, 1.0F, 0.0F, 0.0F);
}
if(item.getItem() == ModItems.gun_flechette) {
GL11.glScaled(1.2, 1.2, -1.2);
GL11.glTranslatef(2.5F, 8.0F, 0.0F);
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(-45F, 0.0F, 0.0F, 1.0F);
}
break;
default: break;
@ -257,7 +300,38 @@ public class ItemRenderWeaponObj implements IItemRenderer {
GL11.glShadeModel(GL11.GL_FLAT);
}
if(item.getItem() == ModItems.gun_flechette) {
renderFlechette();
}
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
public void renderFlechette() {
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_body);
ResourceManager.flechette.renderPart("body");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_chamber);
ResourceManager.flechette.renderPart("chamber");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_barrel);
ResourceManager.flechette.renderPart("barrel");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_gren_tube);
ResourceManager.flechette.renderPart("gren_tube");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_grenades);
ResourceManager.flechette.renderPart("grenades");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_pivot);
ResourceManager.flechette.renderPart("pivot");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_top);
ResourceManager.flechette.renderPart("top");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_drum);
ResourceManager.flechette.renderPart("drum");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_base);
ResourceManager.flechette.renderPart("base");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_trigger);
ResourceManager.flechette.renderPart("trigger");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.flechette_stock);
ResourceManager.flechette.renderPart("stock");
GL11.glShadeModel(GL11.GL_FLAT);
}
}

View File

@ -11,7 +11,6 @@ import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@ -106,13 +105,13 @@ public class RenderEPress extends TileEntitySpecialRenderer {
TileEntityMachineEPress press = (TileEntityMachineEPress)tileentity;
ItemStack stack = new ItemStack(Item.getItemById(press.item), 1, press.meta);
if(!(stack.getItem() instanceof ItemBlock)) {
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
item.getEntityItem().stackSize = 1;
item.hoverStart = 0.0F;
RenderItem.renderInFrame = true;
this.itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
}
RenderItem.renderInFrame = true;
this.itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
GL11.glPopMatrix();
}

View File

@ -11,7 +11,6 @@ import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@ -70,14 +69,14 @@ public class RenderPress extends TileEntitySpecialRenderer {
TileEntityMachinePress press = (TileEntityMachinePress)tileEntity;
ItemStack stack = new ItemStack(Item.getItemById(press.item), 1, press.meta);
if(!(stack.getItem() instanceof ItemBlock)) {
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
item.getEntityItem().stackSize = 1;
item.hoverStart = 0.0F;
RenderItem.renderInFrame = true;
GL11.glTranslatef(0.0F, 1.0F - 0.0625F * 165/100, 0.0F);
this.itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
}
RenderItem.renderInFrame = true;
GL11.glTranslatef(0.0F, 1.0F - 0.0625F * 165/100, 0.0F);
this.itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
GL11.glPopMatrix();
}

View File

@ -137,6 +137,30 @@ public class RenderScreenOverlay {
Minecraft.getMinecraft().renderEngine.bindTexture(hud);
}
public static void renderAmmoAlt(ScaledResolution resolution, Gui gui, Item ammo, int count) {
GL11.glPushMatrix();
Minecraft mc = Minecraft.getMinecraft();
int pX = resolution.getScaledWidth() / 2 + 62 + 36 + 18;
int pZ = resolution.getScaledHeight() - 21 - 16;
Minecraft.getMinecraft().renderEngine.bindTexture(misc);
Minecraft.getMinecraft().fontRenderer.drawString(count + "x", pX + 16, pZ + 6, 0xFFFFFF);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
RenderHelper.enableGUIStandardItemLighting();
itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), new ItemStack(ammo), pX, pZ);
RenderHelper.disableStandardItemLighting();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(hud);
}
public enum Crosshair {
NONE(0, 0, 0),

View File

@ -1,4 +1,4 @@
package com.hbm.blocks.machine;
package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.List;

View File

@ -366,25 +366,29 @@ public class TileEntityMachineChemplant extends TileEntity implements ISidedInve
if(te1 instanceof TileEntityChest) {
TileEntityChest chest = (TileEntityChest)te1;
tryFillContainer(chest, 5);
for(int i = 5; i < 9; i++)
tryFillContainer(chest, i);
}
if(te1 instanceof TileEntityHopper) {
TileEntityHopper hopper = (TileEntityHopper)te1;
tryFillContainer(hopper, 5);
for(int i = 5; i < 9; i++)
tryFillContainer(hopper, i);
}
if(te1 instanceof TileEntityCrateIron) {
TileEntityCrateIron hopper = (TileEntityCrateIron)te1;
TileEntityCrateIron crate = (TileEntityCrateIron)te1;
tryFillContainer(hopper, 5);
for(int i = 5; i < 9; i++)
tryFillContainer(crate, i);
}
if(te1 instanceof TileEntityCrateSteel) {
TileEntityCrateSteel hopper = (TileEntityCrateSteel)te1;
TileEntityCrateSteel crate = (TileEntityCrateSteel)te1;
tryFillContainer(hopper, 5);
for(int i = 5; i < 9; i++)
tryFillContainer(crate, i);
}
//INPUT