diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 5545525ad..578637fc0 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -3,6 +3,10 @@ itemGroup.tabParts=Nuclear Tech Mod Bauteile itemGroup.tabBlocks=Nuclear Tech Mod Blöcke itemGroup.tabNuke=Nuclear Tech Mod Bomben +item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core +item.record.ss.desc=Valve - Sector Sweep +item.record.vc.desc=Valve - Vortal Combat + death.attack.nuclearBlast=%1$s wurde von einer Atomexplosion weggeblasen. death.attack.revolverBullet=%1$s wurde von %2$s in den Kopf geschossen. death.attack.mudPoisoning=%1$s starb an Giftschlamm. @@ -14,8 +18,17 @@ death.attack.tauBlast=%1$s lud die XVL1456 zu lange auf und wurde in Stücke ger death.attack.chopperBullet=%1$s wurde von %2$s gerekt. death.attack.cmb=%1$s wurde von %2$s pulverisiert. death.attack.subAtomic=%1$s's Atome wurden von %2$s vernichtet. +death.attack.subAtomic2=%1$s verließ das QPU-Gitter weil %2$s seine De-Facto-Geschwindigkeit manipulierte. +death.attack.subAtomic3=%1$s's Divergenzwert fiel wegen %2$s unter 1 Prozent. +death.attack.subAtomic4=%1$s wurde von %2$s durch null geteilt. +death.attack.subAtomic5=%1$s wurde von %2$s nullifiziert. death.attack.radiation=%1$s starb an Strahlenvergiftung. death.attack.acid=%1$s fiel in Säure. +death.attack.suicide=%1$s blies sich die Rübe weg. +death.attack.electrified=%1$s wurde von %2$s elektrisiert. +death.attack.flamethrower=%1$s wurde von %2$s gegrillt. +death.attack.plasma=%1$s wurde von %2$s eingeäschert. +death.attack.ice=%1$s wurde von %2$s in ein Eis am Stiel verwandelt. item.redstone_sword.name=Redstoneschwert item.big_sword.name=Großes Schwert @@ -109,7 +122,7 @@ tile.red_wire_coated.name=Geschirmtes rotes Kupferkabel tile.machine_deuterium.name=Deuteriumextraktor container.machine_deuterium=Deuteriumextraktor tile.machine_battery.name=Energiespeicherblock -container.battery=Energiespeicherblock +container.battery=Energiespeicher tile.machine_coal_off.name=Kohlegenerator tile.machine_coal_on.name=Kohlegenerator container.machineCoal=Kohlegenerator @@ -124,6 +137,7 @@ tile.machine_shredder.name=Shredder container.machineShredder=Shredder tile.machine_combine_factory.name=CMB-Stahl Hochofen container.machineCMB=CMB-Stahl Hochofen +tile.machine_teleporter.name=Teleporter tile.factory_titanium_hull.name=Einfache Fabrikshülle tile.factory_titanium_furnace.name=Einfache Fabrikzugriffsluke @@ -248,6 +262,8 @@ tile.block_uranium.name=Uranblock tile.block_trinitite.name=Trinititblock tile.block_beryllium.name=Berylliumblock tile.block_waste.name=Atommüllblock +tile.block_scrap.name=Schrottblock +tile.block_electrical_scrap.name=Elektroschrottblock tile.block_advanced_alloy.name=Fortgeschrittener Legierungsblock tile.block_magnetized_tungsten.name=Magnetisierter Wolframblock tile.block_combine_steel.name=CMB-Stahlblock @@ -263,6 +279,13 @@ tile.ore_uranium.name=Uranerz tile.ore_schrabidium.name=Schrabidiumerz tile.ore_beryllium.name=Berylliumerz +tile.ore_nether_uranium.name=Nether-Uranerz +tile.ore_nether_plutonium.name=Nether-Plutoniumerz +tile.ore_nether_tungsten.name=Nether-Wolframerz +tile.ore_nether_sulfur.name=Nether-Schwefelerz +tile.ore_nether_fire.name=Feuererz +tile.ore_nether_schrabidium.name=Nether-Schrabidiumerz + tile.reinforced_brick.name=Verstärkter Stein tile.reinforced_glass.name=Verstärktes Glas tile.reinforced_sand.name=Verstärkter Sandstein @@ -277,6 +300,8 @@ tile.brick_light.name=Helle Ziegel tile.cmb_brick.name=CMB-Stahlfliese tile.cmb_brick_reinforced.name=Verstärkte CMB-Ziegel +tile.gravel_obsidian.name=Gebrochener Obsidian + item.nugget_uranium.name=Urannugget item.nugget_plutonium.name=Plutoniumnugget item.nugget_neptunium.name=Neptuniumnugget @@ -297,6 +322,7 @@ item.powder_copper.name=Kupferstaub item.powder_titanium.name=Titanstaub item.powder_tungsten.name=Wolframstaub item.powder_uranium.name=Uranstaub +item.powder_plutonium.name=Plutoniumstaub item.dust.name=Staub item.powder_coal.name=Kohlestaub item.powder_lapis.name=Lapis Lazuli-Staub @@ -305,15 +331,16 @@ item.powder_diamond.name=Diamantstaub item.powder_red_copper.name=Roter Kupfer Staub item.powder_steel.name=Stahlstaub item.powder_magnetized_tungsten.name=Magnetisierter Wolframstaub -item.powder_combine_steel.name=CMB-Stahlstaustaub +item.powder_combine_steel.name=CMB-Stahlstaub item.powder_lithium.name=Lithiumstaub item.powder_advanced_alloy.name=Fortgeschrittener Legierungsstaub item.powder_quartz.name=Quarzstaub item.powder_power.name=Energiepulver -item.powder_iodine.name=Iodpulver -item.powder_thorium.name=Thoriumpulver -item.powder_neodymium.name=Neodympulver -item.powder_astatine.name=Astatpulver +item.powder_iodine.name=Iodstaub +item.powder_thorium.name=Thoriumstaub +item.powder_neodymium.name=Neodymstaub +item.powder_astatine.name=Astatstaub +item.powder_caesium.name=Caesiumstaub item.battery_generic.name=Batterie item.battery_advanced.name=Fortgeschrittene Batterie @@ -337,7 +364,10 @@ item.reactor_core.name=Brutreaktorkern item.pellet_rtg.name=Plutonium 238 Pellet item.rtg_unit.name=RTG Einheit item.hazmat_cloth.name=Strahlenschutzanzugsstoff +item.filter_coal.name=Aktivkohlefilter item.tritium_deuterium_cake.name=Tritium-Deuterium-Kuchen +item.telepad.name=Teleplatte +item.entanglement_kit.name=Verschränkungskit item.cell_empty.name=Leere Zelle item.cell_uf6.name=Uranhexafluorit-Zelle @@ -365,6 +395,7 @@ item.inf_antischrabidium.name=Unendlicher Antischrabidiumtank item.canister_empty.name=Leerer Kanister item.canister_fuel.name=Treibstoffkanister item.canister_napalm.name=Napalm B +item.canister_NITAN.name=NITAN© 100 Oktan Supertreibstoff item.rod_empty.name=Leerer Brennstab item.rod_uranium.name=Uranbrennstab @@ -431,6 +462,8 @@ item.pellet_cluster.name=Explosive Pellets item.powder_fire.name=Flammenpulver item.powder_poison.name=Giftpulver item.pellet_gas.name=Giftgaskatusche +item.magnetron.name=Magnetron +item.powder_thermite.name=Thermit item.nuke_starter_kit.name=Atomphysik Starterkit item.nuke_commercially_kit.name=Atomphysik Kit für kommerzielle Zwecke @@ -483,8 +516,10 @@ item.grenade_tau.name=Taugranate item.grenade_schrabidium.name=Schrabidiumgranate item.grenade_lemon.name=Zitronengranate item.grenade_mk2.name=Mk 2 Granate "Botschafter Ananas" +item.grenade_aschrab.name=Werfbare Antischrabidiumzelle item.grenade_nuke.name=Mark VI Bohrgranate item.grenade_nuclear.name=Nuka-Granate +item.grenade_zomg.name=Negativenergie-Paarvernichtungsgranate item.rod_uranium_fuel.name=Urankernbrennstoffzelle item.rod_dual_uranium_fuel.name=Doppelte Urankernbrennstoffzelle @@ -550,12 +585,19 @@ item.gun_revolver_lead.name=Nuka-Revolver item.gun_revolver_schrabidium.name=Schrabidiumrevolver item.gun_revolver_cursed.name=Verfluchte Pistole item.gun_fatman.name=M42 Nukleares Katapult "Fat Man" +item.gun_mirv.name=M42 Nukleares Katapult "Experimentelles MIRV" +item.gun_bf.name=M42_2 Nukleares Katapult "Antimaterienwerfer" +item.gun_mp40.name=Maschinenpistole item.gun_xvl1456.name=XVL1456 Tau-Kanone Prototyp item.gun_osipr.name=Standartausrüstung für Sicherheitskräfte -item.gun_mp.name=Des Pazifistens Maschinengewehr +item.gun_immolator.name=Der Immolator +item.gun_cryolator.name=Der Cryolator +item.gun_mp.name=Maschinengewehr des Pazifisten item.gun_zomg.name=Singularitätsbetriebener Paarvernichtungsstrahl "ZOMG Kanone" +item.gun_emp.name=EMP-Strahler item.gun_super_shotgun.name=Super Shotgun item.gun_moist_nugget.name=Moisn-Nagant +item.gun_revolver_inverted.name=Umgedrehter Revolver item.gun_revolver_iron_ammo.name=Patrone item.gun_revolver_ammo.name=Bleipatrone @@ -564,10 +606,16 @@ item.gun_revolver_lead_ammo.name=Mit Glas umhüllte Atompatrone item.gun_revolver_schrabidium_ammo.name=Schrabidiumpatrone item.gun_revolver_cursed_ammo.name=Stahlpatrone item.gun_fatman_ammo.name=Miniatombombe +item.gun_mirv_ammo.name=Achtfaches MIRV +item.gun_bf_ammo.name=Mk.V kompaktes AMAT-Artilleriegeschoss - Typ B.F. +item.gun_mp40_ammo.name=SMG-Patrone item.gun_xvl1456_ammo.name=Kiste mit erschöpftem Uran-235 -item.gun_osipr_ammo.name=Dunker Energiepuls-Plug +item.gun_osipr_ammo.name=Dunkler Energiepuls-Plug item.gun_osipr_ammo2.name=Combine Ball +item.gun_immolator_ammo.name=Immolatorkraftstoff +item.gun_cryolator_ammo.name=Kryozelle item.gun_mp_ammo.name=Kleine treibmittellose MG-Patrone +item.gun_emp_ammo.name=Energiezelle item.clip_revolver_iron.name=Box voll Eisenkugeln item.clip_revolver.name=.357 Magnum Patronen @@ -576,10 +624,16 @@ item.clip_revolver_schrabidium.name=Schrabidium-Muntionsbehälter item.clip_rpg.name=Raketenbehälter item.clip_xvl1456.name=Große Isotopenbox item.clip_osipr.name=AR2 Magazin +item.clip_immolator.name=Großer Kraftstofftank +item.clip_cryolator.name=Großer Kryogentank item.clip_revolver_lead.name=Box voll Atompatronen item.clip_revolver_cursed.name=Magazin der Standardpistole des Britannischen Militärs item.clip_fatman.name=Miniatombomben im Sechserpack +item.clip_mirv.name=Kauf-drei-zahl-eins Packung Mini MIRVs +item.clip_bf.name=BF-Geschosse im Doppelpack item.clip_mp.name=Magazin des Standardsturmgewehrs des Britannischen Militärs +item.clip_mp40.name=9mm SMG-Magazin +item.clip_emp.name=Magnetsteifen mit Energiezellen tile.block_schrabidium.name=Schrabidiumblock item.plate_gold.name=Goldplatte @@ -678,6 +732,14 @@ item.hazmat_helmet.name=Strahlenschutzhelm item.hazmat_plate.name=Strahlenschutzbrustplatte item.hazmat_legs.name=Strahlenschutzhose item.hazmat_boots.name=Strahlenschutzstiefel +item.hazmat_paa_helmet.name=PaA-Kampfschutzanzug Helm +item.hazmat_paa_plate.name=PaA-Kampfschutzanzug Brustplatte +item.hazmat_paa_legs.name=PaA-Kampfschutzanzug Hose +item.hazmat_paa_boots.name=PaA-Kampfschutzanzug Stiefel + +item.paa_plate.name=PaA-Brustschutzplatte +item.paa_legs.name=PaA-Beinverstärkungsschienen +item.paa_boots.name=PaA-"olle Latschen" item.goggles.name=Schutzbrille item.gas_mask.name=Gasmaske @@ -733,6 +795,10 @@ item.alloy_helmet.name=Legierungshelm item.alloy_plate.name=Legierungsbrustpanzer item.alloy_legs.name=Legierungsbeinschutz item.alloy_boots.name=Legierungsstiefel +item.cmb_helmet.name=CMB-Stahlhelm +item.cmb_plate.name=CMB-Stahlbrustpanzer +item.cmb_legs.name=CMB-Stahlbeinschutz +item.cmb_boots.name=CMB-Stahlstiefel item.steel_sword.name=Stahlschwert item.steel_pickaxe.name=Stahlspitzhacke @@ -749,6 +815,11 @@ item.alloy_pickaxe.name=Legierungsspitzhacke item.alloy_axe.name=Legierungsaxt item.alloy_shovel.name=Legierungsschaufel item.alloy_hoe.name=Legierungsfeldhacke +item.cmb_sword.name=CMB-Stahlschwert +item.cmb_pickaxe.name=CMB-Stahlspitzhacke +item.cmb_axe.name=CMB-Stahlaxt +item.cmb_shovel.name=CMB-Stahlschaufel +item.cmb_hoe.name=CMB-Stahlfeldhacke tile.red_cable.name=Rotes Kupferkabel tile.block_meteor.name=Meteoritenblock @@ -820,4 +891,10 @@ item.blades_steel.name=Stahlsägeblatt item.blades_titanium.name=Titansägeblatt item.blades_advanced_alloy.name=Fortgeschrittenes Sägeblatt item.blades_combine_steel.name=CMB-Sägeblatt -item.blades_schrabidium.name=Schrabidiumsägeblatt \ No newline at end of file +item.blades_schrabidium.name=Schrabidiumsägeblatt + +item.linker.name=Telelinker + +item.letter.name=Eilbrief + +item.chopper.name=Jagdschrauber \ No newline at end of file diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index e43e45594..338fc6d9c 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -3,6 +3,10 @@ itemGroup.tabParts=Nuclear Tech Mod Parts itemGroup.tabBlocks=Nuclear Tech Mod Blocks itemGroup.tabNuke=Nuclear Tech Mod Nukes +item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core +item.record.ss.desc=Valve - Sector Sweep +item.record.vc.desc=Valve - Vortal Combat + death.attack.nuclearBlast=%1$s was blown away by a nuclear explosion. death.attack.revolverBullet=%1$s was shot in the head by %2$s. death.attack.mudPoisoning=%1$s died in poisonous mud. @@ -13,9 +17,18 @@ death.attack.tau=%1$s was riddeled by %2$s using negatively charged tauons. death.attack.tauBlast=%1$s charged the XVL1456 for too long and was blown into pieces. death.attack.chopperBullet=%1$s was rekt by %2$s. death.attack.cmb=%1$s was fizzeled by %2$s. -death.attack.subAtomic=%1$s's atoms were annihilated by %2$s. +death.attack.subAtomic=%1$s's atoms have been destroyed by %2$s. +death.attack.subAtomic2=%1$s was QPU-misaligned because %2$s tampered with his de facto speed. +death.attack.subAtomic3=%1$s's divergence dropped below 1 percent because of %2$s. +death.attack.subAtomic4=%1$s was divided by zero by %2$s. +death.attack.subAtomic5=%1$s was nullified by %2$s. death.attack.radiation=%1$s died from radiation poisoning. death.attack.acid=%1$s fell into acid. +death.attack.suicide=%1$s blew their head off. +death.attack.electrified=%1$s was electrified by %2$s. +death.attack.flamethrower=%1$s was cremated by %2$s. +death.attack.plasma=%1$s was immolated by %2$s. +death.attack.ice=%1$s was turned into a popsicle by %2$s. item.redstone_sword.name=Redstone Sword item.big_sword.name=Great Sword @@ -30,7 +43,7 @@ item.test_nuke_tier2_target.name=Subcritical MOX Target (Tier 2) item.gadget_explosive.name=Propellant item.gadget_explosive8.name=Bundle of Propellant -item.gadget_wireing.name=Wireing +item.gadget_wireing.name=Wiring item.gadget_core.name=Plutonium Core item.boy_igniter.name=Bomb Igniter @@ -88,9 +101,9 @@ tile.machine_difurnace_on.name=Alloy Furnace container.diFurnace=Alloy Furnace tile.machine_centrifuge.name=Centrifuge container.centrifuge=Centrifuge -tile.machine_uf6_tank.name=Uranium Hexafluorite Tank +tile.machine_uf6_tank.name=Uranium Hexafluoride Tank container.uf6_tank=UF6 Tank -tile.machine_puf6_tank.name=Plutonium Hexafluorite Tank +tile.machine_puf6_tank.name=Plutonium Hexafluoride Tank container.puf6_tank=PuF6 Tank tile.machine_reactor.name=Breeding Reactor container.reactor=Breeding Reactor @@ -109,7 +122,7 @@ tile.red_wire_coated.name=Coated Red Copper Cable tile.machine_deuterium.name=Deuterium Extractor container.machine_deuterium=Deuterium Extractor tile.machine_battery.name=Energy Storage Block -container.battery=Energy Storage Block +container.battery=Energy Storage tile.machine_coal_off.name=Coal Generator tile.machine_coal_on.name=Coal Generator container.machineCoal=Coal Generator @@ -124,6 +137,7 @@ tile.machine_shredder.name=Shredder container.machineShredder=Shredder tile.machine_combine_factory.name=CMB Steel Furnace container.machineCMB=CMB Steel Furnace +tile.machine_teleporter.name=Teleporter tile.factory_titanium_hull.name=Basic Factory Casing tile.factory_titanium_furnace.name=Basic Factory Access Hatch @@ -248,6 +262,8 @@ tile.block_uranium.name=Block of Uranium tile.block_trinitite.name=Block of Trinitite tile.block_beryllium.name=Block of Beryllium tile.block_waste.name=Block of Nuclear Waste +tile.block_scrap.name=Block of Scrap +tile.block_electrical_scrap.name=Block of Electrical Scrap tile.block_advanced_alloy.name=Block of Advanced Alloy tile.block_magnetized_tungsten.name=Block of Magnetized Tungsten tile.block_combine_steel.name=Block of CMB Steel @@ -263,6 +279,13 @@ tile.ore_uranium.name=Uranium Ore tile.ore_schrabidium.name=Schrabidium Ore tile.ore_beryllium.name=Beryllium Ore +tile.ore_nether_uranium.name=Nether Uranium Ore +tile.ore_nether_plutonium.name=Nether Plutonium Ore +tile.ore_nether_tungsten.name=Nether Tungsten Ore +tile.ore_nether_sulfur.name=Nether Sulfur Ore +tile.ore_nether_fire.name=Fire Ore +tile.ore_nether_schrabidium.name=Nether Schrabidium Ore + tile.reinforced_brick.name=Reinforced Stone tile.reinforced_glass.name=Reinforced Glass tile.reinforced_sand.name=Reinforced Sandstone @@ -277,6 +300,8 @@ tile.brick_light.name=Light Bricks tile.cmb_brick.name=CMB Steel Tile tile.cmb_brick_reinforced.name=Reinforced CMB Bricks +tile.gravel_obsidian.name=Crushed Obsidian + item.nugget_uranium.name=Uranium Nugget item.nugget_plutonium.name=Plutonium Nugget item.nugget_neptunium.name=Neptunium Nugget @@ -297,6 +322,7 @@ item.powder_copper.name=Copper Powder item.powder_titanium.name=Titanium Powder item.powder_tungsten.name=Tungsten Powder item.powder_uranium.name=Uranium Powder +item.powder_plutonium.name=Plutonium Powder item.dust.name=Dust item.powder_coal.name=Coal Powder item.powder_lapis.name=Lapis Lazuli Powder @@ -314,6 +340,7 @@ item.powder_iodine.name=Iodine Powder item.powder_thorium.name=Thorium Powder item.powder_neodymium.name=Neodymium Powder item.powder_astatine.name=Astatine Powder +item.powder_caesium.name=Caesium Powder item.battery_generic.name=Battery item.battery_advanced.name=Advanced Battery @@ -337,7 +364,10 @@ item.reactor_core.name=Breeding Reactor Core item.pellet_rtg.name=Plutonium 238 Fuel Pellet item.rtg_unit.name=RTG Unit item.hazmat_cloth.name=Hazmat Cloth +item.filter_coal.name=Activated Carbon Filter item.tritium_deuterium_cake.name=Tritium-Deuterium-Cake +item.telepad.name=Telepad +item.entanglement_kit.name=Entaglement Kit item.cell_empty.name=Empty Cell item.cell_uf6.name=Uranium Hexafluorite Cell @@ -365,6 +395,7 @@ item.inf_antischrabidium.name=Infinite Antischrabidium Tank item.canister_empty.name=Empty Canister item.canister_fuel.name=Fuel Canister item.canister_napalm.name=Napalm B +item.canister_NITAN.name=NITAN© 100 Octane Super Fuel item.rod_empty.name=Emty Rod item.rod_uranium.name=Uranium Rod @@ -431,9 +462,11 @@ item.pellet_cluster.name=Explosive Pellets item.powder_fire.name=Flame Powder item.powder_poison.name=Poison Powder item.pellet_gas.name=Poison Gas Cartridge +item.magnetron.name=Magnetron +item.powder_thermite.name=Thermite item.nuke_starter_kit.name=Atomic Science Starter Kit -item.nuke_commercially_kit.name=Atomic Science Kit for Commercialy Uses +item.nuke_commercially_kit.name=Atomic Science Kit for Commercial Uses item.nuke_advanced_kit.name=Atomic Science Advanced Kit item.gadget_kit.name=The Gadget Kit item.boy_kit.name=Little Boy Kit @@ -483,8 +516,10 @@ item.grenade_tau.name=Tau Grenade item.grenade_schrabidium.name=Schrabidium Grenade item.grenade_lemon.name=Combustible Lemon item.grenade_mk2.name=Mk 2 Grenade "Ambassador Pineapple" +item.grenade_aschrab.name=Tossable Antischrabidium Cell item.grenade_nuke.name=Mark VI Drill Grenade item.grenade_nuclear.name=Nuka Grenade +item.grenade_zomg.name=Negative Energy Pair Annihilation Grenade item.rod_uranium_fuel.name=Uranium Fuel Rod item.rod_dual_uranium_fuel.name=Uranium Dual Fuel Rod @@ -550,12 +585,19 @@ item.gun_revolver_lead.name=Nuka Revolver item.gun_revolver_schrabidium.name=Schrabidium Revolver item.gun_revolver_cursed.name=Cursed Revolver item.gun_fatman.name=M42 Nuclear Catapult "Fat Man" +item.gun_mirv.name=M42 Nuclear Catapult "Experimental MIRV" +item.gun_bf.name=M42_2 Nuclear Catapult "Antimatter Launcher" +item.gun_mp40.name=Submachine Gun item.gun_xvl1456.name=XVL1456 Tau Cannon Prototype item.gun_osipr.name=Overwatch Standard Issue Pulse Rifle +item.gun_immolator.name=The Immolator +item.gun_cryolator.name=The Cryolator item.gun_mp.name=Pacifist's Machine Gun item.gun_zomg.name=Singularity Powered Annihilation Ray "ZOMG Cannon" +item.gun_emp.name=EMP Ray item.gun_super_shotgun.name=Super Shotgun item.gun_moist_nugget.name=Moisn-Nagant +item.gun_revolver_inverted.name=Flipped Revolver item.gun_revolver_iron_ammo.name=Bullet item.gun_revolver_ammo.name=Lead Bullet @@ -564,10 +606,16 @@ item.gun_revolver_lead_ammo.name=Glass Covered Nuclear Bullet item.gun_revolver_schrabidium_ammo.name=Schrabidium Bullet item.gun_revolver_cursed_ammo.name=Steel Bullet item.gun_fatman_ammo.name=Mini Nuke +item.gun_mirv_ammo.name=Eightfold MIRV +item.gun_bf_ammo.name=Mk.V Compact AMAT-Artillery Shell - Type B.F. +item.gun_mp40_ammo.name=Submachine Gun Round item.gun_xvl1456_ammo.name=Depleted Uranium-235 Box item.gun_osipr_ammo.name=Dark Energy Pulse Plug item.gun_osipr_ammo2.name=Combine Ball +item.gun_immolator_ammo.name=Immolator Fuel +item.gun_cryolator_ammo.name=Cryo Cell item.gun_mp_ammo.name=Small Propellantless Machine Gun Round +item.gun_emp_ammo.name=Energy Cell item.clip_revolver_iron.name=Box of Iron Rounds item.clip_revolver.name=Box of .357 Rounds @@ -576,10 +624,16 @@ item.clip_revolver_schrabidium.name=Schrabidium Ammo Container item.clip_rpg.name=Rocket Container item.clip_xvl1456.name=Large Isotope Box item.clip_osipr.name=AR2 Magazine +item.clip_immolator.name=Tank of Immolator Fuel +item.clip_cryolator.name=Tank of Cryolator Fuel item.clip_revolver_lead.name=Box of Nuclear Bullets item.clip_revolver_cursed.name=Britannia Military Standard Issue Pisol Magazine item.clip_fatman.name=Six Pack of Mini Nukes +item.clip_mirv.name=Three-In-One Pack of Mini MIRVs +item.clip_bf.name=BF-Shell Double Pack item.clip_mp.name=Britannia Military Standard Issue Assult Rifle Magazine +item.clip_mp40.name=9mm SMG Magazine +item.clip_emp.name=Small Pack of Energy Cells tile.block_schrabidium.name=Block of Schrabidium item.plate_gold.name=Gold Plate @@ -678,6 +732,14 @@ item.hazmat_helmet.name=Hazmat Helmet item.hazmat_plate.name=Hazmmat Chestplate item.hazmat_legs.name=Hazmat Leggings item.hazmat_boots.name=Hazmat Boots +item.hazmat_paa_helmet.name=PaA Battle Hazmat Suit Helmet +item.hazmat_paa_plate.name=PaA Battle Hazmat Suit Chestplate +item.hazmat_paa_legs.name=PaA Battle Hazmat Suit Leggings +item.hazmat_paa_boots.name=PaA Battle Hazmat Suit Boots + +item.paa_plate.name=PaA Chest Protection Plate +item.paa_legs.name=PaA Leg Reinforcements +item.paa_boots.name=PaA "good ol' shoes" item.goggles.name=Protection Goggles item.gas_mask.name=Gas Mask @@ -733,6 +795,10 @@ item.alloy_helmet.name=Advanced Alloy Helmet item.alloy_plate.name=Advanced Alloy Chestplate item.alloy_legs.name=Advanced Alloy Leggings item.alloy_boots.name=Advanced Alloy Boots +item.cmb_helmet.name=CMB Steel Helmet +item.cmb_plate.name=CMB Steel Chestplate +item.cmb_legs.name=CMB Steel Leggings +item.cmb_boots.name=CMB Steel Boots item.steel_sword.name=Steel Sword item.steel_pickaxe.name=Steel Pickaxe @@ -749,6 +815,11 @@ item.alloy_pickaxe.name=Advanced Alloy Pickaxe item.alloy_axe.name=Advanced Alloy Axe item.alloy_shovel.name=Advanced Alloy Shovel item.alloy_hoe.name=Advanced Alloy Hoe +item.cmb_sword.name=CMB Steel Sword +item.cmb_pickaxe.name=CMB Steel Pickaxe +item.cmb_axe.name=CMB Steel Axe +item.cmb_shovel.name=CMB Steel Shovel +item.cmb_hoe.name=CMB Steel Hoe tile.red_cable.name=Red Copper Cable tile.block_meteor.name=Meteor Block @@ -820,4 +891,10 @@ item.blades_steel.name=Steel Shredder Blades item.blades_titanium.name=Titanium Shredder Blades item.blades_advanced_alloy.name=Advanced Shredder Blades item.blades_combine_steel.name=CMB Shredder Blades -item.blades_schrabidium.name=Schrabidium Shredder Blades \ No newline at end of file +item.blades_schrabidium.name=Schrabidium Shredder Blades + +item.linker.name=Telelinker + +item.letter.name=Express Mail + +item.chopper.name=Hunter Chopper \ No newline at end of file diff --git a/assets/hbm/sounds.json b/assets/hbm/sounds.json new file mode 100644 index 000000000..443d2098c --- /dev/null +++ b/assets/hbm/sounds.json @@ -0,0 +1,38 @@ +{ + "misc.nullTau": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]}, + "misc.nullChopper": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]}, + "misc.nullCrashing": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]}, + "misc.nullMine": {"category": "player", "sounds": [{"name": "misc/null", "stream": false}]}, + + "block.crateBreak": {"category": "block", "sounds": ["block/crateBreak1", "block/crateBreak2", "block/crateBreak3", "block/crateBreak4", "block/crateBreak5"]}, + + "music.recordLambdaCore": {"category": "record", "sounds": [{"name": "music/recordLambdaCore", "stream": true}]}, + "music.recordSectorSweep": {"category": "record", "sounds": [{"name": "music/recordSectorSweep", "stream": true}]}, + "music.recordVortalCombat": {"category": "record", "sounds": [{"name": "music/recordVortalCombat", "stream": true}]}, + + "weapon.tauShoot": {"category": "player", "sounds": [{"name": "weapon/tauShoot", "stream": false}]}, + "weapon.tauChargeLoop2": {"category": "player", "sounds": [{"name": "weapon/tauChargeLoop2", "stream": true}]}, + "weapon.revolverShoot": {"category": "player", "sounds": [{"name": "weapon/revolverShoot", "stream": false}]}, + "weapon.heavyShoot": {"category": "player", "sounds": [{"name": "weapon/heavyShoot", "stream": false}]}, + "weapon.schrabidiumShoot": {"category": "player", "sounds": [{"name": "weapon/schrabidiumShoot", "stream": false}]}, + "weapon.osiprShoot": {"category": "player", "sounds": [{"name": "weapon/osiprShoot", "stream": false}]}, + "weapon.osiprAltFire": {"category": "player", "sounds": [{"name": "weapon/osiprAltFire", "stream": false}]}, + "weapon.osiprCharging": {"category": "player", "sounds": [{"name": "weapon/osiprCharging", "stream": false}]}, + "weapon.singFlyby": {"category": "player", "sounds": [{"name": "weapon/singFlyby", "stream": false}]}, + "weapon.rifleShoot": {"category": "player", "sounds": [{"name": "weapon/rifleShoot", "stream": false}]}, + "weapon.rpgShoot": {"category": "player", "sounds": [{"name": "weapon/rpgShoot", "stream": false}]}, + "weapon.fatmanShoot": {"category": "player", "sounds": [{"name": "weapon/fatmanShoot", "stream": false}]}, + "weapon.zomgShoot": {"category": "player", "sounds": [{"name": "weapon/zomgShoot", "stream": false}]}, + "weapon.flamethrowerIgnite": {"category": "player", "sounds": [{"name": "weapon/flamethrowerIgnite", "stream": false}]}, + "weapon.flamethrowerShoot": {"category": "player", "sounds": [{"name": "weapon/flamethrowerShoot", "stream": false}]}, + "weapon.immolatorIgnite": {"category": "player", "sounds": [{"name": "weapon/immolatorIgnite", "stream": false}]}, + "weapon.immolatorShoot": {"category": "player", "sounds": [{"name": "weapon/immolatorShoot", "stream": false}]}, + "weapon.cryolatorShoot": {"category": "player", "sounds": [{"name": "weapon/cryolatorShoot", "stream": false}]}, + + "entity.chopperFlyingLoop": {"category": "hostile", "sounds": [{"name": "entity/chopperFlyingLoop", "stream": true}]}, + "entity.chopperDrop": {"category": "hostile", "sounds": [{"name": "entity/chopperDrop", "stream": false}]}, + "entity.chopperCharge": {"category": "hostile", "sounds": [{"name": "entity/chopperCharge", "stream": false}]}, + "entity.chopperDamage": {"category": "hostile", "sounds": [{"name": "entity/chopperDamage", "stream": true}]}, + "entity.chopperMineLoop": {"category": "hostile", "sounds": [{"name": "entity/chopperMineLoop", "stream": false}]}, + "entity.chopperCrashingLoop": {"category": "hostile", "sounds": [{"name": "entity/chopperCrashingLoop", "stream": true}]} +} diff --git a/assets/hbm/sounds/alarm/boeing707AutopilotDisconnected.ogg b/assets/hbm/sounds/alarm/boeing707AutopilotDisconnected.ogg new file mode 100644 index 000000000..b9cde9b9a Binary files /dev/null and b/assets/hbm/sounds/alarm/boeing707AutopilotDisconnected.ogg differ diff --git a/assets/hbm/sounds/block/crateBreak1.ogg b/assets/hbm/sounds/block/crateBreak1.ogg new file mode 100644 index 000000000..3732f3105 Binary files /dev/null and b/assets/hbm/sounds/block/crateBreak1.ogg differ diff --git a/assets/hbm/sounds/block/crateBreak2.ogg b/assets/hbm/sounds/block/crateBreak2.ogg new file mode 100644 index 000000000..b3925527d Binary files /dev/null and b/assets/hbm/sounds/block/crateBreak2.ogg differ diff --git a/assets/hbm/sounds/block/crateBreak3.ogg b/assets/hbm/sounds/block/crateBreak3.ogg new file mode 100644 index 000000000..637292c03 Binary files /dev/null and b/assets/hbm/sounds/block/crateBreak3.ogg differ diff --git a/assets/hbm/sounds/block/crateBreak4.ogg b/assets/hbm/sounds/block/crateBreak4.ogg new file mode 100644 index 000000000..9566c7e65 Binary files /dev/null and b/assets/hbm/sounds/block/crateBreak4.ogg differ diff --git a/assets/hbm/sounds/block/crateBreak5.ogg b/assets/hbm/sounds/block/crateBreak5.ogg new file mode 100644 index 000000000..2e2aa090a Binary files /dev/null and b/assets/hbm/sounds/block/crateBreak5.ogg differ diff --git a/assets/hbm/sounds/entity/chopperCharge.ogg b/assets/hbm/sounds/entity/chopperCharge.ogg new file mode 100644 index 000000000..1548cdbcc Binary files /dev/null and b/assets/hbm/sounds/entity/chopperCharge.ogg differ diff --git a/assets/hbm/sounds/entity/chopperCrashingLoop.ogg b/assets/hbm/sounds/entity/chopperCrashingLoop.ogg new file mode 100644 index 000000000..add81c5de Binary files /dev/null and b/assets/hbm/sounds/entity/chopperCrashingLoop.ogg differ diff --git a/assets/hbm/sounds/entity/chopperDamage.ogg b/assets/hbm/sounds/entity/chopperDamage.ogg new file mode 100644 index 000000000..2781a413d Binary files /dev/null and b/assets/hbm/sounds/entity/chopperDamage.ogg differ diff --git a/assets/hbm/sounds/entity/chopperDrop.ogg b/assets/hbm/sounds/entity/chopperDrop.ogg new file mode 100644 index 000000000..f9d3cc2d2 Binary files /dev/null and b/assets/hbm/sounds/entity/chopperDrop.ogg differ diff --git a/assets/hbm/sounds/entity/chopperFlyingLoop.ogg b/assets/hbm/sounds/entity/chopperFlyingLoop.ogg new file mode 100644 index 000000000..471d3670a Binary files /dev/null and b/assets/hbm/sounds/entity/chopperFlyingLoop.ogg differ diff --git a/assets/hbm/sounds/entity/chopperMineLoop.ogg b/assets/hbm/sounds/entity/chopperMineLoop.ogg new file mode 100644 index 000000000..f25b6b2ce Binary files /dev/null and b/assets/hbm/sounds/entity/chopperMineLoop.ogg differ diff --git a/assets/hbm/sounds/misc/null.ogg b/assets/hbm/sounds/misc/null.ogg new file mode 100644 index 000000000..309e855fc Binary files /dev/null and b/assets/hbm/sounds/misc/null.ogg differ diff --git a/assets/hbm/sounds/music/recordLambdaCore.ogg b/assets/hbm/sounds/music/recordLambdaCore.ogg new file mode 100644 index 000000000..0245dd039 Binary files /dev/null and b/assets/hbm/sounds/music/recordLambdaCore.ogg differ diff --git a/assets/hbm/sounds/music/recordSectorSweep.ogg b/assets/hbm/sounds/music/recordSectorSweep.ogg new file mode 100644 index 000000000..c9671b16b Binary files /dev/null and b/assets/hbm/sounds/music/recordSectorSweep.ogg differ diff --git a/assets/hbm/sounds/music/recordVortalCombat.ogg b/assets/hbm/sounds/music/recordVortalCombat.ogg new file mode 100644 index 000000000..9b571f016 Binary files /dev/null and b/assets/hbm/sounds/music/recordVortalCombat.ogg differ diff --git a/assets/hbm/sounds/weapon/cryolatorShoot.ogg b/assets/hbm/sounds/weapon/cryolatorShoot.ogg new file mode 100644 index 000000000..8d4f3d27f Binary files /dev/null and b/assets/hbm/sounds/weapon/cryolatorShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/fatmanShoot.ogg b/assets/hbm/sounds/weapon/fatmanShoot.ogg new file mode 100644 index 000000000..661d657cc Binary files /dev/null and b/assets/hbm/sounds/weapon/fatmanShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/flamethrowerIgnite.ogg b/assets/hbm/sounds/weapon/flamethrowerIgnite.ogg new file mode 100644 index 000000000..be56ec539 Binary files /dev/null and b/assets/hbm/sounds/weapon/flamethrowerIgnite.ogg differ diff --git a/assets/hbm/sounds/weapon/flamethrowerShoot.ogg b/assets/hbm/sounds/weapon/flamethrowerShoot.ogg new file mode 100644 index 000000000..afe69a5fb Binary files /dev/null and b/assets/hbm/sounds/weapon/flamethrowerShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/heavyShoot.ogg b/assets/hbm/sounds/weapon/heavyShoot.ogg new file mode 100644 index 000000000..a15cc25da Binary files /dev/null and b/assets/hbm/sounds/weapon/heavyShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/immolatorIgnite.ogg b/assets/hbm/sounds/weapon/immolatorIgnite.ogg new file mode 100644 index 000000000..d98dd1d86 Binary files /dev/null and b/assets/hbm/sounds/weapon/immolatorIgnite.ogg differ diff --git a/assets/hbm/sounds/weapon/immolatorShoot.ogg b/assets/hbm/sounds/weapon/immolatorShoot.ogg new file mode 100644 index 000000000..9edc036ff Binary files /dev/null and b/assets/hbm/sounds/weapon/immolatorShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/osiprAltFire.ogg b/assets/hbm/sounds/weapon/osiprAltFire.ogg new file mode 100644 index 000000000..e117016cd Binary files /dev/null and b/assets/hbm/sounds/weapon/osiprAltFire.ogg differ diff --git a/assets/hbm/sounds/weapon/osiprCharging.ogg b/assets/hbm/sounds/weapon/osiprCharging.ogg new file mode 100644 index 000000000..aa65e7ddb Binary files /dev/null and b/assets/hbm/sounds/weapon/osiprCharging.ogg differ diff --git a/assets/hbm/sounds/weapon/osiprShoot.ogg b/assets/hbm/sounds/weapon/osiprShoot.ogg new file mode 100644 index 000000000..155b3c98c Binary files /dev/null and b/assets/hbm/sounds/weapon/osiprShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/revolverShoot.ogg b/assets/hbm/sounds/weapon/revolverShoot.ogg new file mode 100644 index 000000000..2e1618592 Binary files /dev/null and b/assets/hbm/sounds/weapon/revolverShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/rifleShoot.ogg b/assets/hbm/sounds/weapon/rifleShoot.ogg new file mode 100644 index 000000000..88ea4e00d Binary files /dev/null and b/assets/hbm/sounds/weapon/rifleShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/rpgShoot.ogg b/assets/hbm/sounds/weapon/rpgShoot.ogg new file mode 100644 index 000000000..59d02ce8c Binary files /dev/null and b/assets/hbm/sounds/weapon/rpgShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/schrabidiumShoot.ogg b/assets/hbm/sounds/weapon/schrabidiumShoot.ogg new file mode 100644 index 000000000..d23419529 Binary files /dev/null and b/assets/hbm/sounds/weapon/schrabidiumShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/singFlyby.ogg b/assets/hbm/sounds/weapon/singFlyby.ogg new file mode 100644 index 000000000..4dbd22471 Binary files /dev/null and b/assets/hbm/sounds/weapon/singFlyby.ogg differ diff --git a/assets/hbm/sounds/weapon/tauChargeLoop.ogg b/assets/hbm/sounds/weapon/tauChargeLoop.ogg new file mode 100644 index 000000000..4a378705b Binary files /dev/null and b/assets/hbm/sounds/weapon/tauChargeLoop.ogg differ diff --git a/assets/hbm/sounds/weapon/tauChargeLoop2.ogg b/assets/hbm/sounds/weapon/tauChargeLoop2.ogg new file mode 100644 index 000000000..275db15a8 Binary files /dev/null and b/assets/hbm/sounds/weapon/tauChargeLoop2.ogg differ diff --git a/assets/hbm/sounds/weapon/tauShoot.ogg b/assets/hbm/sounds/weapon/tauShoot.ogg new file mode 100644 index 000000000..a09b1ac43 Binary files /dev/null and b/assets/hbm/sounds/weapon/tauShoot.ogg differ diff --git a/assets/hbm/sounds/weapon/zomgShoot.ogg b/assets/hbm/sounds/weapon/zomgShoot.ogg new file mode 100644 index 000000000..e21fe0465 Binary files /dev/null and b/assets/hbm/sounds/weapon/zomgShoot.ogg differ diff --git a/assets/hbm/textures/armor/cmb_1.png b/assets/hbm/textures/armor/cmb_1.png new file mode 100644 index 000000000..072137248 Binary files /dev/null and b/assets/hbm/textures/armor/cmb_1.png differ diff --git a/assets/hbm/textures/armor/cmb_2.png b/assets/hbm/textures/armor/cmb_2.png new file mode 100644 index 000000000..789f95f33 Binary files /dev/null and b/assets/hbm/textures/armor/cmb_2.png differ diff --git a/assets/hbm/textures/armor/grenade_nan.png b/assets/hbm/textures/armor/grenade_nan.png new file mode 100644 index 000000000..b07dad82c Binary files /dev/null and b/assets/hbm/textures/armor/grenade_nan.png differ diff --git a/assets/hbm/textures/armor/hazmat_paa_1.png b/assets/hbm/textures/armor/hazmat_paa_1.png new file mode 100644 index 000000000..d10b7fbce Binary files /dev/null and b/assets/hbm/textures/armor/hazmat_paa_1.png differ diff --git a/assets/hbm/textures/armor/hazmat_paa_2.png b/assets/hbm/textures/armor/hazmat_paa_2.png new file mode 100644 index 000000000..95a152ace Binary files /dev/null and b/assets/hbm/textures/armor/hazmat_paa_2.png differ diff --git a/assets/hbm/textures/armor/paa_1.png b/assets/hbm/textures/armor/paa_1.png new file mode 100644 index 000000000..f40343b0c Binary files /dev/null and b/assets/hbm/textures/armor/paa_1.png differ diff --git a/assets/hbm/textures/armor/paa_2.png b/assets/hbm/textures/armor/paa_2.png new file mode 100644 index 000000000..89ace9e4d Binary files /dev/null and b/assets/hbm/textures/armor/paa_2.png differ diff --git a/assets/hbm/textures/blocks/block_scrap.png b/assets/hbm/textures/blocks/block_scrap.png new file mode 100644 index 000000000..befc53add Binary files /dev/null and b/assets/hbm/textures/blocks/block_scrap.png differ diff --git a/assets/hbm/textures/blocks/electrical_scrap.png b/assets/hbm/textures/blocks/electrical_scrap.png new file mode 100644 index 000000000..db9897e2e Binary files /dev/null and b/assets/hbm/textures/blocks/electrical_scrap.png differ diff --git a/assets/hbm/textures/blocks/electrical_scrap_alt.png b/assets/hbm/textures/blocks/electrical_scrap_alt.png new file mode 100644 index 000000000..d69fbf68e Binary files /dev/null and b/assets/hbm/textures/blocks/electrical_scrap_alt.png differ diff --git a/assets/hbm/textures/blocks/electrical_scrap_alt2.png b/assets/hbm/textures/blocks/electrical_scrap_alt2.png new file mode 100644 index 000000000..fd5b5c0ac Binary files /dev/null and b/assets/hbm/textures/blocks/electrical_scrap_alt2.png differ diff --git a/assets/hbm/textures/blocks/electrical_scrap_raw.png b/assets/hbm/textures/blocks/electrical_scrap_raw.png new file mode 100644 index 000000000..716244345 Binary files /dev/null and b/assets/hbm/textures/blocks/electrical_scrap_raw.png differ diff --git a/assets/hbm/textures/blocks/gravel_obsidian.png b/assets/hbm/textures/blocks/gravel_obsidian.png new file mode 100644 index 000000000..ffd84f6f8 Binary files /dev/null and b/assets/hbm/textures/blocks/gravel_obsidian.png differ diff --git a/assets/hbm/textures/blocks/gravel_obsidian_alt.png b/assets/hbm/textures/blocks/gravel_obsidian_alt.png new file mode 100644 index 000000000..7d60ca6de Binary files /dev/null and b/assets/hbm/textures/blocks/gravel_obsidian_alt.png differ diff --git a/assets/hbm/textures/blocks/ore_nether_fire.png b/assets/hbm/textures/blocks/ore_nether_fire.png new file mode 100644 index 000000000..9100e07bb Binary files /dev/null and b/assets/hbm/textures/blocks/ore_nether_fire.png differ diff --git a/assets/hbm/textures/blocks/ore_nether_plutonium.png b/assets/hbm/textures/blocks/ore_nether_plutonium.png new file mode 100644 index 000000000..e412752e6 Binary files /dev/null and b/assets/hbm/textures/blocks/ore_nether_plutonium.png differ diff --git a/assets/hbm/textures/blocks/ore_nether_schrabidium.png b/assets/hbm/textures/blocks/ore_nether_schrabidium.png new file mode 100644 index 000000000..4b0d00469 Binary files /dev/null and b/assets/hbm/textures/blocks/ore_nether_schrabidium.png differ diff --git a/assets/hbm/textures/blocks/ore_nether_sulfur.png b/assets/hbm/textures/blocks/ore_nether_sulfur.png new file mode 100644 index 000000000..967abe3a5 Binary files /dev/null and b/assets/hbm/textures/blocks/ore_nether_sulfur.png differ diff --git a/assets/hbm/textures/blocks/ore_nether_tungsten.png b/assets/hbm/textures/blocks/ore_nether_tungsten.png new file mode 100644 index 000000000..7c566fee3 Binary files /dev/null and b/assets/hbm/textures/blocks/ore_nether_tungsten.png differ diff --git a/assets/hbm/textures/blocks/ore_nether_uranium.png b/assets/hbm/textures/blocks/ore_nether_uranium.png new file mode 100644 index 000000000..ed0763da6 Binary files /dev/null and b/assets/hbm/textures/blocks/ore_nether_uranium.png differ diff --git a/assets/hbm/textures/blocks/sound_block.png b/assets/hbm/textures/blocks/sound_block.png new file mode 100644 index 000000000..05f4a4a16 Binary files /dev/null and b/assets/hbm/textures/blocks/sound_block.png differ diff --git a/assets/hbm/textures/blocks/teleporter_bottom.png b/assets/hbm/textures/blocks/teleporter_bottom.png new file mode 100644 index 000000000..f2a7b0d90 Binary files /dev/null and b/assets/hbm/textures/blocks/teleporter_bottom.png differ diff --git a/assets/hbm/textures/blocks/teleporter_side.png b/assets/hbm/textures/blocks/teleporter_side.png new file mode 100644 index 000000000..09d91c642 Binary files /dev/null and b/assets/hbm/textures/blocks/teleporter_side.png differ diff --git a/assets/hbm/textures/blocks/teleporter_top.png b/assets/hbm/textures/blocks/teleporter_top.png new file mode 100644 index 000000000..f117236b4 Binary files /dev/null and b/assets/hbm/textures/blocks/teleporter_top.png differ diff --git a/assets/hbm/textures/entity/chopper.png b/assets/hbm/textures/entity/chopper.png new file mode 100644 index 000000000..6f5e48332 Binary files /dev/null and b/assets/hbm/textures/entity/chopper.png differ diff --git a/assets/hbm/textures/entity/fallout.png b/assets/hbm/textures/entity/fallout.png new file mode 100644 index 000000000..5c6384988 Binary files /dev/null and b/assets/hbm/textures/entity/fallout.png differ diff --git a/assets/hbm/textures/gui/gui_fwatz_multiblock.png b/assets/hbm/textures/gui/gui_fwatz_multiblock.png index 126d7f3d8..96a7bc15a 100644 Binary files a/assets/hbm/textures/gui/gui_fwatz_multiblock.png and b/assets/hbm/textures/gui/gui_fwatz_multiblock.png differ diff --git a/assets/hbm/textures/gui/gui_siren.png b/assets/hbm/textures/gui/gui_siren.png new file mode 100644 index 000000000..c84cc3dc3 Binary files /dev/null and b/assets/hbm/textures/gui/gui_siren.png differ diff --git a/assets/hbm/textures/gui/gui_teleporter.png b/assets/hbm/textures/gui/gui_teleporter.png new file mode 100644 index 000000000..056cda44d Binary files /dev/null and b/assets/hbm/textures/gui/gui_teleporter.png differ diff --git a/assets/hbm/textures/gui/reix_cmd.png b/assets/hbm/textures/gui/reix_cmd.png new file mode 100644 index 000000000..060751976 Binary files /dev/null and b/assets/hbm/textures/gui/reix_cmd.png differ diff --git a/assets/hbm/textures/items/cassette.png b/assets/hbm/textures/items/cassette.png new file mode 100644 index 000000000..8c306962f Binary files /dev/null and b/assets/hbm/textures/items/cassette.png differ diff --git a/assets/hbm/textures/items/chopper.png b/assets/hbm/textures/items/chopper.png new file mode 100644 index 000000000..38bf8a7e5 Binary files /dev/null and b/assets/hbm/textures/items/chopper.png differ diff --git a/assets/hbm/textures/items/clip_bf.png b/assets/hbm/textures/items/clip_bf.png new file mode 100644 index 000000000..72c893d00 Binary files /dev/null and b/assets/hbm/textures/items/clip_bf.png differ diff --git a/assets/hbm/textures/items/clip_cryolator.png b/assets/hbm/textures/items/clip_cryolator.png new file mode 100644 index 000000000..fa788a52c Binary files /dev/null and b/assets/hbm/textures/items/clip_cryolator.png differ diff --git a/assets/hbm/textures/items/clip_emp.png b/assets/hbm/textures/items/clip_emp.png new file mode 100644 index 000000000..0f2652447 Binary files /dev/null and b/assets/hbm/textures/items/clip_emp.png differ diff --git a/assets/hbm/textures/items/clip_immolator.png b/assets/hbm/textures/items/clip_immolator.png new file mode 100644 index 000000000..286c3a2e3 Binary files /dev/null and b/assets/hbm/textures/items/clip_immolator.png differ diff --git a/assets/hbm/textures/items/clip_mirv.png b/assets/hbm/textures/items/clip_mirv.png new file mode 100644 index 000000000..ecca938f2 Binary files /dev/null and b/assets/hbm/textures/items/clip_mirv.png differ diff --git a/assets/hbm/textures/items/clip_mp40.png b/assets/hbm/textures/items/clip_mp40.png new file mode 100644 index 000000000..21ba8a490 Binary files /dev/null and b/assets/hbm/textures/items/clip_mp40.png differ diff --git a/assets/hbm/textures/items/cmb_axe.png b/assets/hbm/textures/items/cmb_axe.png new file mode 100644 index 000000000..316144683 Binary files /dev/null and b/assets/hbm/textures/items/cmb_axe.png differ diff --git a/assets/hbm/textures/items/cmb_boots.png b/assets/hbm/textures/items/cmb_boots.png new file mode 100644 index 000000000..d7d4dcd12 Binary files /dev/null and b/assets/hbm/textures/items/cmb_boots.png differ diff --git a/assets/hbm/textures/items/cmb_helmet.png b/assets/hbm/textures/items/cmb_helmet.png new file mode 100644 index 000000000..ba1dcc352 Binary files /dev/null and b/assets/hbm/textures/items/cmb_helmet.png differ diff --git a/assets/hbm/textures/items/cmb_hoe.png b/assets/hbm/textures/items/cmb_hoe.png new file mode 100644 index 000000000..fccd1c153 Binary files /dev/null and b/assets/hbm/textures/items/cmb_hoe.png differ diff --git a/assets/hbm/textures/items/cmb_legs.png b/assets/hbm/textures/items/cmb_legs.png new file mode 100644 index 000000000..7981c3c33 Binary files /dev/null and b/assets/hbm/textures/items/cmb_legs.png differ diff --git a/assets/hbm/textures/items/cmb_pickaxe.png b/assets/hbm/textures/items/cmb_pickaxe.png new file mode 100644 index 000000000..e5d7729bd Binary files /dev/null and b/assets/hbm/textures/items/cmb_pickaxe.png differ diff --git a/assets/hbm/textures/items/cmb_plate.png b/assets/hbm/textures/items/cmb_plate.png new file mode 100644 index 000000000..148171dbc Binary files /dev/null and b/assets/hbm/textures/items/cmb_plate.png differ diff --git a/assets/hbm/textures/items/cmb_shovel.png b/assets/hbm/textures/items/cmb_shovel.png new file mode 100644 index 000000000..7d6911b95 Binary files /dev/null and b/assets/hbm/textures/items/cmb_shovel.png differ diff --git a/assets/hbm/textures/items/cmb_sword.png b/assets/hbm/textures/items/cmb_sword.png new file mode 100644 index 000000000..e9e6ec17b Binary files /dev/null and b/assets/hbm/textures/items/cmb_sword.png differ diff --git a/assets/hbm/textures/items/discharge.png b/assets/hbm/textures/items/discharge.png new file mode 100644 index 000000000..0a222d2ec Binary files /dev/null and b/assets/hbm/textures/items/discharge.png differ diff --git a/assets/hbm/textures/items/discharge.png.mcmeta b/assets/hbm/textures/items/discharge.png.mcmeta new file mode 100644 index 000000000..dd1bedb12 --- /dev/null +++ b/assets/hbm/textures/items/discharge.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} diff --git a/assets/hbm/textures/items/empblast.png b/assets/hbm/textures/items/empblast.png new file mode 100644 index 000000000..12caa186e Binary files /dev/null and b/assets/hbm/textures/items/empblast.png differ diff --git a/assets/hbm/textures/items/entanglement_kit.png b/assets/hbm/textures/items/entanglement_kit.png new file mode 100644 index 000000000..f55ea8809 Binary files /dev/null and b/assets/hbm/textures/items/entanglement_kit.png differ diff --git a/assets/hbm/textures/items/filter_coal.png b/assets/hbm/textures/items/filter_coal.png new file mode 100644 index 000000000..2294dc2f8 Binary files /dev/null and b/assets/hbm/textures/items/filter_coal.png differ diff --git a/assets/hbm/textures/items/flame_1.png b/assets/hbm/textures/items/flame_1.png new file mode 100644 index 000000000..9392faaeb Binary files /dev/null and b/assets/hbm/textures/items/flame_1.png differ diff --git a/assets/hbm/textures/items/flame_10.png b/assets/hbm/textures/items/flame_10.png new file mode 100644 index 000000000..de70d8de4 Binary files /dev/null and b/assets/hbm/textures/items/flame_10.png differ diff --git a/assets/hbm/textures/items/flame_2.png b/assets/hbm/textures/items/flame_2.png new file mode 100644 index 000000000..f87131035 Binary files /dev/null and b/assets/hbm/textures/items/flame_2.png differ diff --git a/assets/hbm/textures/items/flame_3.png b/assets/hbm/textures/items/flame_3.png new file mode 100644 index 000000000..5e0f503f8 Binary files /dev/null and b/assets/hbm/textures/items/flame_3.png differ diff --git a/assets/hbm/textures/items/flame_4.png b/assets/hbm/textures/items/flame_4.png new file mode 100644 index 000000000..fb5727ada Binary files /dev/null and b/assets/hbm/textures/items/flame_4.png differ diff --git a/assets/hbm/textures/items/flame_5.png b/assets/hbm/textures/items/flame_5.png new file mode 100644 index 000000000..3aeb5467b Binary files /dev/null and b/assets/hbm/textures/items/flame_5.png differ diff --git a/assets/hbm/textures/items/flame_6.png b/assets/hbm/textures/items/flame_6.png new file mode 100644 index 000000000..8402314a0 Binary files /dev/null and b/assets/hbm/textures/items/flame_6.png differ diff --git a/assets/hbm/textures/items/flame_7.png b/assets/hbm/textures/items/flame_7.png new file mode 100644 index 000000000..a010e4163 Binary files /dev/null and b/assets/hbm/textures/items/flame_7.png differ diff --git a/assets/hbm/textures/items/flame_8.png b/assets/hbm/textures/items/flame_8.png new file mode 100644 index 000000000..e46390472 Binary files /dev/null and b/assets/hbm/textures/items/flame_8.png differ diff --git a/assets/hbm/textures/items/flame_9.png b/assets/hbm/textures/items/flame_9.png new file mode 100644 index 000000000..fcfbe93a6 Binary files /dev/null and b/assets/hbm/textures/items/flame_9.png differ diff --git a/assets/hbm/textures/items/grenade_aschrab.png b/assets/hbm/textures/items/grenade_aschrab.png new file mode 100644 index 000000000..55e1ec187 Binary files /dev/null and b/assets/hbm/textures/items/grenade_aschrab.png differ diff --git a/assets/hbm/textures/items/grenade_cluster_alt.png b/assets/hbm/textures/items/grenade_cluster_alt.png new file mode 100644 index 000000000..df175e718 Binary files /dev/null and b/assets/hbm/textures/items/grenade_cluster_alt.png differ diff --git a/assets/hbm/textures/items/grenade_electric_alt.png b/assets/hbm/textures/items/grenade_electric_alt.png new file mode 100644 index 000000000..4bbd9a39b Binary files /dev/null and b/assets/hbm/textures/items/grenade_electric_alt.png differ diff --git a/assets/hbm/textures/items/grenade_fire_alt.png b/assets/hbm/textures/items/grenade_fire_alt.png new file mode 100644 index 000000000..af68a2aa8 Binary files /dev/null and b/assets/hbm/textures/items/grenade_fire_alt.png differ diff --git a/assets/hbm/textures/items/grenade_flare_alt.png b/assets/hbm/textures/items/grenade_flare_alt.png new file mode 100644 index 000000000..a87fca67e Binary files /dev/null and b/assets/hbm/textures/items/grenade_flare_alt.png differ diff --git a/assets/hbm/textures/items/grenade_frag_alt.png b/assets/hbm/textures/items/grenade_frag_alt.png new file mode 100644 index 000000000..4dcf848dc Binary files /dev/null and b/assets/hbm/textures/items/grenade_frag_alt.png differ diff --git a/assets/hbm/textures/items/grenade_gas_alt.png b/assets/hbm/textures/items/grenade_gas_alt.png new file mode 100644 index 000000000..a386f9b7a Binary files /dev/null and b/assets/hbm/textures/items/grenade_gas_alt.png differ diff --git a/assets/hbm/textures/items/grenade_nuke_alt.png b/assets/hbm/textures/items/grenade_nuke_alt.png new file mode 100644 index 000000000..3419864d6 Binary files /dev/null and b/assets/hbm/textures/items/grenade_nuke_alt.png differ diff --git a/assets/hbm/textures/items/grenade_plasma_alt.png b/assets/hbm/textures/items/grenade_plasma_alt.png new file mode 100644 index 000000000..309dce343 Binary files /dev/null and b/assets/hbm/textures/items/grenade_plasma_alt.png differ diff --git a/assets/hbm/textures/items/grenade_poison_alt.png b/assets/hbm/textures/items/grenade_poison_alt.png new file mode 100644 index 000000000..db8953155 Binary files /dev/null and b/assets/hbm/textures/items/grenade_poison_alt.png differ diff --git a/assets/hbm/textures/items/grenade_schrabidium_alt.png b/assets/hbm/textures/items/grenade_schrabidium_alt.png new file mode 100644 index 000000000..290ae3b72 Binary files /dev/null and b/assets/hbm/textures/items/grenade_schrabidium_alt.png differ diff --git a/assets/hbm/textures/items/grenade_tau_alt.png b/assets/hbm/textures/items/grenade_tau_alt.png new file mode 100644 index 000000000..e42ec8249 Binary files /dev/null and b/assets/hbm/textures/items/grenade_tau_alt.png differ diff --git a/assets/hbm/textures/items/grenade_zomg.png b/assets/hbm/textures/items/grenade_zomg.png new file mode 100644 index 000000000..094e7f3da Binary files /dev/null and b/assets/hbm/textures/items/grenade_zomg.png differ diff --git a/assets/hbm/textures/items/gun_bf.png b/assets/hbm/textures/items/gun_bf.png new file mode 100644 index 000000000..67bb9a89f Binary files /dev/null and b/assets/hbm/textures/items/gun_bf.png differ diff --git a/assets/hbm/textures/items/gun_bf_ammo.png b/assets/hbm/textures/items/gun_bf_ammo.png new file mode 100644 index 000000000..cb8f06db8 Binary files /dev/null and b/assets/hbm/textures/items/gun_bf_ammo.png differ diff --git a/assets/hbm/textures/items/gun_cryolator.png b/assets/hbm/textures/items/gun_cryolator.png new file mode 100644 index 000000000..2bb956205 Binary files /dev/null and b/assets/hbm/textures/items/gun_cryolator.png differ diff --git a/assets/hbm/textures/items/gun_cryolator_ammo.png b/assets/hbm/textures/items/gun_cryolator_ammo.png new file mode 100644 index 000000000..11a1af457 Binary files /dev/null and b/assets/hbm/textures/items/gun_cryolator_ammo.png differ diff --git a/assets/hbm/textures/items/gun_emp.png b/assets/hbm/textures/items/gun_emp.png new file mode 100644 index 000000000..b4be7d1f7 Binary files /dev/null and b/assets/hbm/textures/items/gun_emp.png differ diff --git a/assets/hbm/textures/items/gun_emp_ammo.png b/assets/hbm/textures/items/gun_emp_ammo.png new file mode 100644 index 000000000..15ca8e10f Binary files /dev/null and b/assets/hbm/textures/items/gun_emp_ammo.png differ diff --git a/assets/hbm/textures/items/gun_immolator.png b/assets/hbm/textures/items/gun_immolator.png new file mode 100644 index 000000000..26e05d4d6 Binary files /dev/null and b/assets/hbm/textures/items/gun_immolator.png differ diff --git a/assets/hbm/textures/items/gun_immolator_ammo.png b/assets/hbm/textures/items/gun_immolator_ammo.png new file mode 100644 index 000000000..33069873c Binary files /dev/null and b/assets/hbm/textures/items/gun_immolator_ammo.png differ diff --git a/assets/hbm/textures/items/gun_mirv.png b/assets/hbm/textures/items/gun_mirv.png new file mode 100644 index 000000000..7c03eff97 Binary files /dev/null and b/assets/hbm/textures/items/gun_mirv.png differ diff --git a/assets/hbm/textures/items/gun_mirv_ammo.png b/assets/hbm/textures/items/gun_mirv_ammo.png new file mode 100644 index 000000000..8a99d897a Binary files /dev/null and b/assets/hbm/textures/items/gun_mirv_ammo.png differ diff --git a/assets/hbm/textures/items/gun_mp40.png b/assets/hbm/textures/items/gun_mp40.png new file mode 100644 index 000000000..779a68502 Binary files /dev/null and b/assets/hbm/textures/items/gun_mp40.png differ diff --git a/assets/hbm/textures/items/gun_mp40_ammo.png b/assets/hbm/textures/items/gun_mp40_ammo.png new file mode 100644 index 000000000..6c4ae2d18 Binary files /dev/null and b/assets/hbm/textures/items/gun_mp40_ammo.png differ diff --git a/assets/hbm/textures/items/gun_revolver_inverted.png b/assets/hbm/textures/items/gun_revolver_inverted.png new file mode 100644 index 000000000..1c9925700 Binary files /dev/null and b/assets/hbm/textures/items/gun_revolver_inverted.png differ diff --git a/assets/hbm/textures/items/hazmat_paa_boots.png b/assets/hbm/textures/items/hazmat_paa_boots.png new file mode 100644 index 000000000..fb3812a62 Binary files /dev/null and b/assets/hbm/textures/items/hazmat_paa_boots.png differ diff --git a/assets/hbm/textures/items/hazmat_paa_helmet.png b/assets/hbm/textures/items/hazmat_paa_helmet.png new file mode 100644 index 000000000..39e809905 Binary files /dev/null and b/assets/hbm/textures/items/hazmat_paa_helmet.png differ diff --git a/assets/hbm/textures/items/hazmat_paa_legs.png b/assets/hbm/textures/items/hazmat_paa_legs.png new file mode 100644 index 000000000..95b7e7887 Binary files /dev/null and b/assets/hbm/textures/items/hazmat_paa_legs.png differ diff --git a/assets/hbm/textures/items/hazmat_paa_plate.png b/assets/hbm/textures/items/hazmat_paa_plate.png new file mode 100644 index 000000000..c1d9c7f1b Binary files /dev/null and b/assets/hbm/textures/items/hazmat_paa_plate.png differ diff --git a/assets/hbm/textures/items/ingot_caesium.png b/assets/hbm/textures/items/ingot_caesium.png new file mode 100644 index 000000000..e30f2921a Binary files /dev/null and b/assets/hbm/textures/items/ingot_caesium.png differ diff --git a/assets/hbm/textures/items/linker.png b/assets/hbm/textures/items/linker.png new file mode 100644 index 000000000..fa1cedb78 Binary files /dev/null and b/assets/hbm/textures/items/linker.png differ diff --git a/assets/hbm/textures/items/ln2_1.png b/assets/hbm/textures/items/ln2_1.png new file mode 100644 index 000000000..afdd4453c Binary files /dev/null and b/assets/hbm/textures/items/ln2_1.png differ diff --git a/assets/hbm/textures/items/ln2_10.png b/assets/hbm/textures/items/ln2_10.png new file mode 100644 index 000000000..d6e6b40a7 Binary files /dev/null and b/assets/hbm/textures/items/ln2_10.png differ diff --git a/assets/hbm/textures/items/ln2_2.png b/assets/hbm/textures/items/ln2_2.png new file mode 100644 index 000000000..af7187803 Binary files /dev/null and b/assets/hbm/textures/items/ln2_2.png differ diff --git a/assets/hbm/textures/items/ln2_3.png b/assets/hbm/textures/items/ln2_3.png new file mode 100644 index 000000000..55b04d07a Binary files /dev/null and b/assets/hbm/textures/items/ln2_3.png differ diff --git a/assets/hbm/textures/items/ln2_4.png b/assets/hbm/textures/items/ln2_4.png new file mode 100644 index 000000000..f33742080 Binary files /dev/null and b/assets/hbm/textures/items/ln2_4.png differ diff --git a/assets/hbm/textures/items/ln2_5.png b/assets/hbm/textures/items/ln2_5.png new file mode 100644 index 000000000..20e0fcefd Binary files /dev/null and b/assets/hbm/textures/items/ln2_5.png differ diff --git a/assets/hbm/textures/items/ln2_6.png b/assets/hbm/textures/items/ln2_6.png new file mode 100644 index 000000000..41256391a Binary files /dev/null and b/assets/hbm/textures/items/ln2_6.png differ diff --git a/assets/hbm/textures/items/ln2_7.png b/assets/hbm/textures/items/ln2_7.png new file mode 100644 index 000000000..bd3a7ba0f Binary files /dev/null and b/assets/hbm/textures/items/ln2_7.png differ diff --git a/assets/hbm/textures/items/ln2_8.png b/assets/hbm/textures/items/ln2_8.png new file mode 100644 index 000000000..18195c822 Binary files /dev/null and b/assets/hbm/textures/items/ln2_8.png differ diff --git a/assets/hbm/textures/items/ln2_9.png b/assets/hbm/textures/items/ln2_9.png new file mode 100644 index 000000000..8cc282346 Binary files /dev/null and b/assets/hbm/textures/items/ln2_9.png differ diff --git a/assets/hbm/textures/items/magnetron.png b/assets/hbm/textures/items/magnetron.png new file mode 100644 index 000000000..5f160f01f Binary files /dev/null and b/assets/hbm/textures/items/magnetron.png differ diff --git a/assets/hbm/textures/items/magnetron_alt.png b/assets/hbm/textures/items/magnetron_alt.png new file mode 100644 index 000000000..7824f7c9d Binary files /dev/null and b/assets/hbm/textures/items/magnetron_alt.png differ diff --git a/assets/hbm/textures/items/paa_boots.png b/assets/hbm/textures/items/paa_boots.png new file mode 100644 index 000000000..62aa699a5 Binary files /dev/null and b/assets/hbm/textures/items/paa_boots.png differ diff --git a/assets/hbm/textures/items/paa_legs.png b/assets/hbm/textures/items/paa_legs.png new file mode 100644 index 000000000..6be3ef0d1 Binary files /dev/null and b/assets/hbm/textures/items/paa_legs.png differ diff --git a/assets/hbm/textures/items/paa_plate.png b/assets/hbm/textures/items/paa_plate.png new file mode 100644 index 000000000..cfce3ddb8 Binary files /dev/null and b/assets/hbm/textures/items/paa_plate.png differ diff --git a/assets/hbm/textures/items/powder_caesium.png b/assets/hbm/textures/items/powder_caesium.png new file mode 100644 index 000000000..be2317107 Binary files /dev/null and b/assets/hbm/textures/items/powder_caesium.png differ diff --git a/assets/hbm/textures/items/powder_plutonium.png b/assets/hbm/textures/items/powder_plutonium.png new file mode 100644 index 000000000..7f52da135 Binary files /dev/null and b/assets/hbm/textures/items/powder_plutonium.png differ diff --git a/assets/hbm/textures/items/powder_thermite.png b/assets/hbm/textures/items/powder_thermite.png new file mode 100644 index 000000000..4fe5c8fa8 Binary files /dev/null and b/assets/hbm/textures/items/powder_thermite.png differ diff --git a/assets/hbm/textures/items/record_lc.png b/assets/hbm/textures/items/record_lc.png new file mode 100644 index 000000000..94b608ffc Binary files /dev/null and b/assets/hbm/textures/items/record_lc.png differ diff --git a/assets/hbm/textures/items/record_ss.png b/assets/hbm/textures/items/record_ss.png new file mode 100644 index 000000000..c556efea9 Binary files /dev/null and b/assets/hbm/textures/items/record_ss.png differ diff --git a/assets/hbm/textures/items/record_vc.png b/assets/hbm/textures/items/record_vc.png new file mode 100644 index 000000000..b75b71e05 Binary files /dev/null and b/assets/hbm/textures/items/record_vc.png differ diff --git a/assets/hbm/textures/items/telepad.png b/assets/hbm/textures/items/telepad.png new file mode 100644 index 000000000..e22fa3a4b Binary files /dev/null and b/assets/hbm/textures/items/telepad.png differ diff --git a/assets/hbm/textures/models/BFLauncher.png b/assets/hbm/textures/models/BFLauncher.png new file mode 100644 index 000000000..b1f69982c Binary files /dev/null and b/assets/hbm/textures/models/BFLauncher.png differ diff --git a/assets/hbm/textures/models/BaleFireCrashedUV.png b/assets/hbm/textures/models/BaleFireCrashedUV.png deleted file mode 100644 index b1ad5c997..000000000 Binary files a/assets/hbm/textures/models/BaleFireCrashedUV.png and /dev/null differ diff --git a/assets/hbm/textures/models/BaleFlare.png b/assets/hbm/textures/models/BaleFlare.png new file mode 100644 index 000000000..f75ae16be Binary files /dev/null and b/assets/hbm/textures/models/BaleFlare.png differ diff --git a/assets/hbm/textures/models/BombGenericLargeLayout.png b/assets/hbm/textures/models/BombGenericLargeLayout.png deleted file mode 100644 index 04b6b9671..000000000 Binary files a/assets/hbm/textures/models/BombGenericLargeLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/BombGenericLayout.png b/assets/hbm/textures/models/BombGenericLayout.png deleted file mode 100644 index 6d5eb922e..000000000 Binary files a/assets/hbm/textures/models/BombGenericLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/EMPBlast.png b/assets/hbm/textures/models/EMPBlast.png new file mode 100644 index 000000000..ffa03d1bb Binary files /dev/null and b/assets/hbm/textures/models/EMPBlast.png differ diff --git a/assets/hbm/textures/models/FatManLayout.png b/assets/hbm/textures/models/FatManLayout.png deleted file mode 100644 index 4f337a638..000000000 Binary files a/assets/hbm/textures/models/FatManLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/FatManLayout2.png b/assets/hbm/textures/models/FatManLayout2.png deleted file mode 100644 index 549931a4d..000000000 Binary files a/assets/hbm/textures/models/FatManLayout2.png and /dev/null differ diff --git a/assets/hbm/textures/models/FatmanLauncher.png b/assets/hbm/textures/models/FatmanLauncher.png index 6d8eed577..44968347b 100644 Binary files a/assets/hbm/textures/models/FatmanLauncher.png and b/assets/hbm/textures/models/FatmanLauncher.png differ diff --git a/assets/hbm/textures/models/FleijaLayout.png b/assets/hbm/textures/models/FleijaLayout.png deleted file mode 100644 index 44f86c44b..000000000 Binary files a/assets/hbm/textures/models/FleijaLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/FleijaTemplate.png b/assets/hbm/textures/models/FleijaTemplate.png deleted file mode 100644 index 1c1d1c502..000000000 Binary files a/assets/hbm/textures/models/FleijaTemplate.png and /dev/null differ diff --git a/assets/hbm/textures/models/IvyMikeLayout.png b/assets/hbm/textures/models/IvyMikeLayout.png deleted file mode 100644 index baefff617..000000000 Binary files a/assets/hbm/textures/models/IvyMikeLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/LaunchPad.png b/assets/hbm/textures/models/LaunchPad.png deleted file mode 100644 index da13c62eb..000000000 Binary files a/assets/hbm/textures/models/LaunchPad.png and /dev/null differ diff --git a/assets/hbm/textures/models/LilBoy1.png b/assets/hbm/textures/models/LilBoy1.png deleted file mode 100644 index 5acf75faf..000000000 Binary files a/assets/hbm/textures/models/LilBoy1.png and /dev/null differ diff --git a/assets/hbm/textures/models/MIRVLauncher.png b/assets/hbm/textures/models/MIRVLauncher.png new file mode 100644 index 000000000..29eb8037b Binary files /dev/null and b/assets/hbm/textures/models/MIRVLauncher.png differ diff --git a/assets/hbm/textures/models/Mirv.png b/assets/hbm/textures/models/Mirv.png index 0f0c3fbdc..06d6bc88a 100644 Binary files a/assets/hbm/textures/models/Mirv.png and b/assets/hbm/textures/models/Mirv.png differ diff --git a/assets/hbm/textures/models/Missile.png b/assets/hbm/textures/models/Missile.png deleted file mode 100644 index ecb23ec99..000000000 Binary files a/assets/hbm/textures/models/Missile.png and /dev/null differ diff --git a/assets/hbm/textures/models/MissileGenericLayout.png b/assets/hbm/textures/models/MissileGenericLayout.png deleted file mode 100644 index 7357687fd..000000000 Binary files a/assets/hbm/textures/models/MissileGenericLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/MissileHugeLayout.png b/assets/hbm/textures/models/MissileHugeLayout.png deleted file mode 100644 index e68ce58a0..000000000 Binary files a/assets/hbm/textures/models/MissileHugeLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/MissileThermal.png b/assets/hbm/textures/models/MissileThermal.png deleted file mode 100644 index c4b7b0cdd..000000000 Binary files a/assets/hbm/textures/models/MissileThermal.png and /dev/null differ diff --git a/assets/hbm/textures/models/MissileV2Layout.png b/assets/hbm/textures/models/MissileV2Layout.png deleted file mode 100644 index a27190229..000000000 Binary files a/assets/hbm/textures/models/MissileV2Layout.png and /dev/null differ diff --git a/assets/hbm/textures/models/ModelBigSword.png b/assets/hbm/textures/models/ModelBigSword.png deleted file mode 100644 index 2ae258264..000000000 Binary files a/assets/hbm/textures/models/ModelBigSword.png and /dev/null differ diff --git a/assets/hbm/textures/models/ModelCryolator.png b/assets/hbm/textures/models/ModelCryolator.png new file mode 100644 index 000000000..89d71fb71 Binary files /dev/null and b/assets/hbm/textures/models/ModelCryolator.png differ diff --git a/assets/hbm/textures/models/ModelEMPRay.png b/assets/hbm/textures/models/ModelEMPRay.png new file mode 100644 index 000000000..079430b27 Binary files /dev/null and b/assets/hbm/textures/models/ModelEMPRay.png differ diff --git a/assets/hbm/textures/models/ModelImmolator.png b/assets/hbm/textures/models/ModelImmolator.png new file mode 100644 index 000000000..2a54c1359 Binary files /dev/null and b/assets/hbm/textures/models/ModelImmolator.png differ diff --git a/assets/hbm/textures/models/ModelMP.png b/assets/hbm/textures/models/ModelMP.png index 4fd02a6e8..a094364f6 100644 Binary files a/assets/hbm/textures/models/ModelMP.png and b/assets/hbm/textures/models/ModelMP.png differ diff --git a/assets/hbm/textures/models/ModelMP40.png b/assets/hbm/textures/models/ModelMP40.png new file mode 100644 index 000000000..e16cb5ba9 Binary files /dev/null and b/assets/hbm/textures/models/ModelMP40.png differ diff --git a/assets/hbm/textures/models/ModelMP_alt.png b/assets/hbm/textures/models/ModelMP_alt.png new file mode 100644 index 000000000..4fd02a6e8 Binary files /dev/null and b/assets/hbm/textures/models/ModelMP_alt.png differ diff --git a/assets/hbm/textures/models/ModelStatueLayout.png b/assets/hbm/textures/models/ModelStatueLayout.png deleted file mode 100644 index de0ffe9d5..000000000 Binary files a/assets/hbm/textures/models/ModelStatueLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/NukeCloudHuge.png b/assets/hbm/textures/models/NukeCloudHuge.png deleted file mode 100644 index 85a2ed634..000000000 Binary files a/assets/hbm/textures/models/NukeCloudHuge.png and /dev/null differ diff --git a/assets/hbm/textures/models/PlasmaBeam.png b/assets/hbm/textures/models/PlasmaBeam.png new file mode 100644 index 000000000..608752d56 Binary files /dev/null and b/assets/hbm/textures/models/PlasmaBeam.png differ diff --git a/assets/hbm/textures/models/PrototypeLayout.png b/assets/hbm/textures/models/PrototypeLayout.png deleted file mode 100644 index 6c08b7682..000000000 Binary files a/assets/hbm/textures/models/PrototypeLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/Rainbow.png b/assets/hbm/textures/models/Rainbow.png deleted file mode 100644 index 23a9d949d..000000000 Binary files a/assets/hbm/textures/models/Rainbow.png and /dev/null differ diff --git a/assets/hbm/textures/models/Ring.png b/assets/hbm/textures/models/Ring.png deleted file mode 100644 index a96767be1..000000000 Binary files a/assets/hbm/textures/models/Ring.png and /dev/null differ diff --git a/assets/hbm/textures/models/Ring2.png b/assets/hbm/textures/models/Ring2.png index d52ae8735..89bc8bca5 100644 Binary files a/assets/hbm/textures/models/Ring2.png and b/assets/hbm/textures/models/Ring2.png differ diff --git a/assets/hbm/textures/models/TheGadget1.png b/assets/hbm/textures/models/TheGadget1.png deleted file mode 100644 index a1d5e58e4..000000000 Binary files a/assets/hbm/textures/models/TheGadget1.png and /dev/null differ diff --git a/assets/hbm/textures/models/TheGadget3.png b/assets/hbm/textures/models/TheGadget3.png deleted file mode 100644 index 6c9a51a00..000000000 Binary files a/assets/hbm/textures/models/TheGadget3.png and /dev/null differ diff --git a/assets/hbm/textures/models/TsarBombaLayout.png b/assets/hbm/textures/models/TsarBombaLayout.png deleted file mode 100644 index 68aff45bd..000000000 Binary files a/assets/hbm/textures/models/TsarBombaLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/Turret.png b/assets/hbm/textures/models/Turret.png deleted file mode 100644 index ea75ffd8b..000000000 Binary files a/assets/hbm/textures/models/Turret.png and /dev/null differ diff --git a/assets/hbm/textures/models/UF6TankLayout.png b/assets/hbm/textures/models/UF6TankLayout.png deleted file mode 100644 index ae85d1f5d..000000000 Binary files a/assets/hbm/textures/models/UF6TankLayout.png and /dev/null differ diff --git a/assets/hbm/textures/models/centrifuge1.png b/assets/hbm/textures/models/centrifuge1.png deleted file mode 100644 index 71981252f..000000000 Binary files a/assets/hbm/textures/models/centrifuge1.png and /dev/null differ diff --git a/assets/hbm/textures/models/centrifugelayout.png b/assets/hbm/textures/models/centrifugelayout.png deleted file mode 100644 index 1f7f7d9dc..000000000 Binary files a/assets/hbm/textures/models/centrifugelayout.png and /dev/null differ diff --git a/com/hbm/blocks/AcidBlock.java b/com/hbm/blocks/AcidBlock.java index 2f47b2c98..3409b0b9c 100644 --- a/com/hbm/blocks/AcidBlock.java +++ b/com/hbm/blocks/AcidBlock.java @@ -2,7 +2,7 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.entity.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; import com.hbm.lib.RefStrings; diff --git a/com/hbm/blocks/BlockCrashedBomb.java b/com/hbm/blocks/BlockCrashedBomb.java index 121a1beee..a88053281 100644 --- a/com/hbm/blocks/BlockCrashedBomb.java +++ b/com/hbm/blocks/BlockCrashedBomb.java @@ -4,7 +4,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Random; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionParticleB; import com.hbm.interfaces.IBomb; import com.hbm.items.ModItems; @@ -86,7 +86,7 @@ public class BlockCrashedBomb extends BlockContainer implements IBomb { entity0.posX = x; entity0.posY = y; entity0.posZ = z; - entity0.destructionRange = 35; + entity0.destructionRange = MainRegistry.fatmanRadius; entity0.speed = 25; entity0.coefficient = 10.0F; diff --git a/com/hbm/blocks/BlockCrate.java b/com/hbm/blocks/BlockCrate.java index 97418500b..d132f97b3 100644 --- a/com/hbm/blocks/BlockCrate.java +++ b/com/hbm/blocks/BlockCrate.java @@ -34,6 +34,7 @@ public class BlockCrate extends BlockFalling { { dropItems(world, x, y, z); world.setBlockToAir(x, y, z); + world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 1.0F, 1.0F); return true; } else { if(world.isRemote) @@ -47,109 +48,38 @@ public class BlockCrate extends BlockFalling { public void dropItems(World world, int x, int y, int z) { Random rand = new Random(); + List list1 = new ArrayList(); + + list1 = this.addToListWithWeight(list1, ModItems.syringe_metal_stimpak, 10); + list1 = this.addToListWithWeight(list1, ModItems.syringe_antidote, 5); + list1 = this.addToListWithWeight(list1, ModItems.clip_revolver_iron, 9); + list1 = this.addToListWithWeight(list1, ModItems.clip_revolver, 7); + list1 = this.addToListWithWeight(list1, ModItems.clip_revolver_gold, 4); + list1 = this.addToListWithWeight(list1, ModItems.clip_revolver_lead, 6); + list1 = this.addToListWithWeight(list1, ModItems.clip_revolver_schrabidium, 1); + list1 = this.addToListWithWeight(list1, ModItems.clip_revolver_cursed, 5); + list1 = this.addToListWithWeight(list1, ModItems.clip_rpg, 5); + list1 = this.addToListWithWeight(list1, ModItems.clip_fatman, 3); + list1 = this.addToListWithWeight(list1, ModItems.clip_mirv, 1); + list1 = this.addToListWithWeight(list1, ModItems.clip_bf, 0); + list1 = this.addToListWithWeight(list1, ModItems.clip_mp40, 7); + list1 = this.addToListWithWeight(list1, ModItems.clip_osipr, 7); + list1 = this.addToListWithWeight(list1, ModItems.clip_immolator, 4); + list1 = this.addToListWithWeight(list1, ModItems.clip_cryolator, 4); + list1 = this.addToListWithWeight(list1, ModItems.clip_mp, 3); + list1 = this.addToListWithWeight(list1, ModItems.clip_xvl1456, 5); + list1 = this.addToListWithWeight(list1, ModItems.clip_emp, 3); + list1 = this.addToListWithWeight(list1, ModItems.grenade_generic, 8); + list1 = this.addToListWithWeight(list1, ModItems.grenade_strong, 6); + list1 = this.addToListWithWeight(list1, ModItems.grenade_mk2, 4); + list1 = this.addToListWithWeight(list1, ModItems.grenade_flare, 4); + List list = new ArrayList(); - switch(rand.nextInt(23)) { - case 0: - list.add(ModItems.clip_revolver_iron); - list.add(ModItems.clip_revolver_iron); - break; - case 1: - list.add(ModItems.clip_revolver_iron); - list.add(ModItems.syringe_metal_stimpak); - list.add(ModItems.syringe_metal_stimpak); - break; - case 2: - list.add(ModItems.clip_revolver); - list.add(ModItems.syringe_metal_stimpak); - break; - case 3: - list.add(ModItems.clip_osipr); - list.add(ModItems.syringe_metal_stimpak); - break; - case 4: - list.add(ModItems.clip_osipr); - list.add(ModItems.clip_osipr); - list.add(ModItems.syringe_metal_stimpak); - break; - case 5: - list.add(ModItems.clip_revolver_iron); - list.add(ModItems.clip_revolver); - break; - case 6: - list.add(ModItems.clip_revolver_iron); - list.add(ModItems.clip_revolver_iron); - list.add(ModItems.clip_revolver); - break; - case 7: - list.add(ModItems.clip_revolver_iron); - list.add(ModItems.clip_osipr); - break; - case 8: - list.add(ModItems.clip_revolver_gold); - list.add(ModItems.syringe_metal_stimpak); - break; - case 9: - list.add(ModItems.clip_revolver_gold); - list.add(ModItems.clip_revolver_gold); - list.add(ModItems.syringe_metal_stimpak); - break; - case 10: - list.add(ModItems.clip_revolver_schrabidium); - break; - case 11: - list.add(ModItems.clip_xvl1456); - break; - case 12: - list.add(ModItems.clip_xvl1456); - list.add(ModItems.clip_xvl1456); - break; - case 13: - list.add(ModItems.clip_xvl1456); - list.add(ModItems.syringe_metal_stimpak); - break; - case 14: - list.add(ModItems.clip_osipr); - list.add(ModItems.clip_osipr); - list.add(ModItems.syringe_metal_stimpak); - break; - case 15: - list.add(ModItems.clip_osipr); - list.add(ModItems.syringe_metal_stimpak); - list.add(ModItems.syringe_metal_stimpak); - break; - case 16: - list.add(ModItems.clip_revolver_gold); - list.add(ModItems.clip_revolver_gold); - break; - case 17: - list.add(ModItems.clip_rpg); - list.add(ModItems.clip_rpg); - break; - case 18: - list.add(ModItems.clip_rpg); - list.add(ModItems.syringe_metal_stimpak); - break; - case 19: - list.add(ModItems.clip_rpg); - list.add(ModItems.clip_revolver_iron); - list.add(ModItems.syringe_metal_stimpak); - break; - case 20: - list.add(ModItems.clip_rpg); - list.add(ModItems.clip_revolver); - list.add(ModItems.syringe_metal_stimpak); - break; - case 21: - list.add(ModItems.syringe_metal_stimpak); - list.add(ModItems.syringe_metal_stimpak); - break; - case 22: - list.add(ModItems.syringe_metal_stimpak); - list.add(ModItems.syringe_metal_stimpak); - list.add(ModItems.syringe_metal_stimpak); - break; - } + int i = rand.nextInt(5); + for(int j = 0; j < i; j++) + list.add(list1.get(rand.nextInt(list1.size()))); + for(Item stack : list) { float f = rand.nextFloat() * 0.8F + 0.1F; @@ -165,4 +95,11 @@ public class BlockCrate extends BlockFalling { world.spawnEntityInWorld(entityitem); } } + + public static List addToListWithWeight(List list, Item item, int weight) { + for(int i = 0; i < weight; i++) + list.add(item); + + return list; + } } diff --git a/com/hbm/blocks/BlockOre.java b/com/hbm/blocks/BlockOre.java index fbfa7f613..fd81ccfca 100644 --- a/com/hbm/blocks/BlockOre.java +++ b/com/hbm/blocks/BlockOre.java @@ -2,7 +2,7 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.entity.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; @@ -42,7 +42,7 @@ public class BlockOre extends Block { { return ModItems.niter; } - if(this == ModBlocks.ore_sulfur) + if(this == ModBlocks.ore_sulfur || this == ModBlocks.ore_nether_sulfur) { return ModItems.sulfur; } @@ -62,6 +62,10 @@ public class BlockOre extends Block { { return Items.snowball; } + if(this == ModBlocks.ore_nether_fire) + { + return p_149650_2_.nextInt(2) == 0 ? ModItems.powder_fire : Items.blaze_powder; + } return Item.getItemFromBlock(this); } @@ -77,7 +81,11 @@ public class BlockOre extends Block { { return 2 + p_149745_1_.nextInt(3); } - if(this == ModBlocks.ore_sulfur) + if(this == ModBlocks.ore_sulfur || this == ModBlocks.ore_nether_sulfur) + { + return 2 + p_149745_1_.nextInt(3); + } + if(this == ModBlocks.ore_nether_fire) { return 2 + p_149745_1_.nextInt(3); } diff --git a/com/hbm/blocks/FWatzCore.java b/com/hbm/blocks/FWatzCore.java index 09f594f0c..754a65049 100644 --- a/com/hbm/blocks/FWatzCore.java +++ b/com/hbm/blocks/FWatzCore.java @@ -21,23 +21,5 @@ public class FWatzCore extends BlockContainer { public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityFWatzCore(); } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { - if(world.isRemote) - { - return true; - } else if(!player.isSneaking()) - { - TileEntityFWatzCore entity = (TileEntityFWatzCore) world.getTileEntity(x, y, z); - if(entity != null) - { - FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_fwatz_multiblock, world, x, y, z); - } - return true; - } else { - return false; - } - } } diff --git a/com/hbm/blocks/Guide.java b/com/hbm/blocks/Guide.java index c814ef912..c4718b452 100644 --- a/com/hbm/blocks/Guide.java +++ b/com/hbm/blocks/Guide.java @@ -149,27 +149,17 @@ public class Guide extends Block { public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if(!player.isSneaking()) { + ItemStack book1 = new ItemStack(Items.written_book); book1.stackTagCompound = new NBTTagCompound(); book1.stackTagCompound.setString("author", "HbMinecraft"); book1.stackTagCompound.setString("title", "Hbm's Nuclear Tech Mod Part 1: Resources"); NBTTagList pages1 = new NBTTagList(); - pages1.appendTag(new NBTTagString(Library.book11)); - pages1.appendTag(new NBTTagString(Library.book12)); - pages1.appendTag(new NBTTagString(Library.book13)); - pages1.appendTag(new NBTTagString(Library.book14)); - pages1.appendTag(new NBTTagString(Library.book15)); - pages1.appendTag(new NBTTagString(Library.book16)); - pages1.appendTag(new NBTTagString(Library.book17)); - pages1.appendTag(new NBTTagString(Library.book18)); - pages1.appendTag(new NBTTagString(Library.book19)); - pages1.appendTag(new NBTTagString(Library.book110)); - pages1.appendTag(new NBTTagString(Library.book111)); - pages1.appendTag(new NBTTagString(Library.book112)); - pages1.appendTag(new NBTTagString(Library.book113)); - pages1.appendTag(new NBTTagString(Library.book114)); - pages1.appendTag(new NBTTagString(Library.book115)); - pages1.appendTag(new NBTTagString(Library.book116)); + + for(String s : Library.book1) { + pages1.appendTag(new NBTTagString(s)); + } + book1.stackTagCompound.setTag("pages", pages1); player.inventory.addItemStackToInventory(book1); @@ -178,23 +168,11 @@ public class Guide extends Block { book2.stackTagCompound.setString("author", "HbMinecraft"); book2.stackTagCompound.setString("title", "Hbm's Nuclear Tech Mod Part 2: Machines"); NBTTagList pages2 = new NBTTagList(); - pages2.appendTag(new NBTTagString(Library.book21)); - pages2.appendTag(new NBTTagString(Library.book22)); - pages2.appendTag(new NBTTagString(Library.book23)); - pages2.appendTag(new NBTTagString(Library.book24)); - pages2.appendTag(new NBTTagString(Library.book25)); - pages2.appendTag(new NBTTagString(Library.book26)); - pages2.appendTag(new NBTTagString(Library.book27)); - pages2.appendTag(new NBTTagString(Library.book28)); - pages2.appendTag(new NBTTagString(Library.book29)); - pages2.appendTag(new NBTTagString(Library.book210)); - pages2.appendTag(new NBTTagString(Library.book211)); - pages2.appendTag(new NBTTagString(Library.book212)); - pages2.appendTag(new NBTTagString(Library.book213)); - pages2.appendTag(new NBTTagString(Library.book214)); - pages2.appendTag(new NBTTagString(Library.book215)); - pages2.appendTag(new NBTTagString(Library.book216)); - pages2.appendTag(new NBTTagString(Library.book217)); + + for(String s : Library.book2) { + pages2.appendTag(new NBTTagString(s)); + } + book2.stackTagCompound.setTag("pages", pages2); player.inventory.addItemStackToInventory(book2); @@ -203,26 +181,11 @@ public class Guide extends Block { book3.stackTagCompound.setString("author", "HbMinecraft"); book3.stackTagCompound.setString("title", "Hbm's Nuclear Tech Mod Part 3: Bombs"); NBTTagList pages3 = new NBTTagList(); - pages3.appendTag(new NBTTagString(Library.book31)); - pages3.appendTag(new NBTTagString(Library.book32)); - pages3.appendTag(new NBTTagString(Library.book33)); - pages3.appendTag(new NBTTagString(Library.book34)); - pages3.appendTag(new NBTTagString(Library.book35)); - pages3.appendTag(new NBTTagString(Library.book36)); - pages3.appendTag(new NBTTagString(Library.book37)); - pages3.appendTag(new NBTTagString(Library.book38)); - pages3.appendTag(new NBTTagString(Library.book39)); - pages3.appendTag(new NBTTagString(Library.book310)); - pages3.appendTag(new NBTTagString(Library.book311)); - pages3.appendTag(new NBTTagString(Library.book312)); - pages3.appendTag(new NBTTagString(Library.book313)); - pages3.appendTag(new NBTTagString(Library.book314)); - pages3.appendTag(new NBTTagString(Library.book315)); - pages3.appendTag(new NBTTagString(Library.book316)); - pages3.appendTag(new NBTTagString(Library.book317)); - pages3.appendTag(new NBTTagString(Library.book318)); - pages3.appendTag(new NBTTagString(Library.book319)); - pages3.appendTag(new NBTTagString(Library.book320)); + + for(String s : Library.book3) { + pages3.appendTag(new NBTTagString(s)); + } + book3.stackTagCompound.setTag("pages", pages3); player.inventory.addItemStackToInventory(book3); @@ -231,15 +194,11 @@ public class Guide extends Block { book4.stackTagCompound.setString("author", "HbMinecraft"); book4.stackTagCompound.setString("title", "Hbm's Nuclear Tech Mod Part 4: Missiles"); NBTTagList pages4 = new NBTTagList(); - pages4.appendTag(new NBTTagString(Library.book41)); - pages4.appendTag(new NBTTagString(Library.book42)); - pages4.appendTag(new NBTTagString(Library.book43)); - pages4.appendTag(new NBTTagString(Library.book44)); - pages4.appendTag(new NBTTagString(Library.book45)); - pages4.appendTag(new NBTTagString(Library.book46)); - pages4.appendTag(new NBTTagString(Library.book47)); - pages4.appendTag(new NBTTagString(Library.book48)); - pages4.appendTag(new NBTTagString(Library.book49)); + + for(String s : Library.book4) { + pages4.appendTag(new NBTTagString(s)); + } + book4.stackTagCompound.setTag("pages", pages4); player.inventory.addItemStackToInventory(book4); @@ -248,14 +207,11 @@ public class Guide extends Block { book5.stackTagCompound.setString("author", "HbMinecraft"); book5.stackTagCompound.setString("title", "Hbm's Nuclear Tech Mod Part 5: Misc"); NBTTagList pages5 = new NBTTagList(); - pages5.appendTag(new NBTTagString(Library.book51)); - pages5.appendTag(new NBTTagString(Library.book52)); - pages5.appendTag(new NBTTagString(Library.book53)); - pages5.appendTag(new NBTTagString(Library.book54)); - pages5.appendTag(new NBTTagString(Library.book55)); - pages5.appendTag(new NBTTagString(Library.book56)); - pages5.appendTag(new NBTTagString(Library.book57)); - pages5.appendTag(new NBTTagString(Library.book58)); + + for(String s : Library.book5) { + pages5.appendTag(new NBTTagString(s)); + } + book5.stackTagCompound.setTag("pages", pages5); player.inventory.addItemStackToInventory(book5); diff --git a/com/hbm/blocks/LaunchPad.java b/com/hbm/blocks/LaunchPad.java index 5b124ec18..abdb1a91a 100644 --- a/com/hbm/blocks/LaunchPad.java +++ b/com/hbm/blocks/LaunchPad.java @@ -2,23 +2,23 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.entity.EntityMissileAntiBallistic; -import com.hbm.entity.EntityMissileBunkerBuster; -import com.hbm.entity.EntityMissileBurst; -import com.hbm.entity.EntityMissileBusterStrong; -import com.hbm.entity.EntityMissileCluster; -import com.hbm.entity.EntityMissileClusterStrong; -import com.hbm.entity.EntityMissileDrill; -import com.hbm.entity.EntityMissileEndo; -import com.hbm.entity.EntityMissileExo; -import com.hbm.entity.EntityMissileGeneric; -import com.hbm.entity.EntityMissileIncendiary; -import com.hbm.entity.EntityMissileIncendiaryStrong; -import com.hbm.entity.EntityMissileInferno; -import com.hbm.entity.EntityMissileMirv; -import com.hbm.entity.EntityMissileNuclear; -import com.hbm.entity.EntityMissileRain; -import com.hbm.entity.EntityMissileStrong; +import com.hbm.entity.missile.EntityMissileAntiBallistic; +import com.hbm.entity.missile.EntityMissileBunkerBuster; +import com.hbm.entity.missile.EntityMissileBurst; +import com.hbm.entity.missile.EntityMissileBusterStrong; +import com.hbm.entity.missile.EntityMissileCluster; +import com.hbm.entity.missile.EntityMissileClusterStrong; +import com.hbm.entity.missile.EntityMissileDrill; +import com.hbm.entity.missile.EntityMissileEndo; +import com.hbm.entity.missile.EntityMissileExo; +import com.hbm.entity.missile.EntityMissileGeneric; +import com.hbm.entity.missile.EntityMissileIncendiary; +import com.hbm.entity.missile.EntityMissileIncendiaryStrong; +import com.hbm.entity.missile.EntityMissileInferno; +import com.hbm.entity.missile.EntityMissileMirv; +import com.hbm.entity.missile.EntityMissileNuclear; +import com.hbm.entity.missile.EntityMissileRain; +import com.hbm.entity.missile.EntityMissileStrong; import com.hbm.interfaces.IBomb; import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; diff --git a/com/hbm/blocks/MachineTeleporter.java b/com/hbm/blocks/MachineTeleporter.java new file mode 100644 index 000000000..9546602b4 --- /dev/null +++ b/com/hbm/blocks/MachineTeleporter.java @@ -0,0 +1,80 @@ +package com.hbm.blocks; + +import java.util.Random; + +import com.hbm.items.ModItems; +import com.hbm.lib.RefStrings; +import com.hbm.main.MainRegistry; +import com.hbm.tileentity.TileEntityMachineCMBFactory; +import com.hbm.tileentity.TileEntityMachineTeleporter; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class MachineTeleporter extends BlockContainer { + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + private IIcon iconBottom; + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":teleporter_top"); + this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":teleporter_bottom"); + this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":teleporter_side"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metadata) { + return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon); + } + + @Override + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { + return Item.getItemFromBlock(ModBlocks.machine_teleporter); + } + + protected MachineTeleporter(Material p_i45386_1_) { + super(p_i45386_1_); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityMachineTeleporter(); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, + float hitY, float hitZ) { + if (world.isRemote) { + return true; + } else if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.linker) { + return false; + }else if (!player.isSneaking()) { + TileEntityMachineTeleporter entity = (TileEntityMachineTeleporter) world.getTileEntity(x, y, z); + if (entity != null) { + FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_machine_teleporter, world, x, + y, z); + } + return true; + } else { + return false; + } + } +} diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index 555bd51fc..f1dc9b46c 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -1,14 +1,16 @@ package com.hbm.blocks; -import com.hbm.items.ItemPlasmaBlock; -import com.hbm.items.ItemPrototypeBlock; -import com.hbm.items.ItemSchrabidiumBlock; +import com.hbm.items.bomb.ItemPrototypeBlock; +import com.hbm.items.special.ItemPlasmaBlock; +import com.hbm.items.special.ItemSchrabidiumBlock; import com.hbm.lib.ModDamageSource; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; +import net.minecraft.block.Block.SoundType; +import net.minecraft.block.BlockFalling; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; import net.minecraft.block.material.MaterialLiquid; @@ -48,6 +50,13 @@ public class ModBlocks { public static Block ore_schrabidium; public static Block ore_beryllium; + public static Block ore_nether_uranium; + public static Block ore_nether_plutonium; + public static Block ore_nether_tungsten; + public static Block ore_nether_sulfur; + public static Block ore_nether_fire; + public static Block ore_nether_schrabidium; + public static Block block_uranium; public static Block block_titanium; public static Block block_sulfur; @@ -61,12 +70,16 @@ public class ModBlocks { public static Block block_lead; public static Block block_trinitite; public static Block block_waste; + public static Block block_scrap; + public static Block block_electrical_scrap; public static Block block_beryllium; public static Block block_schrabidium; public static Block block_advanced_alloy; public static Block block_magnetized_tungsten; public static Block block_combine_steel; + public static Block gravel_obsidian; + public static Block reinforced_brick; public static Block reinforced_glass; public static Block reinforced_light; @@ -255,6 +268,9 @@ public class ModBlocks { public static Block machine_combine_factory; public static final int guiID_combine_factory = 35; + public static Block machine_teleporter; + public static final int guiID_machine_teleporter = 36; + public static Block launch_pad; public static Block launch_pad_generic; public static Block launch_pad_incendiary; @@ -322,25 +338,36 @@ public class ModBlocks { ore_lead = new BlockGeneric(Material.rock).setBlockName("ore_lead").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_lead"); ore_schrabidium = new BlockGeneric(Material.rock).setBlockName("ore_schrabidium").setCreativeTab(MainRegistry.tabBlock).setHardness(15.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":ore_schrabidium"); ore_beryllium = new BlockGeneric(Material.rock).setBlockName("ore_beryllium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_beryllium"); + + ore_nether_uranium = new BlockGeneric(Material.rock).setBlockName("ore_nether_uranium").setCreativeTab(MainRegistry.tabBlock).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_uranium"); + ore_nether_plutonium = new BlockGeneric(Material.rock).setBlockName("ore_nether_plutonium").setCreativeTab(MainRegistry.tabBlock).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_plutonium"); + ore_nether_tungsten = new BlockGeneric(Material.rock).setBlockName("ore_nether_tungsten").setCreativeTab(MainRegistry.tabBlock).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_tungsten"); + ore_nether_sulfur = new BlockOre(Material.rock).setBlockName("ore_nether_sulfur").setCreativeTab(MainRegistry.tabBlock).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_sulfur"); + ore_nether_fire = new BlockOre(Material.rock).setBlockName("ore_nether_fire").setCreativeTab(MainRegistry.tabBlock).setHardness(0.4F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_fire"); + ore_nether_schrabidium = new BlockGeneric(Material.rock).setBlockName("ore_nether_schrabidium").setCreativeTab(MainRegistry.tabBlock).setHardness(15.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":ore_nether_schrabidium"); - block_uranium = new BlockGeneric(Material.iron).setBlockName("block_uranium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_uranium"); - block_titanium = new BlockGeneric(Material.iron).setBlockName("block_titanium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_titanium"); + block_uranium = new BlockGeneric(Material.iron).setBlockName("block_uranium").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_uranium"); + block_titanium = new BlockGeneric(Material.iron).setBlockName("block_titanium").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_titanium"); block_sulfur = new BlockGeneric(Material.iron).setBlockName("block_sulfur").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_sulfur"); block_niter = new BlockGeneric(Material.iron).setBlockName("block_niter").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_niter"); - block_copper = new BlockGeneric(Material.iron).setBlockName("block_copper").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_copper"); - block_red_copper = new BlockGeneric(Material.iron).setBlockName("block_red_copper").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_red_copper"); - block_tungsten = new BlockGeneric(Material.iron).setBlockName("block_tungsten").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_tungsten"); - block_aluminium = new BlockGeneric(Material.iron).setBlockName("block_aluminium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_aluminium"); + block_copper = new BlockGeneric(Material.iron).setBlockName("block_copper").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_copper"); + block_red_copper = new BlockGeneric(Material.iron).setBlockName("block_red_copper").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_red_copper"); + block_tungsten = new BlockGeneric(Material.iron).setBlockName("block_tungsten").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_tungsten"); + block_aluminium = new BlockGeneric(Material.iron).setBlockName("block_aluminium").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_aluminium"); block_fluorite = new BlockGeneric(Material.iron).setBlockName("block_fluorite").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_fluorite"); - block_steel = new BlockGeneric(Material.iron).setBlockName("block_steel").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_steel"); - block_lead = new BlockGeneric(Material.iron).setBlockName("block_lead").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lead"); + block_steel = new BlockGeneric(Material.iron).setBlockName("block_steel").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_steel"); + block_lead = new BlockGeneric(Material.iron).setBlockName("block_lead").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lead"); block_trinitite = new BlockOre(Material.iron).setBlockName("block_trinitite").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_trinitite"); block_waste = new BlockOre(Material.iron).setBlockName("block_waste").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_waste"); - block_beryllium = new BlockGeneric(Material.iron).setBlockName("block_beryllium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_beryllium"); - block_schrabidium = new BlockGeneric(Material.iron).setBlockName("block_schrabidium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_schrabidium"); + block_scrap = new BlockFalling(Material.sand).setBlockName("block_scrap").setCreativeTab(MainRegistry.tabBlock).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeGravel).setBlockTextureName(RefStrings.MODID + ":block_scrap"); + block_electrical_scrap = new BlockFalling(Material.iron).setBlockName("block_electrical_scrap").setCreativeTab(MainRegistry.tabBlock).setHardness(2.5F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName(RefStrings.MODID + ":electrical_scrap_alt2"); + block_beryllium = new BlockGeneric(Material.iron).setBlockName("block_beryllium").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_beryllium"); + block_schrabidium = new BlockGeneric(Material.iron).setBlockName("block_schrabidium").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_schrabidium"); block_advanced_alloy = new BlockGeneric(Material.iron).setBlockName("block_advanced_alloy").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_advanced_alloy"); - block_magnetized_tungsten = new BlockGeneric(Material.iron).setBlockName("block_magnetized_tungsten").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(35.0F).setBlockTextureName(RefStrings.MODID + ":block_magnetized_tungsten"); - block_combine_steel = new BlockGeneric(Material.iron).setBlockName("block_combine_steel").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_combine_steel"); + block_magnetized_tungsten = new BlockGeneric(Material.iron).setBlockName("block_magnetized_tungsten").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(35.0F).setBlockTextureName(RefStrings.MODID + ":block_magnetized_tungsten"); + block_combine_steel = new BlockGeneric(Material.iron).setBlockName("block_combine_steel").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_combine_steel"); + + gravel_obsidian = new BlockFalling(Material.iron).setBlockName("gravel_obsidian").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeGravel).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":gravel_obsidian"); reinforced_brick = new BlockGeneric(Material.rock).setBlockName("reinforced_brick").setCreativeTab(MainRegistry.tabBlock).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_brick"); reinforced_glass = new ReinforcedBlock(Material.glass).setBlockName("reinforced_glass").setCreativeTab(MainRegistry.tabBlock).setLightOpacity(0).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_glass"); @@ -438,6 +465,8 @@ public class ModBlocks { machine_combine_factory = new MachineCMBFactory(Material.iron).setBlockName("machine_combine_factory").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock); + machine_teleporter = new MachineTeleporter(Material.iron).setBlockName("machine_teleporter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock); + red_wire_coated = new WireCoated(Material.iron).setBlockName("red_wire_coated").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_wire_coated"); red_cable = new BlockCable(Material.iron).setBlockName("red_cable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_cable_icon"); @@ -504,7 +533,7 @@ public class ModBlocks { book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke); - crate = new BlockCrate(Material.iron).setBlockName("crate").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke).setBlockTextureName(RefStrings.MODID + ":crate"); + crate = new BlockCrate(Material.iron).setBlockName("crate").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabNuke).setBlockTextureName(RefStrings.MODID + ":crate"); machine_schrabidium_transmutator = new MachineSchrabidiumTransmutator(Material.iron).setBlockName("machine_schrabidium_transmutator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.tabBlock); @@ -529,7 +558,7 @@ public class ModBlocks { private static void registerBlock() { //Test GameRegistry.registerBlock(test_render, test_render.getUnlocalizedName()); - GameRegistry.registerBlock(test_container, test_container.getUnlocalizedName()); + //GameRegistry.registerBlock(test_container, test_container.getUnlocalizedName()); GameRegistry.registerBlock(test_bomb, test_bomb.getUnlocalizedName()); GameRegistry.registerBlock(test_bomb_advanced, test_bomb_advanced.getUnlocalizedName()); @@ -554,6 +583,14 @@ public class ModBlocks { GameRegistry.registerBlock(ore_lead, ore_lead.getUnlocalizedName()); GameRegistry.registerBlock(ore_schrabidium, ItemSchrabidiumBlock.class, ore_schrabidium.getUnlocalizedName()); + //Nether Ores + GameRegistry.registerBlock(ore_nether_uranium, ore_nether_uranium.getUnlocalizedName()); + GameRegistry.registerBlock(ore_nether_plutonium, ore_nether_plutonium.getUnlocalizedName()); + GameRegistry.registerBlock(ore_nether_tungsten, ore_nether_tungsten.getUnlocalizedName()); + GameRegistry.registerBlock(ore_nether_sulfur, ore_nether_sulfur.getUnlocalizedName()); + GameRegistry.registerBlock(ore_nether_fire, ore_nether_fire.getUnlocalizedName()); + GameRegistry.registerBlock(ore_nether_schrabidium, ItemSchrabidiumBlock.class, ore_nether_schrabidium.getUnlocalizedName()); + //Blocks GameRegistry.registerBlock(block_uranium, block_uranium.getUnlocalizedName()); GameRegistry.registerBlock(block_titanium, block_titanium.getUnlocalizedName()); @@ -568,11 +605,16 @@ public class ModBlocks { GameRegistry.registerBlock(block_beryllium, block_beryllium.getUnlocalizedName()); GameRegistry.registerBlock(block_steel, block_steel.getUnlocalizedName()); GameRegistry.registerBlock(block_lead, block_lead.getUnlocalizedName()); + GameRegistry.registerBlock(block_scrap, block_scrap.getUnlocalizedName()); + GameRegistry.registerBlock(block_electrical_scrap, block_electrical_scrap.getUnlocalizedName()); GameRegistry.registerBlock(block_trinitite, block_trinitite.getUnlocalizedName()); GameRegistry.registerBlock(block_waste, block_waste.getUnlocalizedName()); GameRegistry.registerBlock(block_schrabidium, ItemSchrabidiumBlock.class, block_schrabidium.getUnlocalizedName()); GameRegistry.registerBlock(block_magnetized_tungsten, block_magnetized_tungsten.getUnlocalizedName()); GameRegistry.registerBlock(block_combine_steel, block_combine_steel.getUnlocalizedName()); + + //Gravel + GameRegistry.registerBlock(gravel_obsidian, gravel_obsidian.getUnlocalizedName()); //Reinforced Blocks GameRegistry.registerBlock(reinforced_brick, reinforced_brick.getUnlocalizedName()); @@ -667,6 +709,7 @@ public class ModBlocks { GameRegistry.registerBlock(machine_deuterium, machine_deuterium.getUnlocalizedName()); GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName()); GameRegistry.registerBlock(machine_combine_factory, machine_combine_factory.getUnlocalizedName()); + GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName()); //Industrial Factories GameRegistry.registerBlock(factory_titanium_hull, factory_titanium_hull.getUnlocalizedName()); diff --git a/com/hbm/blocks/MudBlock.java b/com/hbm/blocks/MudBlock.java index 7e4b728ba..2c0c10169 100644 --- a/com/hbm/blocks/MudBlock.java +++ b/com/hbm/blocks/MudBlock.java @@ -2,7 +2,7 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.entity.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; import com.hbm.lib.RefStrings; diff --git a/com/hbm/blocks/NukeBoy.java b/com/hbm/blocks/NukeBoy.java index 54122797f..bc2b78afa 100644 --- a/com/hbm/blocks/NukeBoy.java +++ b/com/hbm/blocks/NukeBoy.java @@ -2,8 +2,9 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.effect.EntityNukeCloudNoShroom; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityNukeBoy; @@ -27,8 +28,8 @@ public class NukeBoy extends BlockContainer implements IBomb { public TileEntityNukeBoy tetn = new TileEntityNukeBoy(); private static boolean keepInventory = false; - private final static Random field_149933_a = new Random(); - private boolean isExploding = false; + private final static Random field_149933_a = new Random(); + private boolean isExploding = false; protected NukeBoy(Material p_i45386_1_) { super(p_i45386_1_); @@ -38,75 +39,69 @@ public class NukeBoy extends BlockContainer implements IBomb { public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityNukeBoy(); } - + @Override - public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) - { - return Item.getItemFromBlock(ModBlocks.nuke_boy); - } - + public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { + return Item.getItemFromBlock(ModBlocks.nuke_boy); + } + @Override - public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) - { - if (!keepInventory) - { - TileEntityNukeBoy tileentityfurnace = (TileEntityNukeBoy)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); + public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, + int p_149749_6_) { + if (!keepInventory) { + TileEntityNukeBoy tileentityfurnace = (TileEntityNukeBoy) p_149749_1_.getTileEntity(p_149749_2_, + p_149749_3_, p_149749_4_); - if (tileentityfurnace != null) - { - for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) - { - ItemStack itemstack = tileentityfurnace.getStackInSlot(i1); + if (tileentityfurnace != null) { + for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) { + ItemStack itemstack = tileentityfurnace.getStackInSlot(i1); - if (itemstack != null) - { - float f = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f1 = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; - float f2 = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; + if (itemstack != null) { + float f = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; + float f1 = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; + float f2 = NukeBoy.field_149933_a.nextFloat() * 0.8F + 0.1F; - while (itemstack.stackSize > 0) - { - int j1 = NukeBoy.field_149933_a.nextInt(21) + 10; + while (itemstack.stackSize > 0) { + int j1 = NukeBoy.field_149933_a.nextInt(21) + 10; - if (j1 > itemstack.stackSize) - { - j1 = itemstack.stackSize; - } + if (j1 > itemstack.stackSize) { + j1 = itemstack.stackSize; + } - itemstack.stackSize -= j1; - EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + itemstack.stackSize -= j1; + EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, + p_149749_4_ + f2, + new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); - if (itemstack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy()); - } + if (itemstack.hasTagCompound()) { + entityitem.getEntityItem() + .setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); + } - float f3 = 0.05F; - entityitem.motionX = (float)NukeBoy.field_149933_a.nextGaussian() * f3; - entityitem.motionY = (float)NukeBoy.field_149933_a.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float)NukeBoy.field_149933_a.nextGaussian() * f3; - p_149749_1_.spawnEntityInWorld(entityitem); - } - } - } + float f3 = 0.05F; + entityitem.motionX = (float) NukeBoy.field_149933_a.nextGaussian() * f3; + entityitem.motionY = (float) NukeBoy.field_149933_a.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) NukeBoy.field_149933_a.nextGaussian() * f3; + p_149749_1_.spawnEntityInWorld(entityitem); + } + } + } - p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_); - } - } + p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_); + } + } + + super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); + } - super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_); - } - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { - if(world.isRemote) - { + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, + float hitY, float hitZ) { + if (world.isRemote) { return true; - } else if(!player.isSneaking()) - { + } else if (!player.isSneaking()) { TileEntityNukeBoy entity = (TileEntityNukeBoy) world.getTileEntity(x, y, z); - if(entity != null) - { + if (entity != null) { FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_nuke_boy, world, x, y, z); } return true; @@ -114,115 +109,113 @@ public class NukeBoy extends BlockContainer implements IBomb { return false; } } - - @Override - public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) - { - TileEntityNukeBoy entity = (TileEntityNukeBoy) p_149695_1_.getTileEntity(x, y, z); - if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) - { - if(entity.isReady()) - { - this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1); - entity.clearSlots(); - p_149695_1_.setBlockToAir(x, y, z); - igniteTestBomb(p_149695_1_, x, y, z); - } - } - } - - public boolean igniteTestBomb(World world, int x, int y, int z) - { - if (!world.isRemote) - { - tetn.clearSlots(); - //world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); //spawns a huge explosion particle - world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); //x,y,z,sound,volume,pitch - /*ExplosionNukeGeneric.detonateTestBomb(world, x, y, z, 120); - ExplosionNukeGeneric.vapor(world, x, y, z, 200); - ExplosionNukeGeneric.waste(world, x, y, z, 150); - ExplosionNukeGeneric.dealDamage(world, x, y, z, 150);*/ - /*EntityNukeExplosion entity = new EntityNukeExplosion(world); - entity.posX = x; - entity.posY = y; - entity.posZ = z; - entity.destructionRange = 120; - entity.vaporRange = 200; - entity.wasteRange = 150; - entity.damageRange = 150; - - world.spawnEntityInWorld(entity);*/ - - EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); - entity.posX = x; - entity.posY = y; - entity.posZ = z; - entity.destructionRange = MainRegistry.boyRadius; - entity.speed = 25; - entity.coefficient = 10.0F; - world.spawnEntityInWorld(entity); - - - //ExplosionNukeAdvanced.mush(world, x, y, z); + @Override + public void onNeighborBlockChange(World p_149695_1_, int x, int y, int z, Block p_149695_5_) { + TileEntityNukeBoy entity = (TileEntityNukeBoy) p_149695_1_.getTileEntity(x, y, z); + if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) { + if (entity.isReady()) { + this.onBlockDestroyedByPlayer(p_149695_1_, x, y, z, 1); + entity.clearSlots(); + p_149695_1_.setBlockToAir(x, y, z); + igniteTestBomb(p_149695_1_, x, y, z); + } + } + } - EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000); - entity2.posX = x; - entity2.posY = y - 11; - entity2.posZ = z; - world.spawnEntityInWorld(entity2); - } + public boolean igniteTestBomb(World world, int x, int y, int z) { + if (!world.isRemote) { + tetn.clearSlots(); + // world.spawnParticle("hugeexplosion", x, y, z, 0, 0, 0); //spawns + // a huge explosion particle + world.playSoundEffect(x, y, z, "random.explode", 1.0f, world.rand.nextFloat() * 0.1F + 0.9F); // x,y,z,sound,volume,pitch + /* + * ExplosionNukeGeneric.detonateTestBomb(world, x, y, z, 120); + * ExplosionNukeGeneric.vapor(world, x, y, z, 200); + * ExplosionNukeGeneric.waste(world, x, y, z, 150); + * ExplosionNukeGeneric.dealDamage(world, x, y, z, 150); + */ + + /* + * EntityNukeExplosion entity = new EntityNukeExplosion(world); + * entity.posX = x; entity.posY = y; entity.posZ = z; + * entity.destructionRange = 120; entity.vaporRange = 200; + * entity.wasteRange = 150; entity.damageRange = 150; + * + * world.spawnEntityInWorld(entity); + */ + + EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(world); + entity.posX = x; + entity.posY = y; + entity.posZ = z; + entity.destructionRange = MainRegistry.boyRadius; + entity.speed = 25; + entity.coefficient = 10.0F; + world.spawnEntityInWorld(entity); + + // ExplosionNukeAdvanced.mush(world, x, y, z); + + if (MainRegistry.enableNukeClouds) { + EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000); + entity2.posX = x; + entity2.posY = y - 11; + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } else { + EntityNukeCloudSmall entity2 = new EntityNukeCloudNoShroom(world, 1000); + entity2.posX = x; + entity2.posY = y - 11; + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } + } return false; } - + @Override - public int getRenderType(){ + public int getRenderType() { return -1; } - + @Override public boolean isOpaqueCube() { return false; } - + @Override public boolean renderAsNormalBlock() { return false; } - + @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) - { + + if (i == 0) { world.setBlockMetadataWithNotify(x, y, z, 5, 2); } - if(i == 1) - { + if (i == 1) { world.setBlockMetadataWithNotify(x, y, z, 3, 2); } - if(i == 2) - { + if (i == 2) { world.setBlockMetadataWithNotify(x, y, z, 4, 2); } - if(i == 3) - { + if (i == 3) { world.setBlockMetadataWithNotify(x, y, z, 2, 2); } } public void explode(World world, int x, int y, int z) { - TileEntityNukeBoy entity = (TileEntityNukeBoy) world.getTileEntity(x, y, z); - //if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) - { - if(entity.isReady()) - { - this.onBlockDestroyedByPlayer(world, x, y, z, 1); - entity.clearSlots(); - world.setBlockToAir(x, y, z); - igniteTestBomb(world, x, y, z); - } - } + TileEntityNukeBoy entity = (TileEntityNukeBoy) world.getTileEntity(x, y, z); + // if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) + { + if (entity.isReady()) { + this.onBlockDestroyedByPlayer(world, x, y, z, 1); + entity.clearSlots(); + world.setBlockToAir(x, y, z); + igniteTestBomb(world, x, y, z); + } + } } } diff --git a/com/hbm/blocks/NukeFleija.java b/com/hbm/blocks/NukeFleija.java index a2b3de5bd..8b30c1791 100644 --- a/com/hbm/blocks/NukeFleija.java +++ b/com/hbm/blocks/NukeFleija.java @@ -4,8 +4,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Random; -import com.hbm.entity.EntityCloudFleija; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityNukeFleija; diff --git a/com/hbm/blocks/NukeGadget.java b/com/hbm/blocks/NukeGadget.java index 004676b69..80d4e814d 100644 --- a/com/hbm/blocks/NukeGadget.java +++ b/com/hbm/blocks/NukeGadget.java @@ -4,8 +4,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Random; -import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.effect.EntityNukeCloudNoShroom; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityNukeGadget; @@ -183,11 +184,19 @@ public class NukeGadget extends BlockContainer implements IBomb { //ExplosionNukeAdvanced.mush(world, x, y, z); - EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000); - entity2.posX = x; - entity2.posY = y - 15; - entity2.posZ = z; - world.spawnEntityInWorld(entity2); + if (MainRegistry.enableNukeClouds) { + EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000); + entity2.posX = x; + entity2.posY = y - 15; + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } else { + EntityNukeCloudSmall entity2 = new EntityNukeCloudNoShroom(world, 1000); + entity2.posX = x; + entity2.posY = y - 15; + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } } return false; diff --git a/com/hbm/blocks/NukeMan.java b/com/hbm/blocks/NukeMan.java index d387bfd92..3069ebe83 100644 --- a/com/hbm/blocks/NukeMan.java +++ b/com/hbm/blocks/NukeMan.java @@ -4,8 +4,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Random; -import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.effect.EntityNukeCloudNoShroom; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityNukeMan; @@ -182,11 +183,19 @@ public class NukeMan extends BlockContainer implements IBomb { //ExplosionNukeAdvanced.mush(world, x, y, z); - EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000); - entity2.posX = x; - entity2.posY = y - 17; - entity2.posZ = z; - world.spawnEntityInWorld(entity2); + if (MainRegistry.enableNukeClouds) { + EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000); + entity2.posX = x; + entity2.posY = y - 17; + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } else { + EntityNukeCloudSmall entity2 = new EntityNukeCloudNoShroom(world, 1000); + entity2.posX = x; + entity2.posY = y - 17; + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } } return false; diff --git a/com/hbm/blocks/NukeMike.java b/com/hbm/blocks/NukeMike.java index b3a748246..5c5b49cfd 100644 --- a/com/hbm/blocks/NukeMike.java +++ b/com/hbm/blocks/NukeMike.java @@ -4,9 +4,10 @@ import java.util.HashMap; import java.util.Map; import java.util.Random; -import com.hbm.entity.EntityNukeCloudBig; -import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.effect.EntityNukeCloudBig; +import com.hbm.entity.effect.EntityNukeCloudNoShroom; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityNukeMike; @@ -160,20 +161,28 @@ public class NukeMike extends BlockContainer implements IBomb { world.spawnEntityInWorld(entity); - if(r < 200) - { - EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000); - entity2.posX = x; - entity2.posY = y - (r / 10); - entity2.posZ = z; - world.spawnEntityInWorld(entity2); - } else { - EntityNukeCloudBig entity2 = new EntityNukeCloudBig(world, 1000); - entity2.posX = x; - entity2.posY = y - (r / 10); - entity2.posZ = z; - world.spawnEntityInWorld(entity2); - } + + if (MainRegistry.enableNukeClouds) { + if (r < 200) { + EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(world, 1000); + entity2.posX = x; + entity2.posY = y - (r / 10); + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } else { + EntityNukeCloudBig entity2 = new EntityNukeCloudBig(world, 1000); + entity2.posX = x; + entity2.posY = y - (r / 10); + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } + } else { + EntityNukeCloudSmall entity2 = new EntityNukeCloudNoShroom(world, 1000); + entity2.posX = x; + entity2.posY = y - (r / 10); + entity2.posZ = z; + world.spawnEntityInWorld(entity2); + } //ExplosionNukeAdvanced.mush(world, x, y, z); } diff --git a/com/hbm/blocks/NukePrototype.java b/com/hbm/blocks/NukePrototype.java index 0ae030492..1d50cd5db 100644 --- a/com/hbm/blocks/NukePrototype.java +++ b/com/hbm/blocks/NukePrototype.java @@ -4,8 +4,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Random; -import com.hbm.entity.EntityCloudFleija; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IBomb; import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; diff --git a/com/hbm/blocks/NukeTsar.java b/com/hbm/blocks/NukeTsar.java index 65b34550c..4a5b6dfeb 100644 --- a/com/hbm/blocks/NukeTsar.java +++ b/com/hbm/blocks/NukeTsar.java @@ -4,7 +4,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Random; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IBomb; import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityNukeTsar; diff --git a/com/hbm/blocks/TestEventTester.java b/com/hbm/blocks/TestEventTester.java index e79986cf9..2f6a793f0 100644 --- a/com/hbm/blocks/TestEventTester.java +++ b/com/hbm/blocks/TestEventTester.java @@ -6,9 +6,10 @@ import java.util.List; import java.util.Map; import java.util.Random; +import com.hbm.entity.effect.EntityFalloutRain; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionParticle; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -37,13 +38,13 @@ public class TestEventTester extends Block { this.worldObj = p_149695_1_; if (p_149695_1_.isBlockIndirectlyGettingPowered(x, y, z)) { - //Thelaser thread is too dangerous to use right now + //The laser thread is too dangerous to use right now //ThreadLaser laser = new ThreadLaser(p_149695_1_, x, y, z, "north"); //laser.start(); //ExplosionChaos.frag(p_149695_1_, x, y + 2, z, 10, false, null); //EntitySmokeFX smoke = new EntitySmokeFX(p_149695_1_, x + 0.5, y + 1, z + 0.5, 0.0, 0.0, 0.0); //p_149695_1_.spawnEntityInWorld(smoke); - ExplosionParticle.spawnMush(p_149695_1_, x, y, z); + //ExplosionParticle.spawnMush(p_149695_1_, x, y, z); //mirv(this.worldObj, x, y + 20, z); //killEvent(p_149695_1_, x, y, z); /*EntityNuclearCreeper e = new EntityNuclearCreeper(p_149695_1_); @@ -58,6 +59,13 @@ public class TestEventTester extends Block { { ExplosionNukeAdvanced.mush(p_149695_1_, x, y, z); }*/ + EntityFalloutRain fallout = new EntityFalloutRain(p_149695_1_, 1000); + fallout.posX = x; + fallout.posY = y + 3; + fallout.posZ = z; + fallout.setScale(50); + + p_149695_1_.spawnEntityInWorld(fallout); } } diff --git a/com/hbm/blocks/TestMissile.java b/com/hbm/blocks/TestMissile.java index 31e6dfe5b..5652ab99e 100644 --- a/com/hbm/blocks/TestMissile.java +++ b/com/hbm/blocks/TestMissile.java @@ -1,6 +1,6 @@ package com.hbm.blocks; -import com.hbm.entity.EntityTestMissile; +import com.hbm.entity.missile.EntityTestMissile; import com.hbm.tileentity.TileEntityTestNuke; import net.minecraft.block.Block; diff --git a/com/hbm/blocks/ToxicBlock.java b/com/hbm/blocks/ToxicBlock.java index 175b20ff6..4e36f9aeb 100644 --- a/com/hbm/blocks/ToxicBlock.java +++ b/com/hbm/blocks/ToxicBlock.java @@ -2,7 +2,7 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.entity.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; import com.hbm.lib.RefStrings; diff --git a/com/hbm/blocks/WasteEarth.java b/com/hbm/blocks/WasteEarth.java index 1810635cf..1db2291b8 100644 --- a/com/hbm/blocks/WasteEarth.java +++ b/com/hbm/blocks/WasteEarth.java @@ -2,7 +2,7 @@ package com.hbm.blocks; import java.util.Random; -import com.hbm.entity.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.lib.Library; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; diff --git a/com/hbm/entity/EntityCloudFleija.java b/com/hbm/entity/effect/EntityCloudFleija.java similarity index 98% rename from com/hbm/entity/EntityCloudFleija.java rename to com/hbm/entity/effect/EntityCloudFleija.java index f15ad51de..2672e2adf 100644 --- a/com/hbm/entity/EntityCloudFleija.java +++ b/com/hbm/entity/effect/EntityCloudFleija.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.effect; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/entity/effect/EntityEMPBlast.java b/com/hbm/entity/effect/EntityEMPBlast.java new file mode 100644 index 000000000..faa0c0e29 --- /dev/null +++ b/com/hbm/entity/effect/EntityEMPBlast.java @@ -0,0 +1,83 @@ +package com.hbm.entity.effect; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.Entity; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class EntityEMPBlast extends Entity { + + public int maxAge = 100; + public int age; + public float scale = 0; + + public EntityEMPBlast(World p_i1582_1_) { + super(p_i1582_1_); + this.setSize(1.5F, 1.5F); + this.ignoreFrustumCheck = true; + this.isImmuneToFire = true; + this.age = 0; + scale = 0; + } + + @Override + protected void entityInit() { + this.dataWatcher.addObject(16, Integer.valueOf((int) 0)); + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) + { + return 15728880; + } + + @Override + public float getBrightness(float p_70013_1_) + { + return 1.0F; + } + + public EntityEMPBlast(World p_i1582_1_, int maxAge) { + super(p_i1582_1_); + this.setSize(1.5F, 1.5F); + this.isImmuneToFire = true; + this.setMaxAge(maxAge); + } + + @Override + public void onUpdate() { + this.age++; + + if(this.age >= this.getMaxAge()) + { + this.age = 0; + this.setDead(); + } + + this.scale++; + } + + @Override + protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { + age = p_70037_1_.getShort("age"); + scale = p_70037_1_.getShort("scale"); + } + + @Override + protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { + p_70014_1_.setShort("age", (short)age); + p_70014_1_.setShort("scale", (short)scale); + + } + + public void setMaxAge(int i) { + this.dataWatcher.updateObject(16, Integer.valueOf(i)); + } + + public int getMaxAge() { + return this.dataWatcher.getWatchableObjectInt(16); + } +} diff --git a/com/hbm/entity/effect/EntityFalloutRain.java b/com/hbm/entity/effect/EntityFalloutRain.java new file mode 100644 index 000000000..37c3b00d9 --- /dev/null +++ b/com/hbm/entity/effect/EntityFalloutRain.java @@ -0,0 +1,69 @@ +package com.hbm.entity.effect; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.Entity; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class EntityFalloutRain extends Entity { + + public int maxAge = 1000; + public int age; + public float scale = 0; + + public EntityFalloutRain(World p_i1582_1_) { + super(p_i1582_1_); + this.setSize(4, 20); + this.ignoreFrustumCheck = true; + this.isImmuneToFire = true; + this.age = 0; + scale = 0; + } + + public EntityFalloutRain(World p_i1582_1_, int maxAge) { + super(p_i1582_1_); + this.setSize(4, 20); + this.isImmuneToFire = true; + this.maxAge = maxAge; + } + + @Override + public void onUpdate() { + //super.onUpdate(); + this.age++; + + if(this.age >= this.maxAge) + { + this.age = 0; + this.setDead(); + } + } + + @Override + protected void entityInit() { + this.dataWatcher.addObject(16, Integer.valueOf((int) 0)); + } + + @Override + protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { + age = p_70037_1_.getShort("age"); + } + + @Override + protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { + p_70014_1_.setShort("age", (short)age); + + } + + public void setScale(int i) { + + this.dataWatcher.updateObject(16, Integer.valueOf((int) i)); + } + + public int getScale() { + + return this.dataWatcher.getWatchableObjectInt(16); + } +} diff --git a/com/hbm/entity/EntityNukeCloudBig.java b/com/hbm/entity/effect/EntityNukeCloudBig.java similarity index 98% rename from com/hbm/entity/EntityNukeCloudBig.java rename to com/hbm/entity/effect/EntityNukeCloudBig.java index 54650b277..90bc8c943 100644 --- a/com/hbm/entity/EntityNukeCloudBig.java +++ b/com/hbm/entity/effect/EntityNukeCloudBig.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.effect; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/entity/effect/EntityNukeCloudNoShroom.java b/com/hbm/entity/effect/EntityNukeCloudNoShroom.java new file mode 100644 index 000000000..3a069cbb1 --- /dev/null +++ b/com/hbm/entity/effect/EntityNukeCloudNoShroom.java @@ -0,0 +1,15 @@ +package com.hbm.entity.effect; + +import net.minecraft.world.World; + +public class EntityNukeCloudNoShroom extends EntityNukeCloudSmall { + + public EntityNukeCloudNoShroom(World p_i1582_1_) { + super(p_i1582_1_); + } + + public EntityNukeCloudNoShroom(World p_i1582_1_, int maxAge) { + super(p_i1582_1_, maxAge); + } + +} diff --git a/com/hbm/entity/EntityNukeCloudSmall.java b/com/hbm/entity/effect/EntityNukeCloudSmall.java similarity index 98% rename from com/hbm/entity/EntityNukeCloudSmall.java rename to com/hbm/entity/effect/EntityNukeCloudSmall.java index 63c9270b3..d36ce9344 100644 --- a/com/hbm/entity/EntityNukeCloudSmall.java +++ b/com/hbm/entity/effect/EntityNukeCloudSmall.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.effect; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/entity/grenade/EntityGrenadeASchrab.java b/com/hbm/entity/grenade/EntityGrenadeASchrab.java new file mode 100644 index 000000000..173554ec5 --- /dev/null +++ b/com/hbm/entity/grenade/EntityGrenadeASchrab.java @@ -0,0 +1,77 @@ +package com.hbm.entity.grenade; + +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.explosion.ExplosionChaos; +import com.hbm.main.MainRegistry; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class EntityGrenadeASchrab extends EntityThrowable +{ + private static final String __OBFID = "CL_00001722"; + + public EntityGrenadeASchrab(World p_i1773_1_) + { + super(p_i1773_1_); + } + + public EntityGrenadeASchrab(World p_i1774_1_, EntityLivingBase p_i1774_2_) + { + super(p_i1774_1_, p_i1774_2_); + } + + public EntityGrenadeASchrab(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) + { + super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); + } + + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) + { + if (p_70184_1_.entityHit != null) + { + byte b0 = 0; + + if (p_70184_1_.entityHit instanceof EntityBlaze) + { + b0 = 3; + } + + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); + } + + if (!this.worldObj.isRemote) + { + this.setDead(); + if (!this.worldObj.isRemote) { + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, + "random.explode", 100.0f, this.worldObj.rand.nextFloat() * 0.1F + 0.9F); + + EntityNukeExplosionAdvanced entity = new EntityNukeExplosionAdvanced(this.worldObj); + entity.posX = this.posX; + entity.posY = this.posY; + entity.posZ = this.posZ; + entity.destructionRange = MainRegistry.aSchrabRadius; + entity.speed = 25; + entity.coefficient = 1.0F; + entity.waste = false; + + this.worldObj.spawnEntityInWorld(entity); + + EntityCloudFleija cloud = new EntityCloudFleija(this.worldObj, MainRegistry.aSchrabRadius); + cloud.posX = this.posX; + cloud.posY = this.posY; + cloud.posZ = this.posZ; + this.worldObj.spawnEntityInWorld(cloud); + } + } + } +} diff --git a/com/hbm/entity/EntityGrenadeCluster.java b/com/hbm/entity/grenade/EntityGrenadeCluster.java similarity index 97% rename from com/hbm/entity/EntityGrenadeCluster.java rename to com/hbm/entity/grenade/EntityGrenadeCluster.java index 32c155ac4..71ec7b92d 100644 --- a/com/hbm/entity/EntityGrenadeCluster.java +++ b/com/hbm/entity/grenade/EntityGrenadeCluster.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; diff --git a/com/hbm/entity/EntityGrenadeElectric.java b/com/hbm/entity/grenade/EntityGrenadeElectric.java similarity index 97% rename from com/hbm/entity/EntityGrenadeElectric.java rename to com/hbm/entity/grenade/EntityGrenadeElectric.java index 0061a7a81..8bbb11aed 100644 --- a/com/hbm/entity/EntityGrenadeElectric.java +++ b/com/hbm/entity/grenade/EntityGrenadeElectric.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; diff --git a/com/hbm/entity/EntityGrenadeFire.java b/com/hbm/entity/grenade/EntityGrenadeFire.java similarity index 98% rename from com/hbm/entity/EntityGrenadeFire.java rename to com/hbm/entity/grenade/EntityGrenadeFire.java index be3627089..ddb41385f 100644 --- a/com/hbm/entity/EntityGrenadeFire.java +++ b/com/hbm/entity/grenade/EntityGrenadeFire.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; diff --git a/com/hbm/entity/EntityGrenadeFlare.java b/com/hbm/entity/grenade/EntityGrenadeFlare.java similarity index 97% rename from com/hbm/entity/EntityGrenadeFlare.java rename to com/hbm/entity/grenade/EntityGrenadeFlare.java index 64e621341..76017717f 100644 --- a/com/hbm/entity/EntityGrenadeFlare.java +++ b/com/hbm/entity/grenade/EntityGrenadeFlare.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; diff --git a/com/hbm/entity/EntityGrenadeFrag.java b/com/hbm/entity/grenade/EntityGrenadeFrag.java similarity index 98% rename from com/hbm/entity/EntityGrenadeFrag.java rename to com/hbm/entity/grenade/EntityGrenadeFrag.java index 5b4f48733..dd5b565c5 100644 --- a/com/hbm/entity/EntityGrenadeFrag.java +++ b/com/hbm/entity/grenade/EntityGrenadeFrag.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; diff --git a/com/hbm/entity/EntityGrenadeGas.java b/com/hbm/entity/grenade/EntityGrenadeGas.java similarity index 83% rename from com/hbm/entity/EntityGrenadeGas.java rename to com/hbm/entity/grenade/EntityGrenadeGas.java index c59f2ace1..fea16156a 100644 --- a/com/hbm/entity/EntityGrenadeGas.java +++ b/com/hbm/entity/grenade/EntityGrenadeGas.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; @@ -7,6 +7,8 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import java.util.Random; + import com.hbm.explosion.ExplosionChaos; public class EntityGrenadeGas extends EntityThrowable @@ -48,6 +50,11 @@ public class EntityGrenadeGas extends EntityThrowable this.setDead(); this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true); ExplosionChaos.poison(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5); + } + + for (int i = 0; i < 10; i++) { + for(int j = 0; j < 10; j++) + this.worldObj.spawnParticle("cloud", this.posX - 2.5D + (((double)i) / 2), this.posY + 0.5D, this.posZ - 2.5D + (((double)j) / 2), 0, rand.nextDouble() * 0.1D, 0); } } diff --git a/com/hbm/entity/EntityGrenadeGeneric.java b/com/hbm/entity/grenade/EntityGrenadeGeneric.java similarity index 97% rename from com/hbm/entity/EntityGrenadeGeneric.java rename to com/hbm/entity/grenade/EntityGrenadeGeneric.java index 01d185696..b0076da77 100644 --- a/com/hbm/entity/EntityGrenadeGeneric.java +++ b/com/hbm/entity/grenade/EntityGrenadeGeneric.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; diff --git a/com/hbm/entity/EntityGrenadeLemon.java b/com/hbm/entity/grenade/EntityGrenadeLemon.java similarity index 97% rename from com/hbm/entity/EntityGrenadeLemon.java rename to com/hbm/entity/grenade/EntityGrenadeLemon.java index cd402e562..a515f0247 100644 --- a/com/hbm/entity/EntityGrenadeLemon.java +++ b/com/hbm/entity/grenade/EntityGrenadeLemon.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import com.hbm.explosion.ExplosionNukeGeneric; diff --git a/com/hbm/entity/EntityGrenadeMk2.java b/com/hbm/entity/grenade/EntityGrenadeMk2.java similarity index 97% rename from com/hbm/entity/EntityGrenadeMk2.java rename to com/hbm/entity/grenade/EntityGrenadeMk2.java index e58264345..aed929aea 100644 --- a/com/hbm/entity/EntityGrenadeMk2.java +++ b/com/hbm/entity/grenade/EntityGrenadeMk2.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; diff --git a/com/hbm/entity/EntityGrenadeNuclear.java b/com/hbm/entity/grenade/EntityGrenadeNuclear.java similarity index 95% rename from com/hbm/entity/EntityGrenadeNuclear.java rename to com/hbm/entity/grenade/EntityGrenadeNuclear.java index d726bb747..5566ff097 100644 --- a/com/hbm/entity/EntityGrenadeNuclear.java +++ b/com/hbm/entity/grenade/EntityGrenadeNuclear.java @@ -1,5 +1,6 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionParticle; import com.hbm.explosion.ExplosionParticleB; import com.hbm.main.MainRegistry; diff --git a/com/hbm/entity/EntityGrenadeNuke.java b/com/hbm/entity/grenade/EntityGrenadeNuke.java similarity index 97% rename from com/hbm/entity/EntityGrenadeNuke.java rename to com/hbm/entity/grenade/EntityGrenadeNuke.java index 2a2adc2ec..9ed8eab46 100644 --- a/com/hbm/entity/EntityGrenadeNuke.java +++ b/com/hbm/entity/grenade/EntityGrenadeNuke.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; diff --git a/com/hbm/entity/EntityGrenadePlasma.java b/com/hbm/entity/grenade/EntityGrenadePlasma.java similarity index 98% rename from com/hbm/entity/EntityGrenadePlasma.java rename to com/hbm/entity/grenade/EntityGrenadePlasma.java index 85c618110..141eef4e7 100644 --- a/com/hbm/entity/EntityGrenadePlasma.java +++ b/com/hbm/entity/grenade/EntityGrenadePlasma.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionNukeGeneric; diff --git a/com/hbm/entity/EntityGrenadePoison.java b/com/hbm/entity/grenade/EntityGrenadePoison.java similarity index 97% rename from com/hbm/entity/EntityGrenadePoison.java rename to com/hbm/entity/grenade/EntityGrenadePoison.java index 776581987..5c7c8a552 100644 --- a/com/hbm/entity/EntityGrenadePoison.java +++ b/com/hbm/entity/grenade/EntityGrenadePoison.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import com.hbm.explosion.ExplosionNukeGeneric; diff --git a/com/hbm/entity/EntityGrenadeSchrabidium.java b/com/hbm/entity/grenade/EntityGrenadeSchrabidium.java similarity index 97% rename from com/hbm/entity/EntityGrenadeSchrabidium.java rename to com/hbm/entity/grenade/EntityGrenadeSchrabidium.java index 442e9344d..e1a494cd1 100644 --- a/com/hbm/entity/EntityGrenadeSchrabidium.java +++ b/com/hbm/entity/grenade/EntityGrenadeSchrabidium.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import com.hbm.explosion.ExplosionChaos; diff --git a/com/hbm/entity/EntityGrenadeStrong.java b/com/hbm/entity/grenade/EntityGrenadeStrong.java similarity index 97% rename from com/hbm/entity/EntityGrenadeStrong.java rename to com/hbm/entity/grenade/EntityGrenadeStrong.java index 8e52de366..3666983d2 100644 --- a/com/hbm/entity/EntityGrenadeStrong.java +++ b/com/hbm/entity/grenade/EntityGrenadeStrong.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityBlaze; diff --git a/com/hbm/entity/EntityGrenadeTau.java b/com/hbm/entity/grenade/EntityGrenadeTau.java similarity index 98% rename from com/hbm/entity/EntityGrenadeTau.java rename to com/hbm/entity/grenade/EntityGrenadeTau.java index 970990ca2..1f2b567bf 100644 --- a/com/hbm/entity/EntityGrenadeTau.java +++ b/com/hbm/entity/grenade/EntityGrenadeTau.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.grenade; import com.hbm.explosion.ExplosionChaos; diff --git a/com/hbm/entity/grenade/EntityGrenadeZOMG.java b/com/hbm/entity/grenade/EntityGrenadeZOMG.java new file mode 100644 index 000000000..da6caaf40 --- /dev/null +++ b/com/hbm/entity/grenade/EntityGrenadeZOMG.java @@ -0,0 +1,55 @@ +package com.hbm.entity.grenade; + +import com.hbm.explosion.ExplosionChaos; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class EntityGrenadeZOMG extends EntityThrowable +{ + private static final String __OBFID = "CL_00001722"; + + public EntityGrenadeZOMG(World p_i1773_1_) + { + super(p_i1773_1_); + } + + public EntityGrenadeZOMG(World p_i1774_1_, EntityLivingBase p_i1774_2_) + { + super(p_i1774_1_, p_i1774_2_); + } + + public EntityGrenadeZOMG(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) + { + super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); + } + + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) + { + if (p_70184_1_.entityHit != null) + { + byte b0 = 0; + + if (p_70184_1_.entityHit instanceof EntityBlaze) + { + b0 = 3; + } + + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); + } + + if (!this.worldObj.isRemote) + { + this.setDead(); + ExplosionChaos.zomgMeSinPi(this.worldObj, this.posX, this.posY, this.posZ, 100, this.getThrower(), this); + } + } + +} diff --git a/com/hbm/entity/EntityNukeExplosion.java b/com/hbm/entity/logic/EntityNukeExplosion.java similarity index 98% rename from com/hbm/entity/EntityNukeExplosion.java rename to com/hbm/entity/logic/EntityNukeExplosion.java index 461fc8826..c025b76da 100644 --- a/com/hbm/entity/EntityNukeExplosion.java +++ b/com/hbm/entity/logic/EntityNukeExplosion.java @@ -49,7 +49,7 @@ public class EntityNukeExplosion extends Entity { }*/ -package com.hbm.entity; +package com.hbm.entity.logic; import com.hbm.explosion.ExplosionNukeGeneric; diff --git a/com/hbm/entity/EntityNukeExplosionAdvanced.java b/com/hbm/entity/logic/EntityNukeExplosionAdvanced.java similarity index 85% rename from com/hbm/entity/EntityNukeExplosionAdvanced.java rename to com/hbm/entity/logic/EntityNukeExplosionAdvanced.java index 12031d144..a70ed632a 100644 --- a/com/hbm/entity/EntityNukeExplosionAdvanced.java +++ b/com/hbm/entity/logic/EntityNukeExplosionAdvanced.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.logic; import java.util.HashSet; import java.util.List; @@ -10,6 +10,7 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import com.hbm.entity.effect.EntityFalloutRain; import com.hbm.explosion.ExplosionFleija; import com.hbm.explosion.ExplosionNukeAdvanced; import com.hbm.explosion.ExplosionNukeGeneric; @@ -26,6 +27,7 @@ public class EntityNukeExplosionAdvanced extends Entity { public float coefficient = 1; public float coefficient2 = 1; public boolean did = false; + public boolean did2 = false; public boolean waste = true; public EntityNukeExplosionAdvanced(World p_i1582_1_) { @@ -78,6 +80,17 @@ public class EntityNukeExplosionAdvanced extends Entity { this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F); ExplosionNukeGeneric.dealDamage(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.destructionRange * 2); } else { + if (!did2 && waste) { + EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (int)(this.destructionRange * 1.8) * 10); + fallout.posX = this.posX; + fallout.posY = this.posY; + fallout.posZ = this.posZ; + fallout.setScale((int)(this.destructionRange * 1.8)); + + this.worldObj.spawnEntityInWorld(fallout); + + did2 = true; + } } age++; diff --git a/com/hbm/entity/EntityMirv.java b/com/hbm/entity/missile/EntityMIRV.java similarity index 90% rename from com/hbm/entity/EntityMirv.java rename to com/hbm/entity/missile/EntityMIRV.java index 13dbb42a2..77d851c28 100644 --- a/com/hbm/entity/EntityMirv.java +++ b/com/hbm/entity/missile/EntityMIRV.java @@ -1,7 +1,9 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.main.MainRegistry; -import com.hbm.particles.EntitySmokeFX; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -11,9 +13,9 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityMirv extends EntityThrowable { +public class EntityMIRV extends EntityThrowable { - public EntityMirv(World p_i1582_1_) { + public EntityMIRV(World p_i1582_1_) { super(p_i1582_1_); this.ignoreFrustumCheck = true; } diff --git a/com/hbm/entity/EntityMissileAntiBallistic.java b/com/hbm/entity/missile/EntityMissileAntiBallistic.java similarity index 99% rename from com/hbm/entity/EntityMissileAntiBallistic.java rename to com/hbm/entity/missile/EntityMissileAntiBallistic.java index 1468b569e..3aecbbca7 100644 --- a/com/hbm/entity/EntityMissileAntiBallistic.java +++ b/com/hbm/entity/missile/EntityMissileAntiBallistic.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.missile; import com.hbm.calc.EasyLocation; import com.hbm.explosion.ExplosionChaos; diff --git a/com/hbm/entity/EntityMissileBase.java b/com/hbm/entity/missile/EntityMissileBase.java similarity index 99% rename from com/hbm/entity/EntityMissileBase.java rename to com/hbm/entity/missile/EntityMissileBase.java index 86e6b04cb..66708a150 100644 --- a/com/hbm/entity/EntityMissileBase.java +++ b/com/hbm/entity/missile/EntityMissileBase.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.missile; import com.hbm.calc.EasyLocation; diff --git a/com/hbm/entity/EntityMissileBunkerBuster.java b/com/hbm/entity/missile/EntityMissileBunkerBuster.java similarity index 98% rename from com/hbm/entity/EntityMissileBunkerBuster.java rename to com/hbm/entity/missile/EntityMissileBunkerBuster.java index 451f72167..763b15c24 100644 --- a/com/hbm/entity/EntityMissileBunkerBuster.java +++ b/com/hbm/entity/missile/EntityMissileBunkerBuster.java @@ -1,6 +1,6 @@ -package com.hbm.entity; +package com.hbm.entity.missile; -import com.hbm.particles.EntitySmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileBurst.java b/com/hbm/entity/missile/EntityMissileBurst.java similarity index 98% rename from com/hbm/entity/EntityMissileBurst.java rename to com/hbm/entity/missile/EntityMissileBurst.java index 9750191c3..cb13a595e 100644 --- a/com/hbm/entity/EntityMissileBurst.java +++ b/com/hbm/entity/missile/EntityMissileBurst.java @@ -1,6 +1,6 @@ -package com.hbm.entity; +package com.hbm.entity.missile; -import com.hbm.particles.EntitySmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileBusterStrong.java b/com/hbm/entity/missile/EntityMissileBusterStrong.java similarity index 98% rename from com/hbm/entity/EntityMissileBusterStrong.java rename to com/hbm/entity/missile/EntityMissileBusterStrong.java index eb4bfe134..ad6dcae84 100644 --- a/com/hbm/entity/EntityMissileBusterStrong.java +++ b/com/hbm/entity/missile/EntityMissileBusterStrong.java @@ -1,6 +1,6 @@ -package com.hbm.entity; +package com.hbm.entity.missile; -import com.hbm.particles.EntitySmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileCluster.java b/com/hbm/entity/missile/EntityMissileCluster.java similarity index 98% rename from com/hbm/entity/EntityMissileCluster.java rename to com/hbm/entity/missile/EntityMissileCluster.java index ec8951c84..908181588 100644 --- a/com/hbm/entity/EntityMissileCluster.java +++ b/com/hbm/entity/missile/EntityMissileCluster.java @@ -1,7 +1,7 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionChaos; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileClusterStrong.java b/com/hbm/entity/missile/EntityMissileClusterStrong.java similarity index 98% rename from com/hbm/entity/EntityMissileClusterStrong.java rename to com/hbm/entity/missile/EntityMissileClusterStrong.java index e7c6c2a20..53ed39f3f 100644 --- a/com/hbm/entity/EntityMissileClusterStrong.java +++ b/com/hbm/entity/missile/EntityMissileClusterStrong.java @@ -1,7 +1,7 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionChaos; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileDrill.java b/com/hbm/entity/missile/EntityMissileDrill.java similarity index 98% rename from com/hbm/entity/EntityMissileDrill.java rename to com/hbm/entity/missile/EntityMissileDrill.java index 2dc6c14a0..4ffc78a8e 100644 --- a/com/hbm/entity/EntityMissileDrill.java +++ b/com/hbm/entity/missile/EntityMissileDrill.java @@ -1,6 +1,6 @@ -package com.hbm.entity; +package com.hbm.entity.missile; -import com.hbm.particles.EntitySmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileEndo.java b/com/hbm/entity/missile/EntityMissileEndo.java similarity index 98% rename from com/hbm/entity/EntityMissileEndo.java rename to com/hbm/entity/missile/EntityMissileEndo.java index 9f9529654..b0696aaac 100644 --- a/com/hbm/entity/EntityMissileEndo.java +++ b/com/hbm/entity/missile/EntityMissileEndo.java @@ -1,7 +1,7 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionThermo; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileExo.java b/com/hbm/entity/missile/EntityMissileExo.java similarity index 98% rename from com/hbm/entity/EntityMissileExo.java rename to com/hbm/entity/missile/EntityMissileExo.java index e944a7a21..425ce4022 100644 --- a/com/hbm/entity/EntityMissileExo.java +++ b/com/hbm/entity/missile/EntityMissileExo.java @@ -1,7 +1,7 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionThermo; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileGeneric.java b/com/hbm/entity/missile/EntityMissileGeneric.java similarity index 98% rename from com/hbm/entity/EntityMissileGeneric.java rename to com/hbm/entity/missile/EntityMissileGeneric.java index a884fb010..098bb1643 100644 --- a/com/hbm/entity/EntityMissileGeneric.java +++ b/com/hbm/entity/missile/EntityMissileGeneric.java @@ -1,6 +1,6 @@ -package com.hbm.entity; +package com.hbm.entity.missile; -import com.hbm.particles.EntitySmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileIncendiary.java b/com/hbm/entity/missile/EntityMissileIncendiary.java similarity index 98% rename from com/hbm/entity/EntityMissileIncendiary.java rename to com/hbm/entity/missile/EntityMissileIncendiary.java index b9c44afff..823100bf7 100644 --- a/com/hbm/entity/EntityMissileIncendiary.java +++ b/com/hbm/entity/missile/EntityMissileIncendiary.java @@ -1,6 +1,6 @@ -package com.hbm.entity; +package com.hbm.entity.missile; -import com.hbm.particles.EntitySmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/entity/EntityMissileIncendiaryStrong.java b/com/hbm/entity/missile/EntityMissileIncendiaryStrong.java similarity index 98% rename from com/hbm/entity/EntityMissileIncendiaryStrong.java rename to com/hbm/entity/missile/EntityMissileIncendiaryStrong.java index ac1247847..4034f411d 100644 --- a/com/hbm/entity/EntityMissileIncendiaryStrong.java +++ b/com/hbm/entity/missile/EntityMissileIncendiaryStrong.java @@ -1,7 +1,7 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionChaos; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; diff --git a/com/hbm/entity/EntityMissileInferno.java b/com/hbm/entity/missile/EntityMissileInferno.java similarity index 98% rename from com/hbm/entity/EntityMissileInferno.java rename to com/hbm/entity/missile/EntityMissileInferno.java index 232f39942..b283f3524 100644 --- a/com/hbm/entity/EntityMissileInferno.java +++ b/com/hbm/entity/missile/EntityMissileInferno.java @@ -1,7 +1,7 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionChaos; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; diff --git a/com/hbm/entity/EntityMissileMirv.java b/com/hbm/entity/missile/EntityMissileMirv.java similarity index 98% rename from com/hbm/entity/EntityMissileMirv.java rename to com/hbm/entity/missile/EntityMissileMirv.java index 3835e44ca..0e714f27a 100644 --- a/com/hbm/entity/EntityMissileMirv.java +++ b/com/hbm/entity/missile/EntityMissileMirv.java @@ -1,7 +1,7 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionChaos; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileNuclear.java b/com/hbm/entity/missile/EntityMissileNuclear.java similarity index 96% rename from com/hbm/entity/EntityMissileNuclear.java rename to com/hbm/entity/missile/EntityMissileNuclear.java index e0b0e8f05..08f2744f3 100644 --- a/com/hbm/entity/EntityMissileNuclear.java +++ b/com/hbm/entity/missile/EntityMissileNuclear.java @@ -1,7 +1,9 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.main.MainRegistry; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileRain.java b/com/hbm/entity/missile/EntityMissileRain.java similarity index 98% rename from com/hbm/entity/EntityMissileRain.java rename to com/hbm/entity/missile/EntityMissileRain.java index c5c227595..e5ca853f1 100644 --- a/com/hbm/entity/EntityMissileRain.java +++ b/com/hbm/entity/missile/EntityMissileRain.java @@ -1,7 +1,7 @@ -package com.hbm.entity; +package com.hbm.entity.missile; +import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.explosion.ExplosionChaos; -import com.hbm.particles.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityMissileStrong.java b/com/hbm/entity/missile/EntityMissileStrong.java similarity index 98% rename from com/hbm/entity/EntityMissileStrong.java rename to com/hbm/entity/missile/EntityMissileStrong.java index a2f13b6c1..18659902a 100644 --- a/com/hbm/entity/EntityMissileStrong.java +++ b/com/hbm/entity/missile/EntityMissileStrong.java @@ -1,6 +1,6 @@ -package com.hbm.entity; +package com.hbm.entity.missile; -import com.hbm.particles.EntitySmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; import net.minecraft.init.Blocks; import net.minecraft.world.World; diff --git a/com/hbm/entity/EntityTestMissile.java b/com/hbm/entity/missile/EntityTestMissile.java similarity index 99% rename from com/hbm/entity/EntityTestMissile.java rename to com/hbm/entity/missile/EntityTestMissile.java index f62f0a0c3..9331c37d8 100644 --- a/com/hbm/entity/EntityTestMissile.java +++ b/com/hbm/entity/missile/EntityTestMissile.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.missile; import com.hbm.calc.EasyLocation; import net.minecraft.entity.projectile.EntityThrowable; diff --git a/com/hbm/entity/EntityAINuclearCreeperSwell.java b/com/hbm/entity/mob/EntityAINuclearCreeperSwell.java similarity index 98% rename from com/hbm/entity/EntityAINuclearCreeperSwell.java rename to com/hbm/entity/mob/EntityAINuclearCreeperSwell.java index 00713bf29..342eca743 100644 --- a/com/hbm/entity/EntityAINuclearCreeperSwell.java +++ b/com/hbm/entity/mob/EntityAINuclearCreeperSwell.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.mob; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.EntityAIBase; diff --git a/com/hbm/entity/EntityHunterChopper.java b/com/hbm/entity/mob/EntityHunterChopper.java similarity index 90% rename from com/hbm/entity/EntityHunterChopper.java rename to com/hbm/entity/mob/EntityHunterChopper.java index 668d36cae..a5ed50bcd 100644 --- a/com/hbm/entity/EntityHunterChopper.java +++ b/com/hbm/entity/mob/EntityHunterChopper.java @@ -1,10 +1,12 @@ -package com.hbm.entity; +package com.hbm.entity.mob; +import com.hbm.entity.particle.EntitySmokeFX; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityChopperMine; import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; import com.hbm.main.MainRegistry; -import com.hbm.particles.EntitySmokeFX; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -35,14 +37,10 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp public double waypointY; public double waypointZ; private Entity targetedEntity; - /** Cooldown time between target loss and new target aquirement. */ private int aggroCooldown; public int prevAttackCounter; public int attackCounter; public int mineDropCounter; - /** The explosion radius of spawned fireballs. */ - private int explosionStrength = 1; - private static final String __OBFID = "CL_00001689"; public boolean isDying = false; public EntityHunterChopper(World p_i1735_1_) { @@ -50,6 +48,7 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp this.setSize(8.25F, 3.0F); this.isImmuneToFire = true; this.experienceValue = 500; + this.ignoreFrustumCheck = true; } @SideOnly(Side.CLIENT) @@ -61,10 +60,12 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp * Called when the entity is attacked. */ public boolean attackEntityFrom(DamageSource source, float amount) { - if (this.isEntityInvulnerable() || !(source.isExplosion() || ModDamageSource.getIsTau(source) || (ModDamageSource.getIsEmplacer(source) && source.getSourceOfDamage() != this))) { + if (this.isEntityInvulnerable() || !(source == ModDamageSource.nuclearBlast || source.isExplosion() || ModDamageSource.getIsTau(source) || ModDamageSource.getIsSubatomic(source) || ModDamageSource.getIsDischarge(source))) { return false; } else if(amount >= this.getHealth()) { this.initDeath(); + this.setIsDying(true); + this.setHealth(0.1F); return false; } @@ -95,11 +96,12 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); this.dataWatcher.addObject(21, Float.valueOf((float) 0)); this.dataWatcher.addObject(22, Float.valueOf((float) 0)); + this.dataWatcher.addObject(23, Byte.valueOf((byte) 0)); } protected void applyEntityAttributes() { super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(1500.0D); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(750.0D); } protected void updateEntityActionState() { @@ -108,10 +110,8 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp } if (!isDying) { - if (this.ticksExisted % 2 == 0) - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "fireworks.blast", 10.0F, 0.5F); + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:misc.nullChopper", 10.0F, 0.5F); - this.despawnEntity(); this.prevAttackCounter = this.attackCounter; double d0 = this.waypointX - this.posX; double d1 = this.waypointY - this.posY; @@ -156,8 +156,7 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp // this.targetedEntity = // this.worldObj.getClosestVulnerablePlayerToEntity(this, // 100.0D); - this.targetedEntity = Library.getClosestEntityForChopper(worldObj, this.posX, this.posY, this.posZ, - 250); + this.targetedEntity = Library.getClosestEntityForChopper(worldObj, this.posX, this.posY, this.posZ, 250); if (this.targetedEntity != null) { this.aggroCooldown = 20; @@ -183,7 +182,7 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp } if (this.attackCounter % 2 == 0 && attackCounter >= 120) { - worldObj.playSoundAtEntity(this, "random.explode", 10.0F, 3.0F); + worldObj.playSoundAtEntity(this, "hbm:weapon.osiprShoot", 10.0F, 1.0F); // EntityLargeFireball entitylargefireball = new // EntityLargeFireball(this.worldObj, this, d5, d6, d7); EntityBullet entityarrow = new EntityBullet(this.worldObj, this, 3.0F, 35, 45, false, "chopper"); @@ -207,12 +206,13 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp // this.worldObj.spawnEntityInWorld(entitylargefireball); this.worldObj.spawnEntityInWorld(entityarrow); } - if (this.attackCounter >= 80 && this.attackCounter < 120) { - worldObj.playSoundAtEntity(this, "random.click", 10.0F, 0.5F + ((attackCounter / 100) - 0.8F)); + if (this.attackCounter == 80) { + worldObj.playSoundAtEntity(this, "hbm:entity.chopperCharge", 5.0F, 1.0F); } this.mineDropCounter++; if (mineDropCounter > 100 && rand.nextInt(15) == 0) { + worldObj.playSoundAtEntity(this, "hbm:entity.chopperDrop", 15.0F, 1.0F); EntityChopperMine mine = new EntityChopperMine(worldObj, this.posX, this.posY - 0.5, this.posZ, 0, -0.3, 0, this); this.mineDropCounter = 0; this.worldObj.spawnEntityInWorld(mine); @@ -260,12 +260,16 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp this.worldObj.spawnEntityInWorld(new EntitySmokeFX(worldObj, this.posX, this.posY, this.posZ, 0, 0, 0)); + rotationYaw += 20; + if(this.onGround) { this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 15F, true); this.dropItems(); this.setDead(); } + if (this.ticksExisted % 2 == 0) + this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:misc.nullCrashing", 10.0F, 0.5F); } if (this.targetedEntity == null) { @@ -296,10 +300,6 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp double d5 = this.targetedEntity.posX - xStart; double d6 = this.targetedEntity.boundingBox.minY + (double) (this.targetedEntity.height / 2.0F) - yStart; double d7 = this.targetedEntity.posZ - zStart; - - this.setYaw(-((float) (Math.atan2(d5, d7) * 180.0D / Math.PI) + 90)); - f3 = MathHelper.sqrt_double(d5 * d5 + d7 * d7); - this.setPitch((float) (Math.atan2(d6, f3) * 180.0D / Math.PI)); } if(rotationPitch <= 330 && rotationPitch >= 30) @@ -392,7 +392,6 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp */ public void writeEntityToNBT(NBTTagCompound p_70014_1_) { super.writeEntityToNBT(p_70014_1_); - p_70014_1_.setInteger("ExplosionPower", this.explosionStrength); } /** @@ -400,10 +399,6 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp */ public void readEntityFromNBT(NBTTagCompound p_70037_1_) { super.readEntityFromNBT(p_70037_1_); - - if (p_70037_1_.hasKey("ExplosionPower", 99)) { - this.explosionStrength = p_70037_1_.getInteger("ExplosionPower"); - } } @Override @@ -415,6 +410,8 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp public void initDeath() { this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10F, true); + if(!this.isDying) + worldObj.playSoundAtEntity(this, "hbm:entity.chopperDamage", 10.0F, 1.0F); isDying = true; } @@ -429,19 +426,11 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp this.dropItem(ModItems.wire_magnetized_tungsten, 1); } - public void setYaw(float f) { - this.dataWatcher.updateObject(21, Float.valueOf((float) f)); + public void setIsDying(boolean b) { + this.dataWatcher.updateObject(23, Byte.valueOf((byte) (b ? 1 : 0))); } - public void setPitch(float f) { - this.dataWatcher.updateObject(22, Float.valueOf((float) f)); - } - - public float getYaw() { - return this.dataWatcher.getWatchableObjectFloat(21); - } - - public float getPitch() { - return this.dataWatcher.getWatchableObjectFloat(22); + public boolean getIsDying() { + return this.dataWatcher.getWatchableObjectByte(23) == 1; } } diff --git a/com/hbm/entity/EntityNuclearCreeper.java b/com/hbm/entity/mob/EntityNuclearCreeper.java similarity index 97% rename from com/hbm/entity/EntityNuclearCreeper.java rename to com/hbm/entity/mob/EntityNuclearCreeper.java index af23d1676..f991772fd 100644 --- a/com/hbm/entity/EntityNuclearCreeper.java +++ b/com/hbm/entity/mob/EntityNuclearCreeper.java @@ -1,12 +1,15 @@ -package com.hbm.entity; +package com.hbm.entity.mob; import java.util.HashSet; import java.util.List; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionParticle; import com.hbm.explosion.ExplosionParticleB; import com.hbm.items.ModItems; import com.hbm.lib.Library; +import com.hbm.lib.ModDamageSource; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -78,6 +81,17 @@ public class EntityNuclearCreeper extends EntityMob { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.3D); } + + @Override + public boolean attackEntityFrom(DamageSource source, float amount) { + + if(source == ModDamageSource.radiation || source == ModDamageSource.mudPoisoning) { + this.heal(amount); + return false; + } + + return super.attackEntityFrom(source, amount); + } /** * Returns true if the newer Entity AI code should be run diff --git a/com/hbm/particles/EntityBSmokeFX.java b/com/hbm/entity/particle/EntityBSmokeFX.java similarity index 98% rename from com/hbm/particles/EntityBSmokeFX.java rename to com/hbm/entity/particle/EntityBSmokeFX.java index 3d878d3dc..ae080ec16 100644 --- a/com/hbm/particles/EntityBSmokeFX.java +++ b/com/hbm/entity/particle/EntityBSmokeFX.java @@ -1,4 +1,4 @@ -package com.hbm.particles; +package com.hbm.entity.particle; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/particles/EntityModFX.java b/com/hbm/entity/particle/EntityModFX.java similarity index 99% rename from com/hbm/particles/EntityModFX.java rename to com/hbm/entity/particle/EntityModFX.java index 8697f6b1a..6657fc09b 100644 --- a/com/hbm/particles/EntityModFX.java +++ b/com/hbm/entity/particle/EntityModFX.java @@ -1,4 +1,4 @@ -package com.hbm.particles; +package com.hbm.entity.particle; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/particles/EntitySmokeFX.java b/com/hbm/entity/particle/EntitySmokeFX.java similarity index 98% rename from com/hbm/particles/EntitySmokeFX.java rename to com/hbm/entity/particle/EntitySmokeFX.java index 10d1cc94d..64d1a0c4b 100644 --- a/com/hbm/particles/EntitySmokeFX.java +++ b/com/hbm/entity/particle/EntitySmokeFX.java @@ -1,4 +1,4 @@ -package com.hbm.particles; +package com.hbm.entity.particle; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/entity/projectile/EntityBaleflare.java b/com/hbm/entity/projectile/EntityBaleflare.java new file mode 100644 index 000000000..d059580dc --- /dev/null +++ b/com/hbm/entity/projectile/EntityBaleflare.java @@ -0,0 +1,578 @@ +package com.hbm.entity.projectile; + +import java.util.List; + +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.explosion.ExplosionParticle; +import com.hbm.explosion.ExplosionParticleB; +import com.hbm.items.ModItems; +import com.hbm.main.MainRegistry; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.play.server.S2BPacketChangeGameState; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityBaleflare extends Entity implements IProjectile { + private int field_145791_d = -1; + private int field_145792_e = -1; + private int field_145789_f = -1; + public double gravity = 0.0D; + private Block field_145790_g; + private int inData; + private boolean inGround; + /** 1 if the player can pick up the arrow */ + public int canBePickedUp; + /** Seems to be some sort of timer for animating an arrow. */ + public int arrowShake; + /** The owner of this arrow. */ + public Entity shootingEntity; + private int ticksInGround; + private int ticksInAir; + private double damage = 2.0D; + /** The amount of knockback an arrow applies when it hits a mob. */ + private int knockbackStrength; + private static final String __OBFID = "CL_00001715"; + + public EntityBaleflare(World p_i1753_1_) + { + super(p_i1753_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } + + public EntityBaleflare(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) + { + super(p_i1754_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); + this.yOffset = 0.0F; + } + + public EntityBaleflare(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) + { + super(p_i1755_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1755_2_; + + if (p_i1755_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + double d0 = p_i1755_3_.posX - p_i1755_2_.posX; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; + double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); + + if (d3 >= 1.0E-7D) + { + float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); + double d4 = d0 / d3; + double d5 = d2 / d3; + this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float)d3 * 0.2F; + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); + } + } + + public EntityBaleflare(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) + { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + if (p_i1756_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + } + + public EntityBaleflare(World world, int x, int y, int z, double mx, double my, double mz, double grav) { + super(world); + this.posX = x + 0.5F; + this.posY = y + 0.5F; + this.posZ = z + 0.5F; + + this.motionX = mx; + this.motionY = my; + this.motionZ = mz; + + this.gravity = grav; + } + + @Override + protected void entityInit() { + this.dataWatcher.addObject(16, Byte.valueOf((byte) 0)); + } + + /** + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z + * direction. + */ + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, + float p_70186_8_) { + float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D + * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D + * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D + * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; + this.motionX = p_70186_1_; + this.motionY = p_70186_3_; + this.motionZ = p_70186_5_; + float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); + this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); + this.ticksInGround = 0; + } + + /** + * Sets the position and rotation. Only difference from the other one is no + * bounding on the rotation. Args: posX, posY, posZ, yaw, pitch + */ + @Override + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, + float p_70056_8_, int p_70056_9_) { + this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); + this.setRotation(p_70056_7_, p_70056_8_); + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @Override + @SideOnly(Side.CLIENT) + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; + + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { + float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); + this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch; + this.prevRotationYaw = this.rotationYaw; + this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.ticksInGround = 0; + } + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + super.onUpdate(); + + 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); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); + } + + Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (block.getMaterial() != Material.air) + { + block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) + { + this.inGround = true; + } + } + + if (this.arrowShake > 0) + { + --this.arrowShake; + } + + if (this.inGround) + { + int j = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (block == this.field_145790_g && j == this.inData) + { + ++this.ticksInGround; + + if (this.ticksInGround == 300) + { + if (!this.worldObj.isRemote) + { + EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + entity0.posX = this.posX; + entity0.posY = this.posY; + entity0.posZ = this.posZ; + entity0.destructionRange = MainRegistry.fatmanRadius; + entity0.speed = 25; + entity0.coefficient = 10.0F; + + this.worldObj.spawnEntityInWorld(entity0); + + ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ); + } + this.setDead(); + } + } + else + { + this.inGround = false; + this.motionX *= (double)(this.rand.nextFloat() * 0.2F); + this.motionY *= (double)(this.rand.nextFloat() * 0.2F); + this.motionZ *= (double)(this.rand.nextFloat() * 0.2F); + this.ticksInGround = 0; + this.ticksInAir = 0; + } + } + else + { + ++this.ticksInAir; + Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); + vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int i; + float f1; + + for (i = 0; i < list.size(); ++i) + { + Entity entity1 = (Entity)list.get(i); + + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) + { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); + + if (movingobjectposition1 != null) + { + double d1 = vec31.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) + { + EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; + + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) + { + movingobjectposition = null; + } + } + + float f2; + float f4; + + if (movingobjectposition != null) + { + if (movingobjectposition.entityHit != null) + { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + int k = MathHelper.ceiling_double_int((double)f2 * this.damage); + + if (this.getIsCritical()) + { + k += this.rand.nextInt(k / 2 + 2); + } + + DamageSource damagesource = null; + + if (this.shootingEntity == null) + { + damagesource = DamageSource.generic; + } + else + { + damagesource = DamageSource.generic; + } + + if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) + { + movingobjectposition.entityHit.setFire(5); + } + + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, (float)k)) + { + if (movingobjectposition.entityHit instanceof EntityLivingBase) + { + EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; + + if (this.knockbackStrength > 0) + { + f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f4 > 0.0F) + { + movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4); + } + } + + if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) + { + EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); + EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); + } + + if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) + { + ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + } + } + } + } + else + { + this.field_145791_d = movingobjectposition.blockX; + this.field_145792_e = movingobjectposition.blockY; + this.field_145789_f = movingobjectposition.blockZ; + this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ)); + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / (double)f2 * 0.05000000074505806D; + this.posY -= this.motionY / (double)f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D; + this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); + this.inGround = true; + this.arrowShake = 7; + this.setIsCritical(false); + + if (this.field_145790_g.getMaterial() != Material.air) + { + this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); + } + } + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + + for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) + { + ; + } + + while (this.rotationPitch - this.prevRotationPitch >= 180.0F) + { + this.prevRotationPitch += 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw < -180.0F) + { + this.prevRotationYaw -= 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw >= 180.0F) + { + this.prevRotationYaw += 360.0F; + } + + this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; + this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; + float f3 = 0.99F; + f1 = 0.05F; + + if (this.isInWater()) + { + for (int l = 0; l < 4; ++l) + { + f4 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ); + } + + f3 = 0.8F; + } + + if (this.isWet()) + { + this.extinguish(); + } + + // + f1 *= 0.25F; + // + this.motionX *= (double)f3; + this.motionY *= (double)f3; + this.motionZ *= (double)f3; + this.motionY -= (double)f1; + this.setPosition(this.posX, this.posY, this.posZ); + this.func_145775_I(); + } + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) { + p_70014_1_.setShort("xTile", (short) this.field_145791_d); + p_70014_1_.setShort("yTile", (short) this.field_145792_e); + p_70014_1_.setShort("zTile", (short) this.field_145789_f); + p_70014_1_.setShort("life", (short) this.ticksInGround); + p_70014_1_.setByte("inTile", (byte) Block.getIdFromBlock(this.field_145790_g)); + p_70014_1_.setByte("inData", (byte) this.inData); + p_70014_1_.setByte("shake", (byte) this.arrowShake); + p_70014_1_.setByte("inGround", (byte) (this.inGround ? 1 : 0)); + p_70014_1_.setByte("pickup", (byte) this.canBePickedUp); + p_70014_1_.setDouble("damage", this.damage); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) { + this.field_145791_d = p_70037_1_.getShort("xTile"); + this.field_145792_e = p_70037_1_.getShort("yTile"); + this.field_145789_f = p_70037_1_.getShort("zTile"); + this.ticksInGround = p_70037_1_.getShort("life"); + this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); + this.inData = p_70037_1_.getByte("inData") & 255; + this.arrowShake = p_70037_1_.getByte("shake") & 255; + this.inGround = p_70037_1_.getByte("inGround") == 1; + + if (p_70037_1_.hasKey("damage", 99)) { + this.damage = p_70037_1_.getDouble("damage"); + } + + if (p_70037_1_.hasKey("pickup", 99)) { + this.canBePickedUp = p_70037_1_.getByte("pickup"); + } else if (p_70037_1_.hasKey("player", 99)) { + this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; + } + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they + * walk on. used for spiders and wolves to prevent them from trampling crops + */ + @Override + protected boolean canTriggerWalking() { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() { + return 0.0F; + } + + public void setDamage(double p_70239_1_) { + this.damage = p_70239_1_; + } + + public double getDamage() { + return this.damage; + } + + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int p_70240_1_) { + this.knockbackStrength = p_70240_1_; + } + + /** + * If returns false, the item will not inflict any damage against entities. + */ + @Override + public boolean canAttackWithItem() { + return false; + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind + * it. + */ + public void setIsCritical(boolean p_70243_1_) { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (p_70243_1_) { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 1))); + } else { + this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -2))); + } + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind + * it. + */ + public boolean getIsCritical() { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + return (b0 & 1) != 0; + } +} diff --git a/com/hbm/entity/EntityBullet.java b/com/hbm/entity/projectile/EntityBullet.java similarity index 99% rename from com/hbm/entity/EntityBullet.java rename to com/hbm/entity/projectile/EntityBullet.java index 7e4312a87..3ef382651 100644 --- a/com/hbm/entity/EntityBullet.java +++ b/com/hbm/entity/projectile/EntityBullet.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.projectile; import java.util.List; @@ -32,6 +32,8 @@ import net.minecraft.world.World; import com.hbm.blocks.DecoBlockAlt; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.RedBarrel; +import com.hbm.entity.grenade.EntityGrenadeTau; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; diff --git a/com/hbm/entity/EntityChopperMine.java b/com/hbm/entity/projectile/EntityChopperMine.java similarity index 92% rename from com/hbm/entity/EntityChopperMine.java rename to com/hbm/entity/projectile/EntityChopperMine.java index 1f3288369..c85eb2339 100644 --- a/com/hbm/entity/EntityChopperMine.java +++ b/com/hbm/entity/projectile/EntityChopperMine.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.projectile; import java.util.List; @@ -119,10 +119,12 @@ public class EntityChopperMine extends Entity implements IProjectile { this.setDead(); } - if(timer % 10 == 0 && timer % 20 != 0) - worldObj.playSoundAtEntity(this, "random.click", 10.0F, 1F); - if(timer % 20 == 0) - worldObj.playSoundAtEntity(this, "random.click", 10.0F, 1.5F); + //if(timer % 10 == 0 && timer % 20 != 0) + // worldObj.playSoundAtEntity(this, "random.click", 10.0F, 1F); + //if(timer % 20 == 0) + // worldObj.playSoundAtEntity(this, "random.click", 10.0F, 1.5F); + + worldObj.playSoundAtEntity(this, "hbm:misc.nullMine", 10.0F, 1F); if(timer >= 100 || worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ).getMaterial() != Material.air) { diff --git a/com/hbm/entity/EntityCombineBall.java b/com/hbm/entity/projectile/EntityCombineBall.java similarity index 97% rename from com/hbm/entity/EntityCombineBall.java rename to com/hbm/entity/projectile/EntityCombineBall.java index 2198a725c..ed824bdcd 100644 --- a/com/hbm/entity/EntityCombineBall.java +++ b/com/hbm/entity/projectile/EntityCombineBall.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.projectile; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -332,11 +332,6 @@ public class EntityCombineBall extends Entity implements IProjectile { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - if (!this.worldObj.isRemote) - { - entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1); - } - if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); @@ -425,6 +420,9 @@ public class EntityCombineBall extends Entity implements IProjectile this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } + + if (this.ticksExisted > 250) + this.setDead(); } /** @@ -567,15 +565,17 @@ public class EntityCombineBall extends Entity implements IProjectile byte b0 = this.dataWatcher.getWatchableObjectByte(16); return (b0 & 1) != 0; } - - @Override - @SideOnly(Side.CLIENT) - public int getBrightnessForRender(float p_70070_1_) { - return super.getBrightnessForRender(p_70070_1_); - } - @Override - public float getBrightness(float p_70013_1_) { - return super.getBrightness(p_70013_1_); - } + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) + { + return 15728880; + } + + @Override + public float getBrightness(float p_70013_1_) + { + return 1.0F; + } } \ No newline at end of file diff --git a/com/hbm/entity/projectile/EntityDischarge.java b/com/hbm/entity/projectile/EntityDischarge.java new file mode 100644 index 000000000..c4522db7a --- /dev/null +++ b/com/hbm/entity/projectile/EntityDischarge.java @@ -0,0 +1,605 @@ +package com.hbm.entity.projectile; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; + +import com.hbm.entity.effect.EntityEMPBlast; +import com.hbm.explosion.ExplosionNukeGeneric; +import com.hbm.items.ModItems; +import com.hbm.lib.ModDamageSource; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.play.server.S2BPacketChangeGameState; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityDischarge extends Entity implements IProjectile +{ + private int field_145791_d = -1; + private int field_145792_e = -1; + private int field_145789_f = -1; + public double gravity = 0.0D; + private Block field_145790_g; + private int inData; + private boolean inGround; + /** 1 if the player can pick up the arrow */ + public int canBePickedUp; + /** Seems to be some sort of timer for animating an arrow. */ + public int arrowShake; + /** The owner of this arrow. */ + public Entity shootingEntity; + private int ticksInGround; + private int ticksInAir; + private double damage = 2.0D; + /** The amount of knockback an arrow applies when it hits a mob. */ + private int knockbackStrength; + private static final String __OBFID = "CL_00001715"; + + + public EntityDischarge(World p_i1753_1_) + { + super(p_i1753_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(1.5F, 1.5F); + } + + public EntityDischarge(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) + { + super(p_i1754_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(1.5F, 1.5F); + this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); + this.yOffset = 0.0F; + } + + public EntityDischarge(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) + { + super(p_i1755_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1755_2_; + + if (p_i1755_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + double d0 = p_i1755_3_.posX - p_i1755_2_.posX; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; + double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); + + if (d3 >= 1.0E-7D) + { + float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); + double d4 = d0 / d3; + double d5 = d2 / d3; + this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float)d3 * 0.2F; + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); + } + } + + public EntityDischarge(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) + { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + if (p_i1756_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.setSize(1.5F, 1.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + } + + public EntityDischarge(World world, int x, int y, int z, double mx, double my, double mz, double grav) { + super(world); + this.posX = x + 0.5F; + this.posY = y + 0.5F; + this.posZ = z + 0.5F; + + this.motionX = mx; + this.motionY = my; + this.motionZ = mz; + + this.gravity = grav; + } + + @Override + protected void entityInit() + { + this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); + } + + /** + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. + */ + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) + { + float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; + this.motionX = p_70186_1_; + this.motionY = p_70186_3_; + this.motionZ = p_70186_5_; + float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); + this.ticksInGround = 0; + } + + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + @Override + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) + { + this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); + this.setRotation(p_70056_7_, p_70056_8_); + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @Override + @SideOnly(Side.CLIENT) + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) + { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; + + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) + { + float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch; + this.prevRotationYaw = this.rotationYaw; + this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.ticksInGround = 0; + } + } + + /** + * Called to update the entity's position/logic. + */ + //@Override + @Override + public void onUpdate() + { + super.onUpdate(); + + 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); + //this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); + } + + Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (block.getMaterial() != Material.air) + { + block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) + { + this.inGround = true; + } + } + + if (this.arrowShake > 0) + { + --this.arrowShake; + } + + if (this.inGround) + { + this.setDead(); + + EntityEMPBlast cloud = new EntityEMPBlast(this.worldObj, 10); + cloud.posX = this.posX; + cloud.posY = this.posY + 0.5F; + cloud.posZ = this.posZ; + if (!this.worldObj.isRemote) { + this.worldObj.spawnEntityInWorld(cloud); + } + + ExplosionNukeGeneric.empBlast(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 10); + } + else + { + ++this.ticksInAir; + Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); + vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int i; + float f1; + + for (i = 0; i < list.size(); ++i) + { + Entity entity1 = (Entity)list.get(i); + + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) + { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); + + if (movingobjectposition1 != null) + { + double d1 = vec31.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) + { + EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; + + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) + { + movingobjectposition = null; + } + } + + float f2; + float f4; + + if (movingobjectposition != null) + { + if (movingobjectposition.entityHit != null) + { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + int k = MathHelper.ceiling_double_int(f2 * this.damage); + + if (this.getIsCritical()) + { + k += this.rand.nextInt(k / 2 + 2); + } + + DamageSource damagesource = null; + + if (this.shootingEntity == null) + { + damagesource = DamageSource.generic; + } + else + { + damagesource = ModDamageSource.causeDischargeDamage(this, this); + } + + if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) + { + movingobjectposition.entityHit.setFire(5); + } + + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) + { + if (movingobjectposition.entityHit instanceof EntityLivingBase) + { + EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; + + if (this.knockbackStrength > 0) + { + f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f4 > 0.0F) + { + movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); + } + } + + if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) + { + EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); + EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); + } + + if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) + { + ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + } + } + + if (!(movingobjectposition.entityHit instanceof EntityEnderman)) + { + if (!this.worldObj.isRemote && movingobjectposition.entityHit instanceof EntityLivingBase) + { + movingobjectposition.entityHit.attackEntityFrom(damagesource, 24 + rand.nextInt(11)); + } + } + } + } + else + { + this.field_145791_d = movingobjectposition.blockX; + this.field_145792_e = movingobjectposition.blockY; + this.field_145789_f = movingobjectposition.blockZ; + this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / f2 * 0.05000000074505806D; + this.posY -= this.motionY / f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / f2 * 0.05000000074505806D; + this.inGround = true; + this.arrowShake = 7; + this.setIsCritical(false); + + if (this.field_145790_g.getMaterial() != Material.air) + { + this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); + } + } + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + + float f3 = 0.99F; + f1 = 0.05F; + + if (this.isInWater()) + { + for (int l = 0; l < 4; ++l) + { + f4 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ); + } + + f3 = 0.8F; + } + + if (this.isWet()) + { + this.extinguish(); + } + + this.motionX *= f3; + this.motionY *= f3; + this.motionZ *= f3; + this.motionY -= gravity; + this.setPosition(this.posX, this.posY, this.posZ); + this.func_145775_I(); + } + + if (this.ticksExisted > 250) { + + EntityEMPBlast cloud = new EntityEMPBlast(this.worldObj, 10); + cloud.posX = this.posX; + cloud.posY = this.posY + 0.5F; + cloud.posZ = this.posZ; + if (!this.worldObj.isRemote) { + this.worldObj.spawnEntityInWorld(cloud); + } + + ExplosionNukeGeneric.empBlast(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 10); + + this.setDead(); + } + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) + { + p_70014_1_.setShort("xTile", (short)this.field_145791_d); + p_70014_1_.setShort("yTile", (short)this.field_145792_e); + p_70014_1_.setShort("zTile", (short)this.field_145789_f); + p_70014_1_.setShort("life", (short)this.ticksInGround); + p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); + p_70014_1_.setByte("inData", (byte)this.inData); + p_70014_1_.setByte("shake", (byte)this.arrowShake); + p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); + p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); + p_70014_1_.setDouble("damage", this.damage); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) + { + this.field_145791_d = p_70037_1_.getShort("xTile"); + this.field_145792_e = p_70037_1_.getShort("yTile"); + this.field_145789_f = p_70037_1_.getShort("zTile"); + this.ticksInGround = p_70037_1_.getShort("life"); + this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); + this.inData = p_70037_1_.getByte("inData") & 255; + this.arrowShake = p_70037_1_.getByte("shake") & 255; + this.inGround = p_70037_1_.getByte("inGround") == 1; + + if (p_70037_1_.hasKey("damage", 99)) + { + this.damage = p_70037_1_.getDouble("damage"); + } + + if (p_70037_1_.hasKey("pickup", 99)) + { + this.canBePickedUp = p_70037_1_.getByte("pickup"); + } + else if (p_70037_1_.hasKey("player", 99)) + { + this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; + } + } + + /** + * Called by a player entity when they collide with an entity + */ + @Override + public void onCollideWithPlayer(EntityPlayer p_70100_1_) + { + if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) + { + boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; + + if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1))) + { + flag = false; + } + + if (flag) + { + p_70100_1_.onItemPickup(this, 1); + this.setDead(); + } + } + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops + */ + @Override + protected boolean canTriggerWalking() + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public void setDamage(double p_70239_1_) + { + this.damage = p_70239_1_; + } + + public double getDamage() + { + return this.damage; + } + + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int p_70240_1_) + { + this.knockbackStrength = p_70240_1_; + } + + /** + * If returns false, the item will not inflict any damage against entities. + */ + @Override + public boolean canAttackWithItem() + { + return false; + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public void setIsCritical(boolean p_70243_1_) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (p_70243_1_) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); + } + else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); + } + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public boolean getIsCritical() + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + return (b0 & 1) != 0; + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) + { + return 15728880; + } + + @Override + public float getBrightness(float p_70013_1_) + { + return 1.0F; + } +} \ No newline at end of file diff --git a/com/hbm/entity/projectile/EntityFire.java b/com/hbm/entity/projectile/EntityFire.java new file mode 100644 index 000000000..854a3544c --- /dev/null +++ b/com/hbm/entity/projectile/EntityFire.java @@ -0,0 +1,582 @@ +package com.hbm.entity.projectile; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +import java.util.List; + +import com.hbm.explosion.ExplosionChaos; +import com.hbm.items.ModItems; +import com.hbm.lib.ModDamageSource; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.play.server.S2BPacketChangeGameState; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityFire extends Entity implements IProjectile +{ + private int field_145791_d = -1; + private int field_145792_e = -1; + private int field_145789_f = -1; + public double gravity = 0.0D; + private Block field_145790_g; + private int inData; + private boolean inGround; + /** 1 if the player can pick up the arrow */ + public int canBePickedUp; + /** Seems to be some sort of timer for animating an arrow. */ + public int arrowShake; + /** The owner of this arrow. */ + public Entity shootingEntity; + private int ticksInGround; + private int ticksInAir; + public int maxAge = 20; + private double damage = 2.0D; + /** The amount of knockback an arrow applies when it hits a mob. */ + private int knockbackStrength; + private static final String __OBFID = "CL_00001715"; + + + public EntityFire(World p_i1753_1_) + { + super(p_i1753_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } + + public EntityFire(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) + { + super(p_i1754_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); + this.yOffset = 0.0F; + } + + public EntityFire(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) + { + super(p_i1755_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1755_2_; + + if (p_i1755_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + double d0 = p_i1755_3_.posX - p_i1755_2_.posX; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; + double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); + + if (d3 >= 1.0E-7D) + { + float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); + double d4 = d0 / d3; + double d5 = d2 / d3; + this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float)d3 * 0.2F; + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); + } + } + + public EntityFire(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) + { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + if (p_i1756_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + } + + public EntityFire(World world, int x, int y, int z, double mx, double my, double mz, double grav) { + super(world); + this.posX = x + 0.5F; + this.posY = y + 0.5F; + this.posZ = z + 0.5F; + + this.motionX = mx; + this.motionY = my; + this.motionZ = mz; + + this.gravity = grav; + } + + @Override + protected void entityInit() + { + this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); + } + + /** + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. + */ + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) + { + float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; + this.motionX = p_70186_1_; + this.motionY = p_70186_3_; + this.motionZ = p_70186_5_; + float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); + this.ticksInGround = 0; + } + + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + @Override + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) + { + this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); + this.setRotation(p_70056_7_, p_70056_8_); + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @Override + @SideOnly(Side.CLIENT) + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) + { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; + + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) + { + float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch; + this.prevRotationYaw = this.rotationYaw; + this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.ticksInGround = 0; + } + } + + /** + * Called to update the entity's position/logic. + */ + //@Override + @Override + public void onUpdate() + { + super.onUpdate(); + + 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); + //this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); + } + + Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (block.getMaterial() != Material.air) + { + block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) + { + this.inGround = true; + } + } + + if (this.arrowShake > 0) + { + --this.arrowShake; + } + + if (this.inGround) + { + this.setDead(); + int i = 3; + if(!worldObj.isRemote) { + ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, i); + ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, i * 2); + } + } + else + { + ++this.ticksInAir; + Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); + vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int i; + float f1; + + for (i = 0; i < list.size(); ++i) + { + Entity entity1 = (Entity)list.get(i); + + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) + { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); + + if (movingobjectposition1 != null) + { + double d1 = vec31.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) + { + EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; + + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) + { + movingobjectposition = null; + } + } + + float f2; + float f4; + + if (movingobjectposition != null) + { + if (movingobjectposition.entityHit != null) + { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + int k = MathHelper.ceiling_double_int(f2 * this.damage); + + if (this.getIsCritical()) + { + k += this.rand.nextInt(k / 2 + 2); + } + + DamageSource damagesource = null; + + if (this.shootingEntity == null) + { + damagesource = DamageSource.generic; + } + else + { + damagesource = ModDamageSource.causeFireDamage(this, this); + } + + if (!(movingobjectposition.entityHit instanceof EntityEnderman) && this.ticksExisted >= 5) + { + movingobjectposition.entityHit.setFire(10); + } + + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) + { + if (movingobjectposition.entityHit instanceof EntityLivingBase) + { + EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; + + if (this.knockbackStrength > 0) + { + f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f4 > 0.0F) + { + movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); + } + } + + if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) + { + EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); + EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); + } + + if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) + { + ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + } + } + + if (!(movingobjectposition.entityHit instanceof EntityEnderman)) + { + if (!this.worldObj.isRemote && movingobjectposition.entityHit instanceof EntityLivingBase) + { + movingobjectposition.entityHit.attackEntityFrom(damagesource, 5F); + } + } + } + } + else + { + this.field_145791_d = movingobjectposition.blockX; + this.field_145792_e = movingobjectposition.blockY; + this.field_145789_f = movingobjectposition.blockZ; + this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / f2 * 0.05000000074505806D; + this.posY -= this.motionY / f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / f2 * 0.05000000074505806D; + this.inGround = true; + this.arrowShake = 7; + this.setIsCritical(false); + + if (this.field_145790_g.getMaterial() != Material.air) + { + this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); + } + } + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + + f1 = 0.05F; + + if (this.isInWater()) + { + this.setDead(); + } + + if (this.isWet()) + { + this.damage *= 0.8F; + } + + float f3 = 0.8F; + this.motionX *= f3; + this.motionY *= f3; + this.motionZ *= f3; + this.motionY -= gravity; + this.setPosition(this.posX, this.posY, this.posZ); + this.func_145775_I(); + } + + if (this.ticksExisted > this.maxAge) + this.setDead(); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) + { + p_70014_1_.setShort("xTile", (short)this.field_145791_d); + p_70014_1_.setShort("yTile", (short)this.field_145792_e); + p_70014_1_.setShort("zTile", (short)this.field_145789_f); + p_70014_1_.setShort("life", (short)this.ticksInGround); + p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); + p_70014_1_.setByte("inData", (byte)this.inData); + p_70014_1_.setByte("shake", (byte)this.arrowShake); + p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); + p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); + p_70014_1_.setDouble("damage", this.damage); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) + { + this.field_145791_d = p_70037_1_.getShort("xTile"); + this.field_145792_e = p_70037_1_.getShort("yTile"); + this.field_145789_f = p_70037_1_.getShort("zTile"); + this.ticksInGround = p_70037_1_.getShort("life"); + this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); + this.inData = p_70037_1_.getByte("inData") & 255; + this.arrowShake = p_70037_1_.getByte("shake") & 255; + this.inGround = p_70037_1_.getByte("inGround") == 1; + + if (p_70037_1_.hasKey("damage", 99)) + { + this.damage = p_70037_1_.getDouble("damage"); + } + + if (p_70037_1_.hasKey("pickup", 99)) + { + this.canBePickedUp = p_70037_1_.getByte("pickup"); + } + else if (p_70037_1_.hasKey("player", 99)) + { + this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; + } + } + + /** + * Called by a player entity when they collide with an entity + */ + @Override + public void onCollideWithPlayer(EntityPlayer p_70100_1_) + { + if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) + { + boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; + + if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1))) + { + flag = false; + } + + if (flag) + { + p_70100_1_.onItemPickup(this, 1); + this.setDead(); + } + } + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops + */ + @Override + protected boolean canTriggerWalking() + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public void setDamage(double p_70239_1_) + { + this.damage = p_70239_1_; + } + + public double getDamage() + { + return this.damage; + } + + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int p_70240_1_) + { + this.knockbackStrength = p_70240_1_; + } + + /** + * If returns false, the item will not inflict any damage against entities. + */ + @Override + public boolean canAttackWithItem() + { + return false; + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public void setIsCritical(boolean p_70243_1_) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (p_70243_1_) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); + } + else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); + } + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public boolean getIsCritical() + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + return (b0 & 1) != 0; + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) + { + return 15728880; + } + + @Override + public float getBrightness(float p_70013_1_) + { + return 1.0F; + } +} \ No newline at end of file diff --git a/com/hbm/entity/projectile/EntityLN2.java b/com/hbm/entity/projectile/EntityLN2.java new file mode 100644 index 000000000..f87d9c678 --- /dev/null +++ b/com/hbm/entity/projectile/EntityLN2.java @@ -0,0 +1,580 @@ +package com.hbm.entity.projectile; + +import java.util.List; + +import com.hbm.explosion.ExplosionChaos; +import com.hbm.explosion.ExplosionThermo; +import com.hbm.items.ModItems; +import com.hbm.lib.ModDamageSource; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.play.server.S2BPacketChangeGameState; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityLN2 extends Entity implements IProjectile +{ + private int field_145791_d = -1; + private int field_145792_e = -1; + private int field_145789_f = -1; + public double gravity = 0.0D; + private Block field_145790_g; + private int inData; + private boolean inGround; + /** 1 if the player can pick up the arrow */ + public int canBePickedUp; + /** Seems to be some sort of timer for animating an arrow. */ + public int arrowShake; + /** The owner of this arrow. */ + public Entity shootingEntity; + private int ticksInGround; + private int ticksInAir; + public int maxAge = 20; + private double damage = 2.0D; + /** The amount of knockback an arrow applies when it hits a mob. */ + private int knockbackStrength; + private static final String __OBFID = "CL_00001715"; + + + public EntityLN2(World p_i1753_1_) + { + super(p_i1753_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } + + public EntityLN2(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) + { + super(p_i1754_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); + this.yOffset = 0.0F; + } + + public EntityLN2(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) + { + super(p_i1755_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1755_2_; + + if (p_i1755_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + double d0 = p_i1755_3_.posX - p_i1755_2_.posX; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; + double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); + + if (d3 >= 1.0E-7D) + { + float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); + double d4 = d0 / d3; + double d5 = d2 / d3; + this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float)d3 * 0.2F; + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); + } + } + + public EntityLN2(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) + { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + if (p_i1756_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + } + + public EntityLN2(World world, int x, int y, int z, double mx, double my, double mz, double grav) { + super(world); + this.posX = x + 0.5F; + this.posY = y + 0.5F; + this.posZ = z + 0.5F; + + this.motionX = mx; + this.motionY = my; + this.motionZ = mz; + + this.gravity = grav; + } + + @Override + protected void entityInit() + { + this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); + } + + /** + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. + */ + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) + { + float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; + this.motionX = p_70186_1_; + this.motionY = p_70186_3_; + this.motionZ = p_70186_5_; + float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); + this.ticksInGround = 0; + } + + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + @Override + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) + { + this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); + this.setRotation(p_70056_7_, p_70056_8_); + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @Override + @SideOnly(Side.CLIENT) + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) + { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; + + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) + { + float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch; + this.prevRotationYaw = this.rotationYaw; + this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.ticksInGround = 0; + } + } + + /** + * Called to update the entity's position/logic. + */ + //@Override + @Override + public void onUpdate() + { + super.onUpdate(); + + 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); + //this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); + } + + Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (block.getMaterial() != Material.air) + { + block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) + { + this.inGround = true; + } + } + + if (this.arrowShake > 0) + { + --this.arrowShake; + } + + if (this.inGround) + { + this.setDead(); + int i = 3; + if(!worldObj.isRemote) { + ExplosionThermo.freeze(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, i); + ExplosionThermo.snow(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, i); + } + } + else + { + ++this.ticksInAir; + Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); + vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int i; + float f1; + + for (i = 0; i < list.size(); ++i) + { + Entity entity1 = (Entity)list.get(i); + + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) + { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); + + if (movingobjectposition1 != null) + { + double d1 = vec31.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) + { + EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; + + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) + { + movingobjectposition = null; + } + } + + float f2; + float f4; + + if (movingobjectposition != null) + { + if (movingobjectposition.entityHit != null) + { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + int k = MathHelper.ceiling_double_int(f2 * this.damage); + + if (this.getIsCritical()) + { + k += this.rand.nextInt(k / 2 + 2); + } + + DamageSource damagesource = null; + + if (this.shootingEntity == null) + { + damagesource = DamageSource.generic; + } + else + { + damagesource = ModDamageSource.causeIceDamage(this, this); + } + + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) + { + if (movingobjectposition.entityHit instanceof EntityLivingBase) + { + EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; + + if (this.knockbackStrength > 0) + { + f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f4 > 0.0F) + { + movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); + } + } + + if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) + { + EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); + EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); + } + + if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) + { + ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + } + } + + if (!(movingobjectposition.entityHit instanceof EntityEnderman)) + { + if (!this.worldObj.isRemote && movingobjectposition.entityHit instanceof EntityLivingBase) + { + movingobjectposition.entityHit.attackEntityFrom(damagesource, 5F); + } + } + } + } + else + { + this.field_145791_d = movingobjectposition.blockX; + this.field_145792_e = movingobjectposition.blockY; + this.field_145789_f = movingobjectposition.blockZ; + this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / f2 * 0.05000000074505806D; + this.posY -= this.motionY / f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / f2 * 0.05000000074505806D; + this.inGround = true; + this.arrowShake = 7; + this.setIsCritical(false); + + if (this.field_145790_g.getMaterial() != Material.air) + { + this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); + } + } + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + + f1 = 0.05F; + + if (this.isInWater()) + { + int j = 3; + ExplosionThermo.freeze(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, j); + ExplosionThermo.snow(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, j); + this.setDead(); + } + + if (this.isWet()) + { + this.damage *= 0.8F; + } + + float f3 = 0.8F; + this.motionX *= f3; + this.motionY *= f3; + this.motionZ *= f3; + this.motionY -= gravity; + this.setPosition(this.posX, this.posY, this.posZ); + this.func_145775_I(); + } + + if (this.ticksExisted > this.maxAge) + this.setDead(); + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) + { + p_70014_1_.setShort("xTile", (short)this.field_145791_d); + p_70014_1_.setShort("yTile", (short)this.field_145792_e); + p_70014_1_.setShort("zTile", (short)this.field_145789_f); + p_70014_1_.setShort("life", (short)this.ticksInGround); + p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); + p_70014_1_.setByte("inData", (byte)this.inData); + p_70014_1_.setByte("shake", (byte)this.arrowShake); + p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); + p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); + p_70014_1_.setDouble("damage", this.damage); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) + { + this.field_145791_d = p_70037_1_.getShort("xTile"); + this.field_145792_e = p_70037_1_.getShort("yTile"); + this.field_145789_f = p_70037_1_.getShort("zTile"); + this.ticksInGround = p_70037_1_.getShort("life"); + this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); + this.inData = p_70037_1_.getByte("inData") & 255; + this.arrowShake = p_70037_1_.getByte("shake") & 255; + this.inGround = p_70037_1_.getByte("inGround") == 1; + + if (p_70037_1_.hasKey("damage", 99)) + { + this.damage = p_70037_1_.getDouble("damage"); + } + + if (p_70037_1_.hasKey("pickup", 99)) + { + this.canBePickedUp = p_70037_1_.getByte("pickup"); + } + else if (p_70037_1_.hasKey("player", 99)) + { + this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; + } + } + + /** + * Called by a player entity when they collide with an entity + */ + @Override + public void onCollideWithPlayer(EntityPlayer p_70100_1_) + { + if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) + { + boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; + + if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 1))) + { + flag = false; + } + + if (flag) + { + p_70100_1_.onItemPickup(this, 1); + this.setDead(); + } + } + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops + */ + @Override + protected boolean canTriggerWalking() + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public void setDamage(double p_70239_1_) + { + this.damage = p_70239_1_; + } + + public double getDamage() + { + return this.damage; + } + + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int p_70240_1_) + { + this.knockbackStrength = p_70240_1_; + } + + /** + * If returns false, the item will not inflict any damage against entities. + */ + @Override + public boolean canAttackWithItem() + { + return false; + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public void setIsCritical(boolean p_70243_1_) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (p_70243_1_) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); + } + else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); + } + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public boolean getIsCritical() + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + return (b0 & 1) != 0; + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) + { + return 15728880; + } + + @Override + public float getBrightness(float p_70013_1_) + { + return 1.0F; + } +} diff --git a/com/hbm/entity/projectile/EntityMiniMIRV.java b/com/hbm/entity/projectile/EntityMiniMIRV.java new file mode 100644 index 000000000..78414c88b --- /dev/null +++ b/com/hbm/entity/projectile/EntityMiniMIRV.java @@ -0,0 +1,625 @@ +package com.hbm.entity.projectile; + +import java.util.List; + +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.explosion.ExplosionChaos; +import com.hbm.explosion.ExplosionParticle; +import com.hbm.explosion.ExplosionParticleB; +import com.hbm.main.MainRegistry; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.play.server.S2BPacketChangeGameState; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityMiniMIRV extends Entity implements IProjectile +{ + private int field_145791_d = -1; + private int field_145792_e = -1; + private int field_145789_f = -1; + public double gravity = 0.0D; + public double startVel = -20.0D; + private Block field_145790_g; + private int inData; + private boolean inGround; + /** 1 if the player can pick up the arrow */ + public int canBePickedUp; + /** Seems to be some sort of timer for animating an arrow. */ + public int arrowShake; + /** The owner of this arrow. */ + public Entity shootingEntity; + private int ticksInGround; + private int ticksInAir; + private double damage = 2.0D; + /** The amount of knockback an arrow applies when it hits a mob. */ + private int knockbackStrength; + private static final String __OBFID = "CL_00001715"; + + + public EntityMiniMIRV(World p_i1753_1_) + { + super(p_i1753_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } + + public EntityMiniMIRV(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) + { + super(p_i1754_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); + this.yOffset = 0.0F; + } + + public EntityMiniMIRV(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) + { + super(p_i1755_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1755_2_; + + if (p_i1755_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + double d0 = p_i1755_3_.posX - p_i1755_2_.posX; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; + double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); + + if (d3 >= 1.0E-7D) + { + float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); + double d4 = d0 / d3; + double d5 = d2 / d3; + this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float)d3 * 0.2F; + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); + } + } + + public EntityMiniMIRV(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) + { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + if (p_i1756_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + } + + public EntityMiniMIRV(World world, int x, int y, int z, double mx, double my, double mz, double grav) { + super(world); + this.posX = x + 0.5F; + this.posY = y + 0.5F; + this.posZ = z + 0.5F; + + this.motionX = mx; + this.motionY = my; + this.motionZ = mz; + + this.gravity = grav; + } + + @Override + protected void entityInit() + { + this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); + } + + /** + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. + */ + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) + { + float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; + this.motionX = p_70186_1_; + this.motionY = p_70186_3_; + this.motionZ = p_70186_5_; + float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); + this.ticksInGround = 0; + } + + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + @Override + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) + { + this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); + this.setRotation(p_70056_7_, p_70056_8_); + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @Override + @SideOnly(Side.CLIENT) + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) + { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; + + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) + { + float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch; + this.prevRotationYaw = this.rotationYaw; + this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.ticksInGround = 0; + } + } + + /** + * Called to update the entity's position/logic. + */ + //@Override + @Override + public void onUpdate() + { + super.onUpdate(); + + if(this.ticksExisted == 10) { + startVel = this.motionY; + } + + if(this.motionY <= startVel - 1) { + if(!this.worldObj.isRemote) + ExplosionChaos.miniMirv(this.worldObj, this.posX, this.posY, this.posZ); + this.motionY = this.startVel; + this.setDead(); + } + + 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); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); + } + + Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (block.getMaterial() != Material.air) + { + block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) + { + this.inGround = true; + } + } + + if (this.arrowShake > 0) + { + --this.arrowShake; + } + + if (this.inGround) + { + if (!this.worldObj.isRemote) + { + EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + entity0.posX = this.posX; + entity0.posY = this.posY; + entity0.posZ = this.posZ; + entity0.destructionRange = MainRegistry.fatmanRadius; + entity0.speed = 25; + entity0.coefficient = 10.0F; + + this.worldObj.spawnEntityInWorld(entity0); + if(rand.nextInt(100) == 0) + { + ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ); + } else { + ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ); + } + } + this.setDead(); + } + else + { + ++this.ticksInAir; + Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); + vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int i; + float f1; + + for (i = 0; i < list.size(); ++i) + { + Entity entity1 = (Entity)list.get(i); + + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) + { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); + + if (movingobjectposition1 != null) + { + double d1 = vec31.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) + { + EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; + + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) + { + movingobjectposition = null; + } + } + + float f2; + float f4; + + if (movingobjectposition != null) + { + if (movingobjectposition.entityHit != null) + { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + int k = MathHelper.ceiling_double_int(f2 * this.damage); + + if (this.getIsCritical()) + { + k += this.rand.nextInt(k / 2 + 2); + } + + DamageSource damagesource = null; + + if (this.shootingEntity == null) + { + damagesource = DamageSource.causeIndirectMagicDamage(this, this); + } + else + { + damagesource = DamageSource.causeIndirectMagicDamage(this, this); + } + + if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) + { + movingobjectposition.entityHit.setFire(5); + } + + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) + { + if (movingobjectposition.entityHit instanceof EntityLivingBase) + { + EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; + + if (this.knockbackStrength > 0) + { + f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f4 > 0.0F) + { + movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); + } + } + + if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) + { + EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); + EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); + } + + if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) + { + ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + } + } + + if (!(movingobjectposition.entityHit instanceof EntityEnderman)) + { + if (!this.worldObj.isRemote) + { + EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj); + entity0.posX = this.posX; + entity0.posY = this.posY; + entity0.posZ = this.posZ; + entity0.destructionRange = MainRegistry.fatmanRadius; + entity0.speed = 25; + entity0.coefficient = 10.0F; + + this.worldObj.spawnEntityInWorld(entity0); + if(rand.nextInt(100) == 0) + { + ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ); + } else { + ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ); + } + } + this.setDead(); + } + } + else + { + this.motionX *= -0.10000000149011612D; + this.motionY *= -0.10000000149011612D; + this.motionZ *= -0.10000000149011612D; + this.rotationYaw += 180.0F; + this.prevRotationYaw += 180.0F; + this.ticksInAir = 0; + } + } + else + { + this.field_145791_d = movingobjectposition.blockX; + this.field_145792_e = movingobjectposition.blockY; + this.field_145789_f = movingobjectposition.blockZ; + this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.motionX = ((float)(movingobjectposition.hitVec.xCoord - this.posX)); + this.motionY = ((float)(movingobjectposition.hitVec.yCoord - this.posY)); + this.motionZ = ((float)(movingobjectposition.hitVec.zCoord - this.posZ)); + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + this.posX -= this.motionX / f2 * 0.05000000074505806D; + this.posY -= this.motionY / f2 * 0.05000000074505806D; + this.posZ -= this.motionZ / f2 * 0.05000000074505806D; + this.inGround = true; + this.arrowShake = 7; + this.setIsCritical(false); + + if (this.field_145790_g.getMaterial() != Material.air) + { + this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); + } + } + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + + for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) + { + ; + } + + while (this.rotationPitch - this.prevRotationPitch >= 180.0F) + { + this.prevRotationPitch += 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw < -180.0F) + { + this.prevRotationYaw -= 360.0F; + } + + while (this.rotationYaw - this.prevRotationYaw >= 180.0F) + { + this.prevRotationYaw += 360.0F; + } + + this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; + this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; + float f3 = 0.99F; + f1 = 0.05F; + + if (this.isInWater()) + { + for (int l = 0; l < 4; ++l) + { + f4 = 0.25F; + this.worldObj.spawnParticle("bubble", this.posX - this.motionX * f4, this.posY - this.motionY * f4, this.posZ - this.motionZ * f4, this.motionX, this.motionY, this.motionZ); + } + + f3 = 0.8F; + } + + if (this.isWet()) + { + this.extinguish(); + } + + this.motionX *= f3; + this.motionY *= f3; + this.motionZ *= f3; + this.motionY -= 0.15D; + this.setPosition(this.posX, this.posY, this.posZ); + this.func_145775_I(); + } + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) + { + p_70014_1_.setShort("xTile", (short)this.field_145791_d); + p_70014_1_.setShort("yTile", (short)this.field_145792_e); + p_70014_1_.setShort("zTile", (short)this.field_145789_f); + p_70014_1_.setShort("life", (short)this.ticksInGround); + p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); + p_70014_1_.setByte("inData", (byte)this.inData); + p_70014_1_.setByte("shake", (byte)this.arrowShake); + p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); + p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); + p_70014_1_.setDouble("damage", this.damage); + p_70014_1_.setDouble("startVel", this.startVel); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) + { + this.field_145791_d = p_70037_1_.getShort("xTile"); + this.field_145792_e = p_70037_1_.getShort("yTile"); + this.field_145789_f = p_70037_1_.getShort("zTile"); + this.ticksInGround = p_70037_1_.getShort("life"); + this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); + this.inData = p_70037_1_.getByte("inData") & 255; + this.arrowShake = p_70037_1_.getByte("shake") & 255; + this.inGround = p_70037_1_.getByte("inGround") == 1; + + if (p_70037_1_.hasKey("damage", 99)) + { + this.damage = p_70037_1_.getDouble("damage"); + } + + if (p_70037_1_.hasKey("startVel", 99)) + { + this.startVel = p_70037_1_.getDouble("startVel"); + } + + if (p_70037_1_.hasKey("pickup", 99)) + { + this.canBePickedUp = p_70037_1_.getByte("pickup"); + } + else if (p_70037_1_.hasKey("player", 99)) + { + this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; + } + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops + */ + @Override + protected boolean canTriggerWalking() + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public void setDamage(double p_70239_1_) + { + this.damage = p_70239_1_; + } + + public double getDamage() + { + return this.damage; + } + + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int p_70240_1_) + { + this.knockbackStrength = p_70240_1_; + } + + /** + * If returns false, the item will not inflict any damage against entities. + */ + @Override + public boolean canAttackWithItem() + { + return false; + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public void setIsCritical(boolean p_70243_1_) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (p_70243_1_) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); + } + else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); + } + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public boolean getIsCritical() + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + return (b0 & 1) != 0; + } +} diff --git a/com/hbm/entity/EntityMiniNuke.java b/com/hbm/entity/projectile/EntityMiniNuke.java similarity index 98% rename from com/hbm/entity/EntityMiniNuke.java rename to com/hbm/entity/projectile/EntityMiniNuke.java index 2e29a7e41..9721b6858 100644 --- a/com/hbm/entity/EntityMiniNuke.java +++ b/com/hbm/entity/projectile/EntityMiniNuke.java @@ -1,7 +1,8 @@ -package com.hbm.entity; +package com.hbm.entity.projectile; import java.util.List; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionParticle; import com.hbm.explosion.ExplosionParticleB; import com.hbm.items.ModItems; @@ -351,11 +352,6 @@ public class EntityMiniNuke extends Entity implements IProjectile { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - if (!this.worldObj.isRemote) - { - entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1); - } - if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); diff --git a/com/hbm/entity/projectile/EntityPlasmaBeam.java b/com/hbm/entity/projectile/EntityPlasmaBeam.java new file mode 100644 index 000000000..8f044e836 --- /dev/null +++ b/com/hbm/entity/projectile/EntityPlasmaBeam.java @@ -0,0 +1,544 @@ +package com.hbm.entity.projectile; + +import java.util.List; + +import com.hbm.entity.grenade.EntityGrenadeZOMG; +import com.hbm.explosion.ExplosionChaos; +import com.hbm.explosion.ExplosionThermo; +import com.hbm.lib.ModDamageSource; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IProjectile; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.play.server.S2BPacketChangeGameState; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class EntityPlasmaBeam extends Entity implements IProjectile +{ + private int field_145791_d = -1; + private int field_145792_e = -1; + private int field_145789_f = -1; + public double gravity = 0.0D; + private Block field_145790_g; + private int inData; + private boolean inGround; + /** 1 if the player can pick up the arrow */ + public int canBePickedUp; + /** Seems to be some sort of timer for animating an arrow. */ + public int arrowShake; + /** The owner of this arrow. */ + public Entity shootingEntity; + private int ticksInGround; + private int ticksInAir; + private double damage = 2.0D; + /** The amount of knockback an arrow applies when it hits a mob. */ + private int knockbackStrength; + private static final String __OBFID = "CL_00001715"; + + + public EntityPlasmaBeam(World p_i1753_1_) + { + super(p_i1753_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + } + + public EntityPlasmaBeam(World p_i1754_1_, double p_i1754_2_, double p_i1754_4_, double p_i1754_6_) + { + super(p_i1754_1_); + this.renderDistanceWeight = 10.0D; + this.setSize(0.5F, 0.5F); + this.setPosition(p_i1754_2_, p_i1754_4_, p_i1754_6_); + this.yOffset = 0.0F; + } + + public EntityPlasmaBeam(World p_i1755_1_, EntityLivingBase p_i1755_2_, EntityLivingBase p_i1755_3_, float p_i1755_4_, float p_i1755_5_) + { + super(p_i1755_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1755_2_; + + if (p_i1755_2_ instanceof EntityPlayer) + { + this.canBePickedUp = 1; + } + + this.posY = p_i1755_2_.posY + p_i1755_2_.getEyeHeight() - 0.10000000149011612D; + double d0 = p_i1755_3_.posX - p_i1755_2_.posX; + double d1 = p_i1755_3_.boundingBox.minY + p_i1755_3_.height / 3.0F - this.posY; + double d2 = p_i1755_3_.posZ - p_i1755_2_.posZ; + double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2); + + if (d3 >= 1.0E-7D) + { + float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; + float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); + double d4 = d0 / d3; + double d5 = d2 / d3; + this.setLocationAndAngles(p_i1755_2_.posX + d4, this.posY, p_i1755_2_.posZ + d5, f2, f3); + this.yOffset = 0.0F; + float f4 = (float)d3 * 0.2F; + this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); + } + } + + public EntityPlasmaBeam(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, EntityGrenadeZOMG grenade) { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(grenade.posX, grenade.posY + grenade.getEyeHeight(), grenade.posZ, + grenade.rotationYaw, grenade.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) + * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) + * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + } + + public EntityPlasmaBeam(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) + { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(p_i1756_2_.posX, p_i1756_2_.posY + p_i1756_2_.getEyeHeight(), p_i1756_2_.posZ, p_i1756_2_.rotationYaw, p_i1756_2_.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + } + + public EntityPlasmaBeam(World world, int x, int y, int z, double mx, double my, double mz, double grav) { + super(world); + this.posX = x + 0.5F; + this.posY = y + 0.5F; + this.posZ = z + 0.5F; + + this.motionX = mx; + this.motionY = my; + this.motionZ = mz; + + this.gravity = grav; + } + + @Override + protected void entityInit() + { + this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); + } + + /** + * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. + */ + @Override + public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_) + { + float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_); + p_70186_1_ /= f2; + p_70186_3_ /= f2; + p_70186_5_ /= f2; + p_70186_1_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_; + p_70186_3_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_; + p_70186_5_ += this.rand.nextGaussian() * (this.rand.nextBoolean() ? -1 : 1) * 0.002499999832361937D * p_70186_8_; + p_70186_1_ *= p_70186_7_; + p_70186_3_ *= p_70186_7_; + p_70186_5_ *= p_70186_7_; + this.motionX = p_70186_1_; + this.motionY = p_70186_3_; + this.motionZ = p_70186_5_; + float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI); + this.ticksInGround = 0; + } + + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + @Override + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) + { + this.setPosition(p_70056_1_, p_70056_3_, p_70056_5_); + this.setRotation(p_70056_7_, p_70056_8_); + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @Override + @SideOnly(Side.CLIENT) + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) + { + this.motionX = p_70016_1_; + this.motionY = p_70016_3_; + this.motionZ = p_70016_5_; + + if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) + { + float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_); + this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI); + this.prevRotationPitch = this.rotationPitch; + this.prevRotationYaw = this.rotationYaw; + this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); + this.ticksInGround = 0; + } + } + + /** + * Called to update the entity's position/logic. + */ + //@Override + @Override + public void onUpdate() + { + super.onUpdate(); + + if(this.ticksExisted > 100) + this.setDead(); + + 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); + //this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); + } + + Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + + if (block.getMaterial() != Material.air) + { + block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); + if(!worldObj.isRemote) { + ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 2); + ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5); + ExplosionThermo.scorchLight(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 3); + } + this.setDead(); + } + + if (this.arrowShake > 0) + { + --this.arrowShake; + } + else + { + ++this.ticksInAir; + Vec3 vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); + vec31 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + + if (movingobjectposition != null) + { + vec3 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + } + + Entity entity = null; + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); + double d0 = 0.0D; + int i; + float f1; + + for (i = 0; i < list.size(); ++i) + { + Entity entity1 = (Entity)list.get(i); + + if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) + { + f1 = 0.3F; + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1); + MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); + + if (movingobjectposition1 != null) + { + double d1 = vec31.distanceTo(movingobjectposition1.hitVec); + + if (d1 < d0 || d0 == 0.0D) + { + entity = entity1; + d0 = d1; + } + } + } + } + + if (entity != null) + { + movingobjectposition = new MovingObjectPosition(entity); + } + + if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) + { + EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; + + if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) + { + movingobjectposition = null; + } + } + + float f2; + float f4; + + if (movingobjectposition != null) + { + if (movingobjectposition.entityHit != null) + { + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); + int k = MathHelper.ceiling_double_int(f2 * this.damage); + + if (this.getIsCritical()) + { + k += this.rand.nextInt(k / 2 + 2); + } + + DamageSource damagesource = null; + + if (this.shootingEntity == null) + { + damagesource = DamageSource.generic; + } + else + { + damagesource = ModDamageSource.causePlasmaDamage(this, this.shootingEntity); + } + + if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) + { + movingobjectposition.entityHit.setFire(5); + } + + if (movingobjectposition.entityHit.attackEntityFrom(damagesource, k)) + { + if (movingobjectposition.entityHit instanceof EntityLivingBase) + { + EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; + + if (this.knockbackStrength > 0) + { + f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (f4 > 0.0F) + { + movingobjectposition.entityHit.addVelocity(this.motionX * this.knockbackStrength * 0.6000000238418579D / f4, 0.1D, this.motionZ * this.knockbackStrength * 0.6000000238418579D / f4); + } + } + + if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) + { + EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); + EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); + } + + if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) + { + ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0.0F)); + } + } + + if (!(movingobjectposition.entityHit instanceof EntityEnderman)) + { + if (!this.worldObj.isRemote && movingobjectposition.entityHit instanceof EntityLivingBase) + { + movingobjectposition.entityHit.attackEntityFrom(damagesource, 25 + rand.nextInt(20)); + if(!worldObj.isRemote) { + ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 2); + ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5); + ExplosionThermo.scorchLight(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 3); + } + this.setDead(); + } + } + } + } + else + { + this.field_145791_d = movingobjectposition.blockX; + this.field_145792_e = movingobjectposition.blockY; + this.field_145789_f = movingobjectposition.blockZ; + this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); + this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); + } + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); + + float f3 = 0.99F; + f1 = 0.05F; + + if (this.isInWater()) + { + this.setDead(); + if(!worldObj.isRemote) { + ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 2); + ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5); + ExplosionThermo.scorchLight(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 3); + } + } + + if (this.isWet()) + { + this.extinguish(); + } + + this.setPosition(this.posX, this.posY, this.posZ); + this.func_145775_I(); + } + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + @Override + public void writeEntityToNBT(NBTTagCompound p_70014_1_) + { + p_70014_1_.setShort("xTile", (short)this.field_145791_d); + p_70014_1_.setShort("yTile", (short)this.field_145792_e); + p_70014_1_.setShort("zTile", (short)this.field_145789_f); + p_70014_1_.setShort("life", (short)this.ticksInGround); + p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); + p_70014_1_.setByte("inData", (byte)this.inData); + p_70014_1_.setByte("shake", (byte)this.arrowShake); + p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0)); + p_70014_1_.setByte("pickup", (byte)this.canBePickedUp); + p_70014_1_.setDouble("damage", this.damage); + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + public void readEntityFromNBT(NBTTagCompound p_70037_1_) + { + this.field_145791_d = p_70037_1_.getShort("xTile"); + this.field_145792_e = p_70037_1_.getShort("yTile"); + this.field_145789_f = p_70037_1_.getShort("zTile"); + this.ticksInGround = p_70037_1_.getShort("life"); + this.field_145790_g = Block.getBlockById(p_70037_1_.getByte("inTile") & 255); + this.inData = p_70037_1_.getByte("inData") & 255; + this.arrowShake = p_70037_1_.getByte("shake") & 255; + this.inGround = p_70037_1_.getByte("inGround") == 1; + + if (p_70037_1_.hasKey("damage", 99)) + { + this.damage = p_70037_1_.getDouble("damage"); + } + + if (p_70037_1_.hasKey("pickup", 99)) + { + this.canBePickedUp = p_70037_1_.getByte("pickup"); + } + else if (p_70037_1_.hasKey("player", 99)) + { + this.canBePickedUp = p_70037_1_.getBoolean("player") ? 1 : 0; + } + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops + */ + @Override + protected boolean canTriggerWalking() + { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + public void setDamage(double p_70239_1_) + { + this.damage = p_70239_1_; + } + + public double getDamage() + { + return this.damage; + } + + /** + * Sets the amount of knockback the arrow applies when it hits a mob. + */ + public void setKnockbackStrength(int p_70240_1_) + { + this.knockbackStrength = p_70240_1_; + } + + /** + * If returns false, the item will not inflict any damage against entities. + */ + @Override + public boolean canAttackWithItem() + { + return false; + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public void setIsCritical(boolean p_70243_1_) + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + + if (p_70243_1_) + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); + } + else + { + this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); + } + } + + /** + * Whether the arrow has a stream of critical hit particles flying behind it. + */ + public boolean getIsCritical() + { + byte b0 = this.dataWatcher.getWatchableObjectByte(16); + return (b0 & 1) != 0; + } +} diff --git a/com/hbm/entity/EntityRainbow.java b/com/hbm/entity/projectile/EntityRainbow.java similarity index 91% rename from com/hbm/entity/EntityRainbow.java rename to com/hbm/entity/projectile/EntityRainbow.java index f95c1bf6f..d89429dc2 100644 --- a/com/hbm/entity/EntityRainbow.java +++ b/com/hbm/entity/projectile/EntityRainbow.java @@ -1,7 +1,8 @@ -package com.hbm.entity; +package com.hbm.entity.projectile; import java.util.List; +import com.hbm.entity.grenade.EntityGrenadeZOMG; import com.hbm.explosion.ExplosionChaos; import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; @@ -95,6 +96,27 @@ public class EntityRainbow extends Entity implements IProjectile this.setThrowableHeading(d0, d1 + f4, d2, p_i1755_4_, p_i1755_5_); } } + + public EntityRainbow(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_, int dmgMin, int dmgMax, EntityGrenadeZOMG grenade) { + super(p_i1756_1_); + this.renderDistanceWeight = 10.0D; + this.shootingEntity = p_i1756_2_; + + this.setSize(0.5F, 0.5F); + this.setLocationAndAngles(grenade.posX, grenade.posY + grenade.getEyeHeight(), grenade.posZ, + grenade.rotationYaw, grenade.rotationPitch); + this.posX -= MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F; + this.posY -= 0.10000000149011612D; + this.posZ -= MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F; + this.setPosition(this.posX, this.posY, this.posZ); + this.yOffset = 0.0F; + this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) + * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) + * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI); + this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI)); + this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, p_i1756_3_ * 1.5F, 1.0F); + } public EntityRainbow(World p_i1756_1_, EntityLivingBase p_i1756_2_, float p_i1756_3_) { @@ -312,7 +334,18 @@ public class EntityRainbow extends Entity implements IProjectile } else { - damagesource = ModDamageSource.causeSubatomicDamage(this, this.shootingEntity); + int j = rand.nextInt(5); + + if(j == 0) + damagesource = ModDamageSource.causeSubatomicDamage(this, this.shootingEntity); + else if(j == 1) + damagesource = ModDamageSource.causeSubatomicDamage2(this, this.shootingEntity); + else if(j == 2) + damagesource = ModDamageSource.causeSubatomicDamage3(this, this.shootingEntity); + else if(j == 3) + damagesource = ModDamageSource.causeSubatomicDamage4(this, this.shootingEntity); + else + damagesource = ModDamageSource.causeSubatomicDamage5(this, this.shootingEntity); } if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) @@ -326,11 +359,6 @@ public class EntityRainbow extends Entity implements IProjectile { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - if (!this.worldObj.isRemote) - { - entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1); - } - if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); diff --git a/com/hbm/entity/EntityRocket.java b/com/hbm/entity/projectile/EntityRocket.java similarity index 98% rename from com/hbm/entity/EntityRocket.java rename to com/hbm/entity/projectile/EntityRocket.java index c878ddd78..e453e1c79 100644 --- a/com/hbm/entity/EntityRocket.java +++ b/com/hbm/entity/projectile/EntityRocket.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.projectile; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -365,11 +365,6 @@ public class EntityRocket extends Entity implements IProjectile { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - if (!this.worldObj.isRemote) - { - entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1); - } - if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); @@ -497,6 +492,9 @@ public class EntityRocket extends Entity implements IProjectile this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } + + if (this.ticksExisted > 250) + this.setDead(); } /** diff --git a/com/hbm/entity/EntitySchrab.java b/com/hbm/entity/projectile/EntitySchrab.java similarity index 99% rename from com/hbm/entity/EntitySchrab.java rename to com/hbm/entity/projectile/EntitySchrab.java index 8c360c15b..bbad604cd 100644 --- a/com/hbm/entity/EntitySchrab.java +++ b/com/hbm/entity/projectile/EntitySchrab.java @@ -1,4 +1,4 @@ -package com.hbm.entity; +package com.hbm.entity.projectile; import java.util.List; @@ -365,11 +365,6 @@ public class EntitySchrab extends Entity implements IProjectile { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; - if (!this.worldObj.isRemote) - { - entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEntity() + 1); - } - if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); @@ -499,6 +494,9 @@ public class EntitySchrab extends Entity implements IProjectile this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } + + if (this.ticksExisted > 250) + this.setDead(); } /** diff --git a/com/hbm/explosion/ExplosionChaos.java b/com/hbm/explosion/ExplosionChaos.java index aa9156824..249aca67f 100644 --- a/com/hbm/explosion/ExplosionChaos.java +++ b/com/hbm/explosion/ExplosionChaos.java @@ -5,12 +5,15 @@ import java.util.List; import java.util.Random; import com.hbm.blocks.ModBlocks; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityGrenadeTau; -import com.hbm.entity.EntityMirv; -import com.hbm.entity.EntityMissileBase; -import com.hbm.entity.EntityRocket; -import com.hbm.entity.EntitySchrab; +import com.hbm.entity.grenade.EntityGrenadeTau; +import com.hbm.entity.grenade.EntityGrenadeZOMG; +import com.hbm.entity.missile.EntityMIRV; +import com.hbm.entity.missile.EntityMissileBase; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.entity.projectile.EntityRainbow; +import com.hbm.entity.projectile.EntityRocket; +import com.hbm.entity.projectile.EntitySchrab; import com.hbm.lib.Library; import net.minecraft.block.Block; @@ -219,7 +222,7 @@ public class ExplosionChaos { int ZZ = YY+zz*zz; if (ZZ= 25) - { - if (ZZ= y) destruction(world, X, Y, Z); + int r2 = r * r; + int r22 = r2 / 2; + for (int xx = -r; xx < r; xx++) { + int X = xx + x; + int XX = xx * xx; + for (int yy = -r; yy < r; yy++) { + int Y = yy + y; + int YY = XX + yy * yy; + for (int zz = -r; zz < r; zz++) { + int Z = zz + z; + int ZZ = YY + zz * zz; + if (r22 >= 25) { + if (ZZ < r22 + world.rand.nextInt(r22 / 25)) { + if (Y >= y) + destruction(world, X, Y, Z); } } else { - if (ZZ= y) destruction(world, X, Y, Z); + if (ZZ < r22) { + if (Y >= y) + destruction(world, X, Y, Z); } } } } } - - for (int xx = -r; xx < r; xx++) - { - int X = xx+x; - int XX = xx*xx; - for (int yy = -r; yy < r; yy++) - { - int Y = yy+y; - int YY = XX+yy*yy*50; - for (int zz = -r; zz < r; zz++) - { - int Z = zz+z; - int ZZ = YY+zz*zz; - if (ZZ 0) isOccupied = true; - double d11 = (1.0D - d4);// * d10; - if(!(entity instanceof EntityPlayerMP) || (entity instanceof EntityPlayerMP && ((EntityPlayerMP)entity).theItemInWorldManager.getGameType() != GameType.CREATIVE)) - { - //entity.attackEntityFrom(DamageSource.generic, ((int)((d11 * d11 + d11) / 2.0D * 8.0D * bombStartStrength + 1.0D))); - entity.attackEntityFrom(ModDamageSource.nuclearBlast, 5F); - entity.setFire(5); - double d8 = EnchantmentProtection.func_92092_a(entity, d11); - entity.motionX += d5 * d8; - entity.motionY += d6 * d8; - entity.motionZ += d7 * d8; - } - } - } - } + if (d4 <= 1.0D) { + d5 = entity.posX - x; + d6 = entity.posY + entity.getEyeHeight() - y; + d7 = entity.posZ - z; + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + if (d9 < wat && !(entity instanceof EntityOcelot) && !(entity instanceof EntityNukeCloudSmall) + && !(entity instanceof EntityMIRV) && !(entity instanceof EntityMiniNuke) + && !(entity instanceof EntityMiniMIRV) && !(entity instanceof EntityGrenadeASchrab) + && !(entity instanceof EntityGrenadeNuclear) + && !(entity instanceof EntityPlayer + && Library.checkArmor((EntityPlayer) entity, ModItems.euphemium_helmet, + ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots))) { + d5 /= d9; + d6 /= d9; + d7 /= d9; + // double d10 = (double)world.getBlockDensity(vec3, + // entity.boundingBox); + // if(d10 > 0) isOccupied = true; + double d11 = (1.0D - d4);// * d10; + if (!(entity instanceof EntityPlayerMP) || (entity instanceof EntityPlayerMP + && ((EntityPlayerMP) entity).theItemInWorldManager.getGameType() != GameType.CREATIVE)) { + // entity.attackEntityFrom(DamageSource.generic, + // ((int)((d11 * d11 + d11) / 2.0D * 8.0D * + // bombStartStrength + 1.0D))); + entity.attackEntityFrom(ModDamageSource.nuclearBlast, 10F); + entity.setFire(5); + double d8 = EnchantmentProtection.func_92092_a(entity, d11); + entity.motionX += d5 * d8; + entity.motionY += d6 * d8; + entity.motionZ += d7 * d8; + } + } + } + } - bombStartStrength = (int)f; + bombStartStrength = (int) f; } - + public static void vapor(World world, int x, int y, int z, int bombStartStrength) { int r = bombStartStrength * 2; - int r2 = r*r; - int r22 = r2/2; - for (int xx = -r; xx < r; xx++) - { - int X = xx+x; - int XX = xx*xx; - for (int yy = -r; yy < r; yy++) - { - int Y = yy+y; - int YY = XX+yy*yy; - for (int zz = -r; zz < r; zz++) - { - int Z = zz+z; - int ZZ = YY+zz*zz; - if (ZZ stacks = new ArrayList(); + + for(int i = 0; i < names.length; i++) { + stacks.addAll(OreDictionary.getOres(names[i])); + } + + for(int i = 0; i < stacks.size(); i++) { + + int[] ids = OreDictionary.getOreIDs(stacks.get(i)); + + List oreNames = new ArrayList(); + + for(int j = 0; j < ids.length; j++) { + oreNames.add(OreDictionary.getOreName(ids[j])); + } + + theWholeThing.add(new DictCouple(stacks.get(i), oreNames)); + } + System.out.println("Added " + theWholeThing.size() + " elements from the Ore Dict!"); } @@ -627,6 +656,13 @@ public class MachineRecipes { } else { setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap)); } + } else if (s.length() > 3 && s.substring(0, 3).equals("rod")) { + ItemStack stack = canFindDustByName(s.substring(3)); + if (stack != null) { + setRecipe(theWholeThing.get(i).item, new ItemStack(stack.getItem(), 2)); + } else { + setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap)); + } } else if (s.length() > 5 && s.substring(0, 5).equals("block")) { ItemStack stack = canFindDustByName(s.substring(5)); if (stack != null) { @@ -642,14 +678,18 @@ public class MachineRecipes { setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap)); } } else if (s.length() > 4 && s.substring(0, 4).equals("dust")) { - setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.dust)); + setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.dust)); + } else if (s.length() > 6 && s.substring(0, 6).equals("powder")) { + setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.dust)); } else { setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap)); } } - + if(theWholeThing.get(i).list.isEmpty()) setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap)); + if(!theWholeThing.get(i).list.isEmpty() && theWholeThing.get(i).list.get(0).equals("Unknown")) + setRecipe(theWholeThing.get(i).item, new ItemStack(ModItems.scrap)); } System.out.println("Added " + recipes.size() + " in total."); @@ -683,6 +723,9 @@ public class MachineRecipes { } public void overridePreSetRecipe(ItemStack inp, ItemStack outp) { + + boolean flag = false; + for(int i = 0; i < recipes.size(); i++) { if(recipes.get(i) != null && @@ -691,8 +734,17 @@ public class MachineRecipes { inp != null && outp != null && recipes.get(i).input.getItem() == inp.getItem() && - recipes.get(i).input.getItemDamage() == inp.getItemDamage()) + recipes.get(i).input.getItemDamage() == inp.getItemDamage()) { recipes.get(i).output = outp; + flag = true; + } + } + + if(!flag) { + ShredderRecipe rec = new ShredderRecipe(); + rec.input = inp; + rec.output = outp; + recipes.add(rec); } } @@ -783,14 +835,14 @@ public class MachineRecipes { return rec.output.copy(); } - return null; + return new ItemStack(ModItems.scrap); } public Map getShredderRecipes() { Map recipes = new HashMap(); for(int i = 0; i < this.recipes.size(); i++) { - if(this.recipes.get(i) != null && this.recipes.get(i).output.getItem() != ModItems.dust && this.recipes.get(i).output.getItem() != ModItems.scrap) + if(this.recipes.get(i) != null && this.recipes.get(i).output.getItem() != ModItems.scrap) recipes.put(((ShredderRecipe)this.recipes.get(i)).input, getShredderResult(((ShredderRecipe)this.recipes.get(i)).input)); } diff --git a/com/hbm/gui/ContainerBombMulti.java b/com/hbm/gui/container/ContainerBombMulti.java similarity index 98% rename from com/hbm/gui/ContainerBombMulti.java rename to com/hbm/gui/container/ContainerBombMulti.java index 0f6ee23da..00617f7b4 100644 --- a/com/hbm/gui/ContainerBombMulti.java +++ b/com/hbm/gui/container/ContainerBombMulti.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityBombMulti; diff --git a/com/hbm/gui/ContainerCentrifuge.java b/com/hbm/gui/container/ContainerCentrifuge.java similarity index 97% rename from com/hbm/gui/ContainerCentrifuge.java rename to com/hbm/gui/container/ContainerCentrifuge.java index f8d1ae9c5..1949cb4b2 100644 --- a/com/hbm/gui/ContainerCentrifuge.java +++ b/com/hbm/gui/container/ContainerCentrifuge.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineCentrifuge; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerConverterHeRf.java b/com/hbm/gui/container/ContainerConverterHeRf.java similarity index 98% rename from com/hbm/gui/ContainerConverterHeRf.java rename to com/hbm/gui/container/ContainerConverterHeRf.java index 67954c119..400ba0cda 100644 --- a/com/hbm/gui/ContainerConverterHeRf.java +++ b/com/hbm/gui/container/ContainerConverterHeRf.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityConverterHeRf; import com.hbm.tileentity.TileEntityConverterRfHe; diff --git a/com/hbm/gui/ContainerConverterRfHe.java b/com/hbm/gui/container/ContainerConverterRfHe.java similarity index 98% rename from com/hbm/gui/ContainerConverterRfHe.java rename to com/hbm/gui/container/ContainerConverterRfHe.java index 785e9d1fb..968c624c1 100644 --- a/com/hbm/gui/ContainerConverterRfHe.java +++ b/com/hbm/gui/container/ContainerConverterRfHe.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityConverterRfHe; import com.hbm.tileentity.TileEntityReactorMultiblock; diff --git a/com/hbm/gui/ContainerCoreAdvanced.java b/com/hbm/gui/container/ContainerCoreAdvanced.java similarity index 98% rename from com/hbm/gui/ContainerCoreAdvanced.java rename to com/hbm/gui/container/ContainerCoreAdvanced.java index e3276321e..a09059a00 100644 --- a/com/hbm/gui/ContainerCoreAdvanced.java +++ b/com/hbm/gui/container/ContainerCoreAdvanced.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityCoreAdvanced; import com.hbm.tileentity.TileEntityCoreTitanium; diff --git a/com/hbm/gui/ContainerCoreTitanium.java b/com/hbm/gui/container/ContainerCoreTitanium.java similarity index 98% rename from com/hbm/gui/ContainerCoreTitanium.java rename to com/hbm/gui/container/ContainerCoreTitanium.java index d1062addb..4d724c5a6 100644 --- a/com/hbm/gui/ContainerCoreTitanium.java +++ b/com/hbm/gui/container/ContainerCoreTitanium.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityCoreTitanium; import com.hbm.tileentity.TileEntityMachineGenerator; diff --git a/com/hbm/gui/ContainerDiFurnace.java b/com/hbm/gui/container/ContainerDiFurnace.java similarity index 97% rename from com/hbm/gui/ContainerDiFurnace.java rename to com/hbm/gui/container/ContainerDiFurnace.java index 8904a5c5e..c94838ee8 100644 --- a/com/hbm/gui/ContainerDiFurnace.java +++ b/com/hbm/gui/container/ContainerDiFurnace.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityDiFurnace; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerElectricFurnace.java b/com/hbm/gui/container/ContainerElectricFurnace.java similarity index 97% rename from com/hbm/gui/ContainerElectricFurnace.java rename to com/hbm/gui/container/ContainerElectricFurnace.java index 6d9ec3634..f7ec2e135 100644 --- a/com/hbm/gui/ContainerElectricFurnace.java +++ b/com/hbm/gui/container/ContainerElectricFurnace.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineElectricFurnace; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerFWatzCore.java b/com/hbm/gui/container/ContainerFWatzCore.java similarity index 99% rename from com/hbm/gui/ContainerFWatzCore.java rename to com/hbm/gui/container/ContainerFWatzCore.java index e997c618b..711ec5439 100644 --- a/com/hbm/gui/ContainerFWatzCore.java +++ b/com/hbm/gui/container/ContainerFWatzCore.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityFWatzCore; import com.hbm.tileentity.TileEntityFusionMultiblock; diff --git a/com/hbm/gui/ContainerFusionMultiblock.java b/com/hbm/gui/container/ContainerFusionMultiblock.java similarity index 99% rename from com/hbm/gui/ContainerFusionMultiblock.java rename to com/hbm/gui/container/ContainerFusionMultiblock.java index 4727f2c3b..00085dbd5 100644 --- a/com/hbm/gui/ContainerFusionMultiblock.java +++ b/com/hbm/gui/container/ContainerFusionMultiblock.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityFusionMultiblock; import com.hbm.tileentity.TileEntityReactorMultiblock; diff --git a/com/hbm/gui/ContainerGenerator.java b/com/hbm/gui/container/ContainerGenerator.java similarity index 99% rename from com/hbm/gui/ContainerGenerator.java rename to com/hbm/gui/container/ContainerGenerator.java index 53bf1d266..e0fde15b0 100644 --- a/com/hbm/gui/ContainerGenerator.java +++ b/com/hbm/gui/container/ContainerGenerator.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityMachineGenerator; diff --git a/com/hbm/gui/ContainerLaunchPadTier1.java b/com/hbm/gui/container/ContainerLaunchPadTier1.java similarity index 98% rename from com/hbm/gui/ContainerLaunchPadTier1.java rename to com/hbm/gui/container/ContainerLaunchPadTier1.java index 36df9cb44..9c5abbcd4 100644 --- a/com/hbm/gui/ContainerLaunchPadTier1.java +++ b/com/hbm/gui/container/ContainerLaunchPadTier1.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityLaunchPad; diff --git a/com/hbm/gui/ContainerMachineBattery.java b/com/hbm/gui/container/ContainerMachineBattery.java similarity index 98% rename from com/hbm/gui/ContainerMachineBattery.java rename to com/hbm/gui/container/ContainerMachineBattery.java index 3c49d3d19..f8a285d74 100644 --- a/com/hbm/gui/ContainerMachineBattery.java +++ b/com/hbm/gui/container/ContainerMachineBattery.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityMachineBattery; diff --git a/com/hbm/gui/ContainerMachineCMBFactory.java b/com/hbm/gui/container/ContainerMachineCMBFactory.java similarity index 98% rename from com/hbm/gui/ContainerMachineCMBFactory.java rename to com/hbm/gui/container/ContainerMachineCMBFactory.java index a57e3be59..94c6b90bd 100644 --- a/com/hbm/gui/ContainerMachineCMBFactory.java +++ b/com/hbm/gui/container/ContainerMachineCMBFactory.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineCMBFactory; import com.hbm.tileentity.TileEntityMachineShredder; diff --git a/com/hbm/gui/ContainerMachineCoal.java b/com/hbm/gui/container/ContainerMachineCoal.java similarity index 99% rename from com/hbm/gui/ContainerMachineCoal.java rename to com/hbm/gui/container/ContainerMachineCoal.java index 8e6540ba7..be614ab46 100644 --- a/com/hbm/gui/ContainerMachineCoal.java +++ b/com/hbm/gui/container/ContainerMachineCoal.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityMachineCoal; diff --git a/com/hbm/gui/ContainerMachineDeuterium.java b/com/hbm/gui/container/ContainerMachineDeuterium.java similarity index 97% rename from com/hbm/gui/ContainerMachineDeuterium.java rename to com/hbm/gui/container/ContainerMachineDeuterium.java index 0d2d6c441..a1ad1a167 100644 --- a/com/hbm/gui/ContainerMachineDeuterium.java +++ b/com/hbm/gui/container/ContainerMachineDeuterium.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineDeuterium; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerMachineDiesel.java b/com/hbm/gui/container/ContainerMachineDiesel.java similarity index 97% rename from com/hbm/gui/ContainerMachineDiesel.java rename to com/hbm/gui/container/ContainerMachineDiesel.java index c1309dd68..ebbc44a99 100644 --- a/com/hbm/gui/ContainerMachineDiesel.java +++ b/com/hbm/gui/container/ContainerMachineDiesel.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineCoal; import com.hbm.tileentity.TileEntityMachineDiesel; diff --git a/com/hbm/gui/ContainerMachineSchrabidiumTransmutator.java b/com/hbm/gui/container/ContainerMachineSchrabidiumTransmutator.java similarity index 97% rename from com/hbm/gui/ContainerMachineSchrabidiumTransmutator.java rename to com/hbm/gui/container/ContainerMachineSchrabidiumTransmutator.java index dfe4d85ea..56e438bff 100644 --- a/com/hbm/gui/ContainerMachineSchrabidiumTransmutator.java +++ b/com/hbm/gui/container/ContainerMachineSchrabidiumTransmutator.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineDeuterium; import com.hbm.tileentity.TileEntityMachineSchrabidiumTransmutator; diff --git a/com/hbm/gui/ContainerMachineShredder.java b/com/hbm/gui/container/ContainerMachineShredder.java similarity index 98% rename from com/hbm/gui/ContainerMachineShredder.java rename to com/hbm/gui/container/ContainerMachineShredder.java index f367a236d..bd0cbaf4a 100644 --- a/com/hbm/gui/ContainerMachineShredder.java +++ b/com/hbm/gui/container/ContainerMachineShredder.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineDiesel; import com.hbm.tileentity.TileEntityMachineShredder; diff --git a/com/hbm/gui/container/ContainerMachineTeleporter.java b/com/hbm/gui/container/ContainerMachineTeleporter.java new file mode 100644 index 000000000..44971ee6e --- /dev/null +++ b/com/hbm/gui/container/ContainerMachineTeleporter.java @@ -0,0 +1,97 @@ +package com.hbm.gui.container; + +import com.hbm.tileentity.TileEntityConverterRfHe; +import com.hbm.tileentity.TileEntityMachineTeleporter; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.ICrafting; +import net.minecraft.item.ItemStack; + +public class ContainerMachineTeleporter extends Container { + + private TileEntityMachineTeleporter diFurnace; + + private int power; + private int x; + private int y; + private int z; + + public ContainerMachineTeleporter(InventoryPlayer invPlayer, TileEntityMachineTeleporter tedf) { + + diFurnace = tedf; + } + + @Override + public void addCraftingToCrafters(ICrafting crafting) { + super.addCraftingToCrafters(crafting); + crafting.sendProgressBarUpdate(this, 0, this.diFurnace.power); + crafting.sendProgressBarUpdate(this, 1, this.diFurnace.targetX); + crafting.sendProgressBarUpdate(this, 2, this.diFurnace.targetY); + crafting.sendProgressBarUpdate(this, 3, this.diFurnace.targetZ); + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) + { + return null; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return true; + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + + for(int i = 0; i < this.crafters.size(); i++) + { + ICrafting par1 = (ICrafting)this.crafters.get(i); + + if(this.power != this.diFurnace.power) + { + par1.sendProgressBarUpdate(this, 0, this.diFurnace.power); + } + if(this.x != this.diFurnace.targetX) + { + par1.sendProgressBarUpdate(this, 1, this.diFurnace.targetX); + } + if(this.y != this.diFurnace.targetY) + { + par1.sendProgressBarUpdate(this, 2, this.diFurnace.targetY); + } + if(this.z != this.diFurnace.targetZ) + { + par1.sendProgressBarUpdate(this, 3, this.diFurnace.targetZ); + } + } + + this.power = this.diFurnace.power; + this.x = this.diFurnace.targetX; + this.y = this.diFurnace.targetY; + this.z = this.diFurnace.targetZ; + } + + @Override + public void updateProgressBar(int i, int j) { + if(i == 0) + { + diFurnace.power = j; + } + if(i == 1) + { + diFurnace.targetX = j; + } + if(i == 2) + { + diFurnace.targetY = j; + } + if(i == 3) + { + diFurnace.targetZ = j; + } + } +} diff --git a/com/hbm/gui/ContainerNukeBoy.java b/com/hbm/gui/container/ContainerNukeBoy.java similarity index 98% rename from com/hbm/gui/ContainerNukeBoy.java rename to com/hbm/gui/container/ContainerNukeBoy.java index ef9973538..1f23c6811 100644 --- a/com/hbm/gui/ContainerNukeBoy.java +++ b/com/hbm/gui/container/ContainerNukeBoy.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityNukeBoy; diff --git a/com/hbm/gui/ContainerNukeFleija.java b/com/hbm/gui/container/ContainerNukeFleija.java similarity index 98% rename from com/hbm/gui/ContainerNukeFleija.java rename to com/hbm/gui/container/ContainerNukeFleija.java index e765101d2..ed02646e6 100644 --- a/com/hbm/gui/ContainerNukeFleija.java +++ b/com/hbm/gui/container/ContainerNukeFleija.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityNukeFleija; diff --git a/com/hbm/gui/ContainerNukeFurnace.java b/com/hbm/gui/container/ContainerNukeFurnace.java similarity index 97% rename from com/hbm/gui/ContainerNukeFurnace.java rename to com/hbm/gui/container/ContainerNukeFurnace.java index 695d6921f..43aa3b5dd 100644 --- a/com/hbm/gui/ContainerNukeFurnace.java +++ b/com/hbm/gui/container/ContainerNukeFurnace.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityNukeFurnace; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerNukeGadget.java b/com/hbm/gui/container/ContainerNukeGadget.java similarity index 98% rename from com/hbm/gui/ContainerNukeGadget.java rename to com/hbm/gui/container/ContainerNukeGadget.java index daabcd1f7..f7ac206de 100644 --- a/com/hbm/gui/ContainerNukeGadget.java +++ b/com/hbm/gui/container/ContainerNukeGadget.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityNukeGadget; diff --git a/com/hbm/gui/ContainerNukeMan.java b/com/hbm/gui/container/ContainerNukeMan.java similarity index 98% rename from com/hbm/gui/ContainerNukeMan.java rename to com/hbm/gui/container/ContainerNukeMan.java index 628e0d137..d9df8cfa3 100644 --- a/com/hbm/gui/ContainerNukeMan.java +++ b/com/hbm/gui/container/ContainerNukeMan.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityNukeMan; diff --git a/com/hbm/gui/ContainerNukeMike.java b/com/hbm/gui/container/ContainerNukeMike.java similarity index 98% rename from com/hbm/gui/ContainerNukeMike.java rename to com/hbm/gui/container/ContainerNukeMike.java index 446766e76..f1ee519f7 100644 --- a/com/hbm/gui/ContainerNukeMike.java +++ b/com/hbm/gui/container/ContainerNukeMike.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityNukeMike; diff --git a/com/hbm/gui/ContainerNukePrototype.java b/com/hbm/gui/container/ContainerNukePrototype.java similarity index 98% rename from com/hbm/gui/ContainerNukePrototype.java rename to com/hbm/gui/container/ContainerNukePrototype.java index cb01e26de..4ebb41520 100644 --- a/com/hbm/gui/ContainerNukePrototype.java +++ b/com/hbm/gui/container/ContainerNukePrototype.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityNukePrototype; diff --git a/com/hbm/gui/ContainerNukeTsar.java b/com/hbm/gui/container/ContainerNukeTsar.java similarity index 98% rename from com/hbm/gui/ContainerNukeTsar.java rename to com/hbm/gui/container/ContainerNukeTsar.java index 0fc7a39a4..54b45d840 100644 --- a/com/hbm/gui/ContainerNukeTsar.java +++ b/com/hbm/gui/container/ContainerNukeTsar.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityNukeTsar; diff --git a/com/hbm/gui/ContainerPuF6Tank.java b/com/hbm/gui/container/ContainerPuF6Tank.java similarity index 97% rename from com/hbm/gui/ContainerPuF6Tank.java rename to com/hbm/gui/container/ContainerPuF6Tank.java index ee2e3c7d0..860ebfa14 100644 --- a/com/hbm/gui/ContainerPuF6Tank.java +++ b/com/hbm/gui/container/ContainerPuF6Tank.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachinePuF6Tank; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerReactor.java b/com/hbm/gui/container/ContainerReactor.java similarity index 97% rename from com/hbm/gui/ContainerReactor.java rename to com/hbm/gui/container/ContainerReactor.java index 2a073eae2..b20e0b379 100644 --- a/com/hbm/gui/ContainerReactor.java +++ b/com/hbm/gui/container/ContainerReactor.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineReactor; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerReactorMultiblock.java b/com/hbm/gui/container/ContainerReactorMultiblock.java similarity index 99% rename from com/hbm/gui/ContainerReactorMultiblock.java rename to com/hbm/gui/container/ContainerReactorMultiblock.java index 182426679..f4f6406ad 100644 --- a/com/hbm/gui/ContainerReactorMultiblock.java +++ b/com/hbm/gui/container/ContainerReactorMultiblock.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityMachineGenerator; import com.hbm.tileentity.TileEntityReactorMultiblock; diff --git a/com/hbm/gui/ContainerRtgFurnace.java b/com/hbm/gui/container/ContainerRtgFurnace.java similarity index 97% rename from com/hbm/gui/ContainerRtgFurnace.java rename to com/hbm/gui/container/ContainerRtgFurnace.java index c26893464..326c3640a 100644 --- a/com/hbm/gui/ContainerRtgFurnace.java +++ b/com/hbm/gui/container/ContainerRtgFurnace.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityRtgFurnace; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerTestNuke.java b/com/hbm/gui/container/ContainerTestNuke.java similarity index 97% rename from com/hbm/gui/ContainerTestNuke.java rename to com/hbm/gui/container/ContainerTestNuke.java index 32852d3cd..71601941e 100644 --- a/com/hbm/gui/ContainerTestNuke.java +++ b/com/hbm/gui/container/ContainerTestNuke.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityTestNuke; diff --git a/com/hbm/gui/ContainerUF6Tank.java b/com/hbm/gui/container/ContainerUF6Tank.java similarity index 97% rename from com/hbm/gui/ContainerUF6Tank.java rename to com/hbm/gui/container/ContainerUF6Tank.java index 7e838bede..2058249b4 100644 --- a/com/hbm/gui/ContainerUF6Tank.java +++ b/com/hbm/gui/container/ContainerUF6Tank.java @@ -1,5 +1,6 @@ -package com.hbm.gui; +package com.hbm.gui.container; +import com.hbm.gui.SlotDiFurnace; import com.hbm.tileentity.TileEntityMachineUF6Tank; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/gui/ContainerWatzCore.java b/com/hbm/gui/container/ContainerWatzCore.java similarity index 99% rename from com/hbm/gui/ContainerWatzCore.java rename to com/hbm/gui/container/ContainerWatzCore.java index 99e9ab887..edb57f0d1 100644 --- a/com/hbm/gui/ContainerWatzCore.java +++ b/com/hbm/gui/container/ContainerWatzCore.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.container; import com.hbm.tileentity.TileEntityFusionMultiblock; import com.hbm.tileentity.TileEntityWatzCore; diff --git a/com/hbm/gui/GUIBombMulti.java b/com/hbm/gui/gui/GUIBombMulti.java similarity index 96% rename from com/hbm/gui/GUIBombMulti.java rename to com/hbm/gui/gui/GUIBombMulti.java index c76959487..f58f2b727 100644 --- a/com/hbm/gui/GUIBombMulti.java +++ b/com/hbm/gui/gui/GUIBombMulti.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerBombMulti; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityBombMulti; diff --git a/com/hbm/gui/GUIConverterHeRf.java b/com/hbm/gui/gui/GUIConverterHeRf.java similarity index 94% rename from com/hbm/gui/GUIConverterHeRf.java rename to com/hbm/gui/gui/GUIConverterHeRf.java index 9156f99f0..b63cc0d1c 100644 --- a/com/hbm/gui/GUIConverterHeRf.java +++ b/com/hbm/gui/gui/GUIConverterHeRf.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerConverterHeRf; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityConverterHeRf; diff --git a/com/hbm/gui/GUIConverterRfHe.java b/com/hbm/gui/gui/GUIConverterRfHe.java similarity index 94% rename from com/hbm/gui/GUIConverterRfHe.java rename to com/hbm/gui/gui/GUIConverterRfHe.java index 0d2b3917a..b95ee279e 100644 --- a/com/hbm/gui/GUIConverterRfHe.java +++ b/com/hbm/gui/gui/GUIConverterRfHe.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerConverterRfHe; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityConverterRfHe; diff --git a/com/hbm/gui/GUICoreAdvanced.java b/com/hbm/gui/gui/GUICoreAdvanced.java similarity index 96% rename from com/hbm/gui/GUICoreAdvanced.java rename to com/hbm/gui/gui/GUICoreAdvanced.java index 297c042c5..364abe2eb 100644 --- a/com/hbm/gui/GUICoreAdvanced.java +++ b/com/hbm/gui/gui/GUICoreAdvanced.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerCoreAdvanced; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityCoreAdvanced; import com.hbm.tileentity.TileEntityCoreTitanium; diff --git a/com/hbm/gui/GUICoreTitanium.java b/com/hbm/gui/gui/GUICoreTitanium.java similarity index 96% rename from com/hbm/gui/GUICoreTitanium.java rename to com/hbm/gui/gui/GUICoreTitanium.java index f8962e713..363f9311e 100644 --- a/com/hbm/gui/GUICoreTitanium.java +++ b/com/hbm/gui/gui/GUICoreTitanium.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerCoreTitanium; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityCoreTitanium; import com.hbm.tileentity.TileEntityMachineGenerator; diff --git a/com/hbm/gui/GUIFWatzCore.java b/com/hbm/gui/gui/GUIFWatzCore.java similarity index 96% rename from com/hbm/gui/GUIFWatzCore.java rename to com/hbm/gui/gui/GUIFWatzCore.java index 1f902260f..c3b758587 100644 --- a/com/hbm/gui/GUIFWatzCore.java +++ b/com/hbm/gui/gui/GUIFWatzCore.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerFWatzCore; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityFWatzCore; import com.hbm.tileentity.TileEntityFusionMultiblock; diff --git a/com/hbm/gui/GUIFusionMultiblock.java b/com/hbm/gui/gui/GUIFusionMultiblock.java similarity index 96% rename from com/hbm/gui/GUIFusionMultiblock.java rename to com/hbm/gui/gui/GUIFusionMultiblock.java index dbae2e7a5..de46fc640 100644 --- a/com/hbm/gui/GUIFusionMultiblock.java +++ b/com/hbm/gui/gui/GUIFusionMultiblock.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerFusionMultiblock; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityFusionMultiblock; import com.hbm.tileentity.TileEntityReactorMultiblock; diff --git a/com/hbm/gui/GUILaunchPadTier1.java b/com/hbm/gui/gui/GUILaunchPadTier1.java similarity index 95% rename from com/hbm/gui/GUILaunchPadTier1.java rename to com/hbm/gui/gui/GUILaunchPadTier1.java index 2f3b74637..91dc91151 100644 --- a/com/hbm/gui/GUILaunchPadTier1.java +++ b/com/hbm/gui/gui/GUILaunchPadTier1.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerLaunchPadTier1; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityLaunchPad; diff --git a/com/hbm/gui/GUIMachineBattery.java b/com/hbm/gui/gui/GUIMachineBattery.java similarity index 92% rename from com/hbm/gui/GUIMachineBattery.java rename to com/hbm/gui/gui/GUIMachineBattery.java index 5f1255968..6e04a4e6d 100644 --- a/com/hbm/gui/GUIMachineBattery.java +++ b/com/hbm/gui/gui/GUIMachineBattery.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerMachineBattery; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineBattery; @@ -27,6 +28,7 @@ public class GUIMachineBattery extends GuiContainer { @Override protected void drawGuiContainerForegroundLayer(int i, int j) { String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName()); + name += (" (" + this.diFurnace.power + " HE)"); this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); diff --git a/com/hbm/gui/GUIMachineCMBFactory.java b/com/hbm/gui/gui/GUIMachineCMBFactory.java similarity index 96% rename from com/hbm/gui/GUIMachineCMBFactory.java rename to com/hbm/gui/gui/GUIMachineCMBFactory.java index 628e6ccc1..ca502d3e3 100644 --- a/com/hbm/gui/GUIMachineCMBFactory.java +++ b/com/hbm/gui/gui/GUIMachineCMBFactory.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerMachineCMBFactory; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineCMBFactory; import com.hbm.tileentity.TileEntityMachineShredder; diff --git a/com/hbm/gui/GUIMachineCentrifuge.java b/com/hbm/gui/gui/GUIMachineCentrifuge.java similarity index 96% rename from com/hbm/gui/GUIMachineCentrifuge.java rename to com/hbm/gui/gui/GUIMachineCentrifuge.java index 298dbebec..c276771dc 100644 --- a/com/hbm/gui/GUIMachineCentrifuge.java +++ b/com/hbm/gui/gui/GUIMachineCentrifuge.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerCentrifuge; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineCentrifuge; diff --git a/com/hbm/gui/GUIMachineCoal.java b/com/hbm/gui/gui/GUIMachineCoal.java similarity index 96% rename from com/hbm/gui/GUIMachineCoal.java rename to com/hbm/gui/gui/GUIMachineCoal.java index f69ea7f65..8b9f4d7a6 100644 --- a/com/hbm/gui/GUIMachineCoal.java +++ b/com/hbm/gui/gui/GUIMachineCoal.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerMachineCoal; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineCoal; diff --git a/com/hbm/gui/GUIMachineDeuterium.java b/com/hbm/gui/gui/GUIMachineDeuterium.java similarity index 96% rename from com/hbm/gui/GUIMachineDeuterium.java rename to com/hbm/gui/gui/GUIMachineDeuterium.java index 07a2723e2..6ce26e60e 100644 --- a/com/hbm/gui/GUIMachineDeuterium.java +++ b/com/hbm/gui/gui/GUIMachineDeuterium.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerMachineDeuterium; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineDeuterium; diff --git a/com/hbm/gui/GUIMachineDiesel.java b/com/hbm/gui/gui/GUIMachineDiesel.java similarity index 96% rename from com/hbm/gui/GUIMachineDiesel.java rename to com/hbm/gui/gui/GUIMachineDiesel.java index 2cc778305..d611a0c69 100644 --- a/com/hbm/gui/GUIMachineDiesel.java +++ b/com/hbm/gui/gui/GUIMachineDiesel.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerMachineDiesel; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineCoal; import com.hbm.tileentity.TileEntityMachineDiesel; diff --git a/com/hbm/gui/GUIMachineElectricFurnace.java b/com/hbm/gui/gui/GUIMachineElectricFurnace.java similarity index 96% rename from com/hbm/gui/GUIMachineElectricFurnace.java rename to com/hbm/gui/gui/GUIMachineElectricFurnace.java index 0ea47c3e2..2abe8f705 100644 --- a/com/hbm/gui/GUIMachineElectricFurnace.java +++ b/com/hbm/gui/gui/GUIMachineElectricFurnace.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerElectricFurnace; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineElectricFurnace; diff --git a/com/hbm/gui/GUIMachineGenerator.java b/com/hbm/gui/gui/GUIMachineGenerator.java similarity index 96% rename from com/hbm/gui/GUIMachineGenerator.java rename to com/hbm/gui/gui/GUIMachineGenerator.java index 4c913f758..70e27d1f1 100644 --- a/com/hbm/gui/GUIMachineGenerator.java +++ b/com/hbm/gui/gui/GUIMachineGenerator.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerGenerator; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineGenerator; diff --git a/com/hbm/gui/GUIMachinePuF6Tank.java b/com/hbm/gui/gui/GUIMachinePuF6Tank.java similarity index 95% rename from com/hbm/gui/GUIMachinePuF6Tank.java rename to com/hbm/gui/gui/GUIMachinePuF6Tank.java index 7d67672c9..0c066be5c 100644 --- a/com/hbm/gui/GUIMachinePuF6Tank.java +++ b/com/hbm/gui/gui/GUIMachinePuF6Tank.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerPuF6Tank; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachinePuF6Tank; diff --git a/com/hbm/gui/GUIMachineReactor.java b/com/hbm/gui/gui/GUIMachineReactor.java similarity index 96% rename from com/hbm/gui/GUIMachineReactor.java rename to com/hbm/gui/gui/GUIMachineReactor.java index db288fe15..ad52158c7 100644 --- a/com/hbm/gui/GUIMachineReactor.java +++ b/com/hbm/gui/gui/GUIMachineReactor.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerReactor; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineReactor; diff --git a/com/hbm/gui/GUIMachineSchrabidiumTransmutator.java b/com/hbm/gui/gui/GUIMachineSchrabidiumTransmutator.java similarity index 95% rename from com/hbm/gui/GUIMachineSchrabidiumTransmutator.java rename to com/hbm/gui/gui/GUIMachineSchrabidiumTransmutator.java index 59eb2b698..4cf72ee6c 100644 --- a/com/hbm/gui/GUIMachineSchrabidiumTransmutator.java +++ b/com/hbm/gui/gui/GUIMachineSchrabidiumTransmutator.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerMachineSchrabidiumTransmutator; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineGenerator; import com.hbm.tileentity.TileEntityMachineSchrabidiumTransmutator; diff --git a/com/hbm/gui/GUIMachineShredder.java b/com/hbm/gui/gui/GUIMachineShredder.java similarity index 97% rename from com/hbm/gui/GUIMachineShredder.java rename to com/hbm/gui/gui/GUIMachineShredder.java index e5b0bc2c5..207a2e4eb 100644 --- a/com/hbm/gui/GUIMachineShredder.java +++ b/com/hbm/gui/gui/GUIMachineShredder.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerMachineShredder; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineDiesel; import com.hbm.tileentity.TileEntityMachineShredder; diff --git a/com/hbm/gui/gui/GUIMachineTeleporter.java b/com/hbm/gui/gui/GUIMachineTeleporter.java new file mode 100644 index 000000000..b29c3b062 --- /dev/null +++ b/com/hbm/gui/gui/GUIMachineTeleporter.java @@ -0,0 +1,53 @@ +package com.hbm.gui.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.gui.container.ContainerConverterRfHe; +import com.hbm.gui.container.ContainerMachineTeleporter; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.TileEntityConverterRfHe; +import com.hbm.tileentity.TileEntityMachineTeleporter; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUIMachineTeleporter extends GuiContainer { + + private static ResourceLocation texture = new ResourceLocation( + RefStrings.MODID + ":textures/gui/gui_teleporter.png"); + private TileEntityMachineTeleporter diFurnace; + + public GUIMachineTeleporter(InventoryPlayer invPlayer, TileEntityMachineTeleporter tedf) { + super(new ContainerMachineTeleporter(invPlayer, tedf)); + diFurnace = tedf; + + this.xSize = 176; + this.ySize = 86; + } + + @Override + protected void drawGuiContainerForegroundLayer(int i, int j) { + String name = I18n.format("container.teleporter"); + + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, + 4210752); + this.fontRendererObj.drawString("Power: " + diFurnace.power + "HE/" + diFurnace.maxPower + "HE", 10, 20, + 4210752); + this.fontRendererObj.drawString("Mode: " + (diFurnace.mode ? "Send" : "Receive"), 10, 29, 4210752); + if (diFurnace.mode) { + this.fontRendererObj.drawString("Destination X: " + diFurnace.targetX, 10, 38, 4210752); + this.fontRendererObj.drawString("Destination Y: " + diFurnace.targetY, 10, 47, 4210752); + this.fontRendererObj.drawString("Destination Z: " + diFurnace.targetZ, 10, 56, 4210752); + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + } +} diff --git a/com/hbm/gui/GUIMachineUF6Tank.java b/com/hbm/gui/gui/GUIMachineUF6Tank.java similarity index 95% rename from com/hbm/gui/GUIMachineUF6Tank.java rename to com/hbm/gui/gui/GUIMachineUF6Tank.java index 0582658ab..5b5573ee9 100644 --- a/com/hbm/gui/GUIMachineUF6Tank.java +++ b/com/hbm/gui/gui/GUIMachineUF6Tank.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerUF6Tank; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineUF6Tank; diff --git a/com/hbm/gui/GUINukeBoy.java b/com/hbm/gui/gui/GUINukeBoy.java similarity index 95% rename from com/hbm/gui/GUINukeBoy.java rename to com/hbm/gui/gui/GUINukeBoy.java index f32b4693a..347c8000f 100644 --- a/com/hbm/gui/GUINukeBoy.java +++ b/com/hbm/gui/gui/GUINukeBoy.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerNukeBoy; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityNukeBoy; diff --git a/com/hbm/gui/GUINukeFleija.java b/com/hbm/gui/gui/GUINukeFleija.java similarity index 97% rename from com/hbm/gui/GUINukeFleija.java rename to com/hbm/gui/gui/GUINukeFleija.java index 9aa11e2d6..78b9396c6 100644 --- a/com/hbm/gui/GUINukeFleija.java +++ b/com/hbm/gui/gui/GUINukeFleija.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerNukeFleija; import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityNukeFleija; diff --git a/com/hbm/gui/GUINukeFurnace.java b/com/hbm/gui/gui/GUINukeFurnace.java similarity index 95% rename from com/hbm/gui/GUINukeFurnace.java rename to com/hbm/gui/gui/GUINukeFurnace.java index 4e43a90a5..5b2596375 100644 --- a/com/hbm/gui/GUINukeFurnace.java +++ b/com/hbm/gui/gui/GUINukeFurnace.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerNukeFurnace; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityNukeFurnace; diff --git a/com/hbm/gui/GUINukeGadget.java b/com/hbm/gui/gui/GUINukeGadget.java similarity index 96% rename from com/hbm/gui/GUINukeGadget.java rename to com/hbm/gui/gui/GUINukeGadget.java index d2143202e..e2510fda8 100644 --- a/com/hbm/gui/GUINukeGadget.java +++ b/com/hbm/gui/gui/GUINukeGadget.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerNukeGadget; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityNukeGadget; diff --git a/com/hbm/gui/GUINukeMan.java b/com/hbm/gui/gui/GUINukeMan.java similarity index 96% rename from com/hbm/gui/GUINukeMan.java rename to com/hbm/gui/gui/GUINukeMan.java index 6e951d3ce..41fa6f066 100644 --- a/com/hbm/gui/GUINukeMan.java +++ b/com/hbm/gui/gui/GUINukeMan.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerNukeMan; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityNukeMan; diff --git a/com/hbm/gui/GUINukeMike.java b/com/hbm/gui/gui/GUINukeMike.java similarity index 95% rename from com/hbm/gui/GUINukeMike.java rename to com/hbm/gui/gui/GUINukeMike.java index 56fe1e330..39429a621 100644 --- a/com/hbm/gui/GUINukeMike.java +++ b/com/hbm/gui/gui/GUINukeMike.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerNukeMike; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityNukeMike; diff --git a/com/hbm/gui/GUINukePrototype.java b/com/hbm/gui/gui/GUINukePrototype.java similarity index 95% rename from com/hbm/gui/GUINukePrototype.java rename to com/hbm/gui/gui/GUINukePrototype.java index 2e1957c4a..74d1d9921 100644 --- a/com/hbm/gui/GUINukePrototype.java +++ b/com/hbm/gui/gui/GUINukePrototype.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerNukePrototype; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityNukePrototype; diff --git a/com/hbm/gui/GUINukeTsar.java b/com/hbm/gui/gui/GUINukeTsar.java similarity index 95% rename from com/hbm/gui/GUINukeTsar.java rename to com/hbm/gui/gui/GUINukeTsar.java index 6278c7c07..6b3b5f41c 100644 --- a/com/hbm/gui/GUINukeTsar.java +++ b/com/hbm/gui/gui/GUINukeTsar.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerNukeTsar; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityNukeTsar; diff --git a/com/hbm/gui/GUIReactorMultiblock.java b/com/hbm/gui/gui/GUIReactorMultiblock.java similarity index 96% rename from com/hbm/gui/GUIReactorMultiblock.java rename to com/hbm/gui/gui/GUIReactorMultiblock.java index a20621c5e..5d5183d49 100644 --- a/com/hbm/gui/GUIReactorMultiblock.java +++ b/com/hbm/gui/gui/GUIReactorMultiblock.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerReactorMultiblock; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityMachineGenerator; import com.hbm.tileentity.TileEntityReactorMultiblock; diff --git a/com/hbm/gui/GUIRtgFurnace.java b/com/hbm/gui/gui/GUIRtgFurnace.java similarity index 95% rename from com/hbm/gui/GUIRtgFurnace.java rename to com/hbm/gui/gui/GUIRtgFurnace.java index 489520149..5ddfdeee2 100644 --- a/com/hbm/gui/GUIRtgFurnace.java +++ b/com/hbm/gui/gui/GUIRtgFurnace.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerRtgFurnace; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityRtgFurnace; diff --git a/com/hbm/gui/GUITestDiFurnace.java b/com/hbm/gui/gui/GUITestDiFurnace.java similarity index 96% rename from com/hbm/gui/GUITestDiFurnace.java rename to com/hbm/gui/gui/GUITestDiFurnace.java index 7d0d1593a..fd53ef801 100644 --- a/com/hbm/gui/GUITestDiFurnace.java +++ b/com/hbm/gui/gui/GUITestDiFurnace.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerDiFurnace; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityDiFurnace; diff --git a/com/hbm/gui/GUITestNuke.java b/com/hbm/gui/gui/GUITestNuke.java similarity index 97% rename from com/hbm/gui/GUITestNuke.java rename to com/hbm/gui/gui/GUITestNuke.java index c4723cb06..f1227d8ff 100644 --- a/com/hbm/gui/GUITestNuke.java +++ b/com/hbm/gui/gui/GUITestNuke.java @@ -1,4 +1,4 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; @@ -8,6 +8,7 @@ import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; +import com.hbm.gui.container.ContainerTestNuke; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityTestNuke; diff --git a/com/hbm/gui/GUIWatzCore.java b/com/hbm/gui/gui/GUIWatzCore.java similarity index 97% rename from com/hbm/gui/GUIWatzCore.java rename to com/hbm/gui/gui/GUIWatzCore.java index ceff548a7..20f135188 100644 --- a/com/hbm/gui/GUIWatzCore.java +++ b/com/hbm/gui/gui/GUIWatzCore.java @@ -1,7 +1,8 @@ -package com.hbm.gui; +package com.hbm.gui.gui; import org.lwjgl.opengl.GL11; +import com.hbm.gui.container.ContainerWatzCore; import com.hbm.lib.RefStrings; import com.hbm.tileentity.TileEntityReactorMultiblock; import com.hbm.tileentity.TileEntityWatzCore; diff --git a/com/hbm/handler/AlloyFurnaceRecipeHandler.java b/com/hbm/handler/AlloyFurnaceRecipeHandler.java index 9cbb12b2b..a36d1e58d 100644 --- a/com/hbm/handler/AlloyFurnaceRecipeHandler.java +++ b/com/hbm/handler/AlloyFurnaceRecipeHandler.java @@ -7,8 +7,8 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import com.hbm.gui.GUITestDiFurnace; import com.hbm.gui.MachineRecipes; +import com.hbm.gui.gui.GUITestDiFurnace; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; diff --git a/com/hbm/handler/CentrifugeRecipeHandler.java b/com/hbm/handler/CentrifugeRecipeHandler.java index f2902f36f..7f7fe7f60 100644 --- a/com/hbm/handler/CentrifugeRecipeHandler.java +++ b/com/hbm/handler/CentrifugeRecipeHandler.java @@ -6,9 +6,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; -import com.hbm.gui.GUIMachineCentrifuge; -import com.hbm.gui.GUITestDiFurnace; import com.hbm.gui.MachineRecipes; +import com.hbm.gui.gui.GUIMachineCentrifuge; +import com.hbm.gui.gui.GUITestDiFurnace; import com.hbm.handler.AlloyFurnaceRecipeHandler.Fuel; import com.hbm.handler.AlloyFurnaceRecipeHandler.SmeltingSet; diff --git a/com/hbm/handler/FuelHandler.java b/com/hbm/handler/FuelHandler.java index 0a313a78c..476c2c543 100644 --- a/com/hbm/handler/FuelHandler.java +++ b/com/hbm/handler/FuelHandler.java @@ -1,8 +1,10 @@ package com.hbm.handler; +import com.hbm.blocks.ModBlocks; import com.hbm.items.ModItems; import cpw.mods.fml.common.IFuelHandler; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class FuelHandler implements IFuelHandler { @@ -10,12 +12,20 @@ public class FuelHandler implements IFuelHandler { @Override public int getBurnTime(ItemStack fuel) { + int i = 200; + if(fuel.getItem().equals(ModItems.canister_fuel)) - return 32000; + return i * 16; + if(fuel.getItem().equals(ModItems.powder_coal)) + return i * 8; if(fuel.getItem().equals(ModItems.scrap)) - return 4000; + return i * 4; + if(fuel.getItem().equals(ModItems.dust)) + return i * 2; if(fuel.getItem().equals(ModItems.powder_fire)) - return 20000; + return i * 32; + if(fuel.getItem().equals(Item.getItemFromBlock(ModBlocks.block_scrap))) + return i * 20; return 0; } diff --git a/com/hbm/main/GUIHandler.java b/com/hbm/handler/GUIHandler.java similarity index 81% rename from com/hbm/main/GUIHandler.java rename to com/hbm/handler/GUIHandler.java index a160d845a..4b0ba0fd9 100644 --- a/com/hbm/main/GUIHandler.java +++ b/com/hbm/handler/GUIHandler.java @@ -1,74 +1,76 @@ -package com.hbm.main; +package com.hbm.handler; import com.hbm.blocks.ModBlocks; -import com.hbm.gui.ContainerBombMulti; -import com.hbm.gui.ContainerDiFurnace; -import com.hbm.gui.ContainerCentrifuge; -import com.hbm.gui.ContainerConverterHeRf; -import com.hbm.gui.ContainerConverterRfHe; -import com.hbm.gui.ContainerCoreAdvanced; -import com.hbm.gui.ContainerCoreTitanium; -import com.hbm.gui.ContainerElectricFurnace; -import com.hbm.gui.ContainerFWatzCore; -import com.hbm.gui.ContainerFusionMultiblock; -import com.hbm.gui.ContainerGenerator; -import com.hbm.gui.ContainerLaunchPadTier1; -import com.hbm.gui.ContainerMachineBattery; -import com.hbm.gui.ContainerMachineCMBFactory; -import com.hbm.gui.ContainerMachineCoal; -import com.hbm.gui.ContainerMachineDeuterium; -import com.hbm.gui.ContainerMachineDiesel; -import com.hbm.gui.ContainerMachineSchrabidiumTransmutator; -import com.hbm.gui.ContainerMachineShredder; -import com.hbm.gui.ContainerNukeBoy; -import com.hbm.gui.ContainerNukeFleija; -import com.hbm.gui.ContainerNukeFurnace; -import com.hbm.gui.ContainerNukeGadget; -import com.hbm.gui.ContainerNukeMan; -import com.hbm.gui.ContainerNukeMike; -import com.hbm.gui.ContainerNukePrototype; -import com.hbm.gui.ContainerNukeTsar; -import com.hbm.gui.ContainerPuF6Tank; -import com.hbm.gui.ContainerReactor; -import com.hbm.gui.ContainerReactorMultiblock; -import com.hbm.gui.ContainerRtgFurnace; -import com.hbm.gui.ContainerTestNuke; -import com.hbm.gui.ContainerUF6Tank; -import com.hbm.gui.ContainerWatzCore; -import com.hbm.gui.GUIBombMulti; -import com.hbm.gui.GUIConverterHeRf; -import com.hbm.gui.GUIConverterRfHe; -import com.hbm.gui.GUICoreAdvanced; -import com.hbm.gui.GUICoreTitanium; -import com.hbm.gui.GUIFWatzCore; -import com.hbm.gui.GUIFusionMultiblock; -import com.hbm.gui.GUILaunchPadTier1; -import com.hbm.gui.GUIMachineBattery; -import com.hbm.gui.GUIMachineCMBFactory; -import com.hbm.gui.GUIMachineCentrifuge; -import com.hbm.gui.GUIMachineCoal; -import com.hbm.gui.GUIMachineDeuterium; -import com.hbm.gui.GUIMachineDiesel; -import com.hbm.gui.GUIMachineElectricFurnace; -import com.hbm.gui.GUIMachineGenerator; -import com.hbm.gui.GUIMachinePuF6Tank; -import com.hbm.gui.GUIMachineReactor; -import com.hbm.gui.GUIMachineSchrabidiumTransmutator; -import com.hbm.gui.GUIMachineShredder; -import com.hbm.gui.GUIMachineUF6Tank; -import com.hbm.gui.GUINukeBoy; -import com.hbm.gui.GUINukeFleija; -import com.hbm.gui.GUINukeFurnace; -import com.hbm.gui.GUINukeGadget; -import com.hbm.gui.GUINukeMan; -import com.hbm.gui.GUINukeMike; -import com.hbm.gui.GUINukePrototype; -import com.hbm.gui.GUINukeTsar; -import com.hbm.gui.GUIReactorMultiblock; -import com.hbm.gui.GUIRtgFurnace; -import com.hbm.gui.GUITestDiFurnace; -import com.hbm.gui.GUITestNuke; -import com.hbm.gui.GUIWatzCore; +import com.hbm.gui.container.ContainerBombMulti; +import com.hbm.gui.container.ContainerCentrifuge; +import com.hbm.gui.container.ContainerConverterHeRf; +import com.hbm.gui.container.ContainerConverterRfHe; +import com.hbm.gui.container.ContainerCoreAdvanced; +import com.hbm.gui.container.ContainerCoreTitanium; +import com.hbm.gui.container.ContainerDiFurnace; +import com.hbm.gui.container.ContainerElectricFurnace; +import com.hbm.gui.container.ContainerFWatzCore; +import com.hbm.gui.container.ContainerFusionMultiblock; +import com.hbm.gui.container.ContainerGenerator; +import com.hbm.gui.container.ContainerLaunchPadTier1; +import com.hbm.gui.container.ContainerMachineBattery; +import com.hbm.gui.container.ContainerMachineCMBFactory; +import com.hbm.gui.container.ContainerMachineCoal; +import com.hbm.gui.container.ContainerMachineDeuterium; +import com.hbm.gui.container.ContainerMachineDiesel; +import com.hbm.gui.container.ContainerMachineSchrabidiumTransmutator; +import com.hbm.gui.container.ContainerMachineShredder; +import com.hbm.gui.container.ContainerMachineTeleporter; +import com.hbm.gui.container.ContainerNukeBoy; +import com.hbm.gui.container.ContainerNukeFleija; +import com.hbm.gui.container.ContainerNukeFurnace; +import com.hbm.gui.container.ContainerNukeGadget; +import com.hbm.gui.container.ContainerNukeMan; +import com.hbm.gui.container.ContainerNukeMike; +import com.hbm.gui.container.ContainerNukePrototype; +import com.hbm.gui.container.ContainerNukeTsar; +import com.hbm.gui.container.ContainerPuF6Tank; +import com.hbm.gui.container.ContainerReactor; +import com.hbm.gui.container.ContainerReactorMultiblock; +import com.hbm.gui.container.ContainerRtgFurnace; +import com.hbm.gui.container.ContainerTestNuke; +import com.hbm.gui.container.ContainerUF6Tank; +import com.hbm.gui.container.ContainerWatzCore; +import com.hbm.gui.gui.GUIBombMulti; +import com.hbm.gui.gui.GUIConverterHeRf; +import com.hbm.gui.gui.GUIConverterRfHe; +import com.hbm.gui.gui.GUICoreAdvanced; +import com.hbm.gui.gui.GUICoreTitanium; +import com.hbm.gui.gui.GUIFWatzCore; +import com.hbm.gui.gui.GUIFusionMultiblock; +import com.hbm.gui.gui.GUILaunchPadTier1; +import com.hbm.gui.gui.GUIMachineBattery; +import com.hbm.gui.gui.GUIMachineCMBFactory; +import com.hbm.gui.gui.GUIMachineCentrifuge; +import com.hbm.gui.gui.GUIMachineCoal; +import com.hbm.gui.gui.GUIMachineDeuterium; +import com.hbm.gui.gui.GUIMachineDiesel; +import com.hbm.gui.gui.GUIMachineElectricFurnace; +import com.hbm.gui.gui.GUIMachineGenerator; +import com.hbm.gui.gui.GUIMachinePuF6Tank; +import com.hbm.gui.gui.GUIMachineReactor; +import com.hbm.gui.gui.GUIMachineSchrabidiumTransmutator; +import com.hbm.gui.gui.GUIMachineShredder; +import com.hbm.gui.gui.GUIMachineTeleporter; +import com.hbm.gui.gui.GUIMachineUF6Tank; +import com.hbm.gui.gui.GUINukeBoy; +import com.hbm.gui.gui.GUINukeFleija; +import com.hbm.gui.gui.GUINukeFurnace; +import com.hbm.gui.gui.GUINukeGadget; +import com.hbm.gui.gui.GUINukeMan; +import com.hbm.gui.gui.GUINukeMike; +import com.hbm.gui.gui.GUINukePrototype; +import com.hbm.gui.gui.GUINukeTsar; +import com.hbm.gui.gui.GUIReactorMultiblock; +import com.hbm.gui.gui.GUIRtgFurnace; +import com.hbm.gui.gui.GUITestDiFurnace; +import com.hbm.gui.gui.GUITestNuke; +import com.hbm.gui.gui.GUIWatzCore; import com.hbm.tileentity.TileEntityBombMulti; import com.hbm.tileentity.TileEntityConverterHeRf; import com.hbm.tileentity.TileEntityConverterRfHe; @@ -90,6 +92,7 @@ import com.hbm.tileentity.TileEntityMachinePuF6Tank; import com.hbm.tileentity.TileEntityMachineReactor; import com.hbm.tileentity.TileEntityMachineSchrabidiumTransmutator; import com.hbm.tileentity.TileEntityMachineShredder; +import com.hbm.tileentity.TileEntityMachineTeleporter; import com.hbm.tileentity.TileEntityMachineUF6Tank; import com.hbm.tileentity.TileEntityNukeBoy; import com.hbm.tileentity.TileEntityNukeFleija; @@ -389,6 +392,14 @@ public class GUIHandler implements IGuiHandler { return new ContainerFWatzCore(player.inventory, (TileEntityFWatzCore) entity); } } + + case ModBlocks.guiID_machine_teleporter: + { + if(entity instanceof TileEntityMachineTeleporter) + { + return new ContainerMachineTeleporter(player.inventory, (TileEntityMachineTeleporter) entity); + } + } } return null; } @@ -673,6 +684,14 @@ public class GUIHandler implements IGuiHandler { return new GUIFWatzCore(player.inventory, (TileEntityFWatzCore) entity); } } + + case ModBlocks.guiID_machine_teleporter: + { + if(entity instanceof TileEntityMachineTeleporter) + { + return new GUIMachineTeleporter(player.inventory, (TileEntityMachineTeleporter) entity); + } + } } } return null; diff --git a/com/hbm/handler/ReactorRecipeHandler.java b/com/hbm/handler/ReactorRecipeHandler.java index 25a6434f7..0b671d243 100644 --- a/com/hbm/handler/ReactorRecipeHandler.java +++ b/com/hbm/handler/ReactorRecipeHandler.java @@ -6,9 +6,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; -import com.hbm.gui.GUIMachineReactor; -import com.hbm.gui.GUITestDiFurnace; import com.hbm.gui.MachineRecipes; +import com.hbm.gui.gui.GUIMachineReactor; +import com.hbm.gui.gui.GUITestDiFurnace; import com.hbm.handler.AlloyFurnaceRecipeHandler.Fuel; import com.hbm.handler.AlloyFurnaceRecipeHandler.SmeltingSet; diff --git a/com/hbm/handler/ShredderRecipeHandler.java b/com/hbm/handler/ShredderRecipeHandler.java index 4ce5a4afd..dadc9d485 100644 --- a/com/hbm/handler/ShredderRecipeHandler.java +++ b/com/hbm/handler/ShredderRecipeHandler.java @@ -5,12 +5,13 @@ import static codechicken.lib.gui.GuiDraw.drawTexturedModalRect; import java.awt.Rectangle; import java.util.ArrayList; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import com.hbm.gui.GUIMachineReactor; -import com.hbm.gui.GUIMachineShredder; import com.hbm.gui.MachineRecipes; +import com.hbm.gui.gui.GUIMachineReactor; +import com.hbm.gui.gui.GUIMachineShredder; import com.hbm.handler.ReactorRecipeHandler.Fuel; import com.hbm.handler.ReactorRecipeHandler.SmeltingSet; import com.hbm.lib.RefStrings; @@ -23,6 +24,7 @@ import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.ICraftingHandler; import codechicken.nei.recipe.TemplateRecipeHandler; import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect; +import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRectHandler; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; @@ -31,6 +33,11 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler { public static ArrayList fuels; + public LinkedList transferRectsRec = new LinkedList(); + public LinkedList transferRectsGui = new LinkedList(); + public LinkedList> guiRec = new LinkedList>(); + public LinkedList> guiGui = new LinkedList>(); + public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe { PositionedStack input; @@ -117,12 +124,27 @@ public class ShredderRecipeHandler extends TemplateRecipeHandler { @Override public Class getGuiClass() { - return GUIMachineShredder.class; + //return GUIMachineShredder.class; + return null; } @Override public void loadTransferRects() { - transferRects.add(new RecipeTransferRect(new Rectangle(74, 23, 24, 18), "shredding")); + //transferRectsRec = new LinkedList(); + transferRectsGui = new LinkedList(); + //guiRec = new LinkedList>(); + guiGui = new LinkedList>(); + + transferRects.add(new RecipeTransferRect(new Rectangle(74 + 6, 23, 24, 18), "shredding")); + transferRectsGui.add(new RecipeTransferRect(new Rectangle(63 - 7 + 4, 89 - 11, 34, 18), "shredding")); + //guiRec.add(GuiRecipe.class); + guiGui.add(GUIMachineShredder.class); + RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects); + //RecipeTransferRectHandler.registerRectsToGuis(guiRec, transferRectsRec); + RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui); + + //for(Class r : getRecipeTransferRectGuis()) + // System.out.println(r.toString()); } @Override diff --git a/com/hbm/items/BigSword.java b/com/hbm/items/BigSword.java deleted file mode 100644 index 0e9bc2e47..000000000 --- a/com/hbm/items/BigSword.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.hbm.items; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.item.ItemSword; -import net.minecraft.world.World; - -public class BigSword extends ItemSword { - - public World worldObj; - - public double posX; - public double posY; - public double posZ; - - public BigSword(ToolMaterial p_i45356_1_) { - super(p_i45356_1_); - } - - @Override - @SideOnly(Side.CLIENT) - public boolean isFull3D() - { - return true; - } - - /*@Override - public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer Entityplayer) { - - Vec3 look = Entityplayer.getLookVec(); - MovingObjectPosition Coord = Entityplayer.rayTrace(300, 1); - EntityLightningBolt Lightning = new EntityLightningBolt(world, 1, 1, 1); - Lightning.setPosition(Coord.blockX,Coord.blockY,Coord.blockZ); - if(!Entityplayer.worldObj.isRemote) - { - world.spawnEntityInWorld(Lightning); - } - Entityplayer.addPotionEffect(new PotionEffect(6, 20, 5)); - itemStack.damageItem(25, Entityplayer); - return itemStack; - }*/ -} diff --git a/com/hbm/items/GunFatman.java b/com/hbm/items/GunFatman.java deleted file mode 100644 index fe4920149..000000000 --- a/com/hbm/items/GunFatman.java +++ /dev/null @@ -1,161 +0,0 @@ -package com.hbm.items; - -import java.util.List; - -import com.google.common.collect.Multimap; -import com.hbm.entity.EntityMiniNuke; -import com.hbm.entity.EntityRocket; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.SharedMonsterAttributes; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.ArrowLooseEvent; -import net.minecraftforge.event.entity.player.ArrowNockEvent; - -public class GunFatman extends Item { - public static final String[] bowPullIconNameArray = new String[] {"pulling_0", "pulling_1", "pulling_2"}; - @SideOnly(Side.CLIENT) - private IIcon[] iconArray; - private static final String __OBFID = "CL_00001777"; - - public GunFatman() - { - this.maxStackSize = 1; - this.setMaxDamage(2500); - } - - /** - * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount - */ - @Override - public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) - { - int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; - - ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); - MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) - { - return; - } - j = event.charge; - - boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; - - if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_fatman_ammo)) - { - float f = j / 20.0F; - f = (f * f + f * 2.0F) / 3.0F; - - if (j < 25.0D) - { - return; - } - - if (j > 25.0F) - { - f = 25.0F; - } - - EntityMiniNuke entityarrow = new EntityMiniNuke(p_77615_2_, p_77615_3_, 3.0F); - - entityarrow.setIsCritical(true); - entityarrow.gravity = 0.3; - entityarrow.setDamage(1000); - - p_77615_1_.damageItem(1, p_77615_3_); - p_77615_2_.playSoundAtEntity(p_77615_3_, "tile.piston.out", 1.0F, 0.5F); - - if(!flag) - { - p_77615_3_.inventory.consumeInventoryItem(ModItems.gun_fatman_ammo); - } - - if (!p_77615_2_.isRemote) - { - p_77615_2_.spawnEntityInWorld(entityarrow); - } - } - } - - @Override - public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) - { - return p_77654_1_; - } - - /** - * How long it takes to use or consume an item - */ - @Override - public int getMaxItemUseDuration(ItemStack p_77626_1_) - { - return 72000; - } - - /** - * returns the action that specifies what animation to play when the items is being used - */ - @Override - public EnumAction getItemUseAction(ItemStack p_77661_1_) - { - return EnumAction.bow; - } - - /** - * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer - */ - @Override - public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) - { - ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); - MinecraftForge.EVENT_BUS.post(event); - if (event.isCanceled()) - { - return event.result; - } - - if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(ModItems.gun_fatman_ammo)) - { - p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); - } - - return p_77659_1_; - } - - /** - * Return the enchantability factor of the item, most of the time is based on material. - */ - @Override - public int getItemEnchantability() - { - return 0; - } - - public Multimap getItemAttributeModifiers() - { - Multimap multimap = super.getItemAttributeModifiers(); - multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)-0.3, 1)); - return multimap; - } - - @Override - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { - - list.add("When normal nukes aren't enough..."); - list.add(""); - list.add("Ammo: Mini Nukes"); - list.add("Damage: 1000"); - list.add("Creates small nuclear explosion."); - } -} diff --git a/com/hbm/items/ItemClip.java b/com/hbm/items/ItemClip.java deleted file mode 100644 index e15082788..000000000 --- a/com/hbm/items/ItemClip.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.hbm.items; - -import com.hbm.blocks.ModBlocks; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.world.World; - -public class ItemClip extends Item { - - public ItemClip() - { - this.setMaxDamage(1); - } - - @Override - public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { - stack.stackSize--; - if(stack.stackSize <= 0) - stack.damageItem(5, player); - - if(this == ModItems.clip_revolver_iron) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_iron_ammo, 20))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_iron_ammo, 20), false); - } - } - - if(this == ModItems.clip_revolver) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_ammo, 12))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_ammo, 12), false); - } - } - - if(this == ModItems.clip_revolver_gold) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_gold_ammo, 4))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_gold_ammo, 4), false); - } - } - - if(this == ModItems.clip_revolver_schrabidium) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_schrabidium_ammo, 2))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_schrabidium_ammo, 2), false); - } - } - - if(this == ModItems.clip_rpg) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 3))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_rpg_ammo, 3), false); - } - } - - if(this == ModItems.clip_osipr) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_osipr_ammo, 30))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_osipr_ammo, 30), false); - } - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_osipr_ammo2, 1))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_osipr_ammo2, 1), false); - } - } - - if(this == ModItems.clip_xvl1456) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_xvl1456_ammo, 60))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_xvl1456_ammo, 60), false); - } - } - - if(this == ModItems.clip_revolver_lead) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_lead_ammo, 12))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_lead_ammo, 12), false); - } - } - - if(this == ModItems.clip_revolver_cursed) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_cursed_ammo, 17))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_cursed_ammo, 17), false); - } - } - - if(this == ModItems.clip_fatman) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_fatman_ammo, 6))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_fatman_ammo, 6), false); - } - } - - if(this == ModItems.clip_mp) - { - if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mp_ammo, 30))) - { - player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp_ammo, 30), false); - } - } - - return stack; - - } -} diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 02f774db1..a5f5c1d2b 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -2,6 +2,83 @@ package com.hbm.items; import com.hbm.blocks.ModBlocks; import com.hbm.handler.BucketHandler; +import com.hbm.items.bomb.ItemBoy; +import com.hbm.items.bomb.ItemFleija; +import com.hbm.items.bomb.ItemGadget; +import com.hbm.items.bomb.ItemMan; +import com.hbm.items.bomb.ItemManMike; +import com.hbm.items.bomb.ItemMike; +import com.hbm.items.bomb.ItemTsar; +import com.hbm.items.food.ItemAppleEuphemium; +import com.hbm.items.food.ItemAppleSchrabidium; +import com.hbm.items.food.ItemCottonCandy; +import com.hbm.items.food.ItemEnergy; +import com.hbm.items.food.ItemLemon; +import com.hbm.items.food.ItemNugget; +import com.hbm.items.food.ItemSchnitzelVegan; +import com.hbm.items.food.ItemTemFlakes; +import com.hbm.items.food.ItemWaffle; +import com.hbm.items.gear.ArmorEuphemium; +import com.hbm.items.gear.ArmorHazmat; +import com.hbm.items.gear.ArmorModel; +import com.hbm.items.gear.ArmorSchrabidium; +import com.hbm.items.gear.ArmorT45; +import com.hbm.items.gear.ArmorTest; +import com.hbm.items.gear.AxeSchrabidium; +import com.hbm.items.gear.BigSword; +import com.hbm.items.gear.HoeSchrabidium; +import com.hbm.items.gear.MaskOfInfamy; +import com.hbm.items.gear.ModArmor; +import com.hbm.items.gear.ModAxe; +import com.hbm.items.gear.ModHoe; +import com.hbm.items.gear.ModPickaxe; +import com.hbm.items.gear.ModSpade; +import com.hbm.items.gear.ModSword; +import com.hbm.items.gear.PickaxeSchrabidium; +import com.hbm.items.gear.RedstoneSword; +import com.hbm.items.gear.SpadeSchrabidium; +import com.hbm.items.gear.SwordSchrabidium; +import com.hbm.items.gear.WeaponSpecial; +import com.hbm.items.special.ItemBattery; +import com.hbm.items.special.ItemBlades; +import com.hbm.items.special.ItemCapacitor; +import com.hbm.items.special.ItemCell; +import com.hbm.items.special.ItemChopper; +import com.hbm.items.special.ItemCustomLore; +import com.hbm.items.special.ItemDrop; +import com.hbm.items.special.ItemFuelRod; +import com.hbm.items.special.ItemModRecord; +import com.hbm.items.special.ItemRadioactive; +import com.hbm.items.special.ItemStarterKit; +import com.hbm.items.special.ItemSyringe; +import com.hbm.items.special.ItemTankWaste; +import com.hbm.items.special.ItemTeleLink; +import com.hbm.items.special.WatzFuel; +import com.hbm.items.tool.ItemCrateCaller; +import com.hbm.items.tool.ItemDesingator; +import com.hbm.items.tool.ItemDetonator; +import com.hbm.items.tool.ItemMatch; +import com.hbm.items.tool.ItemModBucket; +import com.hbm.items.tool.ItemRamManipulator; +import com.hbm.items.tool.ItemWand; +import com.hbm.items.tool.ItemWandD; +import com.hbm.items.tool.ItemWandS; +import com.hbm.items.weapon.GunBaleFlare; +import com.hbm.items.weapon.GunCryolator; +import com.hbm.items.weapon.GunEMPRay; +import com.hbm.items.weapon.GunFatman; +import com.hbm.items.weapon.GunImmolator; +import com.hbm.items.weapon.GunMIRV; +import com.hbm.items.weapon.GunMP; +import com.hbm.items.weapon.GunOSIPR; +import com.hbm.items.weapon.GunRevolver; +import com.hbm.items.weapon.GunRpg; +import com.hbm.items.weapon.GunSMG; +import com.hbm.items.weapon.GunSuicide; +import com.hbm.items.weapon.GunXVL1456; +import com.hbm.items.weapon.GunZOMG; +import com.hbm.items.weapon.ItemClip; +import com.hbm.items.weapon.ItemGrenade; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; @@ -95,6 +172,7 @@ public class ModItems { public static Item nugget_beryllium; public static Item plate_gold; public static Item hazmat_cloth; + public static Item filter_coal; public static Item plate_advanced_alloy; public static Item plate_combine_steel; public static Item plate_mixed; @@ -112,6 +190,7 @@ public class ModItems { public static Item powder_titanium; public static Item powder_tungsten; public static Item powder_uranium; + public static Item powder_plutonium; public static Item dust; public static Item powder_power; @@ -119,6 +198,7 @@ public class ModItems { public static Item powder_iodine; public static Item powder_neodymium; public static Item powder_astatine; + public static Item powder_caesium; public static Item powder_advanced_alloy; public static Item powder_coal; @@ -210,6 +290,9 @@ public class ModItems { public static Item chopper_blades; public static Item combine_scrap; + public static Item telepad; + public static Item entanglement_kit; + public static Item blades_gold; public static Item blades_aluminium; public static Item blades_iron; @@ -256,6 +339,7 @@ public class ModItems { public static Item canister_empty; public static Item canister_fuel; public static Item canister_napalm; + public static Item canister_NITAN; public static Item syringe_empty; public static Item syringe_antidote; @@ -368,9 +452,12 @@ public class ModItems { public static Item pellet_cluster; public static Item powder_fire; public static Item powder_poison; + public static Item powder_thermite; public static Item pellet_gas; + public static Item magnetron; public static Item designator; + public static Item linker; public static Item missile_generic; public static Item missile_anti_ballistic; @@ -406,16 +493,29 @@ public class ModItems { public static Item gun_revolver_cursed_ammo; public static Item gun_fatman; public static Item gun_fatman_ammo; + public static Item gun_mirv; + public static Item gun_mirv_ammo; + public static Item gun_bf; + public static Item gun_bf_ammo; + public static Item gun_mp40; + public static Item gun_mp40_ammo; public static Item gun_xvl1456; public static Item gun_xvl1456_ammo; public static Item gun_osipr; public static Item gun_osipr_ammo; public static Item gun_osipr_ammo2; + public static Item gun_immolator; + public static Item gun_immolator_ammo; + 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_zomg; public static Item gun_super_shotgun; public static Item gun_moist_nugget; + public static Item gun_revolver_inverted; + public static Item gun_emp; + public static Item gun_emp_ammo; public static Item gun_waluigi; public static Item grenade_generic; @@ -432,8 +532,10 @@ public class ModItems { public static Item grenade_schrabidium; public static Item grenade_lemon; public static Item grenade_mk2; + public static Item grenade_aschrab; public static Item grenade_nuke; public static Item grenade_nuclear; + public static Item grenade_zomg; public static Item bomb_waffle; public static Item schnitzel_vegan; @@ -529,6 +631,13 @@ public class ModItems { public static Item alloy_plate; public static Item alloy_legs; public static Item alloy_boots; + public static Item cmb_helmet; + public static Item cmb_plate; + public static Item cmb_legs; + public static Item cmb_boots; + public static Item paa_plate; + public static Item paa_legs; + public static Item paa_boots; public static Item schrabidium_sword; public static Item schrabidium_pickaxe; @@ -550,6 +659,11 @@ public class ModItems { public static Item alloy_axe; public static Item alloy_shovel; public static Item alloy_hoe; + public static Item cmb_sword; + public static Item cmb_pickaxe; + public static Item cmb_axe; + public static Item cmb_shovel; + public static Item cmb_hoe; public static Item matchstick; @@ -564,6 +678,11 @@ public class ModItems { public static Item hazmat_legs; public static Item hazmat_boots; + public static Item hazmat_paa_helmet; + public static Item hazmat_paa_plate; + public static Item hazmat_paa_legs; + public static Item hazmat_paa_boots; + public static Item wand; public static Item wand_s; public static Item wand_d; @@ -601,18 +720,31 @@ public class ModItems { public static Item clip_revolver_cursed; public static Item clip_rpg; public static Item clip_fatman; + public static Item clip_mirv; + public static Item clip_bf; + public static Item clip_mp40; public static Item clip_osipr; + public static Item clip_immolator; + public static Item clip_cryolator; public static Item clip_mp; public static Item clip_xvl1456; + public static Item clip_emp; public static Item igniter; public static Item detonator; public static Item crate_caller; public static Item remote; + public static Item chopper; public static Item bucket_mud; public static Item bucket_acid; public static Item bucket_toxic; + + public static Item record_lc; + public static Item record_ss; + public static Item record_vc; + + public static Item letter; public static Item smoke1; public static Item smoke2; @@ -631,6 +763,28 @@ public class ModItems { public static Item b_smoke7; public static Item b_smoke8; public static Item energy_ball; + public static Item discharge; + public static Item empblast; + public static Item flame_1; + public static Item flame_2; + public static Item flame_3; + public static Item flame_4; + public static Item flame_5; + public static Item flame_6; + public static Item flame_7; + public static Item flame_8; + public static Item flame_9; + public static Item flame_10; + public static Item ln2_1; + public static Item ln2_2; + public static Item ln2_3; + public static Item ln2_4; + public static Item ln2_5; + public static Item ln2_6; + public static Item ln2_7; + public static Item ln2_8; + public static Item ln2_9; + public static Item ln2_10; public static void initializeItem() { @@ -715,6 +869,7 @@ public class ModItems { nugget_schrabidium = new ItemCustomLore().setUnlocalizedName("nugget_schrabidium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_schrabidium"); nugget_beryllium = new Item().setUnlocalizedName("nugget_beryllium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_beryllium"); hazmat_cloth = new Item().setUnlocalizedName("hazmat_cloth").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":hazmat_cloth"); + filter_coal = new Item().setUnlocalizedName("filter_coal").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":filter_coal"); ingot_hes = new ItemRadioactive().setUnlocalizedName("ingot_hes").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_hes"); ingot_les = new ItemRadioactive().setUnlocalizedName("ingot_les").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_les"); nugget_hes = new ItemRadioactive().setUnlocalizedName("nugget_hes").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_hes"); @@ -723,7 +878,7 @@ public class ModItems { powder_lead = new Item().setUnlocalizedName("powder_lead").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_lead"); powder_neptunium = new ItemCustomLore().setUnlocalizedName("powder_neptunium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_neptunium"); - powder_schrabidium = new ItemRadioactive().setUnlocalizedName("powder_schrabidium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_schrabidium"); + powder_schrabidium = new ItemCustomLore().setUnlocalizedName("powder_schrabidium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_schrabidium"); powder_aluminium = new Item().setUnlocalizedName("powder_aluminium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_aluminium"); powder_beryllium = new Item().setUnlocalizedName("powder_beryllium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_beryllium"); powder_copper = new Item().setUnlocalizedName("powder_copper").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_copper"); @@ -732,6 +887,7 @@ public class ModItems { powder_titanium = new Item().setUnlocalizedName("powder_titanium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_titanium"); powder_tungsten = new Item().setUnlocalizedName("powder_tungsten").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_tungsten"); powder_uranium = new ItemRadioactive().setUnlocalizedName("powder_uranium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_uranium"); + powder_plutonium = new ItemRadioactive().setUnlocalizedName("powder_plutonium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_plutonium"); dust = new ItemCustomLore().setUnlocalizedName("dust").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":dust"); powder_advanced_alloy = new Item().setUnlocalizedName("powder_advanced_alloy").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_advanced_alloy"); powder_coal = new Item().setUnlocalizedName("powder_coal").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_coal"); @@ -749,6 +905,7 @@ public class ModItems { powder_thorium = new ItemCustomLore().setUnlocalizedName("powder_thorium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_thorium"); powder_neodymium = new ItemCustomLore().setUnlocalizedName("powder_neodymium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_neodymium"); powder_astatine = new ItemCustomLore().setUnlocalizedName("powder_astatine").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_astatine"); + powder_caesium = new ItemCustomLore().setUnlocalizedName("powder_caesium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_caesium"); coil_copper = new Item().setUnlocalizedName("coil_copper").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":coil_copper"); coil_copper_torus = new Item().setUnlocalizedName("coil_copper_torus").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":coil_copper_torus"); @@ -818,6 +975,9 @@ public class ModItems { chopper_wing = new Item().setUnlocalizedName("chopper_wing").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":chopper_wing"); chopper_blades = new Item().setUnlocalizedName("chopper_blades").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":chopper_blades"); combine_scrap = new Item().setUnlocalizedName("combine_scrap").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":combine_scrap"); + + telepad = new Item().setUnlocalizedName("telepad").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":telepad"); + entanglement_kit = new Item().setUnlocalizedName("entanglement_kit").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":entanglement_kit"); circuit_aluminium = new Item().setUnlocalizedName("circuit_aluminium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":circuit_aluminium"); circuit_copper = new Item().setUnlocalizedName("circuit_copper").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":circuit_copper"); @@ -862,6 +1022,7 @@ public class ModItems { canister_empty = new ItemCustomLore().setUnlocalizedName("canister_empty").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":canister_empty"); canister_fuel = new ItemCustomLore().setUnlocalizedName("canister_fuel").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_fuel"); canister_napalm = new ItemCustomLore().setUnlocalizedName("canister_napalm").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_napalm"); + canister_NITAN = new ItemCustomLore().setUnlocalizedName("canister_NITAN").setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.canister_empty).setTextureName(RefStrings.MODID + ":canister_superfuel"); tank_waste = new ItemTankWaste().setUnlocalizedName("tank_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts); @@ -946,29 +1107,31 @@ public class ModItems { rod_dual_tritium = new ItemCustomLore().setUnlocalizedName("rod_dual_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_tritium"); rod_quad_tritium = new ItemCustomLore().setUnlocalizedName("rod_quad_tritium").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_tritium"); - trinitite = new Item().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":trinitite_new"); - nuclear_waste = new Item().setUnlocalizedName("nuclear_waste").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nuclear_waste"); + trinitite = new ItemCustomLore().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":trinitite_new"); + nuclear_waste = new ItemCustomLore().setUnlocalizedName("nuclear_waste").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nuclear_waste"); scrap = new Item().setUnlocalizedName("scrap").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":scrap"); - rod_uranium_fuel_depleted = new Item().setUnlocalizedName("rod_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel_depleted"); - rod_dual_uranium_fuel_depleted = new Item().setUnlocalizedName("rod_dual_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel_depleted"); - rod_quad_uranium_fuel_depleted = new Item().setUnlocalizedName("rod_quad_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel_depleted"); - rod_plutonium_fuel_depleted = new Item().setUnlocalizedName("rod_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel_depleted"); - rod_dual_plutonium_fuel_depleted = new Item().setUnlocalizedName("rod_dual_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel_depleted"); - rod_quad_plutonium_fuel_depleted = new Item().setUnlocalizedName("rod_quad_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel_depleted"); - rod_mox_fuel_depleted = new Item().setUnlocalizedName("rod_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel_depleted"); - rod_dual_mox_fuel_depleted = new Item().setUnlocalizedName("rod_dual_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel_depleted"); - rod_quad_mox_fuel_depleted = new Item().setUnlocalizedName("rod_quad_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel_depleted"); - rod_schrabidium_fuel_depleted = new Item().setUnlocalizedName("rod_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel_depleted"); - rod_dual_schrabidium_fuel_depleted = new Item().setUnlocalizedName("rod_dual_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel_depleted"); - rod_quad_schrabidium_fuel_depleted = new Item().setUnlocalizedName("rod_quad_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel_depleted"); - rod_waste = new Item().setUnlocalizedName("rod_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_waste"); - rod_dual_waste = new Item().setUnlocalizedName("rod_dual_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_waste"); - rod_quad_waste = new Item().setUnlocalizedName("rod_quad_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_waste"); + rod_uranium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium_fuel_depleted"); + rod_dual_uranium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_dual_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_uranium_fuel_depleted"); + rod_quad_uranium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_quad_uranium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_uranium_fuel_depleted"); + rod_plutonium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_plutonium_fuel_depleted"); + rod_dual_plutonium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_dual_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_plutonium_fuel_depleted"); + rod_quad_plutonium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_quad_plutonium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_plutonium_fuel_depleted"); + rod_mox_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_mox_fuel_depleted"); + rod_dual_mox_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_dual_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_mox_fuel_depleted"); + rod_quad_mox_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_quad_mox_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_mox_fuel_depleted"); + rod_schrabidium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_schrabidium_fuel_depleted"); + rod_dual_schrabidium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_dual_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_schrabidium_fuel_depleted"); + rod_quad_schrabidium_fuel_depleted = new ItemCustomLore().setUnlocalizedName("rod_quad_schrabidium_fuel_depleted").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_schrabidium_fuel_depleted"); + rod_waste = new ItemCustomLore().setUnlocalizedName("rod_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_waste"); + rod_dual_waste = new ItemCustomLore().setUnlocalizedName("rod_dual_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_dual_empty).setTextureName(RefStrings.MODID + ":rod_dual_waste"); + rod_quad_waste = new ItemCustomLore().setUnlocalizedName("rod_quad_waste").setMaxStackSize(1).setCreativeTab(MainRegistry.tabParts).setContainerItem(ModItems.rod_quad_empty).setTextureName(RefStrings.MODID + ":rod_quad_waste"); pellet_cluster = new ItemCustomLore().setUnlocalizedName("pellet_cluster").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_cluster"); powder_fire = new ItemCustomLore().setUnlocalizedName("powder_fire").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_fire"); powder_poison = new ItemCustomLore().setUnlocalizedName("powder_poison").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_poison"); + powder_thermite = new ItemCustomLore().setUnlocalizedName("powder_thermite").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_thermite"); pellet_gas = new ItemCustomLore().setUnlocalizedName("pellet_gas").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_gas"); + magnetron = new ItemCustomLore().setUnlocalizedName("magnetron").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":magnetron_alt"); pellet_schrabidium = new WatzFuel(50000, 140000, 0.975F, 200, 1.05F, 1.05F).setUnlocalizedName("pellet_schrabidium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_schrabidium").setMaxStackSize(1); pellet_hes = new WatzFuel(108000, 65000, 1F, 85, 1, 1.025F).setUnlocalizedName("pellet_hes").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":pellet_hes").setMaxStackSize(1); @@ -1013,34 +1176,49 @@ public class ModItems { gun_revolver_cursed_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_cursed_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_revolver_cursed_ammo"); gun_revolver_cursed = new GunRevolver(gun_revolver_cursed_ammo, 25, 40, false, false).setMaxDamage(5000).setUnlocalizedName("gun_revolver_cursed").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_revolver_cursed"); gun_fatman_ammo = new Item().setUnlocalizedName("gun_fatman_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_fatman_ammo"); - gun_fatman = new GunFatman().setMaxDamage(5000).setUnlocalizedName("gun_fatman").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_fatman"); + gun_fatman = new GunFatman().setMaxDamage(2500).setUnlocalizedName("gun_fatman").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_fatman"); + gun_mirv_ammo = new Item().setUnlocalizedName("gun_mirv_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_mirv_ammo"); + gun_mirv = new GunMIRV().setMaxDamage(2500).setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_mirv"); + gun_bf_ammo = new Item().setUnlocalizedName("gun_bf_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf_ammo"); + gun_bf = new GunBaleFlare().setMaxDamage(2500).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf"); + gun_mp40_ammo = new Item().setUnlocalizedName("gun_mp40_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_mp40_ammo"); + gun_mp40 = new GunSMG().setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_mp40"); gun_xvl1456_ammo = new Item().setUnlocalizedName("gun_xvl1456_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_xvl1456_ammo"); gun_xvl1456 = new GunXVL1456().setUnlocalizedName("gun_xvl1456").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_xvl1456"); gun_osipr_ammo = new Item().setUnlocalizedName("gun_osipr_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_osipr_ammo"); gun_osipr_ammo2 = new Item().setUnlocalizedName("gun_osipr_ammo2").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_osipr_ammo2"); gun_osipr = new GunOSIPR().setUnlocalizedName("gun_osipr").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_osipr"); + gun_immolator_ammo = new Item().setUnlocalizedName("gun_immolator_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_immolator_ammo"); + gun_immolator = new GunImmolator().setUnlocalizedName("gun_immolator").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_immolator"); + gun_cryolator_ammo = new Item().setUnlocalizedName("gun_cryolator_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_cryolator_ammo"); + gun_cryolator = new GunCryolator().setUnlocalizedName("gun_cryolator").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_cryolator"); gun_mp_ammo = new ItemCustomLore().setUnlocalizedName("gun_mp_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_pm_ammo"); gun_mp = new GunMP().setUnlocalizedName("gun_mp").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_pm"); gun_zomg = new GunZOMG().setUnlocalizedName("gun_zomg").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_zomg"); + gun_revolver_inverted = new GunSuicide().setUnlocalizedName("gun_revolver_inverted").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_revolver_inverted"); + gun_emp_ammo = new Item().setUnlocalizedName("gun_emp_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_emp_ammo"); + gun_emp = new GunEMPRay().setUnlocalizedName("gun_emp").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_emp"); gun_super_shotgun = new ItemCustomLore().setUnlocalizedName("gun_super_shotgun").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_super_shotgun"); gun_moist_nugget = new ItemNugget(3, false).setUnlocalizedName("gun_moist_nugget").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_moist_nugget"); grenade_generic = new ItemGrenade().setUnlocalizedName("grenade_generic").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_generic"); grenade_strong = new ItemGrenade().setUnlocalizedName("grenade_strong").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_strong"); - grenade_frag = new ItemGrenade().setUnlocalizedName("grenade_frag").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_frag"); - grenade_fire = new ItemGrenade().setUnlocalizedName("grenade_fire").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_fire"); - grenade_cluster = new ItemGrenade().setUnlocalizedName("grenade_cluster").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_cluster"); - grenade_flare = new ItemGrenade().setUnlocalizedName("grenade_flare").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_flare"); - grenade_electric = new ItemGrenade().setUnlocalizedName("grenade_electric").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_electric"); - grenade_poison = new ItemGrenade().setUnlocalizedName("grenade_poison").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_poison"); - grenade_gas = new ItemGrenade().setUnlocalizedName("grenade_gas").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_gas"); - grenade_plasma = new ItemGrenade().setUnlocalizedName("grenade_plasma").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_plasma"); - grenade_tau = new ItemGrenade().setUnlocalizedName("grenade_tau").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_tau"); - grenade_schrabidium = new ItemGrenade().setUnlocalizedName("grenade_schrabidium").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_schrabidium"); + grenade_frag = new ItemGrenade().setUnlocalizedName("grenade_frag").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_frag_alt"); + grenade_fire = new ItemGrenade().setUnlocalizedName("grenade_fire").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_fire_alt"); + grenade_cluster = new ItemGrenade().setUnlocalizedName("grenade_cluster").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_cluster_alt"); + grenade_flare = new ItemGrenade().setUnlocalizedName("grenade_flare").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_flare_alt"); + grenade_electric = new ItemGrenade().setUnlocalizedName("grenade_electric").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_electric_alt"); + grenade_poison = new ItemGrenade().setUnlocalizedName("grenade_poison").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_poison_alt"); + grenade_gas = new ItemGrenade().setUnlocalizedName("grenade_gas").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_gas_alt"); + grenade_plasma = new ItemGrenade().setUnlocalizedName("grenade_plasma").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_plasma_alt"); + grenade_tau = new ItemGrenade().setUnlocalizedName("grenade_tau").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_tau_alt"); + grenade_schrabidium = new ItemGrenade().setUnlocalizedName("grenade_schrabidium").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_schrabidium_alt"); grenade_lemon = new ItemGrenade().setUnlocalizedName("grenade_lemon").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_lemon"); grenade_mk2 = new ItemGrenade().setUnlocalizedName("grenade_mk2").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_mk2_alt"); - grenade_nuke = new ItemGrenade().setUnlocalizedName("grenade_nuke").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_nuke"); + grenade_aschrab = new ItemGrenade().setUnlocalizedName("grenade_aschrab").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_aschrab"); + grenade_nuke = new ItemGrenade().setUnlocalizedName("grenade_nuke").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_nuke_alt"); grenade_nuclear = new ItemGrenade().setUnlocalizedName("grenade_nuclear").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_nuclear"); + grenade_zomg = new ItemGrenade().setUnlocalizedName("grenade_zomg").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_zomg"); bomb_waffle = new ItemWaffle(20, false).setUnlocalizedName("bomb_waffle").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":bomb_waffle"); schnitzel_vegan = new ItemSchnitzelVegan(0, true).setUnlocalizedName("schnitzel_vegan").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":schnitzel_vegan"); @@ -1126,9 +1304,15 @@ public class ModItems { clip_revolver_cursed = new ItemClip().setUnlocalizedName("clip_revolver_cursed").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_revolver_cursed"); clip_rpg = new ItemClip().setUnlocalizedName("clip_rpg").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_rpg"); clip_fatman = new ItemClip().setUnlocalizedName("clip_fatman").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_fatman"); + clip_mirv = new ItemClip().setUnlocalizedName("clip_mirv").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_mirv"); + clip_bf = new ItemClip().setUnlocalizedName("clip_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":clip_bf"); + clip_mp40 = new ItemClip().setUnlocalizedName("clip_mp40").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_mp40"); clip_osipr = new ItemClip().setUnlocalizedName("clip_osipr").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_osipr"); + clip_immolator = new ItemClip().setUnlocalizedName("clip_immolator").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_immolator"); + clip_cryolator = new ItemClip().setUnlocalizedName("clip_cryolator").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_cryolator"); clip_mp = new ItemClip().setUnlocalizedName("clip_mp").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_mp"); clip_xvl1456 = new ItemClip().setUnlocalizedName("clip_xvl1456").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_xvl1456"); + clip_emp = new ItemClip().setUnlocalizedName("clip_emp").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":clip_emp"); ingot_euphemium = new ItemCustomLore().setUnlocalizedName("ingot_euphemium").setTextureName(RefStrings.MODID + ":ingot_euphemium"); nugget_euphemium = new ItemCustomLore().setUnlocalizedName("nugget_euphemium").setTextureName(RefStrings.MODID + ":nugget_euphemium"); @@ -1140,6 +1324,8 @@ public class ModItems { detonator = new ItemDetonator().setUnlocalizedName("detonator").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":detonator"); crate_caller = new ItemCrateCaller().setUnlocalizedName("crate_caller").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":crate_caller"); remote = new ItemRamManipulator().setUnlocalizedName("remote").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":remote"); + chopper = new ItemChopper().setUnlocalizedName("chopper").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":chopper"); + linker = new ItemTeleLink().setUnlocalizedName("linker").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":linker"); euphemium_helmet = new ArmorEuphemium(MainRegistry.enumArmorMaterialEuphemium, 6, 0).setUnlocalizedName("euphemium_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_helmet"); euphemium_plate = new ArmorEuphemium(MainRegistry.enumArmorMaterialEuphemium, 6, 1).setUnlocalizedName("euphemium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":euphemium_plate"); @@ -1160,18 +1346,25 @@ public class ModItems { schrabidium_plate = new ArmorSchrabidium(MainRegistry.enumArmorMaterialSchrabidium, 7, 1).setUnlocalizedName("schrabidium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_plate"); schrabidium_legs = new ArmorSchrabidium(MainRegistry.enumArmorMaterialSchrabidium, 7, 2).setUnlocalizedName("schrabidium_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_legs"); schrabidium_boots = new ArmorSchrabidium(MainRegistry.enumArmorMaterialSchrabidium, 7, 3).setUnlocalizedName("schrabidium_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_boots"); - titanium_helmet = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 0).setUnlocalizedName("titanium_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_helmet"); - titanium_plate = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 1).setUnlocalizedName("titanium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_plate"); - titanium_legs = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 2).setUnlocalizedName("titanium_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_legs"); - titanium_boots = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 3).setUnlocalizedName("titanium_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_boots"); - steel_helmet = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 0).setUnlocalizedName("steel_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_helmet"); - steel_plate = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 1).setUnlocalizedName("steel_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_plate"); - steel_legs = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 2).setUnlocalizedName("steel_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_legs"); - steel_boots = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 3).setUnlocalizedName("steel_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_boots"); - alloy_helmet = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 0).setUnlocalizedName("alloy_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_helmet"); - alloy_plate = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 1).setUnlocalizedName("alloy_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_plate"); - alloy_legs = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 2).setUnlocalizedName("alloy_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_legs"); - alloy_boots = new ModArmor(MainRegistry.enumArmorMaterialSchrabidium, 7, 3).setUnlocalizedName("alloy_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_boots"); + titanium_helmet = new ModArmor(MainRegistry.enumArmorMaterialTitanium, 7, 0).setUnlocalizedName("titanium_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_helmet"); + titanium_plate = new ModArmor(MainRegistry.enumArmorMaterialTitanium, 7, 1).setUnlocalizedName("titanium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_plate"); + titanium_legs = new ModArmor(MainRegistry.enumArmorMaterialTitanium, 7, 2).setUnlocalizedName("titanium_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_legs"); + titanium_boots = new ModArmor(MainRegistry.enumArmorMaterialTitanium, 7, 3).setUnlocalizedName("titanium_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_boots"); + steel_helmet = new ModArmor(MainRegistry.enumArmorMaterialSteel, 7, 0).setUnlocalizedName("steel_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_helmet"); + steel_plate = new ModArmor(MainRegistry.enumArmorMaterialSteel, 7, 1).setUnlocalizedName("steel_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_plate"); + steel_legs = new ModArmor(MainRegistry.enumArmorMaterialSteel, 7, 2).setUnlocalizedName("steel_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_legs"); + steel_boots = new ModArmor(MainRegistry.enumArmorMaterialSteel, 7, 3).setUnlocalizedName("steel_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":steel_boots"); + alloy_helmet = new ModArmor(MainRegistry.enumArmorMaterialAlloy, 7, 0).setUnlocalizedName("alloy_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_helmet"); + alloy_plate = new ModArmor(MainRegistry.enumArmorMaterialAlloy, 7, 1).setUnlocalizedName("alloy_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_plate"); + alloy_legs = new ModArmor(MainRegistry.enumArmorMaterialAlloy, 7, 2).setUnlocalizedName("alloy_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_legs"); + alloy_boots = new ModArmor(MainRegistry.enumArmorMaterialAlloy, 7, 3).setUnlocalizedName("alloy_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_boots"); + cmb_helmet = new ModArmor(MainRegistry.enumArmorMaterialCmb, 7, 0).setUnlocalizedName("cmb_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_helmet"); + cmb_plate = new ModArmor(MainRegistry.enumArmorMaterialCmb, 7, 1).setUnlocalizedName("cmb_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_plate"); + cmb_legs = new ModArmor(MainRegistry.enumArmorMaterialCmb, 7, 2).setUnlocalizedName("cmb_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_legs"); + cmb_boots = new ModArmor(MainRegistry.enumArmorMaterialCmb, 7, 3).setUnlocalizedName("cmb_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_boots"); + paa_plate = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 1).setUnlocalizedName("paa_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_plate"); + paa_legs = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 2).setUnlocalizedName("paa_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_legs"); + paa_boots = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 3).setUnlocalizedName("paa_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_boots"); schrabidium_sword = new SwordSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_sword").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_sword"); schrabidium_pickaxe = new PickaxeSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_pickaxe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_pickaxe"); @@ -1193,6 +1386,11 @@ public class ModItems { alloy_axe = new ModAxe(MainRegistry.enumToolMaterialAlloy).setUnlocalizedName("alloy_axe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_axe"); alloy_shovel = new ModSpade(MainRegistry.enumToolMaterialAlloy).setUnlocalizedName("alloy_shovel").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_shovel"); alloy_hoe = new ModHoe(MainRegistry.enumToolMaterialAlloy).setUnlocalizedName("alloy_hoe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":alloy_hoe"); + cmb_sword = new ModSword(MainRegistry.enumToolMaterialCmb).setUnlocalizedName("cmb_sword").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_sword"); + cmb_pickaxe = new ModPickaxe(MainRegistry.enumToolMaterialCmb).setUnlocalizedName("cmb_pickaxe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_pickaxe"); + cmb_axe = new ModAxe(MainRegistry.enumToolMaterialCmb).setUnlocalizedName("cmb_axe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_axe"); + cmb_shovel = new ModSpade(MainRegistry.enumToolMaterialCmb).setUnlocalizedName("cmb_shovel").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_shovel"); + cmb_hoe = new ModHoe(MainRegistry.enumToolMaterialCmb).setUnlocalizedName("cmb_hoe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cmb_hoe"); mask_of_infamy = new MaskOfInfamy(ArmorMaterial.IRON, 8, 0).setUnlocalizedName("mask_of_infamy").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mask_of_infamy"); @@ -1200,6 +1398,10 @@ public class ModItems { hazmat_plate = new ArmorHazmat(MainRegistry.enumArmorMaterialHazmat, 9, 1).setUnlocalizedName("hazmat_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_plate"); hazmat_legs = new ArmorHazmat(MainRegistry.enumArmorMaterialHazmat, 9, 2).setUnlocalizedName("hazmat_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_legs"); hazmat_boots = new ArmorHazmat(MainRegistry.enumArmorMaterialHazmat, 9, 3).setUnlocalizedName("hazmat_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_boots"); + hazmat_paa_helmet = new ArmorHazmat(MainRegistry.enumArmorMaterialPaa, 9, 0).setUnlocalizedName("hazmat_paa_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_paa_helmet"); + hazmat_paa_plate = new ArmorHazmat(MainRegistry.enumArmorMaterialPaa, 9, 1).setUnlocalizedName("hazmat_paa_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_paa_plate"); + hazmat_paa_legs = new ArmorHazmat(MainRegistry.enumArmorMaterialPaa, 9, 2).setUnlocalizedName("hazmat_paa_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_paa_legs"); + hazmat_paa_boots = new ArmorHazmat(MainRegistry.enumArmorMaterialPaa, 9, 3).setUnlocalizedName("hazmat_paa_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":hazmat_paa_boots"); cape_test = new ArmorModel(MainRegistry.enumArmorMaterialEmerald, 9, 1).setUnlocalizedName("cape_test").setCreativeTab(MainRegistry.tabTest).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cape_test"); cape_radiation = new ArmorModel(ArmorMaterial.CHAIN, 9, 1).setUnlocalizedName("cape_radiation").setCreativeTab(MainRegistry.tabNuke).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cape_radiation"); @@ -1218,6 +1420,12 @@ public class ModItems { bucket_acid = new ItemModBucket(ModBlocks.acid_block).setUnlocalizedName("bucket_acid").setContainerItem(Items.bucket).setCreativeTab(MainRegistry.tabBlock).setTextureName(RefStrings.MODID + ":bucket_acid"); bucket_toxic = new ItemModBucket(ModBlocks.toxic_block).setUnlocalizedName("bucket_toxic").setContainerItem(Items.bucket).setCreativeTab(MainRegistry.tabBlock).setTextureName(RefStrings.MODID + ":bucket_toxic"); + record_lc = new ItemModRecord("lc").setUnlocalizedName("record_lc").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_lc"); + record_ss = new ItemModRecord("ss").setUnlocalizedName("record_ss").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_ss"); + record_vc = new ItemModRecord("vc").setUnlocalizedName("record_vc").setCreativeTab(CreativeTabs.tabMisc).setTextureName(RefStrings.MODID + ":record_vc"); + + letter = new ItemStarterKit().setUnlocalizedName("letter").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":letter"); + smoke1 = new Item().setUnlocalizedName("smoke1").setTextureName(RefStrings.MODID + ":smoke1"); smoke2 = new Item().setUnlocalizedName("smoke2").setTextureName(RefStrings.MODID + ":smoke2"); smoke3 = new Item().setUnlocalizedName("smoke3").setTextureName(RefStrings.MODID + ":smoke3"); @@ -1235,6 +1443,28 @@ public class ModItems { b_smoke7 = new Item().setUnlocalizedName("b_smoke7").setTextureName(RefStrings.MODID + ":b_smoke7"); b_smoke8 = new Item().setUnlocalizedName("b_smoke8").setTextureName(RefStrings.MODID + ":b_smoke8"); energy_ball = new Item().setUnlocalizedName("energy_ball").setTextureName(RefStrings.MODID + ":energy_ball"); + discharge = new Item().setUnlocalizedName("discharge").setTextureName(RefStrings.MODID + ":discharge"); + empblast = new Item().setUnlocalizedName("empblast").setTextureName(RefStrings.MODID + ":empblast"); + flame_1 = new Item().setUnlocalizedName("flame_1").setTextureName(RefStrings.MODID + ":flame_1"); + flame_2 = new Item().setUnlocalizedName("flame_2").setTextureName(RefStrings.MODID + ":flame_2"); + flame_3 = new Item().setUnlocalizedName("flame_3").setTextureName(RefStrings.MODID + ":flame_3"); + flame_4 = new Item().setUnlocalizedName("flame_4").setTextureName(RefStrings.MODID + ":flame_4"); + flame_5 = new Item().setUnlocalizedName("flame_5").setTextureName(RefStrings.MODID + ":flame_5"); + flame_6 = new Item().setUnlocalizedName("flame_6").setTextureName(RefStrings.MODID + ":flame_6"); + flame_7 = new Item().setUnlocalizedName("flame_7").setTextureName(RefStrings.MODID + ":flame_7"); + flame_8 = new Item().setUnlocalizedName("flame_8").setTextureName(RefStrings.MODID + ":flame_8"); + flame_9 = new Item().setUnlocalizedName("flame_9").setTextureName(RefStrings.MODID + ":flame_9"); + flame_10 = new Item().setUnlocalizedName("flame_10").setTextureName(RefStrings.MODID + ":flame_10"); + ln2_1 = new Item().setUnlocalizedName("ln2_1").setTextureName(RefStrings.MODID + ":ln2_1"); + ln2_2 = new Item().setUnlocalizedName("ln2_2").setTextureName(RefStrings.MODID + ":ln2_2"); + ln2_3 = new Item().setUnlocalizedName("ln2_3").setTextureName(RefStrings.MODID + ":ln2_3"); + ln2_4 = new Item().setUnlocalizedName("ln2_4").setTextureName(RefStrings.MODID + ":ln2_4"); + ln2_5 = new Item().setUnlocalizedName("ln2_5").setTextureName(RefStrings.MODID + ":ln2_5"); + ln2_6 = new Item().setUnlocalizedName("ln2_6").setTextureName(RefStrings.MODID + ":ln2_6"); + ln2_7 = new Item().setUnlocalizedName("ln2_7").setTextureName(RefStrings.MODID + ":ln2_7"); + ln2_8 = new Item().setUnlocalizedName("ln2_8").setTextureName(RefStrings.MODID + ":ln2_8"); + ln2_9 = new Item().setUnlocalizedName("ln2_9").setTextureName(RefStrings.MODID + ":ln2_9"); + ln2_10 = new Item().setUnlocalizedName("ln2_10").setTextureName(RefStrings.MODID + ":ln2_10"); FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.mud_fluid, 1000), new ItemStack(ModItems.bucket_mud)); FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.acid_fluid, 1000), new ItemStack(ModItems.bucket_acid)); @@ -1308,6 +1538,7 @@ public class ModItems { GameRegistry.registerItem(powder_diamond, powder_diamond.getUnlocalizedName()); GameRegistry.registerItem(powder_emerald, powder_emerald.getUnlocalizedName()); GameRegistry.registerItem(powder_uranium, powder_uranium.getUnlocalizedName()); + GameRegistry.registerItem(powder_plutonium, powder_plutonium.getUnlocalizedName()); GameRegistry.registerItem(powder_neptunium, powder_neptunium.getUnlocalizedName()); GameRegistry.registerItem(powder_titanium, powder_titanium.getUnlocalizedName()); GameRegistry.registerItem(powder_copper, powder_copper.getUnlocalizedName()); @@ -1326,11 +1557,13 @@ public class ModItems { GameRegistry.registerItem(powder_thorium, powder_thorium.getUnlocalizedName()); GameRegistry.registerItem(powder_neodymium, powder_neodymium.getUnlocalizedName()); GameRegistry.registerItem(powder_astatine, powder_astatine.getUnlocalizedName()); + GameRegistry.registerItem(powder_caesium, powder_caesium.getUnlocalizedName()); GameRegistry.registerItem(dust, dust.getUnlocalizedName()); //Powders GameRegistry.registerItem(powder_fire, powder_fire.getUnlocalizedName()); GameRegistry.registerItem(powder_poison, powder_poison.getUnlocalizedName()); + GameRegistry.registerItem(powder_thermite, powder_thermite.getUnlocalizedName()); GameRegistry.registerItem(powder_power, powder_power.getUnlocalizedName()); //Nuggets @@ -1367,6 +1600,7 @@ public class ModItems { GameRegistry.registerItem(plate_mixed, plate_mixed.getUnlocalizedName()); GameRegistry.registerItem(plate_paa, plate_paa.getUnlocalizedName()); GameRegistry.registerItem(hazmat_cloth, hazmat_cloth.getUnlocalizedName()); + GameRegistry.registerItem(filter_coal, filter_coal.getUnlocalizedName()); //Wires GameRegistry.registerItem(wire_aluminium, wire_aluminium.getUnlocalizedName()); @@ -1396,6 +1630,10 @@ public class ModItems { GameRegistry.registerItem(thermo_unit_exo, thermo_unit_exo.getUnlocalizedName()); GameRegistry.registerItem(levitation_unit, levitation_unit.getUnlocalizedName()); + //Teleporter Parts + GameRegistry.registerItem(telepad, telepad.getUnlocalizedName()); + GameRegistry.registerItem(entanglement_kit, entanglement_kit.getUnlocalizedName()); + //Bomb Parts GameRegistry.registerItem(cap_aluminium, cap_aluminium.getUnlocalizedName()); GameRegistry.registerItem(hull_small_steel, hull_small_steel.getUnlocalizedName()); @@ -1462,6 +1700,8 @@ public class ModItems { GameRegistry.registerItem(tritium_deuterium_cake, tritium_deuterium_cake.getUnlocalizedName()); GameRegistry.registerItem(pellet_cluster, pellet_cluster.getUnlocalizedName()); GameRegistry.registerItem(pellet_gas, pellet_gas.getUnlocalizedName()); + + GameRegistry.registerItem(magnetron, magnetron.getUnlocalizedName()); //Watz Pellets GameRegistry.registerItem(pellet_schrabidium, pellet_schrabidium.getUnlocalizedName()); @@ -1507,6 +1747,7 @@ public class ModItems { GameRegistry.registerItem(canister_empty, canister_empty.getUnlocalizedName()); GameRegistry.registerItem(canister_fuel, canister_fuel.getUnlocalizedName()); GameRegistry.registerItem(canister_napalm, canister_napalm.getUnlocalizedName()); + GameRegistry.registerItem(canister_NITAN, canister_NITAN.getUnlocalizedName()); //Batteries GameRegistry.registerItem(battery_generic, battery_generic.getUnlocalizedName()); @@ -1635,8 +1876,14 @@ public class ModItems { GameRegistry.registerItem(trinitite, trinitite.getUnlocalizedName()); GameRegistry.registerItem(nuclear_waste, nuclear_waste.getUnlocalizedName()); - //Missiles + //Da Chopper + GameRegistry.registerItem(chopper, chopper.getUnlocalizedName()); + + //Computer Tools GameRegistry.registerItem(designator, designator.getUnlocalizedName()); + GameRegistry.registerItem(linker, linker.getUnlocalizedName()); + + //Missiles GameRegistry.registerItem(missile_generic, missile_generic.getUnlocalizedName()); //GameRegistry.registerItem(missile_anti_ballistic, missile_anti_ballistic.getUnlocalizedName()); GameRegistry.registerItem(missile_incendiary, missile_incendiary.getUnlocalizedName()); @@ -1664,10 +1911,17 @@ public class ModItems { GameRegistry.registerItem(gun_revolver_cursed, gun_revolver_cursed.getUnlocalizedName()); GameRegistry.registerItem(gun_rpg, gun_rpg.getUnlocalizedName()); GameRegistry.registerItem(gun_fatman, gun_fatman.getUnlocalizedName()); + GameRegistry.registerItem(gun_mirv, gun_mirv.getUnlocalizedName()); + GameRegistry.registerItem(gun_bf, gun_bf.getUnlocalizedName()); + GameRegistry.registerItem(gun_mp40, gun_mp40.getUnlocalizedName()); GameRegistry.registerItem(gun_xvl1456, gun_xvl1456.getUnlocalizedName()); GameRegistry.registerItem(gun_osipr, gun_osipr.getUnlocalizedName()); + GameRegistry.registerItem(gun_immolator, gun_immolator.getUnlocalizedName()); + GameRegistry.registerItem(gun_cryolator, gun_cryolator.getUnlocalizedName()); GameRegistry.registerItem(gun_mp, gun_mp.getUnlocalizedName()); GameRegistry.registerItem(gun_zomg, gun_zomg.getUnlocalizedName()); + GameRegistry.registerItem(gun_emp, gun_emp.getUnlocalizedName()); + GameRegistry.registerItem(gun_revolver_inverted, gun_revolver_inverted.getUnlocalizedName()); GameRegistry.registerItem(gun_super_shotgun, gun_super_shotgun.getUnlocalizedName()); GameRegistry.registerItem(gun_moist_nugget, gun_moist_nugget.getUnlocalizedName()); @@ -1680,12 +1934,18 @@ public class ModItems { GameRegistry.registerItem(gun_revolver_cursed_ammo, gun_revolver_cursed_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_rpg_ammo, gun_rpg_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_fatman_ammo, gun_fatman_ammo.getUnlocalizedName()); + GameRegistry.registerItem(gun_mirv_ammo, gun_mirv_ammo.getUnlocalizedName()); + GameRegistry.registerItem(gun_bf_ammo, gun_bf_ammo.getUnlocalizedName()); + GameRegistry.registerItem(gun_mp40_ammo, gun_mp40_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_xvl1456_ammo, gun_xvl1456_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_osipr_ammo, gun_osipr_ammo.getUnlocalizedName()); 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()); - //Clips + //-C-l-i-p-s- Magazines GameRegistry.registerItem(clip_revolver_iron, clip_revolver_iron.getUnlocalizedName()); GameRegistry.registerItem(clip_revolver, clip_revolver.getUnlocalizedName()); GameRegistry.registerItem(clip_revolver_gold, clip_revolver_gold.getUnlocalizedName()); @@ -1694,9 +1954,15 @@ public class ModItems { GameRegistry.registerItem(clip_revolver_cursed, clip_revolver_cursed.getUnlocalizedName()); GameRegistry.registerItem(clip_rpg, clip_rpg.getUnlocalizedName()); GameRegistry.registerItem(clip_fatman, clip_fatman.getUnlocalizedName()); + GameRegistry.registerItem(clip_mirv, clip_mirv.getUnlocalizedName()); + GameRegistry.registerItem(clip_bf, clip_bf.getUnlocalizedName()); + GameRegistry.registerItem(clip_mp40, clip_mp40.getUnlocalizedName()); GameRegistry.registerItem(clip_xvl1456, clip_xvl1456.getUnlocalizedName()); GameRegistry.registerItem(clip_osipr, clip_osipr.getUnlocalizedName()); + GameRegistry.registerItem(clip_immolator, clip_immolator.getUnlocalizedName()); + GameRegistry.registerItem(clip_cryolator, clip_cryolator.getUnlocalizedName()); GameRegistry.registerItem(clip_mp, clip_mp.getUnlocalizedName()); + GameRegistry.registerItem(clip_emp, clip_emp.getUnlocalizedName()); //Grenades GameRegistry.registerItem(grenade_generic, grenade_generic.getUnlocalizedName()); @@ -1711,10 +1977,12 @@ public class ModItems { GameRegistry.registerItem(grenade_plasma, grenade_plasma.getUnlocalizedName()); GameRegistry.registerItem(grenade_tau, grenade_tau.getUnlocalizedName()); GameRegistry.registerItem(grenade_schrabidium, grenade_schrabidium.getUnlocalizedName()); + GameRegistry.registerItem(grenade_nuke, grenade_nuke.getUnlocalizedName()); GameRegistry.registerItem(grenade_lemon, grenade_lemon.getUnlocalizedName()); GameRegistry.registerItem(grenade_mk2, grenade_mk2.getUnlocalizedName()); - GameRegistry.registerItem(grenade_nuke, grenade_nuke.getUnlocalizedName()); + GameRegistry.registerItem(grenade_aschrab, grenade_aschrab.getUnlocalizedName()); GameRegistry.registerItem(grenade_nuclear, grenade_nuclear.getUnlocalizedName()); + GameRegistry.registerItem(grenade_zomg, grenade_zomg.getUnlocalizedName()); //Capes GameRegistry.registerItem(cape_radiation, cape_radiation.getUnlocalizedName()); @@ -1746,6 +2014,11 @@ public class ModItems { GameRegistry.registerItem(alloy_axe, alloy_axe.getUnlocalizedName()); GameRegistry.registerItem(alloy_shovel, alloy_shovel.getUnlocalizedName()); GameRegistry.registerItem(alloy_hoe, alloy_hoe.getUnlocalizedName()); + GameRegistry.registerItem(cmb_sword, cmb_sword.getUnlocalizedName()); + GameRegistry.registerItem(cmb_pickaxe, cmb_pickaxe.getUnlocalizedName()); + GameRegistry.registerItem(cmb_axe, cmb_axe.getUnlocalizedName()); + GameRegistry.registerItem(cmb_shovel, cmb_shovel.getUnlocalizedName()); + GameRegistry.registerItem(cmb_hoe, cmb_hoe.getUnlocalizedName()); GameRegistry.registerItem(matchstick, matchstick.getUnlocalizedName()); GameRegistry.registerItem(crowbar, crowbar.getUnlocalizedName()); @@ -1840,6 +2113,17 @@ public class ModItems { GameRegistry.registerItem(hazmat_plate, hazmat_plate.getUnlocalizedName()); GameRegistry.registerItem(hazmat_legs, hazmat_legs.getUnlocalizedName()); GameRegistry.registerItem(hazmat_boots, hazmat_boots.getUnlocalizedName()); + GameRegistry.registerItem(hazmat_paa_helmet, hazmat_paa_helmet.getUnlocalizedName()); + GameRegistry.registerItem(hazmat_paa_plate, hazmat_paa_plate.getUnlocalizedName()); + GameRegistry.registerItem(hazmat_paa_legs, hazmat_paa_legs.getUnlocalizedName()); + GameRegistry.registerItem(hazmat_paa_boots, hazmat_paa_boots.getUnlocalizedName()); + GameRegistry.registerItem(cmb_helmet, cmb_helmet.getUnlocalizedName()); + GameRegistry.registerItem(cmb_plate, cmb_plate.getUnlocalizedName()); + GameRegistry.registerItem(cmb_legs, cmb_legs.getUnlocalizedName()); + GameRegistry.registerItem(cmb_boots, cmb_boots.getUnlocalizedName()); + GameRegistry.registerItem(paa_plate, paa_plate.getUnlocalizedName()); + GameRegistry.registerItem(paa_legs, paa_legs.getUnlocalizedName()); + GameRegistry.registerItem(paa_boots, paa_boots.getUnlocalizedName()); GameRegistry.registerItem(schrabidium_helmet, schrabidium_helmet.getUnlocalizedName()); GameRegistry.registerItem(schrabidium_plate, schrabidium_plate.getUnlocalizedName()); GameRegistry.registerItem(schrabidium_legs, schrabidium_legs.getUnlocalizedName()); @@ -1879,12 +2163,18 @@ public class ModItems { GameRegistry.registerItem(grenade_kit, grenade_kit.getUnlocalizedName()); GameRegistry.registerItem(t45_kit, t45_kit.getUnlocalizedName()); GameRegistry.registerItem(euphemium_kit, euphemium_kit.getUnlocalizedName()); + GameRegistry.registerItem(letter, letter.getUnlocalizedName()); //THIS is a bucket. GameRegistry.registerItem(bucket_mud, bucket_mud.getUnlocalizedName()); GameRegistry.registerItem(bucket_acid, bucket_acid.getUnlocalizedName()); GameRegistry.registerItem(bucket_toxic, bucket_toxic.getUnlocalizedName()); + //Records + GameRegistry.registerItem(record_lc, record_lc.getUnlocalizedName()); + GameRegistry.registerItem(record_ss, record_ss.getUnlocalizedName()); + GameRegistry.registerItem(record_vc, record_vc.getUnlocalizedName()); + //Technical Items GameRegistry.registerItem(smoke1, smoke1.getUnlocalizedName()); GameRegistry.registerItem(smoke2, smoke2.getUnlocalizedName()); @@ -1903,5 +2193,27 @@ public class ModItems { GameRegistry.registerItem(b_smoke7, b_smoke7.getUnlocalizedName()); GameRegistry.registerItem(b_smoke8, b_smoke8.getUnlocalizedName()); GameRegistry.registerItem(energy_ball, energy_ball.getUnlocalizedName()); + GameRegistry.registerItem(discharge, discharge.getUnlocalizedName()); + GameRegistry.registerItem(empblast, empblast.getUnlocalizedName()); + GameRegistry.registerItem(flame_1, flame_1.getUnlocalizedName()); + GameRegistry.registerItem(flame_2, flame_2.getUnlocalizedName()); + GameRegistry.registerItem(flame_3, flame_3.getUnlocalizedName()); + GameRegistry.registerItem(flame_4, flame_4.getUnlocalizedName()); + GameRegistry.registerItem(flame_5, flame_5.getUnlocalizedName()); + GameRegistry.registerItem(flame_6, flame_6.getUnlocalizedName()); + GameRegistry.registerItem(flame_7, flame_7.getUnlocalizedName()); + GameRegistry.registerItem(flame_8, flame_8.getUnlocalizedName()); + GameRegistry.registerItem(flame_9, flame_9.getUnlocalizedName()); + GameRegistry.registerItem(flame_10, flame_10.getUnlocalizedName()); + GameRegistry.registerItem(ln2_1, ln2_1.getUnlocalizedName()); + GameRegistry.registerItem(ln2_2, ln2_2.getUnlocalizedName()); + GameRegistry.registerItem(ln2_3, ln2_3.getUnlocalizedName()); + GameRegistry.registerItem(ln2_4, ln2_4.getUnlocalizedName()); + GameRegistry.registerItem(ln2_5, ln2_5.getUnlocalizedName()); + GameRegistry.registerItem(ln2_6, ln2_6.getUnlocalizedName()); + GameRegistry.registerItem(ln2_7, ln2_7.getUnlocalizedName()); + GameRegistry.registerItem(ln2_8, ln2_8.getUnlocalizedName()); + GameRegistry.registerItem(ln2_9, ln2_9.getUnlocalizedName()); + GameRegistry.registerItem(ln2_10, ln2_10.getUnlocalizedName()); } } diff --git a/com/hbm/items/ItemBoy.java b/com/hbm/items/bomb/ItemBoy.java similarity index 82% rename from com/hbm/items/ItemBoy.java rename to com/hbm/items/bomb/ItemBoy.java index 765b4ac81..ecfd56431 100644 --- a/com/hbm/items/ItemBoy.java +++ b/com/hbm/items/bomb/ItemBoy.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.bomb; import java.util.List; +import com.hbm.items.special.ItemRadioactive; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/com/hbm/items/ItemFleija.java b/com/hbm/items/bomb/ItemFleija.java similarity index 85% rename from com/hbm/items/ItemFleija.java rename to com/hbm/items/bomb/ItemFleija.java index 4449d0fd6..b986a7d9a 100644 --- a/com/hbm/items/ItemFleija.java +++ b/com/hbm/items/bomb/ItemFleija.java @@ -1,7 +1,10 @@ -package com.hbm.items; +package com.hbm.items.bomb; import java.util.List; +import com.hbm.items.ModItems; +import com.hbm.items.special.ItemRadioactive; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; diff --git a/com/hbm/items/ItemGadget.java b/com/hbm/items/bomb/ItemGadget.java similarity index 82% rename from com/hbm/items/ItemGadget.java rename to com/hbm/items/bomb/ItemGadget.java index 33d4cb303..833b8530c 100644 --- a/com/hbm/items/ItemGadget.java +++ b/com/hbm/items/bomb/ItemGadget.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.bomb; import java.util.List; +import com.hbm.items.special.ItemRadioactive; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/com/hbm/items/ItemMan.java b/com/hbm/items/bomb/ItemMan.java similarity index 92% rename from com/hbm/items/ItemMan.java rename to com/hbm/items/bomb/ItemMan.java index 7b5b8256a..296bbd3db 100644 --- a/com/hbm/items/ItemMan.java +++ b/com/hbm/items/bomb/ItemMan.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.bomb; import java.util.List; diff --git a/com/hbm/items/ItemManMike.java b/com/hbm/items/bomb/ItemManMike.java similarity index 84% rename from com/hbm/items/ItemManMike.java rename to com/hbm/items/bomb/ItemManMike.java index a5b89fe97..dd2a25089 100644 --- a/com/hbm/items/ItemManMike.java +++ b/com/hbm/items/bomb/ItemManMike.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.bomb; import java.util.List; +import com.hbm.items.special.ItemRadioactive; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/com/hbm/items/ItemMike.java b/com/hbm/items/bomb/ItemMike.java similarity index 82% rename from com/hbm/items/ItemMike.java rename to com/hbm/items/bomb/ItemMike.java index 95f1bb6d7..bd844ac70 100644 --- a/com/hbm/items/ItemMike.java +++ b/com/hbm/items/bomb/ItemMike.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.bomb; import java.util.List; +import com.hbm.items.special.ItemRadioactive; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/com/hbm/items/ItemPrototypeBlock.java b/com/hbm/items/bomb/ItemPrototypeBlock.java similarity index 95% rename from com/hbm/items/ItemPrototypeBlock.java rename to com/hbm/items/bomb/ItemPrototypeBlock.java index 390454797..6162b668e 100644 --- a/com/hbm/items/ItemPrototypeBlock.java +++ b/com/hbm/items/bomb/ItemPrototypeBlock.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.bomb; import java.util.List; diff --git a/com/hbm/items/ItemTsar.java b/com/hbm/items/bomb/ItemTsar.java similarity index 82% rename from com/hbm/items/ItemTsar.java rename to com/hbm/items/bomb/ItemTsar.java index 7c1731a31..350586614 100644 --- a/com/hbm/items/ItemTsar.java +++ b/com/hbm/items/bomb/ItemTsar.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.bomb; import java.util.List; +import com.hbm.items.special.ItemRadioactive; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/com/hbm/items/ItemAppleEuphemium.java b/com/hbm/items/food/ItemAppleEuphemium.java similarity index 97% rename from com/hbm/items/ItemAppleEuphemium.java rename to com/hbm/items/food/ItemAppleEuphemium.java index f05b0a8c5..eb7b9eba7 100644 --- a/com/hbm/items/ItemAppleEuphemium.java +++ b/com/hbm/items/food/ItemAppleEuphemium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.food; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/items/ItemAppleSchrabidium.java b/com/hbm/items/food/ItemAppleSchrabidium.java similarity index 99% rename from com/hbm/items/ItemAppleSchrabidium.java rename to com/hbm/items/food/ItemAppleSchrabidium.java index 97cfa2409..3fdf552c3 100644 --- a/com/hbm/items/ItemAppleSchrabidium.java +++ b/com/hbm/items/food/ItemAppleSchrabidium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.food; import java.util.List; diff --git a/com/hbm/items/ItemCottonCandy.java b/com/hbm/items/food/ItemCottonCandy.java similarity index 97% rename from com/hbm/items/ItemCottonCandy.java rename to com/hbm/items/food/ItemCottonCandy.java index ddc7cfe4b..8b26da7af 100644 --- a/com/hbm/items/ItemCottonCandy.java +++ b/com/hbm/items/food/ItemCottonCandy.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.food; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemFood; diff --git a/com/hbm/items/ItemEnergy.java b/com/hbm/items/food/ItemEnergy.java similarity index 98% rename from com/hbm/items/ItemEnergy.java rename to com/hbm/items/food/ItemEnergy.java index fc2577eaf..b47e59d67 100644 --- a/com/hbm/items/ItemEnergy.java +++ b/com/hbm/items/food/ItemEnergy.java @@ -1,8 +1,10 @@ -package com.hbm.items; +package com.hbm.items.food; import java.util.Iterator; import java.util.List; +import com.hbm.items.ModItems; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/items/ItemLemon.java b/com/hbm/items/food/ItemLemon.java similarity index 94% rename from com/hbm/items/ItemLemon.java rename to com/hbm/items/food/ItemLemon.java index 38ea5a677..7532521c2 100644 --- a/com/hbm/items/ItemLemon.java +++ b/com/hbm/items/food/ItemLemon.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.food; import java.util.List; diff --git a/com/hbm/items/ItemNugget.java b/com/hbm/items/food/ItemNugget.java similarity index 89% rename from com/hbm/items/ItemNugget.java rename to com/hbm/items/food/ItemNugget.java index a5bf8d0b3..f7a2f75ae 100644 --- a/com/hbm/items/ItemNugget.java +++ b/com/hbm/items/food/ItemNugget.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.food; import java.util.List; +import com.hbm.items.ModItems; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; diff --git a/com/hbm/items/ItemSchnitzelVegan.java b/com/hbm/items/food/ItemSchnitzelVegan.java similarity index 97% rename from com/hbm/items/ItemSchnitzelVegan.java rename to com/hbm/items/food/ItemSchnitzelVegan.java index b11a52a67..d901a191f 100644 --- a/com/hbm/items/ItemSchnitzelVegan.java +++ b/com/hbm/items/food/ItemSchnitzelVegan.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.food; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemFood; diff --git a/com/hbm/items/ItemTemFlakes.java b/com/hbm/items/food/ItemTemFlakes.java similarity index 98% rename from com/hbm/items/ItemTemFlakes.java rename to com/hbm/items/food/ItemTemFlakes.java index 7dbafbc76..fa0b8c808 100644 --- a/com/hbm/items/ItemTemFlakes.java +++ b/com/hbm/items/food/ItemTemFlakes.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.food; import java.util.List; diff --git a/com/hbm/items/ItemWaffle.java b/com/hbm/items/food/ItemWaffle.java similarity index 91% rename from com/hbm/items/ItemWaffle.java rename to com/hbm/items/food/ItemWaffle.java index 1ee440b87..5e0472f27 100644 --- a/com/hbm/items/ItemWaffle.java +++ b/com/hbm/items/food/ItemWaffle.java @@ -1,6 +1,6 @@ -package com.hbm.items; +package com.hbm.items.food; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionParticle; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/items/ArmorEuphemium.java b/com/hbm/items/gear/ArmorEuphemium.java similarity index 98% rename from com/hbm/items/ArmorEuphemium.java rename to com/hbm/items/gear/ArmorEuphemium.java index 911f860d3..72ff79347 100644 --- a/com/hbm/items/ArmorEuphemium.java +++ b/com/hbm/items/gear/ArmorEuphemium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -13,6 +13,7 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; +import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.RefStrings; diff --git a/com/hbm/items/ArmorHazmat.java b/com/hbm/items/gear/ArmorHazmat.java similarity index 65% rename from com/hbm/items/ArmorHazmat.java rename to com/hbm/items/gear/ArmorHazmat.java index 87b07f453..4e27792f1 100644 --- a/com/hbm/items/ArmorHazmat.java +++ b/com/hbm/items/gear/ArmorHazmat.java @@ -1,5 +1,6 @@ -package com.hbm.items; +package com.hbm.items.gear; +import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import net.minecraft.entity.Entity; @@ -20,6 +21,12 @@ public class ArmorHazmat extends ItemArmor { if(stack.getItem().equals(ModItems.hazmat_legs)) { return (RefStrings.MODID + ":textures/armor/hazmat_2.png"); } + if(stack.getItem().equals(ModItems.hazmat_paa_helmet) || stack.getItem().equals(ModItems.hazmat_paa_plate) || stack.getItem().equals(ModItems.hazmat_paa_boots)) { + return (RefStrings.MODID + ":textures/armor/hazmat_paa_1.png"); + } + if(stack.getItem().equals(ModItems.hazmat_paa_legs)) { + return (RefStrings.MODID + ":textures/armor/hazmat_paa_2.png"); + } else return null; } diff --git a/com/hbm/items/ArmorModel.java b/com/hbm/items/gear/ArmorModel.java similarity index 96% rename from com/hbm/items/ArmorModel.java rename to com/hbm/items/gear/ArmorModel.java index 53dc1d746..ecda6b071 100644 --- a/com/hbm/items/ArmorModel.java +++ b/com/hbm/items/gear/ArmorModel.java @@ -1,11 +1,12 @@ -package com.hbm.items; +package com.hbm.items.gear; import java.util.List; +import com.hbm.items.ModItems; import com.hbm.lib.Library; -import com.hbm.render.ModelCloak; -import com.hbm.render.ModelGasMask; -import com.hbm.render.ModelGoggles; +import com.hbm.render.model.ModelCloak; +import com.hbm.render.model.ModelGasMask; +import com.hbm.render.model.ModelGoggles; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/items/ArmorSchrabidium.java b/com/hbm/items/gear/ArmorSchrabidium.java similarity index 98% rename from com/hbm/items/ArmorSchrabidium.java rename to com/hbm/items/gear/ArmorSchrabidium.java index 5fc845314..5150ff2db 100644 --- a/com/hbm/items/ArmorSchrabidium.java +++ b/com/hbm/items/gear/ArmorSchrabidium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -11,6 +11,8 @@ import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; + +import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; public class ArmorSchrabidium extends ItemArmor implements ISpecialArmor { diff --git a/com/hbm/items/ArmorT45.java b/com/hbm/items/gear/ArmorT45.java similarity index 97% rename from com/hbm/items/ArmorT45.java rename to com/hbm/items/gear/ArmorT45.java index 080db607d..1e4630cfa 100644 --- a/com/hbm/items/ArmorT45.java +++ b/com/hbm/items/gear/ArmorT45.java @@ -1,13 +1,14 @@ -package com.hbm.items; +package com.hbm.items.gear; import java.util.List; import com.google.common.collect.Multimap; +import com.hbm.items.ModItems; import com.hbm.lib.Library; -import com.hbm.render.ModelT45Boots; -import com.hbm.render.ModelT45Chest; -import com.hbm.render.ModelT45Helmet; -import com.hbm.render.ModelT45Legs; +import com.hbm.render.model.ModelT45Boots; +import com.hbm.render.model.ModelT45Chest; +import com.hbm.render.model.ModelT45Helmet; +import com.hbm.render.model.ModelT45Legs; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/items/ArmorTest.java b/com/hbm/items/gear/ArmorTest.java similarity index 93% rename from com/hbm/items/ArmorTest.java rename to com/hbm/items/gear/ArmorTest.java index 8c959131b..75aca91ae 100644 --- a/com/hbm/items/ArmorTest.java +++ b/com/hbm/items/gear/ArmorTest.java @@ -1,5 +1,6 @@ -package com.hbm.items; +package com.hbm.items.gear; +import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import net.minecraft.entity.Entity; diff --git a/com/hbm/items/AxeSchrabidium.java b/com/hbm/items/gear/AxeSchrabidium.java similarity index 78% rename from com/hbm/items/AxeSchrabidium.java rename to com/hbm/items/gear/AxeSchrabidium.java index 9402641f0..ca2928271 100644 --- a/com/hbm/items/AxeSchrabidium.java +++ b/com/hbm/items/gear/AxeSchrabidium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemAxe; @@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack; public class AxeSchrabidium extends ItemAxe { - protected AxeSchrabidium(ToolMaterial p_i45327_1_) { + public AxeSchrabidium(ToolMaterial p_i45327_1_) { super(p_i45327_1_); } diff --git a/com/hbm/items/gear/BigSword.java b/com/hbm/items/gear/BigSword.java new file mode 100644 index 000000000..47e9c635a --- /dev/null +++ b/com/hbm/items/gear/BigSword.java @@ -0,0 +1,65 @@ +package com.hbm.items.gear; + +import java.util.Random; + +import com.hbm.entity.projectile.EntityPlasmaBeam; +import com.hbm.lib.Library; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemSword; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; + +public class BigSword extends ItemSword { + + public World worldObj; + + public double posX; + public double posY; + public double posZ; + + public BigSword(ToolMaterial p_i45356_1_) { + super(p_i45356_1_); + } + + @Override + @SideOnly(Side.CLIENT) + public boolean isFull3D() { + return true; + } + + @Override + public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer Entityplayer) { + + return itemStack; + } + + /*public void onUsingTick(ItemStack itemStack, EntityPlayer Entityplayer, int count) { + World world = Entityplayer.worldObj; + + Vec3 look = Entityplayer.getLookVec(); + Random rand = new Random(); + MovingObjectPosition Coord = Library.rayTrace(Entityplayer, 300, 1); + // EntityLightningBolt Lightning = new EntityLightningBolt(world, 1, 1, + // 1); + // Lightning.setPosition(Coord.blockX,Coord.blockY,Coord.blockZ); + EntityPlasmaBeam plasma = new EntityPlasmaBeam(world, Entityplayer); + plasma.setPosition(Coord.blockX + (rand.nextGaussian() * 0.25D), Coord.blockY + 1, + Coord.blockZ + (rand.nextGaussian() * 0.25D)); + if (!Entityplayer.worldObj.isRemote) { + // world.spawnEntityInWorld(Lightning); + world.setBlock(Coord.blockX, Coord.blockY, Coord.blockZ, Blocks.ice); + world.spawnEntityInWorld(plasma); + } + System.out.println(Coord.blockX + ", " + Coord.blockY + ", " + Coord.blockZ); + Entityplayer.addPotionEffect(new PotionEffect(6, 20, 5)); + itemStack.damageItem(25, Entityplayer); + }*/ +} diff --git a/com/hbm/items/HoeSchrabidium.java b/com/hbm/items/gear/HoeSchrabidium.java similarity index 92% rename from com/hbm/items/HoeSchrabidium.java rename to com/hbm/items/gear/HoeSchrabidium.java index c96a29052..242b0ce7a 100644 --- a/com/hbm/items/HoeSchrabidium.java +++ b/com/hbm/items/gear/HoeSchrabidium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemHoe; diff --git a/com/hbm/items/MaskOfInfamy.java b/com/hbm/items/gear/MaskOfInfamy.java similarity index 94% rename from com/hbm/items/MaskOfInfamy.java rename to com/hbm/items/gear/MaskOfInfamy.java index 9b3d8acf8..8f06da5c2 100644 --- a/com/hbm/items/MaskOfInfamy.java +++ b/com/hbm/items/gear/MaskOfInfamy.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import com.hbm.lib.RefStrings; diff --git a/com/hbm/items/ModArmor.java b/com/hbm/items/gear/ModArmor.java similarity index 69% rename from com/hbm/items/ModArmor.java rename to com/hbm/items/gear/ModArmor.java index c5ab2f508..f217ce957 100644 --- a/com/hbm/items/ModArmor.java +++ b/com/hbm/items/gear/ModArmor.java @@ -1,5 +1,6 @@ -package com.hbm.items; +package com.hbm.items.gear; +import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import net.minecraft.entity.Entity; @@ -32,6 +33,18 @@ public class ModArmor extends ItemArmor { if(stack.getItem().equals(ModItems.alloy_legs)) { return (RefStrings.MODID + ":textures/armor/alloy_2.png"); } + if(stack.getItem().equals(ModItems.cmb_helmet) || stack.getItem().equals(ModItems.cmb_plate) || stack.getItem().equals(ModItems.cmb_boots)) { + return (RefStrings.MODID + ":textures/armor/cmb_1.png"); + } + if(stack.getItem().equals(ModItems.cmb_legs)) { + return (RefStrings.MODID + ":textures/armor/cmb_2.png"); + } + if(stack.getItem().equals(ModItems.paa_plate) || stack.getItem().equals(ModItems.paa_boots)) { + return (RefStrings.MODID + ":textures/armor/paa_1.png"); + } + if(stack.getItem().equals(ModItems.paa_legs)) { + return (RefStrings.MODID + ":textures/armor/paa_2.png"); + } else return null; } diff --git a/com/hbm/items/ModAxe.java b/com/hbm/items/gear/ModAxe.java similarity index 67% rename from com/hbm/items/ModAxe.java rename to com/hbm/items/gear/ModAxe.java index b759f8abe..ee5f39842 100644 --- a/com/hbm/items/ModAxe.java +++ b/com/hbm/items/gear/ModAxe.java @@ -1,10 +1,10 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.ItemAxe; public class ModAxe extends ItemAxe { - protected ModAxe(ToolMaterial p_i45327_1_) { + public ModAxe(ToolMaterial p_i45327_1_) { super(p_i45327_1_); // TODO Auto-generated constructor stub } diff --git a/com/hbm/items/ModHoe.java b/com/hbm/items/gear/ModHoe.java similarity index 87% rename from com/hbm/items/ModHoe.java rename to com/hbm/items/gear/ModHoe.java index 3c2d06eb8..24cf7ca9a 100644 --- a/com/hbm/items/ModHoe.java +++ b/com/hbm/items/gear/ModHoe.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.ItemHoe; diff --git a/com/hbm/items/ModPickaxe.java b/com/hbm/items/gear/ModPickaxe.java similarity index 67% rename from com/hbm/items/ModPickaxe.java rename to com/hbm/items/gear/ModPickaxe.java index 7e4876f27..cc85aadbe 100644 --- a/com/hbm/items/ModPickaxe.java +++ b/com/hbm/items/gear/ModPickaxe.java @@ -1,10 +1,10 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.ItemPickaxe; public class ModPickaxe extends ItemPickaxe { - protected ModPickaxe(ToolMaterial p_i45347_1_) { + public ModPickaxe(ToolMaterial p_i45347_1_) { super(p_i45347_1_); // TODO Auto-generated constructor stub } diff --git a/com/hbm/items/ModSpade.java b/com/hbm/items/gear/ModSpade.java similarity index 87% rename from com/hbm/items/ModSpade.java rename to com/hbm/items/gear/ModSpade.java index 275750e40..e554c2867 100644 --- a/com/hbm/items/ModSpade.java +++ b/com/hbm/items/gear/ModSpade.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.ItemSpade; diff --git a/com/hbm/items/ModSword.java b/com/hbm/items/gear/ModSword.java similarity index 87% rename from com/hbm/items/ModSword.java rename to com/hbm/items/gear/ModSword.java index 4e5a4e7c1..48eb30179 100644 --- a/com/hbm/items/ModSword.java +++ b/com/hbm/items/gear/ModSword.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.ItemSword; diff --git a/com/hbm/items/PickaxeSchrabidium.java b/com/hbm/items/gear/PickaxeSchrabidium.java similarity index 78% rename from com/hbm/items/PickaxeSchrabidium.java rename to com/hbm/items/gear/PickaxeSchrabidium.java index a92aca33f..cf7e99245 100644 --- a/com/hbm/items/PickaxeSchrabidium.java +++ b/com/hbm/items/gear/PickaxeSchrabidium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemPickaxe; @@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack; public class PickaxeSchrabidium extends ItemPickaxe { - protected PickaxeSchrabidium(ToolMaterial p_i45347_1_) { + public PickaxeSchrabidium(ToolMaterial p_i45347_1_) { super(p_i45347_1_); } diff --git a/com/hbm/items/RedstoneSword.java b/com/hbm/items/gear/RedstoneSword.java similarity index 98% rename from com/hbm/items/RedstoneSword.java rename to com/hbm/items/gear/RedstoneSword.java index 56ede2b68..990e498e6 100644 --- a/com/hbm/items/RedstoneSword.java +++ b/com/hbm/items/gear/RedstoneSword.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/com/hbm/items/SpadeSchrabidium.java b/com/hbm/items/gear/SpadeSchrabidium.java similarity index 92% rename from com/hbm/items/SpadeSchrabidium.java rename to com/hbm/items/gear/SpadeSchrabidium.java index 430262830..661050dac 100644 --- a/com/hbm/items/SpadeSchrabidium.java +++ b/com/hbm/items/gear/SpadeSchrabidium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemSpade; diff --git a/com/hbm/items/SwordSchrabidium.java b/com/hbm/items/gear/SwordSchrabidium.java similarity index 92% rename from com/hbm/items/SwordSchrabidium.java rename to com/hbm/items/gear/SwordSchrabidium.java index afe2ce026..f82b3580e 100644 --- a/com/hbm/items/SwordSchrabidium.java +++ b/com/hbm/items/gear/SwordSchrabidium.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; diff --git a/com/hbm/items/WeaponSpecial.java b/com/hbm/items/gear/WeaponSpecial.java similarity index 98% rename from com/hbm/items/WeaponSpecial.java rename to com/hbm/items/gear/WeaponSpecial.java index a8865a8d1..15b9f1450 100644 --- a/com/hbm/items/WeaponSpecial.java +++ b/com/hbm/items/gear/WeaponSpecial.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.gear; import java.util.List; diff --git a/com/hbm/items/ItemBattery.java b/com/hbm/items/special/ItemBattery.java similarity index 95% rename from com/hbm/items/ItemBattery.java rename to com/hbm/items/special/ItemBattery.java index d11bf8de9..fbecf79df 100644 --- a/com/hbm/items/ItemBattery.java +++ b/com/hbm/items/special/ItemBattery.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.List; +import com.hbm.items.ModItems; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; diff --git a/com/hbm/items/ItemBlades.java b/com/hbm/items/special/ItemBlades.java similarity index 81% rename from com/hbm/items/ItemBlades.java rename to com/hbm/items/special/ItemBlades.java index a023e4151..e902f4c47 100644 --- a/com/hbm/items/ItemBlades.java +++ b/com/hbm/items/special/ItemBlades.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.special; import net.minecraft.item.Item; diff --git a/com/hbm/items/ItemCapacitor.java b/com/hbm/items/special/ItemCapacitor.java similarity index 96% rename from com/hbm/items/ItemCapacitor.java rename to com/hbm/items/special/ItemCapacitor.java index 215d77c41..86589fc98 100644 --- a/com/hbm/items/ItemCapacitor.java +++ b/com/hbm/items/special/ItemCapacitor.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.List; +import com.hbm.items.ModItems; + import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; diff --git a/com/hbm/items/ItemCell.java b/com/hbm/items/special/ItemCell.java similarity index 94% rename from com/hbm/items/ItemCell.java rename to com/hbm/items/special/ItemCell.java index 61561b429..a6deb166a 100644 --- a/com/hbm/items/ItemCell.java +++ b/com/hbm/items/special/ItemCell.java @@ -1,12 +1,13 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.Random; import com.hbm.blocks.BlockCrashedBomb; import com.hbm.blocks.LaunchPad; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionParticle; import com.hbm.explosion.ExplosionParticleB; +import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; diff --git a/com/hbm/items/special/ItemChopper.java b/com/hbm/items/special/ItemChopper.java new file mode 100644 index 000000000..4f5275f23 --- /dev/null +++ b/com/hbm/items/special/ItemChopper.java @@ -0,0 +1,147 @@ +package com.hbm.items.special; + +import com.hbm.entity.mob.EntityHunterChopper; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityList; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.IEntityLivingData; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Facing; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public class ItemChopper extends Item { + + public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) + { + if (p_77648_3_.isRemote) + { + return true; + } + else + { + Block block = p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_); + p_77648_4_ += Facing.offsetsXForSide[p_77648_7_]; + p_77648_5_ += Facing.offsetsYForSide[p_77648_7_]; + p_77648_6_ += Facing.offsetsZForSide[p_77648_7_]; + double d0 = 0.0D; + + if (p_77648_7_ == 1 && block.getRenderType() == 11) + { + d0 = 0.5D; + } + + Entity entity = spawnCreature(p_77648_3_, p_77648_1_.getItemDamage(), (double)p_77648_4_ + 0.5D, (double)p_77648_5_ + d0, (double)p_77648_6_ + 0.5D); + + if (entity != null) + { + if (entity instanceof EntityLivingBase && p_77648_1_.hasDisplayName()) + { + ((EntityLiving)entity).setCustomNameTag(p_77648_1_.getDisplayName()); + } + + if (!p_77648_2_.capabilities.isCreativeMode) + { + --p_77648_1_.stackSize; + } + } + + return true; + } + } + + /** + * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer + */ + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) + { + if (p_77659_2_.isRemote) + { + return p_77659_1_; + } + else + { + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(p_77659_2_, p_77659_3_, true); + + if (movingobjectposition == null) + { + return p_77659_1_; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int i = movingobjectposition.blockX; + int j = movingobjectposition.blockY; + int k = movingobjectposition.blockZ; + + if (!p_77659_2_.canMineBlock(p_77659_3_, i, j, k)) + { + return p_77659_1_; + } + + if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) + { + return p_77659_1_; + } + + if (p_77659_2_.getBlock(i, j, k) instanceof BlockLiquid) + { + Entity entity = spawnCreature(p_77659_2_, p_77659_1_.getItemDamage(), (double)i, (double)j, (double)k); + + if (entity != null) + { + if (entity instanceof EntityLivingBase && p_77659_1_.hasDisplayName()) + { + ((EntityLiving)entity).setCustomNameTag(p_77659_1_.getDisplayName()); + } + + if (!p_77659_3_.capabilities.isCreativeMode) + { + --p_77659_1_.stackSize; + } + } + } + } + + return p_77659_1_; + } + } + } + + /** + * Spawns the creature specified by the egg's type in the location specified by the last three parameters. + * Parameters: world, entityID, x, y, z. + */ + public static Entity spawnCreature(World p_77840_0_, int p_77840_1_, double p_77840_2_, double p_77840_4_, double p_77840_6_) + { + { + Entity entity = null; + + for (int j = 0; j < 1; ++j) + { + entity = new EntityHunterChopper(p_77840_0_); + + if (entity != null && entity instanceof EntityLivingBase) + { + EntityLiving entityliving = (EntityLiving)entity; + entity.setLocationAndAngles(p_77840_2_, p_77840_4_, p_77840_6_, MathHelper.wrapAngleTo180_float(p_77840_0_.rand.nextFloat() * 360.0F), 0.0F); + entityliving.rotationYawHead = entityliving.rotationYaw; + entityliving.renderYawOffset = entityliving.rotationYaw; + entityliving.onSpawnWithEgg((IEntityLivingData)null); + p_77840_0_.spawnEntityInWorld(entity); + } + } + + return entity; + } + } + +} diff --git a/com/hbm/items/ItemCustomLore.java b/com/hbm/items/special/ItemCustomLore.java similarity index 99% rename from com/hbm/items/ItemCustomLore.java rename to com/hbm/items/special/ItemCustomLore.java index 7e45f2fcf..afc53f1b8 100644 --- a/com/hbm/items/ItemCustomLore.java +++ b/com/hbm/items/special/ItemCustomLore.java @@ -1,7 +1,8 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.List; +import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; import net.minecraft.entity.Entity; @@ -367,7 +368,7 @@ public class ItemCustomLore extends ItemRadioactive { @Override public EnumRarity getRarity(ItemStack p_77613_1_) { - if(this == ModItems.nugget_euphemium || this == ModItems.ingot_euphemium || this == ModItems.rod_quad_euphemium || this == ModItems.watch || this == ModItems.powder_iodine || this == ModItems.powder_thorium || this == ModItems.powder_neodymium || this == ModItems.powder_neptunium || this == ModItems.powder_astatine) + if(this == ModItems.nugget_euphemium || this == ModItems.ingot_euphemium || this == ModItems.rod_quad_euphemium || this == ModItems.watch || this == ModItems.powder_iodine || this == ModItems.powder_thorium || this == ModItems.powder_neodymium || this == ModItems.powder_neptunium || this == ModItems.powder_astatine || this == ModItems.powder_caesium) { return EnumRarity.epic; } diff --git a/com/hbm/items/ItemDrop.java b/com/hbm/items/special/ItemDrop.java similarity index 96% rename from com/hbm/items/ItemDrop.java rename to com/hbm/items/special/ItemDrop.java index 21d48e702..f4f72337a 100644 --- a/com/hbm/items/ItemDrop.java +++ b/com/hbm/items/special/ItemDrop.java @@ -1,10 +1,11 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.List; -import com.hbm.entity.EntityCloudFleija; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.explosion.ExplosionChaos; +import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; import net.minecraft.entity.item.EntityItem; @@ -144,7 +145,7 @@ public class ItemDrop extends Item { } if (itemstack.getItem() != null && itemstack.getItem() == ModItems.cell_anti_schrabidium) { list.add("Warning: Exposure to matter will"); - list.add("create a fólkvangr field!"); + list.add("create a f�lkvangr field!"); } if (itemstack.getItem() != null && itemstack.getItem() == ModItems.singularity) { list.add("You may be asking:"); @@ -158,7 +159,7 @@ public class ItemDrop extends Item { list.add("non-euclidean space, creates variable"); list.add("gravity well. Spontaneously spawns"); list.add("tesseracts. If a tesseract happens to"); - list.add("appear near you, do not directly look"); + list.add("appear near you, do not look directly"); list.add("at it."); } if (itemstack.getItem() != null && itemstack.getItem() == ModItems.singularity_super_heated) { diff --git a/com/hbm/items/ItemFuelRod.java b/com/hbm/items/special/ItemFuelRod.java similarity index 97% rename from com/hbm/items/ItemFuelRod.java rename to com/hbm/items/special/ItemFuelRod.java index c924d7e3a..30686ff7c 100644 --- a/com/hbm/items/ItemFuelRod.java +++ b/com/hbm/items/special/ItemFuelRod.java @@ -1,7 +1,9 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.List; +import com.hbm.items.ModItems; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; diff --git a/com/hbm/items/special/ItemModRecord.java b/com/hbm/items/special/ItemModRecord.java new file mode 100644 index 000000000..bcc9684a6 --- /dev/null +++ b/com/hbm/items/special/ItemModRecord.java @@ -0,0 +1,112 @@ +package com.hbm.items.special; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.hbm.lib.RefStrings; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.BlockJukebox; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.EntityList; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemRecord; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; + +public class ItemModRecord extends ItemRecord { + + private static final Map modRecords = new HashMap(); + public final String recordName; + + public ItemModRecord(String string) { + super(string); + recordName = string; + modRecords.put(string, this); + } + + public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, + int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) { + if (p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_) == Blocks.jukebox + && p_77648_3_.getBlockMetadata(p_77648_4_, p_77648_5_, p_77648_6_) == 0) { + if (p_77648_3_.isRemote) { + return true; + } else { + ((BlockJukebox) Blocks.jukebox).func_149926_b(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, + p_77648_1_); + p_77648_3_.playAuxSFXAtEntity((EntityPlayer) null, 1005, p_77648_4_, p_77648_5_, p_77648_6_, + Item.getIdFromItem(this)); + --p_77648_1_.stackSize; + return true; + } + } else { + return false; + } + } + + /** + * allows items to add custom lines of information to the mouseover + * description + */ + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { + p_77624_3_.add(this.getRecordNameLocal()); + } + + @SideOnly(Side.CLIENT) + public String getRecordNameLocal() { + return StatCollector.translateToLocal("item.record." + this.recordName + ".desc"); + } + + /** + * Return an item rarity from EnumRarity + */ + public EnumRarity getRarity(ItemStack p_77613_1_) { + return EnumRarity.rare; + } + + /** + * Return the record item corresponding to the given name. + */ + @SideOnly(Side.CLIENT) + public static ItemRecord getRecord(String p_150926_0_) { + return (ItemRecord) modRecords.get(p_150926_0_); + } + + /** + * Retrieves the resource location of the sound to play for this record. + * + * @param name + * The name of the record to play + * @return The resource location for the audio, null to use default. + */ + public ResourceLocation getRecordResource(String name) { + + String s = ""; + + if(name.equals("records.lc")) + s = RefStrings.MODID + ":music.recordLambdaCore"; + if(name.equals("records.ss")) + s = RefStrings.MODID + ":music.recordSectorSweep"; + if(name.equals("records.vc")) + s = RefStrings.MODID + ":music.recordVortalCombat"; + + return new ResourceLocation(s); + } + + public String getItemStackDisplayName(ItemStack p_77653_1_) + { + String s = (StatCollector.translateToLocal(Items.record_11.getUnlocalizedName() + ".name")).trim(); + + return s; + } +} diff --git a/com/hbm/items/ItemPlasmaBlock.java b/com/hbm/items/special/ItemPlasmaBlock.java similarity index 92% rename from com/hbm/items/ItemPlasmaBlock.java rename to com/hbm/items/special/ItemPlasmaBlock.java index 1d3c45494..feaec66af 100644 --- a/com/hbm/items/ItemPlasmaBlock.java +++ b/com/hbm/items/special/ItemPlasmaBlock.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.special; import net.minecraft.block.Block; import net.minecraft.item.EnumRarity; diff --git a/com/hbm/items/ItemRadioactive.java b/com/hbm/items/special/ItemRadioactive.java similarity index 90% rename from com/hbm/items/ItemRadioactive.java rename to com/hbm/items/special/ItemRadioactive.java index 910e76a8d..a043c66ff 100644 --- a/com/hbm/items/ItemRadioactive.java +++ b/com/hbm/items/special/ItemRadioactive.java @@ -1,5 +1,6 @@ -package com.hbm.items; +package com.hbm.items.special; +import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; @@ -75,7 +76,8 @@ public class ItemRadioactive extends Item { this == ModItems.boy_bullet || this == ModItems.boy_target || this == ModItems.gadget_core || - this == ModItems.man_core) { + this == ModItems.man_core || + this == ModItems.nuclear_waste) { living.addPotionEffect(new PotionEffect(Potion.poison.id, 45 * 20, 4)); living.addPotionEffect(new PotionEffect(Potion.wither.id, 5 * 20, 2)); living.attackEntityFrom(ModDamageSource.radiation, 3); @@ -116,7 +118,8 @@ public class ItemRadioactive extends Item { this == ModItems.rod_quad_plutonium || this == ModItems.rod_dual_plutonium || this == ModItems.mike_core || - this == ModItems.tsar_core) { + this == ModItems.tsar_core || + this == ModItems.trinitite) { living.addPotionEffect(new PotionEffect(Potion.poison.id, 25 * 20, 4)); living.attackEntityFrom(ModDamageSource.radiation, 1); } @@ -160,7 +163,8 @@ public class ItemRadioactive extends Item { //Powder - if (this == ModItems.powder_neptunium) { + if (this == ModItems.powder_neptunium || + this == ModItems.powder_plutonium) { living.addPotionEffect(new PotionEffect(Potion.poison.id, 25 * 20, 4)); living.attackEntityFrom(ModDamageSource.radiation, 1); living.setFire(5); @@ -178,7 +182,14 @@ public class ItemRadioactive extends Item { this == ModItems.ingot_hes || this == ModItems.ingot_les || this == ModItems.cell_sas3 || - this == ModItems.fleija_propellant) { + this == ModItems.fleija_propellant || + this == ModItems.gun_revolver_schrabidium_ammo || + this == ModItems.rod_schrabidium || + this == ModItems.rod_dual_schrabidium || + this == ModItems.rod_quad_schrabidium || + this == ModItems.rod_schrabidium_fuel || + this == ModItems.rod_dual_schrabidium_fuel || + this == ModItems.rod_quad_schrabidium_fuel) { living.addPotionEffect(new PotionEffect(Potion.blindness.id, 2 * 60 * 20, 0)); living.attackEntityFrom(ModDamageSource.radiation, 30); } @@ -191,7 +202,8 @@ public class ItemRadioactive extends Item { living.attackEntityFrom(ModDamageSource.radiation, 10); } - if (this == ModItems.plate_schrabidium) { + if (this == ModItems.plate_schrabidium || + this == ModItems.wire_schrabidium) { living.addPotionEffect(new PotionEffect(Potion.blindness.id, 2 * 60 * 20, 0)); living.attackEntityFrom(ModDamageSource.radiation, 15); } diff --git a/com/hbm/items/ItemSchrabidiumBlock.java b/com/hbm/items/special/ItemSchrabidiumBlock.java similarity index 92% rename from com/hbm/items/ItemSchrabidiumBlock.java rename to com/hbm/items/special/ItemSchrabidiumBlock.java index a0a87abda..4e831bb6c 100644 --- a/com/hbm/items/ItemSchrabidiumBlock.java +++ b/com/hbm/items/special/ItemSchrabidiumBlock.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.special; import net.minecraft.block.Block; import net.minecraft.item.EnumRarity; diff --git a/com/hbm/items/ItemStarterKit.java b/com/hbm/items/special/ItemStarterKit.java similarity index 96% rename from com/hbm/items/ItemStarterKit.java rename to com/hbm/items/special/ItemStarterKit.java index 66d65ecd0..e7fda3022 100644 --- a/com/hbm/items/ItemStarterKit.java +++ b/com/hbm/items/special/ItemStarterKit.java @@ -1,6 +1,8 @@ -package com.hbm.items; +package com.hbm.items.special; import com.hbm.blocks.ModBlocks; +import com.hbm.items.ModItems; +import com.hbm.lib.Library; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -9,6 +11,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; public class ItemStarterKit extends Item { @@ -243,8 +246,11 @@ public class ItemStarterKit extends Item { player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_tau, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_schrabidium, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_lemon, 16)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_mk2, 16)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_aschrab, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_nuke, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_nuclear, 16)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_zomg, 16)); } if(this == ModItems.fleija_kit) @@ -343,6 +349,15 @@ public class ItemStarterKit extends Item { player.inventory.addItemStackToInventory(new ItemStack(ModItems.watch, 1)); } + if(this == ModItems.letter && world.isRemote) + { + if(player.getUniqueID().toString().equals(Library.a20)) { + player.addChatMessage(new ChatComponentText("Error: null reference @ com.hbm.items.ItemStarterKit.class, please report this to the modder!")); + } else { + player.addChatMessage(new ChatComponentText("You rip the letter in half; nothing happens.")); + } + } + return stack; } diff --git a/com/hbm/items/ItemSyringe.java b/com/hbm/items/special/ItemSyringe.java similarity index 99% rename from com/hbm/items/ItemSyringe.java rename to com/hbm/items/special/ItemSyringe.java index c285c0647..a8d8e2a9b 100644 --- a/com/hbm/items/ItemSyringe.java +++ b/com/hbm/items/special/ItemSyringe.java @@ -1,7 +1,8 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.Random; +import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; import cpw.mods.fml.relauncher.Side; diff --git a/com/hbm/items/ItemTankWaste.java b/com/hbm/items/special/ItemTankWaste.java similarity index 98% rename from com/hbm/items/ItemTankWaste.java rename to com/hbm/items/special/ItemTankWaste.java index 4b561c7ba..ec83cad52 100644 --- a/com/hbm/items/ItemTankWaste.java +++ b/com/hbm/items/special/ItemTankWaste.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.List; diff --git a/com/hbm/items/special/ItemTeleLink.java b/com/hbm/items/special/ItemTeleLink.java new file mode 100644 index 000000000..58db3ee06 --- /dev/null +++ b/com/hbm/items/special/ItemTeleLink.java @@ -0,0 +1,78 @@ +package com.hbm.items.special; + +import java.util.List; + +import com.hbm.blocks.ModBlocks; +import com.hbm.tileentity.TileEntityMachineTeleporter; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentText; +import net.minecraft.world.World; + +public class ItemTeleLink extends Item { + + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) + { + TileEntity te = world.getTileEntity(x, y, z); + + if(te != null && te instanceof TileEntityMachineTeleporter && world.getBlock(x, y, z) == ModBlocks.machine_teleporter ) { + + if(stack.stackTagCompound == null) + { + stack.stackTagCompound = new NBTTagCompound(); + + stack.stackTagCompound.setInteger("x", x); + stack.stackTagCompound.setInteger("y", y); + stack.stackTagCompound.setInteger("z", z); + + if(world.isRemote) + player.addChatMessage(new ChatComponentText("[TeleLink] Set teleporter exit to " + x + ", " + y + ", " + z + ".")); + } else { + int x1 = stack.stackTagCompound.getInteger("x"); + int y1 = stack.stackTagCompound.getInteger("y"); + int z1 = stack.stackTagCompound.getInteger("z"); + + if(world.getBlock(x1, y1, z1) == ModBlocks.machine_teleporter && world.getTileEntity(x1, y1, z1) != null && world.getTileEntity(x1, y1, z1) instanceof TileEntityMachineTeleporter) { + + ((TileEntityMachineTeleporter)te).mode = true; + ((TileEntityMachineTeleporter)te).targetX = x1; + ((TileEntityMachineTeleporter)te).targetY = y1; + ((TileEntityMachineTeleporter)te).targetZ = z1; + ((TileEntityMachineTeleporter)te).linked = true; + ((TileEntityMachineTeleporter)world.getTileEntity(x1, y1, z1)).linked = true; + + if(world.isRemote) + player.addChatMessage(new ChatComponentText("[TeleLink] Teleporters have been successfully linked.")); + + stack.stackTagCompound = null; + } else { + if(world.isRemote) + player.addChatMessage(new ChatComponentText("[TeleLink] Warning: Exit teleporter has been destroyed while linking. Values have been reset.")); + stack.stackTagCompound = null; + } + } + + player.swingItem(); + return true; + } + + return false; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) + { + if(itemstack.stackTagCompound != null) + { + list.add("Teleporter Exit x: " + itemstack.stackTagCompound.getInteger("x")); + list.add("Teleporter Exit y: " + itemstack.stackTagCompound.getInteger("y")); + list.add("Teleporter Exit z: " + itemstack.stackTagCompound.getInteger("z")); + } + } + +} diff --git a/com/hbm/items/WatzFuel.java b/com/hbm/items/special/WatzFuel.java similarity index 97% rename from com/hbm/items/WatzFuel.java rename to com/hbm/items/special/WatzFuel.java index f680da2b8..d35ec9345 100644 --- a/com/hbm/items/WatzFuel.java +++ b/com/hbm/items/special/WatzFuel.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.special; import java.util.List; diff --git a/com/hbm/items/ItemCrateCaller.java b/com/hbm/items/tool/ItemCrateCaller.java similarity index 97% rename from com/hbm/items/ItemCrateCaller.java rename to com/hbm/items/tool/ItemCrateCaller.java index 87fc1353c..40ac57158 100644 --- a/com/hbm/items/ItemCrateCaller.java +++ b/com/hbm/items/tool/ItemCrateCaller.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import java.util.List; import java.util.Random; diff --git a/com/hbm/items/ItemDesingator.java b/com/hbm/items/tool/ItemDesingator.java similarity index 98% rename from com/hbm/items/ItemDesingator.java rename to com/hbm/items/tool/ItemDesingator.java index ff693d5b5..6952b8d57 100644 --- a/com/hbm/items/ItemDesingator.java +++ b/com/hbm/items/tool/ItemDesingator.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import java.util.List; diff --git a/com/hbm/items/ItemDetonator.java b/com/hbm/items/tool/ItemDetonator.java similarity index 98% rename from com/hbm/items/ItemDetonator.java rename to com/hbm/items/tool/ItemDetonator.java index 6c3260717..f01614f94 100644 --- a/com/hbm/items/ItemDetonator.java +++ b/com/hbm/items/tool/ItemDetonator.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import java.util.List; diff --git a/com/hbm/items/ItemMatch.java b/com/hbm/items/tool/ItemMatch.java similarity index 98% rename from com/hbm/items/ItemMatch.java rename to com/hbm/items/tool/ItemMatch.java index c03d73ad1..81b85b90f 100644 --- a/com/hbm/items/ItemMatch.java +++ b/com/hbm/items/tool/ItemMatch.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; diff --git a/com/hbm/items/ItemModBucket.java b/com/hbm/items/tool/ItemModBucket.java similarity index 87% rename from com/hbm/items/ItemModBucket.java rename to com/hbm/items/tool/ItemModBucket.java index 524f10cb7..9400235fe 100644 --- a/com/hbm/items/ItemModBucket.java +++ b/com/hbm/items/tool/ItemModBucket.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import net.minecraft.block.Block; import net.minecraft.item.ItemBucket; diff --git a/com/hbm/items/ItemRamManipulator.java b/com/hbm/items/tool/ItemRamManipulator.java similarity index 99% rename from com/hbm/items/ItemRamManipulator.java rename to com/hbm/items/tool/ItemRamManipulator.java index a089dcb93..dc6981ab0 100644 --- a/com/hbm/items/ItemRamManipulator.java +++ b/com/hbm/items/tool/ItemRamManipulator.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import java.util.List; diff --git a/com/hbm/items/ItemWand.java b/com/hbm/items/tool/ItemWand.java similarity index 99% rename from com/hbm/items/ItemWand.java rename to com/hbm/items/tool/ItemWand.java index 0d635a83b..ee3256256 100644 --- a/com/hbm/items/ItemWand.java +++ b/com/hbm/items/tool/ItemWand.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import java.util.List; diff --git a/com/hbm/items/ItemWandD.java b/com/hbm/items/tool/ItemWandD.java similarity index 98% rename from com/hbm/items/ItemWandD.java rename to com/hbm/items/tool/ItemWandD.java index bd338fe8f..e81cf08fb 100644 --- a/com/hbm/items/ItemWandD.java +++ b/com/hbm/items/tool/ItemWandD.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import java.util.List; diff --git a/com/hbm/items/ItemWandS.java b/com/hbm/items/tool/ItemWandS.java similarity index 99% rename from com/hbm/items/ItemWandS.java rename to com/hbm/items/tool/ItemWandS.java index 9c8b66c0c..148215906 100644 --- a/com/hbm/items/ItemWandS.java +++ b/com/hbm/items/tool/ItemWandS.java @@ -1,4 +1,4 @@ -package com.hbm.items; +package com.hbm.items.tool; import java.util.List; import java.util.Random; diff --git a/com/hbm/items/weapon/GunBaleFlare.java b/com/hbm/items/weapon/GunBaleFlare.java new file mode 100644 index 000000000..cc45dd062 --- /dev/null +++ b/com/hbm/items/weapon/GunBaleFlare.java @@ -0,0 +1,155 @@ +package com.hbm.items.weapon; + +import java.util.List; + +import com.google.common.collect.Multimap; +import com.hbm.entity.projectile.EntityBaleflare; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.items.ModItems; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.ArrowLooseEvent; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunBaleFlare extends Item { + public static final String[] bowPullIconNameArray = new String[] { "pulling_0", "pulling_1", "pulling_2" }; + @SideOnly(Side.CLIENT) + private IIcon[] iconArray; + private static final String __OBFID = "CL_00001777"; + + public GunBaleFlare() { + this.maxStackSize = 1; + this.setMaxDamage(2500); + } + + /** + * called when the player releases the use item button. Args: itemstack, + * world, entityplayer, itemInUseCount + */ + @Override + public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { + int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; + + ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) { + return; + } + j = event.charge; + + boolean flag = p_77615_3_.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; + + if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_bf_ammo)) { + float f = j / 20.0F; + f = (f * f + f * 2.0F) / 3.0F; + + if (j < 25.0D) { + return; + } + + if (j > 25.0F) { + f = 25.0F; + } + + EntityBaleflare entityarrow = new EntityBaleflare(p_77615_2_, p_77615_3_, 3.0F * 0.25F); + + entityarrow.setIsCritical(true); + entityarrow.gravity = 0.3; + entityarrow.setDamage(1000); + + p_77615_1_.damageItem(1, p_77615_3_); + // p_77615_2_.playSoundAtEntity(p_77615_3_, "tile.piston.out", 1.0F, + // 0.5F); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.fatmanShoot", 1.0F, 1F); + + if (!flag) { + p_77615_3_.inventory.consumeInventoryItem(ModItems.gun_bf_ammo); + } + + if (!p_77615_2_.isRemote) { + p_77615_2_.spawnEntityInWorld(entityarrow); + } + } + } + + @Override + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { + return p_77654_1_; + } + + /** + * How long it takes to use or consume an item + */ + @Override + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + /** + * returns the action that specifies what animation to play when the items + * is being used + */ + @Override + public EnumAction getItemUseAction(ItemStack p_77661_1_) { + return EnumAction.bow; + } + + /** + * Called whenever this item is equipped and the right mouse button is + * pressed. Args: itemStack, world, entityPlayer + */ + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) { + return event.result; + } + + if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(ModItems.gun_bf_ammo)) { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + /** + * Return the enchantability factor of the item, most of the time is based + * on material. + */ + @Override + public int getItemEnchantability() { + return 0; + } + + public Multimap getItemAttributeModifiers() { + Multimap multimap = super.getItemAttributeModifiers(); + multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), + new AttributeModifier(field_111210_e, "Weapon modifier", (double) -0.3, 1)); + return multimap; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add("These bombs were meant for artillery, but"); + list.add("this makeshift launcher works just fine!"); + list.add(""); + list.add("Ammo: Mini Nukes"); + list.add("Damage: 1000"); + list.add("Creates small nuclear explosion."); + } +} diff --git a/com/hbm/items/weapon/GunCryolator.java b/com/hbm/items/weapon/GunCryolator.java new file mode 100644 index 000000000..d54fc2d58 --- /dev/null +++ b/com/hbm/items/weapon/GunCryolator.java @@ -0,0 +1,86 @@ +package com.hbm.items.weapon; + +import java.util.List; +import java.util.Random; + +import com.hbm.entity.projectile.EntityFire; +import com.hbm.entity.projectile.EntityLN2; +import com.hbm.entity.projectile.EntityPlasmaBeam; +import com.hbm.items.ModItems; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunCryolator extends Item { + + Random rand = new Random(); + + public GunCryolator() { + this.maxStackSize = 1; + } + + @Override + public EnumAction getItemUseAction(ItemStack par1ItemStack) { + return EnumAction.bow; + } + + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + public void onUsingTick(ItemStack stack, EntityPlayer player, int count) { + World world = player.worldObj; + + boolean flag = player.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; + if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_cryolator_ammo))) { + EntityLN2 entityarrow = new EntityLN2(world, player, 3.0F); + + if (flag) { + entityarrow.canBePickedUp = 2; + } else { + if (count % 10 == 0) + player.inventory.consumeInventoryItem(ModItems.gun_cryolator_ammo); + } + + System.out.println(count); + + if (count % 5 == 0) + world.playSoundAtEntity(player, "hbm:weapon.cryolatorShoot", 1.0F, 1F); + + if (!world.isRemote) { + world.spawnEntityInWorld(entityarrow); + } + } + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add("Ice to meet you!"); + list.add(""); + list.add("Ammo: Cryolator Ammo"); + list.add("Damage: 5"); + } +} diff --git a/com/hbm/items/weapon/GunEMPRay.java b/com/hbm/items/weapon/GunEMPRay.java new file mode 100644 index 000000000..4003305c2 --- /dev/null +++ b/com/hbm/items/weapon/GunEMPRay.java @@ -0,0 +1,144 @@ +package com.hbm.items.weapon; + +import java.util.List; +import java.util.Random; + +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.effect.EntityEMPBlast; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityDischarge; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.explosion.ExplosionNukeGeneric; +import com.hbm.items.ModItems; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.ArrowLooseEvent; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunEMPRay extends Item { + + Random rand = new Random(); + + public GunEMPRay() { + this.maxStackSize = 1; + } + + @Override + public EnumAction getItemUseAction(ItemStack par1ItemStack) { + return EnumAction.bow; + } + + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + /** + * called when the player releases the use item button. Args: itemstack, + * world, entityplayer, itemInUseCount + */ + @Override + public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { + int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; + + ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) { + return; + } + j = event.charge; + + boolean flag = p_77615_3_.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; + + if (!p_77615_3_.isSneaking()) { + if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_emp_ammo)) { + float f = j / 20.0F; + f = (f * f + f * 2.0F) / 3.0F; + + if (j < 25.0D) { + return; + } + + if (j > 25.0F) { + f = 25.0F; + } + + EntityDischarge entityarrow = new EntityDischarge(p_77615_2_, p_77615_3_, 1.0F); + + entityarrow.setIsCritical(true); + + p_77615_1_.damageItem(1, p_77615_3_); + // p_77615_2_.playSoundAtEntity(p_77615_3_, "tile.piston.out", + // 1.0F, 0.5F); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.fatmanShoot", 1.0F, 1F); + + if (!flag) { + p_77615_3_.inventory.consumeInventoryItem(ModItems.gun_emp_ammo); + } + + if (!p_77615_2_.isRemote) { + p_77615_2_.spawnEntityInWorld(entityarrow); + } + } + } else { + if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_emp_ammo)) { + + if (j < 25.0D) { + return; + } + + if (!flag) { + p_77615_3_.inventory.consumeInventoryItem(ModItems.gun_emp_ammo); + } + + EntityEMPBlast cloud = new EntityEMPBlast(p_77615_3_.worldObj, 25); + cloud.posX = p_77615_3_.posX; + cloud.posY = p_77615_3_.posY + 1.0F; + cloud.posZ = p_77615_3_.posZ; + if (!p_77615_2_.isRemote) { + p_77615_2_.spawnEntityInWorld(cloud); + } + + ExplosionNukeGeneric.empBlast(p_77615_3_.worldObj, (int)p_77615_3_.posX, (int)p_77615_3_.posY, (int)p_77615_3_.posZ, 25); + } + } + } + + @Override + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { + return p_77654_1_; + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add("Hold right mouse buttom"); + list.add("to shoot ball lightning,"); + list.add("sneak to create EMP wave!"); + list.add(""); + list.add("Ammo: Energy Cell"); + list.add("Damage: 25 - 35"); + } +} diff --git a/com/hbm/items/weapon/GunFatman.java b/com/hbm/items/weapon/GunFatman.java new file mode 100644 index 000000000..ea50a1281 --- /dev/null +++ b/com/hbm/items/weapon/GunFatman.java @@ -0,0 +1,154 @@ +package com.hbm.items.weapon; + +import java.util.List; + +import com.google.common.collect.Multimap; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.entity.projectile.EntityRocket; +import com.hbm.items.ModItems; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.ArrowLooseEvent; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunFatman extends Item { + public static final String[] bowPullIconNameArray = new String[] { "pulling_0", "pulling_1", "pulling_2" }; + @SideOnly(Side.CLIENT) + private IIcon[] iconArray; + private static final String __OBFID = "CL_00001777"; + + public GunFatman() { + this.maxStackSize = 1; + this.setMaxDamage(2500); + } + + /** + * called when the player releases the use item button. Args: itemstack, + * world, entityplayer, itemInUseCount + */ + @Override + public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { + int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; + + ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) { + return; + } + j = event.charge; + + boolean flag = p_77615_3_.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; + + if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_fatman_ammo)) { + float f = j / 20.0F; + f = (f * f + f * 2.0F) / 3.0F; + + if (j < 25.0D) { + return; + } + + if (j > 25.0F) { + f = 25.0F; + } + + EntityMiniNuke entityarrow = new EntityMiniNuke(p_77615_2_, p_77615_3_, 3.0F); + + entityarrow.setIsCritical(true); + entityarrow.gravity = 0.3; + entityarrow.setDamage(1000); + + p_77615_1_.damageItem(1, p_77615_3_); + // p_77615_2_.playSoundAtEntity(p_77615_3_, "tile.piston.out", 1.0F, + // 0.5F); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.fatmanShoot", 1.0F, 1F); + + if (!flag) { + p_77615_3_.inventory.consumeInventoryItem(ModItems.gun_fatman_ammo); + } + + if (!p_77615_2_.isRemote) { + p_77615_2_.spawnEntityInWorld(entityarrow); + } + } + } + + @Override + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { + return p_77654_1_; + } + + /** + * How long it takes to use or consume an item + */ + @Override + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + /** + * returns the action that specifies what animation to play when the items + * is being used + */ + @Override + public EnumAction getItemUseAction(ItemStack p_77661_1_) { + return EnumAction.bow; + } + + /** + * Called whenever this item is equipped and the right mouse button is + * pressed. Args: itemStack, world, entityPlayer + */ + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) { + return event.result; + } + + if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(ModItems.gun_fatman_ammo)) { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + /** + * Return the enchantability factor of the item, most of the time is based + * on material. + */ + @Override + public int getItemEnchantability() { + return 0; + } + + public Multimap getItemAttributeModifiers() { + Multimap multimap = super.getItemAttributeModifiers(); + multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), + new AttributeModifier(field_111210_e, "Weapon modifier", (double) -0.3, 1)); + return multimap; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add("When normal nukes aren't enough..."); + list.add(""); + list.add("Ammo: Mini Nukes"); + list.add("Damage: 1000"); + list.add("Creates small nuclear explosion."); + } +} diff --git a/com/hbm/items/weapon/GunImmolator.java b/com/hbm/items/weapon/GunImmolator.java new file mode 100644 index 000000000..1a7bd47c7 --- /dev/null +++ b/com/hbm/items/weapon/GunImmolator.java @@ -0,0 +1,122 @@ +package com.hbm.items.weapon; + +import java.util.List; +import java.util.Random; + +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityFire; +import com.hbm.entity.projectile.EntityPlasmaBeam; +import com.hbm.items.ModItems; +import com.hbm.lib.Library; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunImmolator extends Item { + + Random rand = new Random(); + + public GunImmolator() { + this.maxStackSize = 1; + } + + @Override + public EnumAction getItemUseAction(ItemStack par1ItemStack) { + return EnumAction.bow; + } + + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + public void onUsingTick(ItemStack stack, EntityPlayer player, int count) { + World world = player.worldObj; + + if (!player.isSneaking()) { + boolean flag = player.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; + if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_immolator_ammo))) { + EntityFire entityarrow = new EntityFire(world, player, 3.0F); + entityarrow.setDamage(6 + rand.nextInt(5)); + + if (flag) { + entityarrow.canBePickedUp = 2; + } else { + if(count % 10 == 0) + player.inventory.consumeInventoryItem(ModItems.gun_immolator_ammo); + } + + System.out.println(count); + + if(count == this.getMaxItemUseDuration(stack)) + world.playSoundAtEntity(player, "hbm:weapon.flamethrowerIgnite", 1.0F, 1F); + if(count % 5 == 0) + world.playSoundAtEntity(player, "hbm:weapon.flamethrowerShoot", 1.0F, 1F); + + if (!world.isRemote) { + world.spawnEntityInWorld(entityarrow); + } + } + } else { + boolean flag = player.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; + if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_immolator_ammo))) { + + EntityPlasmaBeam plasma = new EntityPlasmaBeam(world, player, 1F); + + if (flag) { + plasma.canBePickedUp = 2; + } else { + if(count % 4 == 0) + player.inventory.consumeInventoryItem(ModItems.gun_immolator_ammo); + } + + if(count == this.getMaxItemUseDuration(stack)) + world.playSoundAtEntity(player, "hbm:weapon.immolatorIgnite", 1.0F, 1F); + if(count % 10 == 0) + world.playSoundAtEntity(player, "hbm:weapon.immolatorShoot", 1.0F, 1F); + + if (!world.isRemote) + world.spawnEntityInWorld(plasma); + } + } + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add("Hold right mouse button"); + list.add("to shoot fire,"); + list.add("sneak to shoot"); + list.add("plasma beams!"); + list.add(""); + list.add("Ammo: Immolator Fuel"); + list.add("Damage: 5"); + list.add("Secondary Damage: 25 - 45"); + } +} diff --git a/com/hbm/items/weapon/GunMIRV.java b/com/hbm/items/weapon/GunMIRV.java new file mode 100644 index 000000000..cc01229a4 --- /dev/null +++ b/com/hbm/items/weapon/GunMIRV.java @@ -0,0 +1,153 @@ +package com.hbm.items.weapon; + +import java.util.List; + +import com.google.common.collect.Multimap; +import com.hbm.entity.projectile.EntityMiniMIRV; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.items.ModItems; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.ArrowLooseEvent; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunMIRV extends Item { + public static final String[] bowPullIconNameArray = new String[] { "pulling_0", "pulling_1", "pulling_2" }; + @SideOnly(Side.CLIENT) + private IIcon[] iconArray; + private static final String __OBFID = "CL_00001777"; + + public GunMIRV() + { + this.maxStackSize = 1; + this.setMaxDamage(2500); + } + + /** + * called when the player releases the use item button. Args: itemstack, + * world, entityplayer, itemInUseCount + */ + @Override + public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { + int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; + + ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) { + return; + } + j = event.charge; + + boolean flag = p_77615_3_.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; + + if (flag || p_77615_3_.inventory.hasItem(ModItems.gun_mirv_ammo)) { + float f = j / 20.0F; + f = (f * f + f * 2.0F) / 3.0F; + + if (j < 25.0D) { + return; + } + + if (j > 25.0F) { + f = 25.0F; + } + + EntityMiniMIRV entityarrow = new EntityMiniMIRV(p_77615_2_, p_77615_3_, 3.0F); + + entityarrow.setIsCritical(true); + entityarrow.gravity = 0.3; + entityarrow.setDamage(1000); + + p_77615_1_.damageItem(1, p_77615_3_); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.fatmanShoot", 1.0F, 1F); + + if (!flag) { + p_77615_3_.inventory.consumeInventoryItem(ModItems.gun_mirv_ammo); + } + + if (!p_77615_2_.isRemote) { + p_77615_2_.spawnEntityInWorld(entityarrow); + } + } + } + + @Override + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { + return p_77654_1_; + } + + /** + * How long it takes to use or consume an item + */ + @Override + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + /** + * returns the action that specifies what animation to play when the items + * is being used + */ + @Override + public EnumAction getItemUseAction(ItemStack p_77661_1_) { + return EnumAction.bow; + } + + /** + * Called whenever this item is equipped and the right mouse button is + * pressed. Args: itemStack, world, entityPlayer + */ + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + MinecraftForge.EVENT_BUS.post(event); + if (event.isCanceled()) { + return event.result; + } + + if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(ModItems.gun_mirv_ammo)) { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + /** + * Return the enchantability factor of the item, most of the time is based + * on material. + */ + @Override + public int getItemEnchantability() { + return 0; + } + + public Multimap getItemAttributeModifiers() { + Multimap multimap = super.getItemAttributeModifiers(); + multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), + new AttributeModifier(field_111210_e, "Weapon modifier", (double) -0.3, 1)); + return multimap; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add("Ummm...are you sure you want to use that?"); + list.add(""); + list.add("Ammo: Mini MIRV"); + list.add("Damage: 1000"); + list.add("Splits into eight mini nukes."); + } +} diff --git a/com/hbm/items/GunMP.java b/com/hbm/items/weapon/GunMP.java similarity index 81% rename from com/hbm/items/GunMP.java rename to com/hbm/items/weapon/GunMP.java index e3361551d..cbfce5d5c 100644 --- a/com/hbm/items/GunMP.java +++ b/com/hbm/items/weapon/GunMP.java @@ -1,10 +1,11 @@ -package com.hbm.items; +package com.hbm.items.weapon; import java.util.List; import java.util.Random; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityCombineBall; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityCombineBall; +import com.hbm.items.ModItems; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; @@ -22,7 +23,6 @@ public class GunMP extends Item { public GunMP() { this.maxStackSize = 1; - this.setMaxDamage(10000); } @Override @@ -52,10 +52,11 @@ public class GunMP extends Item { || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_mp_ammo)) && count % 3 == 0) { - EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 35, 45, false, false); + EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 100, 150, false, false); entityarrow.setDamage(100 + rand.nextInt(50)); - world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4)); + //world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4)); + world.playSoundAtEntity(player, "hbm:weapon.rifleShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F)); if (flag) { entityarrow.canBePickedUp = 2; @@ -83,7 +84,7 @@ public class GunMP extends Item { list.add("whose blood is that? The former"); list.add("user's? The victim's? Both?"); list.add(""); - list.add("Ammo: Smal Propellantless Machine Gun Round"); - list.add("Damage: x - x"); + list.add("Ammo: Small Propellantless Machine Gun Round"); + list.add("Damage: 100 - 150"); } } diff --git a/com/hbm/items/GunOSIPR.java b/com/hbm/items/weapon/GunOSIPR.java similarity index 76% rename from com/hbm/items/GunOSIPR.java rename to com/hbm/items/weapon/GunOSIPR.java index e99de0150..2653dc0ae 100644 --- a/com/hbm/items/GunOSIPR.java +++ b/com/hbm/items/weapon/GunOSIPR.java @@ -1,11 +1,12 @@ -package com.hbm.items; +package com.hbm.items.weapon; import java.util.List; import java.util.Random; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityCombineBall; -import com.hbm.entity.EntityMiniNuke; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityCombineBall; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; import net.minecraft.enchantment.Enchantment; @@ -59,10 +60,11 @@ public class GunOSIPR extends Item { boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_osipr_ammo)) && count % 3 == 0) { - EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 35, 45, false, "chopper"); - entityarrow.setDamage(35 + rand.nextInt(45 - 35)); + EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 5, 15, false, "chopper"); + entityarrow.setDamage(5 + rand.nextInt(10)); - world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4)); + //world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4)); + world.playSoundAtEntity(player, "hbm:weapon.osiprShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F)); if (flag) { entityarrow.canBePickedUp = 2; @@ -77,11 +79,12 @@ public class GunOSIPR extends Item { } else { boolean flag = player.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; - if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_osipr_ammo2)) && count % 50 == 0 && (this.getMaxItemUseDuration(stack) - count) != 0) { + if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_osipr_ammo2)) && count % 30 == 0 && (this.getMaxItemUseDuration(stack) - count) != 0) { EntityCombineBall entityarrow = new EntityCombineBall(player.worldObj, player, 3.0F); entityarrow.setDamage(35 + rand.nextInt(45 - 35)); - world.playSoundAtEntity(player, "tile.piston.in", 1.0F, 0.75F); + //world.playSoundAtEntity(player, "tile.piston.in", 1.0F, 0.75F); + world.playSoundAtEntity(player, "hbm:weapon.singFlyby", 1.0F, 1F); if (flag) { entityarrow.canBePickedUp = 2; @@ -93,6 +96,9 @@ public class GunOSIPR extends Item { world.spawnEntityInWorld(entityarrow); } } + + if((this.getMaxItemUseDuration(stack) - count) % 30 == 15 && (player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_osipr_ammo2))) + world.playSoundAtEntity(player, "hbm:weapon.osiprCharging", 1.0F, 1F); } } @@ -111,7 +117,7 @@ public class GunOSIPR extends Item { list.add(""); list.add("Ammo: Dark Energy Plugs"); list.add("Secondary Ammo: Combine Ball"); - list.add("Damage: 35 - 45"); + list.add("Damage: 5 - 15"); list.add("Secondary Damage: 1000"); } diff --git a/com/hbm/items/weapon/GunRevolver.java b/com/hbm/items/weapon/GunRevolver.java new file mode 100644 index 000000000..2d31605ce --- /dev/null +++ b/com/hbm/items/weapon/GunRevolver.java @@ -0,0 +1,234 @@ +package com.hbm.items.weapon; + +import java.util.List; +import java.util.Random; + +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.items.ModItems; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.player.ArrowLooseEvent; +import net.minecraftforge.event.entity.player.ArrowNockEvent; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class GunRevolver extends Item { + public static final String[] bowPullIconNameArray = new String[] { "pulling_0", "pulling_1", "pulling_2" }; + @SideOnly(Side.CLIENT) + private IIcon[] iconArray; + private static final String __OBFID = "CL_00001777"; + private Item ammo; + private int dmgMin; + private int dmgMax; + private boolean instakill = false; + private boolean rad = false; + Random rand = new Random(); + + public GunRevolver(Item ammo, int dmgMin, int dmgMax, boolean instakill, boolean rad) { + this.maxStackSize = 1; + if (this == ModItems.gun_revolver_iron) { + this.setMaxDamage(100); + } + if (this == ModItems.gun_revolver) { + this.setMaxDamage(500); + } + if (this == ModItems.gun_revolver_gold) { + this.setMaxDamage(1000); + } + if (this == ModItems.gun_revolver_lead) { + this.setMaxDamage(250); + } + if (this == ModItems.gun_revolver_schrabidium) { + this.setMaxDamage(100000); + } + if (this == ModItems.gun_revolver_cursed) { + this.setMaxDamage(5000); + } + + this.ammo = ammo; + this.dmgMin = dmgMin; + this.dmgMax = dmgMax; + this.instakill = instakill; + this.rad = rad; + } + + @Override + public EnumRarity getRarity(ItemStack p_77613_1_) { + + if (this == ModItems.gun_revolver_schrabidium) { + return EnumRarity.rare; + } + + if (this == ModItems.gun_revolver_cursed) { + return EnumRarity.uncommon; + } + + return EnumRarity.common; + } + + /** + * called when the player releases the use item button. Args: itemstack, + * world, entityplayer, itemInUseCount + */ + @Override + public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_) { + int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_; + + ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j); + MinecraftForge.EVENT_BUS.post(event); + j = event.charge; + + boolean flag = p_77615_3_.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0; + + if (flag || p_77615_3_.inventory.hasItem(ammo)) { + float f = j / 20.0F; + f = (f * f + f * 2.0F) / 3.0F; + + if (j < 10.0D) { + return; + } + + if (j > 10.0F) { + f = 10.0F; + } + + EntityBullet entityarrow = new EntityBullet(p_77615_2_, p_77615_3_, 3.0F, dmgMin, dmgMax, instakill, rad); + entityarrow.setDamage(dmgMin + rand.nextInt(dmgMax - dmgMin)); + + p_77615_1_.damageItem(1, p_77615_3_); + if (this == ModItems.gun_revolver || this == ModItems.gun_revolver_iron + || this == ModItems.gun_revolver_gold || this == ModItems.gun_revolver_lead) { + // p_77615_2_.playSoundAtEntity(p_77615_3_, "random.explode", + // 1.0F, 3.0F); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.revolverShoot", 1.0F, 1.0F); + } + if (this == ModItems.gun_revolver_cursed) { + // p_77615_2_.playSoundAtEntity(p_77615_3_, "random.explode", + // 3.0F, 1.5F); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.heavyShoot", 3.0F, 1.0F); + } + if (this == ModItems.gun_revolver_schrabidium) { + // p_77615_2_.playSoundAtEntity(p_77615_3_, "random.explode", + // 1.0F, 3.0F); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.schrabidiumShoot", 1.0F, 1.0F); + } + + if (flag) { + entityarrow.canBePickedUp = 2; + } else { + p_77615_3_.inventory.consumeInventoryItem(ammo); + } + + if (!p_77615_2_.isRemote) { + p_77615_2_.spawnEntityInWorld(entityarrow); + + if (this == ModItems.gun_revolver_cursed && rand.nextInt(3) == 0) { + p_77615_3_.addPotionEffect(new PotionEffect(Potion.wither.id, 5 * 20, 0)); + } + } + } + } + + @Override + public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) { + return p_77654_1_; + } + + /** + * How long it takes to use or consume an item + */ + @Override + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + /** + * returns the action that specifies what animation to play when the items + * is being used + */ + @Override + public EnumAction getItemUseAction(ItemStack p_77661_1_) { + return EnumAction.bow; + } + + /** + * Called whenever this item is equipped and the right mouse button is + * pressed. Args: itemStack, world, entityPlayer + */ + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + MinecraftForge.EVENT_BUS.post(event); + + if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(ammo)) { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + /** + * Return the enchantability factor of the item, most of the time is based + * on material. + */ + @Override + public int getItemEnchantability() { + return 1; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + if (this == ModItems.gun_revolver_iron) { + list.add("Cheap."); + list.add(""); + list.add("Ammo: Iron Bullets"); + list.add("Damage: 5 - 15"); + } + if (this == ModItems.gun_revolver) { + list.add("I feel like a cowboy!"); + list.add(""); + list.add("Ammo: Lead Bullets"); + list.add("Damage: 10 - 25"); + } + if (this == ModItems.gun_revolver_gold) { + list.add("GoldenEye would be proud!"); + list.add(""); + list.add("Ammo: Golden Bullets"); + list.add("Damage: 20 - 30"); + } + if (this == ModItems.gun_revolver_lead) { + list.add("Made from lead for your safety!"); + list.add(""); + list.add("Ammo: Atomic Bullets"); + list.add("Damage: 5 - 15"); + list.add("Bullets are radioactive."); + } + if (this == ModItems.gun_revolver_schrabidium) { + list.add("Kills everyone and everything."); + list.add(""); + list.add("Ammo: Schrabidium Bullets"); + list.add("Damage: 10000 - 100000"); + list.add("Sets enemy's health to zero."); + } + if (this == ModItems.gun_revolver_cursed) { + list.add("You're dead."); + list.add(""); + list.add("Ammo: Steel Bullets"); + list.add("Damage: 25 - 40"); + list.add("33% chance of user being withered."); + } + } +} diff --git a/com/hbm/items/GunRpg.java b/com/hbm/items/weapon/GunRpg.java similarity index 94% rename from com/hbm/items/GunRpg.java rename to com/hbm/items/weapon/GunRpg.java index 57553c4ac..ee28ee31a 100644 --- a/com/hbm/items/GunRpg.java +++ b/com/hbm/items/weapon/GunRpg.java @@ -1,9 +1,10 @@ -package com.hbm.items; +package com.hbm.items.weapon; import java.util.List; -import com.hbm.entity.EntityMiniNuke; -import com.hbm.entity.EntityRocket; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.entity.projectile.EntityRocket; +import com.hbm.items.ModItems; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -73,7 +74,7 @@ public class GunRpg extends Item } p_77615_1_.damageItem(1, p_77615_3_); - p_77615_2_.playSoundAtEntity(p_77615_3_, "fireworks.launch", 1.0F, 0.25F); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.rpgShoot", 1.0F, 0.25F); if (flag) { diff --git a/com/hbm/items/weapon/GunSMG.java b/com/hbm/items/weapon/GunSMG.java new file mode 100644 index 000000000..300009995 --- /dev/null +++ b/com/hbm/items/weapon/GunSMG.java @@ -0,0 +1,85 @@ +package com.hbm.items.weapon; + +import java.util.List; +import java.util.Random; + +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.items.ModItems; + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.event.entity.player.ArrowNockEvent; + +public class GunSMG extends Item { + + Random rand = new Random(); + + public GunSMG() + { + this.maxStackSize = 1; + } + + @Override + public EnumAction getItemUseAction(ItemStack par1ItemStack) { + return EnumAction.bow; + } + + public int getMaxItemUseDuration(ItemStack p_77626_1_) { + return 72000; + } + + @Override + public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) { + ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_); + { + p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_)); + } + + return p_77659_1_; + } + + public void onUsingTick(ItemStack stack, EntityPlayer player, int count) + { + World world = player.worldObj; + + boolean flag = player.capabilities.isCreativeMode + || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; + if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_mp40_ammo)) + && count % 2 == 0) { + EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 2, 8, false, false); + entityarrow.setDamage(1 + rand.nextInt(8)); + + //world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4)); + world.playSoundAtEntity(player, "hbm:weapon.rifleShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F)); + + if (flag) { + entityarrow.canBePickedUp = 2; + } else { + player.inventory.consumeInventoryItem(ModItems.gun_mp40_ammo); + } + + if (!world.isRemote) { + world.spawnEntityInWorld(entityarrow); + } + } + } + + @Override + public int getItemEnchantability() { + return 0; + } + + @Override + public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { + + list.add("Ratatatatatatatata!!"); + list.add(""); + list.add("Ammo: SMG Round"); + list.add("Damage: 2 - 8"); + } +} diff --git a/com/hbm/items/GunRevolver.java b/com/hbm/items/weapon/GunSuicide.java similarity index 54% rename from com/hbm/items/GunRevolver.java rename to com/hbm/items/weapon/GunSuicide.java index c51dbb8e6..553448cbf 100644 --- a/com/hbm/items/GunRevolver.java +++ b/com/hbm/items/weapon/GunSuicide.java @@ -1,8 +1,14 @@ -package com.hbm.items; +package com.hbm.items.weapon; import java.util.List; import java.util.Random; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.items.ModItems; +import com.hbm.lib.ModDamageSource; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; @@ -18,73 +24,30 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.ArrowLooseEvent; import net.minecraftforge.event.entity.player.ArrowNockEvent; -import com.hbm.entity.EntityBullet; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class GunRevolver extends Item -{ +public class GunSuicide extends Item { + public static final String[] bowPullIconNameArray = new String[] {"pulling_0", "pulling_1", "pulling_2"}; @SideOnly(Side.CLIENT) private IIcon[] iconArray; private static final String __OBFID = "CL_00001777"; private Item ammo; - private int dmgMin; - private int dmgMax; - private boolean instakill = false; - private boolean rad = false; Random rand = new Random(); - public GunRevolver(Item ammo, int dmgMin, int dmgMax, boolean instakill, boolean rad) + public GunSuicide() { this.maxStackSize = 1; - if(this == ModItems.gun_revolver_iron) - { - this.setMaxDamage(100); - } - if(this == ModItems.gun_revolver) + //if(this == ModItems.gun_revolver) { this.setMaxDamage(500); } - if(this == ModItems.gun_revolver_gold) - { - this.setMaxDamage(1000); - } - if(this == ModItems.gun_revolver_lead) - { - this.setMaxDamage(250); - } - if(this == ModItems.gun_revolver_schrabidium) - { - this.setMaxDamage(100000); - } - if(this == ModItems.gun_revolver_cursed) - { - this.setMaxDamage(5000); - } - this.ammo = ammo; - this.dmgMin = dmgMin; - this.dmgMax = dmgMax; - this.instakill = instakill; - this.rad = rad; + this.ammo = ModItems.gun_revolver_ammo; } @Override public EnumRarity getRarity(ItemStack p_77613_1_) { - if(this == ModItems.gun_revolver_schrabidium) - { - return EnumRarity.rare; - } - - if(this == ModItems.gun_revolver_cursed) - { - return EnumRarity.uncommon; - } - - return EnumRarity.common; + return EnumRarity.uncommon; } /** @@ -117,23 +80,15 @@ public class GunRevolver extends Item f = 10.0F; } - EntityBullet entityarrow = new EntityBullet(p_77615_2_, p_77615_3_, 3.0F, dmgMin, dmgMax, instakill, rad); - entityarrow.setDamage(dmgMin + rand.nextInt(dmgMax - dmgMin)); - p_77615_1_.damageItem(1, p_77615_3_); - if(this == ModItems.gun_revolver || this == ModItems.gun_revolver_iron || this == ModItems.gun_revolver_gold || this == ModItems.gun_revolver_lead || this == ModItems.gun_revolver_schrabidium) + //if(this == ModItems.gun_revolver || this == ModItems.gun_revolver_iron || this == ModItems.gun_revolver_gold || this == ModItems.gun_revolver_lead) { - p_77615_2_.playSoundAtEntity(p_77615_3_, "random.explode", 1.0F, 3.0F); - } - if(this == ModItems.gun_revolver_cursed) - { - p_77615_2_.playSoundAtEntity(p_77615_3_, "random.explode", 3.0F, 1.5F); + //p_77615_2_.playSoundAtEntity(p_77615_3_, "random.explode", 1.0F, 3.0F); + p_77615_2_.playSoundAtEntity(p_77615_3_, "hbm:weapon.revolverShoot", 1.0F, 1.0F); } if (flag) - { - entityarrow.canBePickedUp = 2; - } + { } else { p_77615_3_.inventory.consumeInventoryItem(ammo); @@ -141,12 +96,7 @@ public class GunRevolver extends Item if (!p_77615_2_.isRemote) { - p_77615_2_.spawnEntityInWorld(entityarrow); - - if(this == ModItems.gun_revolver_cursed && rand.nextInt(3) == 0) - { - p_77615_3_.addPotionEffect(new PotionEffect(Potion.wither.id, 5 * 20, 0)); - } + p_77615_3_.attackEntityFrom(ModDamageSource.suicide, Float.POSITIVE_INFINITY); } } } @@ -204,50 +154,13 @@ public class GunRevolver extends Item @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { - if(this == ModItems.gun_revolver_iron) + //if(this == ModItems.gun_revolver) { - list.add("Cheap."); - list.add(""); - list.add("Ammo: Iron Bullets"); - list.add("Damage: 5 - 15"); - } - if(this == ModItems.gun_revolver) - { - list.add("I feel like a cowboy!"); + list.add("I've seen things..."); + list.add("...I shouldn't have seen."); list.add(""); list.add("Ammo: Lead Bullets"); - list.add("Damage: 10 - 25"); - } - if(this == ModItems.gun_revolver_gold) - { - list.add("GoldenEye would be proud!"); - list.add(""); - list.add("Ammo: Golden Bullets"); - list.add("Damage: 20 - 30"); - } - if(this == ModItems.gun_revolver_lead) - { - list.add("Made from lead for your safety!"); - list.add(""); - list.add("Ammo: Atomic Bullets"); - list.add("Damage: 5 - 15"); - list.add("Bullets are radioactive."); - } - if(this == ModItems.gun_revolver_schrabidium) - { - list.add("Kills everyone and everything."); - list.add(""); - list.add("Ammo: Schrabidium Bullets"); - list.add("Damage: 10000 - 100000"); - list.add("Sets enemy's health to zero."); - } - if(this == ModItems.gun_revolver_cursed) - { - list.add("You're dead."); - list.add(""); - list.add("Ammo: Steel Bullets"); - list.add("Damage: 25 - 40"); - list.add("33% chance of user being withered."); + list.add("Damage: infinite"); } } } diff --git a/com/hbm/items/GunXVL1456.java b/com/hbm/items/weapon/GunXVL1456.java similarity index 82% rename from com/hbm/items/GunXVL1456.java rename to com/hbm/items/weapon/GunXVL1456.java index 2f211746d..9cc1c40a6 100644 --- a/com/hbm/items/GunXVL1456.java +++ b/com/hbm/items/weapon/GunXVL1456.java @@ -1,11 +1,15 @@ -package com.hbm.items; +package com.hbm.items.weapon; import java.util.List; import java.util.Random; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityMiniNuke; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.items.ModItems; import com.hbm.lib.ModDamageSource; +import com.hbm.sound.MovingSoundPlayerLoop; +import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound; +import com.hbm.sound.MovingSoundXVL1456; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; @@ -16,6 +20,7 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.ArrowLooseEvent; @@ -55,8 +60,7 @@ public class GunXVL1456 extends Item { entitybullet.setDamage(j + rand.nextInt(6)); - world.playSoundAtEntity(player, "fireworks.blast", 1.0F, - 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) * 0.75F); + world.playSoundAtEntity(player, "hbm:weapon.tauShoot", 1.0F, 0.5F); if (flag) { entitybullet.canBePickedUp = 2; @@ -104,10 +108,10 @@ public class GunXVL1456 extends Item { || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0; if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_xvl1456_ammo)) && count % 4 == 0) { - EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 35, 45, false, "eyyOk"); - entityarrow.setDamage(35 + rand.nextInt(45 - 35)); + EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 25, 65, false, "eyyOk"); + entityarrow.setDamage(25 + rand.nextInt(65 - 25)); - world.playSoundAtEntity(player, "fireworks.blast", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + 0.5F); + world.playSoundAtEntity(player, "hbm:weapon.tauShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F)); if (flag) { entityarrow.canBePickedUp = 2; @@ -129,17 +133,13 @@ public class GunXVL1456 extends Item { } } } - if(count % 2 == 0) - { - //world.playSoundAtEntity(player, "dig.stone", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + 1F); - //world.playSoundAtEntity(player, "random.click", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + 1F); - world.playSoundAtEntity(player, "random.click", 1.0F, (this.getMaxItemUseDuration(stack) - count) * 0.01F); - } + + world.playSoundAtEntity(player, "hbm:misc.nullTau", 0.1F, 1.0F); } if(player instanceof EntityPlayer) { - if(((EntityPlayer)player).getItemInUseCount() < getMaxItemUseDuration(stack) - 200 && player.isSneaking() && ((EntityPlayer)player).getItemInUseCount() != 0) + if(count < getMaxItemUseDuration(stack) - 200 && player.isSneaking() && count != 0) { if(!world.isRemote) { @@ -167,7 +167,7 @@ public class GunXVL1456 extends Item { list.add("stronger shots!"); list.add(""); list.add("Ammo: Depleted Uranium"); - list.add("Damage: 35 - 45"); + list.add("Damage: 25 - 65"); list.add("Charged Damage: 40 - 400"); list.add("Projectiles penetrate walls."); } diff --git a/com/hbm/items/GunZOMG.java b/com/hbm/items/weapon/GunZOMG.java similarity index 94% rename from com/hbm/items/GunZOMG.java rename to com/hbm/items/weapon/GunZOMG.java index 6ae964ea9..699d62e52 100644 --- a/com/hbm/items/GunZOMG.java +++ b/com/hbm/items/weapon/GunZOMG.java @@ -1,11 +1,12 @@ -package com.hbm.items; +package com.hbm.items.weapon; import java.util.List; import java.util.Random; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityCombineBall; -import com.hbm.entity.EntityRainbow; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityCombineBall; +import com.hbm.entity.projectile.EntityRainbow; +import com.hbm.items.ModItems; import com.hbm.lib.Library; import net.minecraft.enchantment.Enchantment; @@ -133,7 +134,7 @@ public class GunZOMG extends Item { entityarrow4.setDamage(35 + rand.nextInt(45 - 35)); entityarrow5.setDamage(35 + rand.nextInt(45 - 35)); - world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4)); + world.playSoundAtEntity(player, "hbm:weapon.osiprShoot", 1.0F, 0.6F + (rand.nextFloat() * 0.4F)); if (!world.isRemote) { world.spawnEntityInWorld(entityarrow); @@ -156,7 +157,7 @@ public class GunZOMG extends Item { entityarrow4.setDamage(10000 + rand.nextInt(90000)); //world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4)); - world.playSoundAtEntity(player, "ambient.weather.thunder", 1.0F, 2); + world.playSoundAtEntity(player, "hbm:weapon.zomgShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F)); if (!world.isRemote) { world.spawnEntityInWorld(entityarrow); diff --git a/com/hbm/items/weapon/ItemClip.java b/com/hbm/items/weapon/ItemClip.java new file mode 100644 index 000000000..b004d102e --- /dev/null +++ b/com/hbm/items/weapon/ItemClip.java @@ -0,0 +1,171 @@ +package com.hbm.items.weapon; + +import com.hbm.blocks.ModBlocks; +import com.hbm.items.ModItems; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; + +public class ItemClip extends Item { + + public ItemClip() + { + this.setMaxDamage(1); + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + stack.stackSize--; + if(stack.stackSize <= 0) + stack.damageItem(5, player); + + if(this == ModItems.clip_revolver_iron) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_iron_ammo, 20))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_iron_ammo, 20), false); + } + } + + if(this == ModItems.clip_revolver) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_ammo, 12))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_ammo, 12), false); + } + } + + if(this == ModItems.clip_revolver_gold) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_gold_ammo, 4))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_gold_ammo, 4), false); + } + } + + if(this == ModItems.clip_revolver_schrabidium) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_schrabidium_ammo, 2))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_schrabidium_ammo, 2), false); + } + } + + if(this == ModItems.clip_rpg) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_rpg_ammo, 3))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_rpg_ammo, 3), false); + } + } + + if(this == ModItems.clip_osipr) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_osipr_ammo, 30))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_osipr_ammo, 30), false); + } + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_osipr_ammo2, 1))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_osipr_ammo2, 1), false); + } + } + + if(this == ModItems.clip_xvl1456) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_xvl1456_ammo, 60))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_xvl1456_ammo, 60), false); + } + } + + if(this == ModItems.clip_revolver_lead) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_lead_ammo, 12))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_lead_ammo, 12), false); + } + } + + if(this == ModItems.clip_revolver_cursed) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_revolver_cursed_ammo, 17))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_revolver_cursed_ammo, 17), false); + } + } + + if(this == ModItems.clip_fatman) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_fatman_ammo, 6))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_fatman_ammo, 6), false); + } + } + + if(this == ModItems.clip_mp) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mp_ammo, 30))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp_ammo, 30), false); + } + } + + if(this == ModItems.clip_mp40) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mp40_ammo, 32))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp40_ammo, 32), false); + } + } + + if(this == ModItems.clip_mirv) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mirv_ammo, 3))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp40_ammo, 32), false); + } + } + + if(this == ModItems.clip_bf) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_bf_ammo, 2))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp40_ammo, 32), false); + } + } + + if(this == ModItems.clip_immolator) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_immolator_ammo, 60))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp40_ammo, 32), false); + } + } + + if(this == ModItems.clip_cryolator) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_cryolator_ammo, 60))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp40_ammo, 32), false); + } + } + + if(this == ModItems.clip_emp) + { + if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_emp_ammo, 6))) + { + //player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_mp40_ammo, 32), false); + } + } + + return stack; + + } +} diff --git a/com/hbm/items/ItemGrenade.java b/com/hbm/items/weapon/ItemGrenade.java similarity index 69% rename from com/hbm/items/ItemGrenade.java rename to com/hbm/items/weapon/ItemGrenade.java index 3376ebb12..e515efd1f 100644 --- a/com/hbm/items/ItemGrenade.java +++ b/com/hbm/items/weapon/ItemGrenade.java @@ -1,21 +1,24 @@ -package com.hbm.items; +package com.hbm.items.weapon; -import com.hbm.entity.EntityGrenadeCluster; -import com.hbm.entity.EntityGrenadeElectric; -import com.hbm.entity.EntityGrenadeFire; -import com.hbm.entity.EntityGrenadeFlare; -import com.hbm.entity.EntityGrenadeFrag; -import com.hbm.entity.EntityGrenadeGas; -import com.hbm.entity.EntityGrenadeGeneric; -import com.hbm.entity.EntityGrenadeLemon; -import com.hbm.entity.EntityGrenadeMk2; -import com.hbm.entity.EntityGrenadeNuclear; -import com.hbm.entity.EntityGrenadeNuke; -import com.hbm.entity.EntityGrenadePlasma; -import com.hbm.entity.EntityGrenadePoison; -import com.hbm.entity.EntityGrenadeSchrabidium; -import com.hbm.entity.EntityGrenadeStrong; -import com.hbm.entity.EntityGrenadeTau; +import com.hbm.entity.grenade.EntityGrenadeASchrab; +import com.hbm.entity.grenade.EntityGrenadeCluster; +import com.hbm.entity.grenade.EntityGrenadeElectric; +import com.hbm.entity.grenade.EntityGrenadeFire; +import com.hbm.entity.grenade.EntityGrenadeFlare; +import com.hbm.entity.grenade.EntityGrenadeFrag; +import com.hbm.entity.grenade.EntityGrenadeGas; +import com.hbm.entity.grenade.EntityGrenadeGeneric; +import com.hbm.entity.grenade.EntityGrenadeLemon; +import com.hbm.entity.grenade.EntityGrenadeMk2; +import com.hbm.entity.grenade.EntityGrenadeNuclear; +import com.hbm.entity.grenade.EntityGrenadeNuke; +import com.hbm.entity.grenade.EntityGrenadePlasma; +import com.hbm.entity.grenade.EntityGrenadePoison; +import com.hbm.entity.grenade.EntityGrenadeSchrabidium; +import com.hbm.entity.grenade.EntityGrenadeStrong; +import com.hbm.entity.grenade.EntityGrenadeTau; +import com.hbm.entity.grenade.EntityGrenadeZOMG; +import com.hbm.items.ModItems; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; @@ -90,6 +93,12 @@ public class ItemGrenade extends Item { if (this == ModItems.grenade_mk2) { p_77659_2_.spawnEntityInWorld(new EntityGrenadeMk2(p_77659_2_, p_77659_3_)); } + if (this == ModItems.grenade_aschrab) { + p_77659_2_.spawnEntityInWorld(new EntityGrenadeASchrab(p_77659_2_, p_77659_3_)); + } + if (this == ModItems.grenade_zomg) { + p_77659_2_.spawnEntityInWorld(new EntityGrenadeZOMG(p_77659_2_, p_77659_3_)); + } } return p_77659_1_; @@ -98,15 +107,15 @@ public class ItemGrenade extends Item { @Override public EnumRarity getRarity(ItemStack p_77613_1_) { - if (this == ModItems.grenade_schrabidium) { + if (this == ModItems.grenade_schrabidium || this == ModItems.grenade_aschrab) { return EnumRarity.rare; } - if (this == ModItems.grenade_plasma) { + if (this == ModItems.grenade_plasma || this == ModItems.grenade_zomg) { return EnumRarity.epic; } - if (this == ModItems.grenade_nuke || this == ModItems.grenade_nuclear || this == ModItems.grenade_tau || this == ModItems.grenade_lemon) { + if (this == ModItems.grenade_nuke || this == ModItems.grenade_nuclear || this == ModItems.grenade_tau || this == ModItems.grenade_lemon || this == ModItems.grenade_mk2) { return EnumRarity.uncommon; } diff --git a/com/hbm/lib/HbmChestContents.java b/com/hbm/lib/HbmChestContents.java index 34a3497ce..08e8c656a 100644 --- a/com/hbm/lib/HbmChestContents.java +++ b/com/hbm/lib/HbmChestContents.java @@ -9,173 +9,190 @@ import net.minecraft.item.Item; import net.minecraft.util.WeightedRandomChestContent; public class HbmChestContents { - + static Random rand = new Random(); - private static WeightedRandomChestContent[] modGeneric = new WeightedRandomChestContent[] - {new WeightedRandomChestContent(ModItems.ingot_steel, 0, 10, 15, 5), - new WeightedRandomChestContent(ModItems.ingot_red_copper, 0, 5, 10, 3), - new WeightedRandomChestContent(ModItems.ingot_tungsten, 0, 5, 15, 3), - new WeightedRandomChestContent(ModItems.ingot_beryllium, 0, 1, 5, 2), - new WeightedRandomChestContent(ModItems.ingot_titanium, 0, 7, 10, 4), - new WeightedRandomChestContent(ModItems.gun_revolver, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.battery_generic, 50, 1, 1, 4), - new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 1), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.block_titanium), 0, 0, 3, 1)}; + private static WeightedRandomChestContent[] modGeneric = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.ingot_steel, 0, 10, 15, 5), + new WeightedRandomChestContent(ModItems.ingot_red_copper, 0, 5, 10, 3), + new WeightedRandomChestContent(ModItems.ingot_tungsten, 0, 5, 15, 3), + new WeightedRandomChestContent(ModItems.ingot_beryllium, 0, 1, 5, 2), + new WeightedRandomChestContent(ModItems.ingot_titanium, 0, 7, 10, 4), + new WeightedRandomChestContent(ModItems.gun_revolver, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.gun_revolver_ammo, 0, 2, 6, 2), + new WeightedRandomChestContent(ModItems.battery_generic, 50, 1, 1, 4), + new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 1), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.block_titanium), 0, 0, 3, 1) }; - private static WeightedRandomChestContent[] antenna = new WeightedRandomChestContent[] - {new WeightedRandomChestContent(ModItems.ingot_steel, 0, 3, 7, 5), - new WeightedRandomChestContent(ModItems.ingot_red_copper, 0, 3, 10, 3), - new WeightedRandomChestContent(ModItems.ingot_titanium, 0, 3, 5, 4), - new WeightedRandomChestContent(ModItems.wire_red_copper, 0, 3, 7, 4), - new WeightedRandomChestContent(ModItems.circuit_aluminium, 0, 1, 5, 3), - new WeightedRandomChestContent(ModItems.circuit_copper, 0, 1, 3, 2), - new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 1, 2, 1), - new WeightedRandomChestContent(ModItems.battery_generic, 50, 1, 1, 5), - new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 3), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.block_titanium), 0, 1, 2, 2), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.steel_poles), 0, 4, 9, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.pole_top), 0, 2, 4, 4), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.pole_satellite_receiver), 0, 3, 5, 3)}; + private static WeightedRandomChestContent[] antenna = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.ingot_steel, 0, 3, 7, 5), + new WeightedRandomChestContent(ModItems.ingot_red_copper, 0, 3, 10, 3), + new WeightedRandomChestContent(ModItems.ingot_titanium, 0, 3, 5, 4), + new WeightedRandomChestContent(ModItems.wire_red_copper, 0, 3, 7, 4), + new WeightedRandomChestContent(ModItems.circuit_aluminium, 0, 1, 5, 3), + new WeightedRandomChestContent(ModItems.circuit_copper, 0, 1, 3, 2), + new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 1, 2, 1), + new WeightedRandomChestContent(ModItems.battery_generic, 50, 1, 1, 5), + new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 3), + new WeightedRandomChestContent(ModItems.powder_iodine, 0, 1, 1, 1), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.block_titanium), 0, 1, 2, 2), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.steel_poles), 0, 4, 9, 5), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.steel_scaffold), 0, 4, 6, 3), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.pole_top), 0, 2, 4, 4), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.pole_satellite_receiver), 0, 3, 5, 3) }; - private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] - {new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 2, 3), - new WeightedRandomChestContent(ModItems.circuit_schrabidium, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.nuke_starter_kit, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.nuke_commercially_kit, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.nuke_electric_kit, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.gun_revolver_gold, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.gun_revolver_gold_ammo, 0, 1, 6, 5), - new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 32, 5), - new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 8, 2), - new WeightedRandomChestContent(ModItems.gun_xvl1456, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.gun_xvl1456_ammo, 0, 16, 64, 2), - new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 3), - new WeightedRandomChestContent(ModItems.battery_schrabidium, 1000, 1, 1, 1), - new WeightedRandomChestContent(ModItems.syringe_awesome, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.fusion_core, 0, 1, 1, 4), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_barrel), 0, 1, 3, 1)}; + private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 2, 3), + new WeightedRandomChestContent(ModItems.circuit_schrabidium, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.nuke_starter_kit, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.nuke_commercially_kit, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.nuke_electric_kit, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.gun_revolver_gold, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.gun_revolver_gold_ammo, 0, 1, 6, 5), + new WeightedRandomChestContent(ModItems.gun_revolver_lead, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.gun_revolver_lead_ammo, 0, 1, 6, 5), + new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 32, 5), + new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 8, 2), + new WeightedRandomChestContent(ModItems.gun_xvl1456, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.gun_xvl1456_ammo, 0, 16, 64, 2), + new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.battery_advanced, 200, 1, 1, 3), + new WeightedRandomChestContent(ModItems.battery_schrabidium, 10000, 1, 1, 1), + new WeightedRandomChestContent(ModItems.syringe_awesome, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.fusion_core, 0, 1, 1, 4), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_barrel), 0, 1, 3, 1) }; - private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] - {new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5), - new WeightedRandomChestContent(ModItems.nugget_pu240, 0, 3, 8, 5), - new WeightedRandomChestContent(ModItems.nugget_neptunium, 0, 1, 4, 3), - new WeightedRandomChestContent(ModItems.rod_u238, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_neptunium, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_pu240, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_u238, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_pu240, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_u238, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_pu240, 0, 1, 1, 3), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.yellow_barrel), 0, 1, 1, 2)}; + private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5), + new WeightedRandomChestContent(ModItems.nugget_pu240, 0, 3, 8, 5), + new WeightedRandomChestContent(ModItems.nugget_neptunium, 0, 1, 4, 3), + new WeightedRandomChestContent(ModItems.rod_u238, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_neptunium, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_pu240, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual_u238, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual_pu240, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad_u238, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad_pu240, 0, 1, 1, 3), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.yellow_barrel), 0, 1, 1, 2) }; - private static WeightedRandomChestContent[] nuclear = new WeightedRandomChestContent[] - {new WeightedRandomChestContent(ModItems.nugget_u235, 0, 3, 12, 5), - new WeightedRandomChestContent(ModItems.nugget_pu238, 0, 3, 12, 5), - new WeightedRandomChestContent(ModItems.nugget_pu239, 0, 3, 12, 5), - new WeightedRandomChestContent(ModItems.rod_u235, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_pu239, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_u235, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_pu239, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_u235, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_pu239, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_plutonium_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_mox_fuel, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_plutonium_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_dual_mox_fuel, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.rod_quad_plutonium_fuel, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.rod_quad_mox_fuel, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.pellet_rtg, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 1, 1, 1), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.yellow_barrel), 0, 1, 3, 3)}; + private static WeightedRandomChestContent[] nuclear = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.nugget_u235, 0, 3, 12, 5), + new WeightedRandomChestContent(ModItems.nugget_pu238, 0, 3, 12, 5), + new WeightedRandomChestContent(ModItems.nugget_pu239, 0, 3, 12, 5), + new WeightedRandomChestContent(ModItems.rod_u235, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_pu239, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual_u235, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual_pu239, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad_u235, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad_pu239, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_plutonium_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_mox_fuel, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual_plutonium_fuel, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_dual_mox_fuel, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.rod_quad_plutonium_fuel, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.rod_quad_mox_fuel, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.pellet_rtg, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.powder_thorium, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.powder_neptunium, 0, 1, 1, 1), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.yellow_barrel), 0, 1, 3, 3) }; - private static WeightedRandomChestContent[] vertibird = new WeightedRandomChestContent[] - {new WeightedRandomChestContent(ModItems.t45_helmet, 0, 1, 1, 15), - new WeightedRandomChestContent(ModItems.t45_plate, 0, 1, 1, 15), - new WeightedRandomChestContent(ModItems.t45_legs, 0, 1, 1, 15), - new WeightedRandomChestContent(ModItems.t45_boots, 0, 1, 1, 15), - new WeightedRandomChestContent(ModItems.fusion_core, 0, 1, 1, 10), - new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 1, 3, 3), - new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 3, 3), - new WeightedRandomChestContent(ModItems.gun_revolver, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.gun_revolver_ammo, 0, 1, 24, 4), - new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 6, 3), - new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 2, 2), - new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1)}; + private static WeightedRandomChestContent[] vertibird = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.t45_helmet, 0, 1, 1, 15), + new WeightedRandomChestContent(ModItems.t45_plate, 0, 1, 1, 15), + new WeightedRandomChestContent(ModItems.t45_legs, 0, 1, 1, 15), + new WeightedRandomChestContent(ModItems.t45_boots, 0, 1, 1, 15), + new WeightedRandomChestContent(ModItems.fusion_core, 0, 1, 1, 10), + new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 1, 3, 3), + new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 3, 3), + new WeightedRandomChestContent(ModItems.gun_revolver, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.gun_revolver_ammo, 0, 1, 24, 4), + new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 6, 3), + new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 2, 2), + new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 2, 2) }; - private static WeightedRandomChestContent[] missile = new WeightedRandomChestContent[] - {new WeightedRandomChestContent(ModItems.missile_generic, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.missile_incendiary, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.missile_cluster, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.missile_buster, 0, 1, 1, 4), - new WeightedRandomChestContent(ModItems.missile_strong, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.missile_incendiary_strong, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.missile_cluster_strong, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.missile_buster_strong, 0, 1, 1, 3), - new WeightedRandomChestContent(ModItems.missile_burst, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.missile_inferno, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.missile_rain, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.missile_drill, 0, 1, 1, 2), - new WeightedRandomChestContent(ModItems.missile_nuclear, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.missile_nuclear_cluster, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.missile_endo, 0, 1, 1, 1), - new WeightedRandomChestContent(ModItems.missile_exo, 0, 1, 1, 1), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.launch_pad), 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.designator, 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.thruster_small, 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.thruster_medium, 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.thruster_large, 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.fuel_tank_medium, 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5)}; + private static WeightedRandomChestContent[] missile = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.missile_generic, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.missile_incendiary, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.missile_cluster, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.missile_buster, 0, 1, 1, 4), + new WeightedRandomChestContent(ModItems.missile_strong, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.missile_incendiary_strong, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.missile_cluster_strong, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.missile_buster_strong, 0, 1, 1, 3), + new WeightedRandomChestContent(ModItems.missile_burst, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.missile_inferno, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.missile_rain, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.missile_drill, 0, 1, 1, 2), + new WeightedRandomChestContent(ModItems.missile_nuclear, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.missile_nuclear_cluster, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.missile_endo, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.missile_exo, 0, 1, 1, 1), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.launch_pad), 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.designator, 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 1), + new WeightedRandomChestContent(ModItems.thruster_small, 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.thruster_medium, 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.thruster_large, 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.fuel_tank_medium, 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5) }; + + private static WeightedRandomChestContent[] spaceship = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5), + new WeightedRandomChestContent(ModItems.ingot_advanced_alloy, 0, 2, 16, 5), + new WeightedRandomChestContent(ModItems.wire_advanced_alloy, 0, 8, 32, 5), + new WeightedRandomChestContent(ModItems.coil_advanced_alloy, 0, 2, 16, 5), + new WeightedRandomChestContent(ModItems.cell_deuterium, 0, 1, 8, 5), + new WeightedRandomChestContent(ModItems.cell_tritium, 0, 1, 8, 5), + new WeightedRandomChestContent(ModItems.cell_antimatter, 0, 1, 4, 5), + new WeightedRandomChestContent(ModItems.cell_anti_schrabidium, 0, 1, 2, 5), + new WeightedRandomChestContent(ModItems.powder_neodymium, 0, 1, 1, 1), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.fusion_conductor), 0, 4, 8, 5), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.fusion_heater), 0, 1, 6, 5), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.reactor_element), 0, 1, 2, 5), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.block_tungsten), 0, 8, 32, 5), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_wire_coated), 0, 4, 16, 5), + new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_cable), 0, 8, 32, 5) }; + + private static WeightedRandomChestContent[] powder = new WeightedRandomChestContent[] { + new WeightedRandomChestContent(ModItems.powder_neptunium, 0, 1, 32, 1), + new WeightedRandomChestContent(ModItems.powder_iodine, 0, 1, 32, 1), + new WeightedRandomChestContent(ModItems.powder_thorium, 0, 1, 32, 1), + new WeightedRandomChestContent(ModItems.powder_astatine, 0, 1, 32, 1), + new WeightedRandomChestContent(ModItems.powder_neodymium, 0, 1, 32, 1) }; - private static WeightedRandomChestContent[] spaceship = new WeightedRandomChestContent[] - {new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5), - new WeightedRandomChestContent(ModItems.ingot_advanced_alloy, 0, 2, 16, 5), - new WeightedRandomChestContent(ModItems.wire_advanced_alloy, 0, 8, 32, 5), - new WeightedRandomChestContent(ModItems.coil_advanced_alloy, 0, 2, 16, 5), - new WeightedRandomChestContent(ModItems.cell_deuterium, 0, 1, 8, 5), - new WeightedRandomChestContent(ModItems.cell_tritium, 0, 1, 8, 5), - new WeightedRandomChestContent(ModItems.cell_antimatter, 0, 1, 4, 5), - new WeightedRandomChestContent(ModItems.cell_anti_schrabidium, 0, 1, 2, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.fusion_conductor), 0, 4, 8, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.fusion_heater), 0, 1, 6, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.reactor_element), 0, 1, 2, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.block_tungsten), 0, 8, 32, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_wire_coated), 0, 4, 16, 5), - new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_cable), 0, 8, 32, 5)}; - /** * @param i * @return WeightedRandomChestContent array with custom loot * - * case 1: modGeneric loot (ingots, few blocks) - * case 2: antenna loot (spare parts, electronics) - * case 3: expensive loot (revolers, circuits, schrabidium nuggets) - * case 4: nukeTrash loot (U238 and Pu240 nuggets and rods) - * case 5: nuclear loot (U235 and Pu239 nuggets and rods, fuel rods) - * case 6: vertibrid loot (T45 power armor, fusion cores, circuits, nuclear material) - * case 7: missile loot (Missiles, designators, missile parts) - * case 8: spaceship loot (reactor elements, super conductors) + * case 1: modGeneric loot (ingots, few blocks) + * case 2: antenna loot (spare parts, electronics) + * case 3: expensive loot (revolers, circuits, schrabidium nuggets) + * case 4: nukeTrash loot (U238 and Pu240 nuggets and rods) + * case 5: nuclear loot (U235 and Pu239 nuggets and rods, fuel rods) + * case 6: vertibrid loot (T45 power armor, fusion cores, circuits, nuclear material) + * case 7: missile loot (missiles, designators, missile parts) + * case 8: spaceship loot (reactor elements, super conductors) + * case 9: powder loot (secret chest with the five powders for NITAN) **/ - - public static WeightedRandomChestContent[] getLoot(int i) - { - switch(i) - { + + public static WeightedRandomChestContent[] getLoot(int i) { + switch (i) { case 1: return modGeneric; case 2: @@ -192,8 +209,10 @@ public class HbmChestContents { return missile; case 8: return spaceship; + case 9: + return powder; } - + return null; } } diff --git a/com/hbm/lib/HbmWorldGen.java b/com/hbm/lib/HbmWorldGen.java index 6a6a9b6f4..53f1910c5 100644 --- a/com/hbm/lib/HbmWorldGen.java +++ b/com/hbm/lib/HbmWorldGen.java @@ -18,6 +18,9 @@ import com.hbm.world.Silo; import com.hbm.world.Spaceship; import com.hbm.world.Vertibird; +import net.minecraft.init.Blocks; +import net.minecraft.tileentity.TileEntityChest; +import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.IChunkProvider; @@ -27,281 +30,364 @@ import cpw.mods.fml.common.IWorldGenerator; public class HbmWorldGen implements IWorldGenerator { @Override - public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { - switch (world.provider.dimensionId) - { - case -1: - generateNether(world, rand, chunkX * 16, chunkZ * 16); - case 0: - generateSurface(world, rand, chunkX * 16, chunkZ * 16); + public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, + IChunkProvider chunkProvider) { + switch (world.provider.dimensionId) { + case -1: + generateNether(world, rand, chunkX * 16, chunkZ * 16); + case 0: + generateSurface(world, rand, chunkX * 16, chunkZ * 16); } } private void generateSurface(World world, Random rand, int i, int j) { - //Ore stains per chunk - for (int k = 0; k < MainRegistry.uraniumSpawn; k++) - { + // Ore stains per chunk + for (int k = 0; k < MainRegistry.uraniumSpawn; k++) { int randPosX = i + rand.nextInt(16); - //Max height of generation + // Max height of generation int randPosY = rand.nextInt(25); int randPosZ = j + rand.nextInt(16); - - //Ore, amount of ore in one stain + + // Ore, amount of ore in one stain (new WorldGenMinable(ModBlocks.ore_uranium, 5)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.titaniumSpawn; k++) - { + + for (int k = 0; k < MainRegistry.titaniumSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(35); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_titanium, 6)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.sulfurSpawn; k++) - { + + for (int k = 0; k < MainRegistry.sulfurSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(35); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_sulfur, 8)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.aluminiumSpawn; k++) - { + + for (int k = 0; k < MainRegistry.aluminiumSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(45); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_aluminium, 6)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.copperSpawn; k++) - { + + for (int k = 0; k < MainRegistry.copperSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(50); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_copper, 6)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.fluoriteSpawn; k++) - { + + for (int k = 0; k < MainRegistry.fluoriteSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(40); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_fluorite, 4)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.niterSpawn; k++) - { + + for (int k = 0; k < MainRegistry.niterSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(35); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_niter, 4)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.tungstenSpawn; k++) - { + + for (int k = 0; k < MainRegistry.tungstenSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(35); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_tungsten, 8)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.leadSpawn; k++) - { + + for (int k = 0; k < MainRegistry.leadSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(35); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_lead, 9)).generate(world, rand, randPosX, randPosY, randPosZ); } - - for (int k = 0; k < MainRegistry.berylliumSpawn; k++) - { + + for (int k = 0; k < MainRegistry.berylliumSpawn; k++) { int randPosX = i + rand.nextInt(16); int randPosY = rand.nextInt(35); int randPosZ = j + rand.nextInt(16); - + (new WorldGenMinable(ModBlocks.ore_beryllium, 4)).generate(world, rand, randPosX, randPosY, randPosZ); } - - if(MainRegistry.enableBarrels) - { - for (int k = 0; k < 1; k++) - { + + if (MainRegistry.enableBarrels && rand.nextInt(5) == 0) { + for (int k = 0; k < 1; k++) { int randPosX = i + rand.nextInt(16); - int randPosY = rand.nextInt(35); + int randPosY = rand.nextInt(25); int randPosZ = j + rand.nextInt(16); - - (new WorldGenMinable(ModBlocks.yellow_barrel, 20)).generate(world, rand, randPosX, randPosY, randPosZ); + + (new WorldGenMinable(ModBlocks.yellow_barrel, 10)).generate(world, rand, randPosX, randPosY, randPosZ); } } - - if(MainRegistry.enableDungeons) { - - BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(i, j); - - if(biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) - { - if(rand.nextInt(MainRegistry.radioStructure) == 0) - { - for(int a = 0; a < 1; a++) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); - - new Radio01().generate(world, rand, x, y, z); - } - } - } - - if(biome == BiomeGenBase.plains || biome == BiomeGenBase.forest || biome == BiomeGenBase.desert || biome == BiomeGenBase.swampland || biome == BiomeGenBase.extremeHills) - { - if(rand.nextInt(MainRegistry.antennaStructure) == 0) - { - for(int a = 0; a < 1; a++) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); - - new Antenna().generate(world, rand, x, y, z); - } - } - } - - if(biome == BiomeGenBase.desert || biome == BiomeGenBase.beach || biome == BiomeGenBase.mesa || biome == BiomeGenBase.mesaPlateau) - { - if(rand.nextInt(MainRegistry.atomStructure) == 0) - { - for(int a = 0; a < 1; a++) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); - - new DesertAtom001().generate(world, rand, x, y, z); - } - } - } - - if(biome == BiomeGenBase.desert) - { - if(rand.nextInt(MainRegistry.vertibirdStructure) == 0) - { - for(int a = 0; a < 1; a++) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); - - if(rand.nextInt(2) == 0) - { - new Vertibird().generate(world, rand, x, y, z); - } else { - new CrashedVertibird().generate(world, rand, x, y, z); + + if (MainRegistry.enableDungeons) { + + BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(i, j); + + if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) { + if (rand.nextInt(MainRegistry.radioStructure) == 0) { + for (int a = 0; a < 1; a++) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new Radio01().generate(world, rand, x, y, z); } - } } - } - - if(rand.nextInt(MainRegistry.dungeonStructure) == 0) - { - int x = i + rand.nextInt(16); - int y = rand.nextInt(256); - int z = j + rand.nextInt(16); - new LibraryDungeon().generate(world, rand, x, y, z); - } - - if(biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) - { - if(rand.nextInt(MainRegistry.relayStructure) == 0) - { - for(int a = 0; a < 1; a++) - { + + if (biome == BiomeGenBase.plains || biome == BiomeGenBase.forest || biome == BiomeGenBase.desert + || biome == BiomeGenBase.swampland || biome == BiomeGenBase.extremeHills) { + if (rand.nextInt(MainRegistry.antennaStructure) == 0) { + for (int a = 0; a < 1; a++) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new Antenna().generate(world, rand, x, y, z); + } + } + } + + if (biome == BiomeGenBase.desert || biome == BiomeGenBase.beach || biome == BiomeGenBase.mesa + || biome == BiomeGenBase.mesaPlateau) { + if (rand.nextInt(MainRegistry.atomStructure) == 0) { + for (int a = 0; a < 1; a++) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new DesertAtom001().generate(world, rand, x, y, z); + } + } + } + + if (biome == BiomeGenBase.desert) { + if (rand.nextInt(MainRegistry.vertibirdStructure) == 0) { + for (int a = 0; a < 1; a++) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + if (rand.nextInt(2) == 0) { + new Vertibird().generate(world, rand, x, y, z); + } else { + new CrashedVertibird().generate(world, rand, x, y, z); + } + + } + } + } + + if (rand.nextInt(MainRegistry.dungeonStructure) == 0) { + int x = i + rand.nextInt(16); + int y = rand.nextInt(256); + int z = j + rand.nextInt(16); + new LibraryDungeon().generate(world, rand, x, y, z); + } + + if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) { + if (rand.nextInt(MainRegistry.relayStructure) == 0) { + for (int a = 0; a < 1; a++) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new Relay().generate(world, rand, x, y, z); + } + } + } + if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) { + if (rand.nextInt(MainRegistry.satelliteStructure) == 0) { + for (int a = 0; a < 1; a++) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new Satellite().generate(world, rand, x, y, z); + } + } + } + + if (rand.nextInt(MainRegistry.bunkerStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); - - new Relay().generate(world, rand, x, y, z); + + new Bunker().generate(world, rand, x, y, z); } - } - } - if(biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) - { - if(rand.nextInt(MainRegistry.satelliteStructure) == 0) - { - for(int a = 0; a < 1; a++) - { + + if (rand.nextInt(MainRegistry.siloStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); - - new Satellite().generate(world, rand, x, y, z); + + new Silo().generate(world, rand, x, y, z); } + + if (rand.nextInt(MainRegistry.factoryStructure) == 0) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new Factory().generate(world, rand, x, y, z); + } + + if (rand.nextInt(MainRegistry.dudStructure) == 0) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new Dud().generate(world, rand, x, y, z); + } + + if (rand.nextInt(MainRegistry.spaceshipStructure) == 0) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = world.getHeightValue(x, z); + + new Spaceship().generate(world, rand, x, y, z); } } - - if(rand.nextInt(MainRegistry.bunkerStructure) == 0) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); - new Bunker().generate(world, rand, x, y, z); - } - - if(rand.nextInt(MainRegistry.siloStructure) == 0) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); + if (MainRegistry.enableNITAN) { - new Silo().generate(world, rand, x, y, z); - } - - if(rand.nextInt(MainRegistry.factoryStructure) == 0) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); - - new Factory().generate(world, rand, x, y, z); - } - - if(rand.nextInt(MainRegistry.dudStructure) == 0) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); - - new Dud().generate(world, rand, x, y, z); - } - - if(rand.nextInt(MainRegistry.spaceshipStructure) == 0) - { - int x = i + rand.nextInt(16); - int z = j + rand.nextInt(16); - int y = world.getHeightValue(x, z); - - new Spaceship().generate(world, rand, x, y, z); - } - + if (i <= 10000 && i + 16 >= 10000 && j <= 10000 && j + 16 >= 10000) { + if (world.getBlock(10000, 250, 10000) == Blocks.air) { + world.setBlock(10000, 250, 10000, Blocks.chest); + if (world.getBlock(10000, 250, 10000) == Blocks.chest) { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9), + (TileEntityChest) world.getTileEntity(10000, 250, 10000), 29); + } + } + } + if (i <= 0 && i + 16 >= 0 && j <= 10000 && j + 16 >= 10000) { + if (world.getBlock(0, 250, 10000) == Blocks.air) { + world.setBlock(0, 250, 10000, Blocks.chest); + if (world.getBlock(0, 250, 10000) == Blocks.chest) { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9), + (TileEntityChest) world.getTileEntity(0, 250, 10000), 29); + } + } + } + if (i <= -10000 && i + 16 >= -10000 && j <= 10000 && j + 16 >= 10000) { + if (world.getBlock(-10000, 250, 10000) == Blocks.air) { + world.setBlock(-10000, 250, 10000, Blocks.chest); + if (world.getBlock(-10000, 250, 10000) == Blocks.chest) { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9), + (TileEntityChest) world.getTileEntity(-10000, 250, 10000), 29); + } + } + } + if (i <= 10000 && i + 16 >= 10000 && j <= 0 && j + 16 >= 0) { + if (world.getBlock(10000, 250, 0) == Blocks.air) { + world.setBlock(10000, 250, 0, Blocks.chest); + if (world.getBlock(10000, 250, 0) == Blocks.chest) { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9), + (TileEntityChest) world.getTileEntity(10000, 250, 0), 29); + } + } + } + if (i <= -10000 && i + 16 >= -10000 && j <= 0 && j + 16 >= 0) { + if (world.getBlock(-10000, 250, 0) == Blocks.air) { + world.setBlock(-10000, 250, 0, Blocks.chest); + if (world.getBlock(-10000, 250, 0) == Blocks.chest) { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9), + (TileEntityChest) world.getTileEntity(-10000, 250, 0), 29); + } + } + } + if (i <= 10000 && i + 16 >= 10000 && j <= -10000 && j + 16 >= -10000) { + if (world.getBlock(10000, 250, -10000) == Blocks.air) { + world.setBlock(10000, 250, -10000, Blocks.chest); + if (world.getBlock(10000, 250, -10000) == Blocks.chest) { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9), + (TileEntityChest) world.getTileEntity(10000, 250, -10000), 29); + } + } + } + if (i <= 0 && i + 16 >= 0 && j <= -10000 && j + 16 >= -10000) { + if (world.getBlock(0, 250, -10000) == Blocks.air) { + world.setBlock(0, 250, -10000, Blocks.chest); + if (world.getBlock(0, 250, -10000) == Blocks.chest) { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9), + (TileEntityChest) world.getTileEntity(0, 250, -10000), 29); + } + } + } + if (i <= -10000 && i + 16 >= -10000 && j <= -10000 && j + 16 >= -10000) { + if (world.getBlock(-10000, 250, -10000) == Blocks.air) { + world.setBlock(-10000, 250, -10000, Blocks.chest); + if (world.getBlock(-10000, 250, -10000) == Blocks.chest) { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9), + (TileEntityChest) world.getTileEntity(-10000, 250, -10000), 29); + } + } + } } } private void generateNether(World world, Random rand, int i, int j) { - + + for (int k = 0; k < 8; k++) + { + int randPosX = i + rand.nextInt(16); + int randPosY = rand.nextInt(127); + int randPosZ = j + rand.nextInt(16); + + (new WorldGenMinable(ModBlocks.ore_nether_uranium, 6, Blocks.netherrack)).generate(world, rand, randPosX, randPosY, randPosZ); + } + if(MainRegistry.enablePlutoniumOre) + { + for (int k = 0; k < 6; k++) + { + int randPosX = i + rand.nextInt(16); + int randPosY = rand.nextInt(127); + int randPosZ = j + rand.nextInt(16); + + (new WorldGenMinable(ModBlocks.ore_nether_plutonium, 4, Blocks.netherrack)).generate(world, rand, randPosX, randPosY, randPosZ); + } + } + for (int k = 0; k < 10; k++) + { + int randPosX = i + rand.nextInt(16); + int randPosY = rand.nextInt(127); + int randPosZ = j + rand.nextInt(16); + + (new WorldGenMinable(ModBlocks.ore_nether_tungsten, 10, Blocks.netherrack)).generate(world, rand, randPosX, randPosY, randPosZ); + } + for (int k = 0; k < 26; k++) + { + int randPosX = i + rand.nextInt(16); + int randPosY = rand.nextInt(127); + int randPosZ = j + rand.nextInt(16); + + (new WorldGenMinable(ModBlocks.ore_nether_sulfur, 12, Blocks.netherrack)).generate(world, rand, randPosX, randPosY, randPosZ); + } + for (int k = 0; k < 24; k++) + { + int randPosX = i + rand.nextInt(16); + int randPosY = rand.nextInt(127); + int randPosZ = j + rand.nextInt(16); + + (new WorldGenMinable(ModBlocks.ore_nether_fire, 3, Blocks.netherrack)).generate(world, rand, randPosX, randPosY, randPosZ); + } } } diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index 4fb6e82b1..62eae6a7e 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -6,11 +6,13 @@ import java.util.UUID; import com.hbm.blocks.ModBlocks; import com.hbm.calc.UnionOfTileEntitiesAndBooleans; -import com.hbm.entity.EntityHunterChopper; +import com.hbm.entity.mob.EntityHunterChopper; +import com.hbm.entity.projectile.EntityChopperMine; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; import com.hbm.items.ModItems; +import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityLaunchPad; import com.hbm.tileentity.TileEntityMachineBattery; import com.hbm.tileentity.TileEntityMachineDeuterium; @@ -18,97 +20,135 @@ import com.hbm.tileentity.TileEntityMachineElectricFurnace; import com.hbm.tileentity.TileEntityWireCoated; import net.minecraft.block.Block; +import net.minecraft.client.multiplayer.WorldClient; +import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; public class Library { - - public static String book11 = "Resources\nHbm's Nuclear Tech Mod features eleven different ores and 13 materials which are used to craft machines and bombs. Most of them can be obtained from ores or various machines. This book will provide information about all of them."; - public static String book12 = "Uranium\nUranium is a rather rare ore found deep underground. Smelting the ore will give you a raw uranium ingot which can later be processed into fissile material that can be used for energy production or nuclear weapons."; - public static String book13 = "Titanium\nTitanium is a material mainly used for crafting machines and bomb hulls. You can get it from smelting titanium ore."; - public static String book14 = "Steel\nSteel is a commonly used material for building bombs, machines and decorative elements. It can be obtained by combining a lump of coal and an iron ingot in the alloy furnace."; - public static String book15 = "Sulfur\nSulfur is a powder which will directly drop from it's ore. Sulfur is used for extracting deuterium with the deuterium extractor, crafting gunpowder or Schrabidiumtrisulfite."; - public static String book16 = "Niter\nNiter also drops directly from the ore, it's only uses are for crafting det cords and gunpowder."; - public static String book17 = "Industrial Grade Copper\nIndustrial Grade Copper (mainly just referred to as Copper) is an importand ingot used for crafting electronic components and creating Minecraft Grade Copper. It can be obtained by simply smelting copper ore."; - public static String book18 = "Minecraft Grade Copper\nMinecraft Grade Copper (aka Red Copper) can be created by combining copper ingots and redstone in the alloy furnace. It is used for crafting advanced electronics and batteries."; - public static String book19 = "Tungsten\nTungsten can be used to make neutron reflectors by combining it in the alloy furnace with coal. It is also needed for heating coils, which are importand for storing uranium and plutonium hexafluorite."; - public static String book110 = "Aluminium\nAluminium is a commonly found metal that is used for crafting hulls and machines. Basic circuits are also made out of aluminium wires."; - public static String book111 = "Fuorite\nFluorite is a powder which can be found in form of ores. It is used to make uranium and plutonium hexafluorite, gasses which can be enriched in a gas centrifuge."; - public static String book112 = "Beryllium\nBeryllium is an ingot which can be simply obtained from it's ore. Beryllium is used for Schrabidium fuel and plutonium cores."; - public static String book113 = "Lead\nLead is a very common ore that can be smelted into an ingot. It can be used to craft breeding reactors, RTG-Units and if combined with copper in the alloy furnace, it can be processed into neutron reflectors."; - public static String book114 = "Schrabidium\nSchrabidium is a very odd element only found near nuclear testing sites. It has violent behaviours if used the right way, making it perfect for bombs. If a big ammount is hit by neutrons, it will create other elements."; - public static String book115 = "Advanced Alloy\nThe advanced alloy is a very durable and useful material, only used for the best factories which can handle four operations at once. It is composed of Minecraft grade copper and steel, combined by an alloy furnace."; - public static String book116 = "Fuel\nFuel is obtained by combining an empty canister and a piece of coal in the alloy furnace. It is used for crafting explosive barrels and missiles."; - - public static String book21 = "Machines\nAs an essential part of technic mods, Hbm's Nuclear Tech Mod also features many machines. They are either used to smelt or refine items or to store hazardous materials or even generate electricity."; - public static String book22 = "Alloy Furnace\nThe alloy furnace is the most importand machine as it is used to create alloys like red copper or neutron reflectors. It uses different kinds of fuel such as coal, netherrack, lava or even redstone."; - public static String book23 = "Gas Centrifuge\nThe gas centrifuge is a requirement for any advanced nuclear tech as it can be used to enrich uranium and plutonium. It uses the same fuel as the alloy furnace. It can process uranium and plutonium hexafluorite."; - public static String book24 = "Hexafluorite Tanks\nThese tanks can store uranium or plutonium hexafluorite. By placing a filled cell into the upper-left slot, the gas will be transfered into the tank. Placing empty cells into the upper-right slot will drain the tank's content."; - public static String book25 = "Breeding Reactor\nThe breeding reactor is used to breed uranium into plutonium. By filling the lower slot with a radioactive rod it will supply it with power, the rod which shall be breeded goes into the upper slot."; - public static String book26 = "Nuclear Powered Furnace\nThis furnace works like the regular furnace, but uses fissile material as fuel instead. Each smelting process only takes arround 1.5 seconds."; - public static String book27 = "RTG-Furnace\nThe RGT-Furnace also works like a normal furnace, but uses three plutonium 238 pellets as fuel. Those pellets never deplete, making this furnace last forever. Smelting an item takes 2.5 seconds."; - public static String book28 = "Coal Generator\nThe coal generator can generate electricity by burning coal. It needs a constant water supply for successfully providing energy, it can use water buckets or cells. You can transport it's energy either with wires or batteries."; - public static String book29 = "Nuclear Reactor\nThe nuclear reactor uses special fuel cells to generate energy. It needs water to do so and coolant to prevent it from overheating."; - public static String book210 = "Coated Wire\nThis wire is made from red copper and can transfer electricity. It can take energy from various generators and transport it to machines."; - public static String book211 = "Energy Storage Block\nThis battery block will collect electricity from wires. Applying a redstone signal will prevent it from getting more energy and make it release it's electricity again."; - public static String book212 = "Electric Furnace\nThe electric furnace works like a normal furnace, but uses electricity instead of fuel items. It can be powered either with wires or with battery items."; - public static String book213 = "Deuterium Extractor\nThis machine needs electricity, water, sulfur and empty cells to extract deuterium from the water. Water will deplete much faster than sulfur."; - public static String book214 = "Factories\nFactories are big 3x3x3 furnaces on steroids. Depending on what type you use, it can smelt 2 or 4 items at the same time, while having nine additional in and output slots!"; - public static String book215 = "Large Nuclear Reactor\nThese big machines work like regular nuclear reactors, but can store much more energy, water, coolant and up to 30 slots of fuel! Be sure to protect it with a concrete shell, or else it will emit deadly doses of radiation."; - public static String book216 = "Fusion Reactor\nHarness the mighty power of the sun with this high-tech machinery! It will not present any danger as it can not explode or radiate, unlike other reactors. It needs deuterium, tritium, a fuse and four energy cores to start the fusion process."; - public static String book217 = "Schrabidium Transmutator\nThis new innovaion turns regular impure uranium into schrabidium! It needs almost 500MHE and a neutral redcoil capacitor to work. The capacitors can be discharged, but it is very dangerous to do so."; - public static String book31 = "Bombs\nThis mod also features many different bombs, some of them work like regular TNT, others are nukes and need additional items to ignite."; - public static String book32 = "The Gadget\nThe Gadget was the first functional nuclear explosive ever built. It needs four special propellants, a plutonium core and a cable drum. It's crater has a radius up to 150 meters."; - public static String book33 = "Little Boy\nLittle Boy is a gun-type nuke which uses a tungsten-carbide neutron reflector, two different uranium 235 elements, a propellant and it's igniter. It has an explosion radius of 120."; - public static String book34 = "Fat Man\nFat Man is very similar to the Gadged in terms of it's inner parts, even though it uses alternate versions of these items. It's explosion radius is 175 meters."; - public static String book35 = "Ivy Mike\nIvy Mike is a hydrogen bomb which needs Fat Man's parts to work. Additionally, you can add an uranium tank, deuterium and a cooler to increase the radius by a lot. Radius with Fat Man parts: 175 meters, radius with additional items: 250 meters."; - public static String book36 = "Tsar Bomba\nThe Tsar Bomba was the strongest bomb ever built and is a hydrogen bomb much like Ivy Mike. It needs Fat Man's parts to work and with the fusion core, the explosion radius reaches an astounding 500 meters."; - public static String book37 = "The Prototype\nThe Prototype was the first (and strongest) Schrabidium-powered bomb. It was made from a pimped makeshift nuclear reactor using liquid Schrabidiumtrisulfide. Like any other Schrabidium bomb, the Prototype's crater is 100% spherical,"; - public static String book38 = "leaving no blocks untouched, besides Bedrock on Y: 0. It needs four quad rods of regular uranium, four quad rods filled with lead, two quad rods of neptunium and four Schrabidiumtrisulfide cells in order to explode. It has a crater radius of only"; - public static String book39 = "150 meters, but because it's shape, it can destroy a whopping 14 million blocks, the seven million blocks of the bottom half are ten times more than the ammount of blocks the Gadget will destroy below it's Y axis."; - public static String book310 = "F.L.E.I.J.A.\nF.L.E.I.J.A. (pronounced §oFre-ja§r) is a high-tech Schrabidium bomb which consists of two special impulse igniters, three Schrabidium propellants and six magnetized F.L.E.I.J.A. uranium 235 cores. It has a range of 50 meters."; - public static String book311 = "Multi Purpose Bomb\nThe multi purpose bomb is a small customizable explosive which requires four blocks of TNT to work. It has a base explosion value which can be modified with different items. You can either use two of a kind (the small box will show"; - public static String book312 = "you what kind of explosion it will create), only one item (with half the radius/effect of the modifier) or two different items (two different items or one single are part of scambled mode, indicated by a question mark. It will have two different effects.)"; - public static String book313 = "Modifying items:\nBase Value: 8\nGunpowder: +1\nTNT: +4\nExplosive Pellets: +50 bomblets\nFire Powder: +10 fire radius\nPoison Powder: +15 poison radius\nGas Cartridge: +15 gas radius"; - public static String book314 = "Flame War in a Box\nEverything explodes, everything is on fire. Enough desription."; - public static String book315 = "Levitation Bomb\nThis bomb uses a Schrabidium powered modified thermal distribution unit to lift the surrounding area 50 meters up. It will mess with entities caught in it's radius, making them...weird."; - public static String book316 = "Endothermic Bomb\nThis bomb contains an ice-filled thermal distribution unit and will freeze blocks and entities close to it. Entities will get a slowness effect and freeze to a big ice cube."; - public static String book317 = "Exothermic Bomb\nThe exothermic bomb needs a thermal distribution unit filled with lava in order to burn and/or melt nearby blocks. Living creatures will get a slowness and weakness effect."; - public static String book318 = "Det Cord\nThe det cord is a TNT like block with a much smaller explosion radius. It will explode right after ignition. It can be triggered by redstone or other explosions and is ideal to trigger far away TNT chrages."; - public static String book319 = "Explosive Barrel\nThis is a red barrel filled with fuel. It will explode if it catches fire, explodes or gets shot with a revolver. It will blow up in a big firey explosion, great for demolishing houses or forests."; - public static String book320 = "Radioactive Barrel\nA yellow barrel filled to the top with nuclear waste. It has a much bigger explosion radius than it's non-nuclear counterpart, and can only be triggered by explosions. It will give creatures bad effects when they stay to close."; - - public static String book41 = "Missiles\nThere are four different tiers and four major groups of missiles. They need a launch pad to work and will fly to a maked target where they will explode. Most missiles are easily recognizable by their shape and color."; - public static String book42 = "HE Missiles\nHE missiles (often just referred to as generic missiles) are the simplest type of missiles. They will fly in an arc shape and explode on impact. There are three different HE missiles, one for each of the first three tiers."; - public static String book43 = "Incendiary Missiles\nIncendiary missiles work just like generic missiles, with the slight difference that the explosion will spawn fire. The higher the tier, the more fire the impact will create. There are three different tiers of incendiary missiles."; - public static String book44 = "Cluster Missiles\nCluster missiles will fly the same arc shape as all the other missiles do, with the exception that it will explode just before impact, releasing hundrets of small bomblets. They are avalible in three different sizes (tiers)"; - public static String book45 = "Bunker Busters\nA bunker buster behaves much like a normal missile, except that it's explosion goes further down, digging holes and revealing underground structures or destroying bunkers. They also come in three different sizes."; - public static String book46 = "Endothermic Missile\nA tier 3 missile which works exactly like an endothermic bomb, but has double the effect radius."; - public static String book47 = "Exothermic Missile\nAnother tier 3 missile with an exothermic warhead and double the radius of it's stationary counterpart."; - public static String book48 = "Nuclear Missile\nIt's basically a small nuke mounted on a missile. It has an explosion radius of 100 meters, making it the smallest nuke (next to the waffle of mass destruction, the nuclear creeper and the MIRV.)"; - public static String book49 = "Nuclear MIRV Missile\nThe nuclear MIRV is the most destructive intercontinental ballistic missile ever created. It combines a cluster bomb with the destructive force of a nuke, splitting into eight small warheads just before impact."; - - public static String book51 = "Misc\nNext to nuclear technology and weapons of mass destruction, this mod also offers some gimmicks, handguns, different armor sets, randomly generated dungeons and more! (Please, do not touch any objects you don't know. You will probably explode and die.)"; - public static String book52 = "Revolvers\nLike in the good old Western films, you can shoot with your own revolver! There are four different tiers of revolvers, dealing about 5 - infinite damage, depending on the tier. Note: A revolver can not hurt mobs like the ender dragon!"; - public static String book53 = "RPG\nTo use the RPG, charge it like a bow and release the charge when it reached it's maximum. The rocket will cause a small explosion about half the size of a creeper's explosion."; - public static String book54 = "Nuke Launcher\nThe M42 Nuclear Catapult \"Fat Man\" is the perfect christmas present for every small child! It shoots small tactical nuclear warheads causing chaos and destrucion. (What did you expect?)"; - public static String book55 = "Grenades\nA grenade is a very easy-to-use type of explosive. Simply throw it like a snowball and watch the explosion. Remember: Never, NEVER throw a Schrabidium Grenade."; - public static String book56 = "Syringes\nDon't do drugs! (except in Minecraft) Need some health? Take a Stimpak. You demand damage resistance? Inject a Med-X. Want to go nuts? Take AWESOME (only one dose per hour will help) Warning: Hitting enemies with syinges will give them the effect!"; - public static String book57 = "Mobile Stealth Device\nThis useful machine will make you invisibile, even without the annoying particles! Just remember that the effect will wear off in 30 seconds, so don't rely too much on it."; - public static String book58 = "Food\nSurprisingly enough, this mod offers a great variety of different food. Be sure not to eat anything, you may explode/combust/die of radiation poisoning/starve to death/experience a rare case of waffles taking over the world."; - - public static String book61; + public static List book1 = new ArrayList(); + public static List book2 = new ArrayList(); + public static List book3 = new ArrayList(); + public static List book4 = new ArrayList(); + public static List book5 = new ArrayList(); public static String HbMinecraft = "192af5d7-ed0f-48d8-bd89-9d41af8524f8"; public static String LPkukin = "937c9804-e11f-4ad2-a5b1-42e62ac73077"; public static String Dafnik = "3af1c262-61c0-4b12-a4cb-424cc3a9c8c0"; + public static String a20 = "4729b498-a81c-42fd-8acd-20d6d9f759e0"; public static List superuser = new ArrayList(); + public static void initBooks() { + + book1.add("This book contains detailed information about the resources in Hbm's Nuclear Tech Mod. Some can be found underground, some have to be processed in special machines before becoming useful."); + book1.add("Uranium\nRare metal which spawns below Y:25. Impure uranium which is not useful by itself. Can be crafted into uranium hexafluoride, which can be seperated by the centrifuge."); + book1.add("Uranium 235\nRare uranium isotope obtained from processing uranium hexafluoride in the centrifuge. This isotope is fissile, it can be used for reactor fuel and bombs. Np237 can be bred from U235."); + book1.add("Uranium 238\nVery abundant isotope which is not as useful as it's fissile counterpart. Used in reactor fuel and for breeding fissile Pu239."); + book1.add("Plutonium\nTransuranic element which cannot be found underground. It can be found in the nether (config option required) or bred from impure uranium."); + book1.add("Plutonium 238\nAlpha emitter that can be bred from Np237, useful for making RTG pellets which is needed for the RTG furnace."); + book1.add("Plutonium 239\nFissile plutonium isotope that can be crafted into reactor fuel. Implosion-type nukes also need this isotope."); + book1.add("Plutonium 240\nIsotope with a high spontaneous fission rate. Not very useful."); + book1.add("Neptunium\nNeptunium 237 can only be obtained by breeding U235. Other than being crucial for Pu238 production, it doesn't have many uses."); + book1.add("Titanium\nTough metal which can be found underground below Y:35. Titanium is important for crafting machines and stong tools."); + book1.add("Copper\nMetal found below Y:50. Very important metal for machines, mostly used for alloys."); + book1.add("Minecraft Grade Copper\nMinecraft Grade Copper (or red copper) is used for all machines that use electricity. Every conductor is made from red copper."); + book1.add("Advanced Alloy\nAlloy made from red copper and steel. Very tough, used for super conductors, late game machines and heavy duty tools."); + book1.add("Tungsten\nFound below Y:35 or in the nether, needed for heating elements, neutron reflectors and late game alloys."); + book1.add("Aluminium\nSoft metal found below Y:45. Can be used to craft shells and canisters."); + book1.add("Steel\nAlloy made from coal and iron. Almost everything needs steel, shells, frames, machines, tools, etc."); + book1.add("Lead\n.Found below Y:35. Used for nuclear reactors, hazmat equpiment and bullets."); + book1.add("Beryllium\n.Brittle metal found below Y:35, used for deco elements and atom bombs."); + book1.add("Schrabidium\n.Weird. Can be created using the schrabidium transmutation device or by setting off nukes near uranium ore. Can be crafted into extremely powerful equipment and machines."); + book1.add("Magnetized Tungsten\nTungsten with traces of schrabidium. Strong super conductor which withstands very high temparatures. Used for 4000K magnets and calculation matrices."); + book1.add("Lithium\nCan be extracted from quartz using the centrifuge, used for breeding tritium."); + book1.add("Sulfur\nDust found underground below Y:35. Useful for matchsticks, deuterium production and crafting gunpowder."); + book1.add("Niter\nDust found below Y:35. Can be used to craft gunpowder and det cord."); + book1.add("Fluorite\nCan be found below Y:40. Only used for crafting uranium and plutonium hexafluoride."); + book1.add("Uranium Hexafluoride\nCan be seperated in the centrifuge. Storable in the UF6 tank."); + book1.add("Plutonium Hexafluoride\nCan be seperated in the centrifuge. Storable in the PuF6 tank."); + + book2.add("This book contains detailed information about the machines in Hbm's Nuclear Tech Mod. Most machines use electricity in the form of HE."); + book2.add("Alloy Furnace\nType: Processor\nUses fuels like redstone, coal and netherrack to combine two items. Accepts RTG pellets."); + book2.add("Centrifuge\nType: Processor\nUses the same fuels as the alloy furnace to seperate an imput to up to four outputs. Used for uranium enrichment."); + book2.add("Hexafluoride Tanks\nType: Storage\nComes in two different variations, for uranium and plutonium."); + book2.add("Breeding Reactor\nType: Processor\nUses nuclear rods as fuel to breed other rods. Used to process isotopes."); + book2.add("Nuclear Furnace\nType: Processor\nUses nuclear rods as fuel to smelt items like a normal furnace does, but much faster."); + book2.add("RTG-Furnace\nType: Processor\nUtilizes three plutonium 238 pellets which never run out to smelt items very fast."); + book2.add("Coal Generator\nType: Generator\nUses coal and water in order to create little amounts of HE."); + book2.add("Diesel Generator\nType: Generator\nUses diesel fuel to create HE, does not need water in order to run."); + book2.add("Small Nuclear Reactor\nType: Generator\nUses reactor fuel, water and coolant to generate HE, the reactor explodes when it overheats."); + book2.add("Red Copper Cable\nType: Conductor\nConnects to other cables and machines, transfers HE."); + book2.add("Coated Red Copper Cable\nType: Conductor\nFull block conductors which are more resistant than normal cables."); + book2.add("Energy Storage Block\nType: Storage\nStores energy when connected to a power source, releases it if it's powered with a redstone signal."); + book2.add("HE to RF Converter\nType: Power Converter\nCollects HE and converts it to RF, which can be used by machines from other mods which are RF compatible."); + book2.add("RF to HE Converter\nType: Power Converter\nCollects RF and converts it to HE."); + book2.add("Electric Furnace\nType: Processor\nNeeds HE in order to smelt items much faster than a normal furnace."); + book2.add("Shredder\nType: Processor\nNeeds HE and two blades in order to run. Ingots and ores are turned into dust, other blocks get processed into scrap. Useful to make fuel out of junk."); + book2.add("Deuterium Extractor\nType: Processor\nNeeds HE, water and sulfur in order to extract deuterium out of the water. Sulfur is used up slower than water."); + book2.add("Schrabidium Transmutation Device\nType: Processor\nWith 500 million HE, a special capacitor and uranium, this machine creates schrabidium ingots."); + book2.add("CMB Steel Factory\nType: Processor\nCombines magnetized tungsten, advanced alloy and poisonous mud into CMB steel."); + book2.add("Basic Factory\nType: Processor\nLarge furnace with in- and output queue that smelts two items at a time. Needs a specific energy core to run, though it also accepts external energy if it has an electricity port."); + book2.add("Advanced Factory\nType: Processor\nThis factory smelts four items at a time, twice as fast, making it four times better than the basic factory."); + book2.add("Large Nuclear Reactor\nType: Generator\nA much larger version of the nuclear reactor which works similarly, but needs a fuse to run. The optional concrete coating will prevent radiation from leaking out."); + book2.add("Fusion Reactor\nType: Generator\nA very large reactor which fuses deuterium and tritium to create power. It needs startup energy in form of four energy cores (and or fusion cores) and a fuse."); + book2.add("Watz Power Plant\nType: Generator\nA special fission reactor whcih needs a titanium filter and fuel pellets to run. Pellets have different modifiers changing lifetime and efficiency of all other components. Mind the waste."); + book2.add("Fusionary Watz Plant\nType: Generator\nThe strongest reactor which fuses antimatter with antischrabidium with the help of a singularity. Different singularities have different effects. Beware the screwdriver."); + + book3.add("This book contains detailed information about the explosives in Hbm's Nuclear Tech Mod. All explosives can also be used with the detonator."); + book3.add("The Gadget\nType: Nuke\nStrength: " + MainRegistry.gadgetRadius + "\nItems required: 4x bundled propellant, 1x Gadget plutonium core, 1x Wiring"); + book3.add("Little Boy\nType: Nuke\nStrength: " + MainRegistry.boyRadius + "\nItems required: 1x neutron shielding, 1x U235 target, 1x U235 bullet, 1x Little Boy propellant, 1x Little Boy igniter"); + book3.add("Fat Man\nType: Nuke\nStrength: " + MainRegistry.manRadius + "\nItems required: 4x bundled propellant, 1x Fat Man plutonium core, 1x Fatman fuse"); + book3.add("Ivy Mike\nType: H-Bomb\nStrength (nuke): " + MainRegistry.manRadius + "\nStrength (h-bomb): " + MainRegistry.mikeRadius + "\nItems required: 4x bundled propellant, 1x Fat Man plutonium core\nOptional: 1x deuterium supercooler, 1x uranium covered deuterium tank, 1x deuterium tank"); + book3.add("Tsar Bomba\nType: H-Bomb\nStrength (nuke): " + MainRegistry.manRadius + "\nStrength (h-bomb): " + MainRegistry.tsarRadius + "\nItems required: 4x bundled propellant, 1x Fat Man plutonium core\nOptional: Tsar Bomba core"); + book3.add("The Prototype\nType: Schrabidium-Bomb\nStrength:" + MainRegistry.prototypeRadius + "\nItems required: 4x schrabidium-trisulfide, 4x uranium quad rod, 4x lead quad rod, 2x neptunium quad rod"); + book3.add("F.L.E.I.J.A.\nType: Schrabidium-Bomb\nStrength:" + MainRegistry.fleijaRadius + "\nItems required: 2x pulse igniter, 3x schrabidium propellant, 6x F.L.E.I.J.A. uranium charge"); + book3.add("Multi Purpose Bomb\nType: Generic\nStrength: Variable\nNeeds four blocks of TNT in the marked slots, special items can be added in the right two slots. Equal items have their own icon, unequal items show a ?-icon, though they still work together."); + book3.add("Multi Purpose Bomb (cont.)\nGunpowder: +1 explosion strength, TNT: +4 explosion strength, explosive pellets: +50 bomblets, fire powder: +10 fire radius, poison powder: +15 poison radius, gas cartridge: +15 gas radius"); + book3.add("Dud\nType: ???\nStrength:" + MainRegistry.fatmanRadius + "\nUncraftable, right-click with empty cells to extract antimatter. Can explode via detonator."); + book3.add("Flame War in a Box\nType: Box\nSpawns random explosions, sets everything on fire."); + book3.add("Levitation Bomb\nRadius: 15\nHeight: 50\nLifts all blocks and entites caught in it's area of effect."); + book3.add("Endothermic Bomb\nRadius: 15\nTurns blocks into ice, freezes entities solid."); + book3.add("Exothermic Bomb\nRadius: 15\nBurns/melts blocks, sets all entities on fire."); + book3.add("Explosive Barrel\nType: Barrel\nExplodes when shot/set on fire."); + book3.add("Radioactive Barrel\nType: Barrel\nOnly set off by explosions, contaminates area."); + + book4.add("This book contains detailed information about the missiles in Hbm's Nuclear Tech Mod. All missiles are launched from the launch pad, the coordinates are set using the short range target designator."); + book4.add("HE Missiles\nNormal missile which explodes on impact.\nSmall: 10\nMedium: 25\nLarge: 50 x 5"); + book4.add("Incendiary Missiles\nSpecial missile which explodes and sets the surrounding area on fire.\nSmall: 10 + F\nMedium: 25 + F\nLarge: 35 + F"); + book4.add("Cluster Missiles\nMissile which explodes mid-air and releases small bomblets.\nSmall: 5 + 25B\nMedium: 15 + 50B\nLarge: 25 + 100B"); + book4.add("Bunker Buster\nMissile which creates vertical explosions.\nSmall: 5 x 15\nMedium: 7.5 x 20\nLarge: 10 x 30B"); + book4.add("Thermal Missiles\nEndo or exothermic, area of effect is twice as large as for their stationary counterparts."); + book4.add("Nuclear Missile\nLarge missile equipped with a nuclear warhead.\nRadius: " + MainRegistry.missileRadius); + book4.add("Nuclear MIRV\nCrossbreed of a nuclear missile and a cluster missile...splits into eight smaller nukes.\nRadius per MIRV: " + MainRegistry.mirvRadius); + + book5.add("This book contains detailed information about the miscellaneous items in Hbm's Nuclear Tech Mod. All missiles are launched from the launch pad, the coordinates are set using the short range target designator."); + book5.add("Revolvers\nThese guns come in different variants, each one has it's own ammo. Charge them like a bow for half a second and release to shoot."); + book5.add("Rocket Launcher\nWorks much like a revolver, but it needs to be completely charged up to fire. Shoots explosive rockets instead of bullets. Duh."); + book5.add("M42 Nuclear Catapult\nIs basically just an RPG. That shoots nukes. In an arch. Which kill everybody. Full stop."); + book5.add("Waffle of Mass Destruction\nEat & explode."); + book5.add("Vegan Schnitzel\nEat & die."); + book5.add("Radioactive Cotton Candy\nEat & enjoy."); + book5.add("Schrabidium Apples\nGives you an epic bizeps in 1.2 seconds."); + book5.add("Tem Flakes\nfood of tem. com in 3 flavurs, on sale, nurmal & PREMIUM!!! (expensiv) heals 2HP. construction paper."); + book5.add("Oversugared Unhealthy Beverages\nHalf of them taste like urine, all of them are unhealthy."); + book5.add("Grenades\nMany different types with effects, do not use the schrabidium/drill ones."); + book5.add("Detonator\nRight click a block to set the position, shift-right click to detonate."); + book5.add("Supply Drop Requester\nRight click to call in a supply drop, has five uses in survival mode."); + book5.add("Magazines\nRight click to retrieve ammo for a specific gun."); + book5.add("Syringes\nRight click to inject the syringe's content, hit somebody else to give them the effects."); + book5.add(""); + book5.add(""); + book5.add(""); + book5.add("Coincidences are less likely than most people believe, don't you think? Look at things twice. Try imagining what the creators and inventors were thinking. All things happen for a reason, tough sometimes they are not as clear. \n\nPPPPPPP"); + } + public static boolean checkArmor(EntityPlayer player, Item helmet, Item plate, Item legs, Item boots) { if(player.inventory.armorInventory[0] != null && @@ -160,7 +200,10 @@ public class Library { public static boolean checkForHazmat(EntityPlayer player) { - if(checkArmor(player, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots) || checkArmor(player, ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs, ModItems.t45_boots) || checkArmor(player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)) + if(checkArmor(player, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots) || + checkArmor(player, ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs, ModItems.t45_boots) || + checkArmor(player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots) || + checkArmor(player, ModItems.hazmat_paa_helmet, ModItems.hazmat_paa_plate, ModItems.hazmat_paa_legs, ModItems.hazmat_paa_boots)) { return true; } @@ -169,11 +212,15 @@ public class Library { } public static boolean checkForGasMask(EntityPlayer player) { - + if(checkArmorPiece(player, ModItems.hazmat_helmet, 3)) { return true; } + if(checkArmorPiece(player, ModItems.hazmat_paa_helmet, 3)) + { + return true; + } if(checkArmorPiece(player, ModItems.gas_mask, 3)) { return true; @@ -265,4 +312,75 @@ public class Library { return null; } + + public static EntityPlayer getClosestPlayerForSound(World world, double x, double y, double z, double radius) { + double d4 = -1.0D; + EntityPlayer entity = null; + + for (int i = 0; i < world.loadedEntityList.size(); ++i) { + Entity entityplayer1 = (Entity)world.loadedEntityList.get(i); + + if (entityplayer1.isEntityAlive() && entityplayer1 instanceof EntityPlayer) { + double d5 = entityplayer1.getDistanceSq(x, y, z); + double d6 = radius; + + if ((radius < 0.0D || d5 < d6 * d6) && (d4 == -1.0D || d5 < d4)) { + d4 = d5; + entity = (EntityPlayer)entityplayer1; + } + } + } + + return entity; + } + + public static EntityHunterChopper getClosestChopperForSound(World world, double x, double y, double z, double radius) { + double d4 = -1.0D; + EntityHunterChopper entity = null; + + for (int i = 0; i < world.loadedEntityList.size(); ++i) { + Entity entityplayer1 = (Entity)world.loadedEntityList.get(i); + + if (entityplayer1.isEntityAlive() && entityplayer1 instanceof EntityHunterChopper) { + double d5 = entityplayer1.getDistanceSq(x, y, z); + double d6 = radius; + + if ((radius < 0.0D || d5 < d6 * d6) && (d4 == -1.0D || d5 < d4)) { + d4 = d5; + entity = (EntityHunterChopper)entityplayer1; + } + } + } + + return entity; + } + + public static EntityChopperMine getClosestMineForSound(World world, double x, double y, double z, double radius) { + double d4 = -1.0D; + EntityChopperMine entity = null; + + for (int i = 0; i < world.loadedEntityList.size(); ++i) { + Entity entityplayer1 = (Entity)world.loadedEntityList.get(i); + + if (entityplayer1.isEntityAlive() && entityplayer1 instanceof EntityChopperMine) { + double d5 = entityplayer1.getDistanceSq(x, y, z); + double d6 = radius; + + if ((radius < 0.0D || d5 < d6 * d6) && (d4 == -1.0D || d5 < d4)) { + d4 = d5; + entity = (EntityChopperMine)entityplayer1; + } + } + } + + return entity; + } + + public static MovingObjectPosition rayTrace(EntityPlayer player, double d, float f) { + Vec3 vec3 = player.getPosition(f); + vec3.yCoord += player.eyeHeight; + Vec3 vec31 = player.getLook(f); + Vec3 vec32 = vec3.addVector(vec31.xCoord * d, vec31.yCoord * d, vec31.zCoord * d); + return player.worldObj.func_147447_a(vec3, vec32, false, false, true); + } } diff --git a/com/hbm/lib/ModDamageSource.java b/com/hbm/lib/ModDamageSource.java index 2ae9fa017..3ca2cffad 100644 --- a/com/hbm/lib/ModDamageSource.java +++ b/com/hbm/lib/ModDamageSource.java @@ -1,8 +1,12 @@ package com.hbm.lib; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityCombineBall; -import com.hbm.entity.EntityRainbow; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityCombineBall; +import com.hbm.entity.projectile.EntityDischarge; +import com.hbm.entity.projectile.EntityFire; +import com.hbm.entity.projectile.EntityLN2; +import com.hbm.entity.projectile.EntityPlasmaBeam; +import com.hbm.entity.projectile.EntityRainbow; import net.minecraft.entity.Entity; import net.minecraft.entity.projectile.EntityArrow; @@ -18,6 +22,8 @@ public class ModDamageSource extends DamageSource { public static DamageSource euthanizedSelf2 = (new DamageSource("euthanizedSelf2")).setDamageBypassesArmor(); public static DamageSource tauBlast = (new DamageSource("tauBlast")).setDamageBypassesArmor(); public static DamageSource radiation = (new DamageSource("radiation")).setDamageBypassesArmor(); + public static DamageSource suicide = (new DamageSource("suicide")).setProjectile(); + public static DamageSource teleporter = (new DamageSource("teleporter")).setDamageIsAbsolute(); public ModDamageSource(String p_i1566_1_) { super(p_i1566_1_); @@ -42,10 +48,42 @@ public class ModDamageSource extends DamageSource { { return (new EntityDamageSourceIndirect("subAtomic", p_76353_0_, p_76353_1_)).setProjectile().setDamageBypassesArmor(); } + public static DamageSource causeSubatomicDamage2(EntityRainbow p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("subAtomic2", p_76353_0_, p_76353_1_)).setProjectile().setDamageBypassesArmor(); + } + public static DamageSource causeSubatomicDamage3(EntityRainbow p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("subAtomic3", p_76353_0_, p_76353_1_)).setProjectile().setDamageBypassesArmor(); + } + public static DamageSource causeSubatomicDamage4(EntityRainbow p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("subAtomic4", p_76353_0_, p_76353_1_)).setProjectile().setDamageBypassesArmor(); + } + public static DamageSource causeSubatomicDamage5(EntityRainbow p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("subAtomic5", p_76353_0_, p_76353_1_)).setProjectile().setDamageBypassesArmor(); + } public static DamageSource euthanized(Entity p_76353_0_, Entity p_76353_1_) { return (new EntityDamageSourceIndirect("euthanized", p_76353_0_, p_76353_1_)).setDamageBypassesArmor(); } + public static DamageSource causeDischargeDamage(EntityDischarge p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("electrified", p_76353_0_, p_76353_1_)).setDamageBypassesArmor(); + } + public static DamageSource causeFireDamage(EntityFire p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("flamethrower", p_76353_0_, p_76353_1_)).setFireDamage().setDamageBypassesArmor(); + } + public static DamageSource causePlasmaDamage(EntityPlasmaBeam p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("plasma", p_76353_0_, p_76353_1_)).setDamageBypassesArmor(); + } + public static DamageSource causeIceDamage(EntityLN2 p_76353_0_, Entity p_76353_1_) + { + return (new EntityDamageSourceIndirect("ice", p_76353_0_, p_76353_1_)).setDamageBypassesArmor(); + } public static boolean getIsBullet(DamageSource source) { if(source instanceof EntityDamageSourceIndirect) @@ -90,7 +128,40 @@ public class ModDamageSource extends DamageSource { public static boolean getIsSubatomic(DamageSource source) { if(source instanceof EntityDamageSourceIndirect) { - return ((EntityDamageSourceIndirect)source).damageType.equals("subAtomic"); + String s = ((EntityDamageSourceIndirect)source).damageType; + return s.equals("subAtomic") || s.equals("subAtomic2") || s.equals("subAtomic3") || s.equals("subAtomic4") || s.equals("subAtomic5"); + } + return false; + } + + public static boolean getIsDischarge(DamageSource source) { + if(source instanceof EntityDamageSourceIndirect) + { + return ((EntityDamageSourceIndirect)source).damageType.equals("electrified"); + } + return false; + } + + public static boolean getIsFire(DamageSource source) { + if(source instanceof EntityDamageSourceIndirect) + { + return ((EntityDamageSourceIndirect)source).damageType.equals("flamethrower"); + } + return false; + } + + public static boolean getIsPlasma(DamageSource source) { + if(source instanceof EntityDamageSourceIndirect) + { + return ((EntityDamageSourceIndirect)source).damageType.equals("plasma"); + } + return false; + } + + public static boolean getIsLiquidNitrogen(DamageSource source) { + if(source instanceof EntityDamageSourceIndirect) + { + return ((EntityDamageSourceIndirect)source).damageType.equals("ice"); } return false; } diff --git a/com/hbm/lib/RefStrings.java b/com/hbm/lib/RefStrings.java index 93289e9da..169f047df 100644 --- a/com/hbm/lib/RefStrings.java +++ b/com/hbm/lib/RefStrings.java @@ -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.21"; + public static final String VERSION = "1.0.22"; public static final String CLIENTSIDE = "com.hbm.main.ClientProxy"; public static final String SERVERSIDE = "com.hbm.main.ServerProxy"; } diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 22eeb0ac9..8a59ecf16 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -3,128 +3,158 @@ package com.hbm.main; import net.minecraft.client.renderer.entity.RenderSnowball; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; +import net.minecraftforge.common.MinecraftForge; import com.hbm.blocks.ModBlocks; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityChopperMine; -import com.hbm.entity.EntityCloudFleija; -import com.hbm.entity.EntityCombineBall; -import com.hbm.entity.EntityGrenadeCluster; -import com.hbm.entity.EntityGrenadeElectric; -import com.hbm.entity.EntityGrenadeFire; -import com.hbm.entity.EntityGrenadeFlare; -import com.hbm.entity.EntityGrenadeFrag; -import com.hbm.entity.EntityGrenadeGas; -import com.hbm.entity.EntityGrenadeGeneric; -import com.hbm.entity.EntityGrenadeLemon; -import com.hbm.entity.EntityGrenadeMk2; -import com.hbm.entity.EntityGrenadeNuclear; -import com.hbm.entity.EntityGrenadeNuke; -import com.hbm.entity.EntityGrenadePlasma; -import com.hbm.entity.EntityGrenadePoison; -import com.hbm.entity.EntityGrenadeSchrabidium; -import com.hbm.entity.EntityGrenadeStrong; -import com.hbm.entity.EntityGrenadeTau; -import com.hbm.entity.EntityHunterChopper; -import com.hbm.entity.EntityMiniNuke; -import com.hbm.entity.EntityMirv; -import com.hbm.entity.EntityMissileAntiBallistic; -import com.hbm.entity.EntityMissileBunkerBuster; -import com.hbm.entity.EntityMissileBurst; -import com.hbm.entity.EntityMissileBusterStrong; -import com.hbm.entity.EntityMissileCluster; -import com.hbm.entity.EntityMissileClusterStrong; -import com.hbm.entity.EntityMissileDrill; -import com.hbm.entity.EntityMissileEndo; -import com.hbm.entity.EntityMissileExo; -import com.hbm.entity.EntityMissileGeneric; -import com.hbm.entity.EntityMissileIncendiary; -import com.hbm.entity.EntityMissileIncendiaryStrong; -import com.hbm.entity.EntityMissileInferno; -import com.hbm.entity.EntityMissileMirv; -import com.hbm.entity.EntityMissileNuclear; -import com.hbm.entity.EntityMissileRain; -import com.hbm.entity.EntityMissileStrong; -import com.hbm.entity.EntityNuclearCreeper; -import com.hbm.entity.EntityNukeCloudBig; -import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityRainbow; -import com.hbm.entity.EntityRocket; -import com.hbm.entity.EntitySchrab; -import com.hbm.entity.EntityTestMissile; +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.effect.EntityEMPBlast; +import com.hbm.entity.effect.EntityFalloutRain; +import com.hbm.entity.effect.EntityNukeCloudBig; +import com.hbm.entity.effect.EntityNukeCloudNoShroom; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.grenade.EntityGrenadeASchrab; +import com.hbm.entity.grenade.EntityGrenadeCluster; +import com.hbm.entity.grenade.EntityGrenadeElectric; +import com.hbm.entity.grenade.EntityGrenadeFire; +import com.hbm.entity.grenade.EntityGrenadeFlare; +import com.hbm.entity.grenade.EntityGrenadeFrag; +import com.hbm.entity.grenade.EntityGrenadeGas; +import com.hbm.entity.grenade.EntityGrenadeGeneric; +import com.hbm.entity.grenade.EntityGrenadeLemon; +import com.hbm.entity.grenade.EntityGrenadeMk2; +import com.hbm.entity.grenade.EntityGrenadeNuclear; +import com.hbm.entity.grenade.EntityGrenadeNuke; +import com.hbm.entity.grenade.EntityGrenadePlasma; +import com.hbm.entity.grenade.EntityGrenadePoison; +import com.hbm.entity.grenade.EntityGrenadeSchrabidium; +import com.hbm.entity.grenade.EntityGrenadeStrong; +import com.hbm.entity.grenade.EntityGrenadeTau; +import com.hbm.entity.grenade.EntityGrenadeZOMG; +import com.hbm.entity.missile.EntityMIRV; +import com.hbm.entity.missile.EntityMissileAntiBallistic; +import com.hbm.entity.missile.EntityMissileBunkerBuster; +import com.hbm.entity.missile.EntityMissileBurst; +import com.hbm.entity.missile.EntityMissileBusterStrong; +import com.hbm.entity.missile.EntityMissileCluster; +import com.hbm.entity.missile.EntityMissileClusterStrong; +import com.hbm.entity.missile.EntityMissileDrill; +import com.hbm.entity.missile.EntityMissileEndo; +import com.hbm.entity.missile.EntityMissileExo; +import com.hbm.entity.missile.EntityMissileGeneric; +import com.hbm.entity.missile.EntityMissileIncendiary; +import com.hbm.entity.missile.EntityMissileIncendiaryStrong; +import com.hbm.entity.missile.EntityMissileInferno; +import com.hbm.entity.missile.EntityMissileMirv; +import com.hbm.entity.missile.EntityMissileNuclear; +import com.hbm.entity.missile.EntityMissileRain; +import com.hbm.entity.missile.EntityMissileStrong; +import com.hbm.entity.missile.EntityTestMissile; +import com.hbm.entity.mob.EntityHunterChopper; +import com.hbm.entity.mob.EntityNuclearCreeper; +import com.hbm.entity.particle.EntityBSmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; +import com.hbm.entity.projectile.EntityBaleflare; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityChopperMine; +import com.hbm.entity.projectile.EntityCombineBall; +import com.hbm.entity.projectile.EntityDischarge; +import com.hbm.entity.projectile.EntityFire; +import com.hbm.entity.projectile.EntityLN2; +import com.hbm.entity.projectile.EntityMiniMIRV; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.entity.projectile.EntityPlasmaBeam; +import com.hbm.entity.projectile.EntityRainbow; +import com.hbm.entity.projectile.EntityRocket; +import com.hbm.entity.projectile.EntitySchrab; import com.hbm.items.ModItems; -import com.hbm.particles.EntityBSmokeFX; -import com.hbm.particles.EntitySmokeFX; -import com.hbm.render.ItemRenderRevolverCursed; -import com.hbm.render.ItemRenderRevolverIron; -import com.hbm.render.ItemRenderRevolverLead; -import com.hbm.render.BSmokeRenderer; -import com.hbm.render.ItemRenderBigSword; -import com.hbm.render.ItemRenderDecoBlock; -import com.hbm.render.ItemRenderFatMan; -import com.hbm.render.ItemRenderMP; -import com.hbm.render.ItemRenderMiniNuke; -import com.hbm.render.ItemRenderOSIPR; -import com.hbm.render.ItemRenderPoleTop; -import com.hbm.render.ItemRenderRedstoneSword; -import com.hbm.render.ItemRenderRevolver; -import com.hbm.render.ItemRenderRevolverGold; -import com.hbm.render.ItemRenderRevolverSchrabidium; -import com.hbm.render.ItemRenderRocket; -import com.hbm.render.ItemRenderRpg; -import com.hbm.render.ItemRenderSatelliteReceiver; -import com.hbm.render.ItemRenderSteelPoles; -import com.hbm.render.ItemRenderTapeRecorder; -import com.hbm.render.ItemRenderTestBombAdvanced; -import com.hbm.render.ItemRenderTestContainer; -import com.hbm.render.ItemRenderXVL1456; -import com.hbm.render.ItemRenderZOMG; -import com.hbm.render.ModEffectRenderer; -import com.hbm.render.RenderBigNuke; -import com.hbm.render.RenderBombMulti; -import com.hbm.render.RenderCable; -import com.hbm.render.RenderCentrifuge; -import com.hbm.render.RenderChopperMine; -import com.hbm.render.RenderCloudFleija; -import com.hbm.render.RenderCrashedBomb; -import com.hbm.render.RenderDecoBlock; -import com.hbm.render.RenderDecoBlockAlt; -import com.hbm.render.RenderFlare; -import com.hbm.render.RenderHunterChopper; -import com.hbm.render.RenderLaunchPadTier1; -import com.hbm.render.RenderMiniNuke; -import com.hbm.render.RenderMirv; -import com.hbm.render.RenderMissileGeneric; -import com.hbm.render.RenderMissileHuge; -import com.hbm.render.RenderMissileMirv; -import com.hbm.render.RenderMissileNuclear; -import com.hbm.render.RenderMissileStrong; -import com.hbm.render.RenderMissileThermo; -import com.hbm.render.RenderNuclearCreeper; -import com.hbm.render.RenderNukeBoy; -import com.hbm.render.RenderNukeFleija; -import com.hbm.render.RenderNukeGadget; -import com.hbm.render.RenderNukeMan; -import com.hbm.render.RenderNukeMike; -import com.hbm.render.RenderNukePrototype; -import com.hbm.render.RenderNukeTsar; -import com.hbm.render.RenderPoleSatelliteReceiver; -import com.hbm.render.RenderPoleTop; -import com.hbm.render.RenderPuF6Tank; -import com.hbm.render.RenderRainbow; -import com.hbm.render.RenderRedBarrel; -import com.hbm.render.RenderRocket; -import com.hbm.render.RenderRotationTester; -import com.hbm.render.RenderSmallNukeAlt; -import com.hbm.render.RenderSteelPoles; -import com.hbm.render.RenderTapeRecorder; -import com.hbm.render.RenderTestBombAdvanced; -import com.hbm.render.RenderTestContainer; -import com.hbm.render.RenderTestMissile; -import com.hbm.render.RenderTestRender; -import com.hbm.render.RenderUF6Tank; -import com.hbm.render.RenderYellowBarrel; -import com.hbm.render.RendererObjTester; +import com.hbm.render.entity.BSmokeRenderer; +import com.hbm.render.entity.ElectricityRenderer; +import com.hbm.render.entity.ModEffectRenderer; +import com.hbm.render.entity.RenderBaleflare; +import com.hbm.render.entity.RenderBeam; +import com.hbm.render.entity.RenderBigNuke; +import com.hbm.render.entity.RenderChopperMine; +import com.hbm.render.entity.RenderCloudFleija; +import com.hbm.render.entity.RenderEMPBlast; +import com.hbm.render.entity.RenderFallout; +import com.hbm.render.entity.RenderFireball; +import com.hbm.render.entity.RenderFlare; +import com.hbm.render.entity.RenderHunterChopper; +import com.hbm.render.entity.RenderLN2; +import com.hbm.render.entity.RenderMiniMIRV; +import com.hbm.render.entity.RenderMiniNuke; +import com.hbm.render.entity.RenderMirv; +import com.hbm.render.entity.RenderMissileGeneric; +import com.hbm.render.entity.RenderMissileHuge; +import com.hbm.render.entity.RenderMissileMirv; +import com.hbm.render.entity.RenderMissileNuclear; +import com.hbm.render.entity.RenderMissileStrong; +import com.hbm.render.entity.RenderMissileThermo; +import com.hbm.render.entity.RenderNoCloud; +import com.hbm.render.entity.RenderNuclearCreeper; +import com.hbm.render.entity.RenderRainbow; +import com.hbm.render.entity.RenderRocket; +import com.hbm.render.entity.RenderSmallNukeAlt; +import com.hbm.render.item.ItemRenderBFLauncher; +import com.hbm.render.item.ItemRenderBaleflare; +import com.hbm.render.item.ItemRenderBigSword; +import com.hbm.render.item.ItemRenderCryolator; +import com.hbm.render.item.ItemRenderDecoBlock; +import com.hbm.render.item.ItemRenderEMPRay; +import com.hbm.render.item.ItemRenderFatMan; +import com.hbm.render.item.ItemRenderImmolator; +import com.hbm.render.item.ItemRenderMIRV; +import com.hbm.render.item.ItemRenderMIRVLauncher; +import com.hbm.render.item.ItemRenderMP; +import com.hbm.render.item.ItemRenderMP40; +import com.hbm.render.item.ItemRenderMiniNuke; +import com.hbm.render.item.ItemRenderOSIPR; +import com.hbm.render.item.ItemRenderPoleTop; +import com.hbm.render.item.ItemRenderRedstoneSword; +import com.hbm.render.item.ItemRenderRevolver; +import com.hbm.render.item.ItemRenderRevolverCursed; +import com.hbm.render.item.ItemRenderRevolverGold; +import com.hbm.render.item.ItemRenderRevolverInverted; +import com.hbm.render.item.ItemRenderRevolverIron; +import com.hbm.render.item.ItemRenderRevolverLead; +import com.hbm.render.item.ItemRenderRevolverSchrabidium; +import com.hbm.render.item.ItemRenderRocket; +import com.hbm.render.item.ItemRenderRpg; +import com.hbm.render.item.ItemRenderSatelliteReceiver; +import com.hbm.render.item.ItemRenderSteelPoles; +import com.hbm.render.item.ItemRenderTapeRecorder; +import com.hbm.render.item.ItemRenderTestBombAdvanced; +import com.hbm.render.item.ItemRenderTestContainer; +import com.hbm.render.item.ItemRenderXVL1456; +import com.hbm.render.item.ItemRenderZOMG; +import com.hbm.render.tileentity.RenderBombMulti; +import com.hbm.render.tileentity.RenderCable; +import com.hbm.render.tileentity.RenderCentrifuge; +import com.hbm.render.tileentity.RenderCrashedBomb; +import com.hbm.render.tileentity.RenderDecoBlock; +import com.hbm.render.tileentity.RenderDecoBlockAlt; +import com.hbm.render.tileentity.RenderLaunchPadTier1; +import com.hbm.render.tileentity.RenderNukeBoy; +import com.hbm.render.tileentity.RenderNukeFleija; +import com.hbm.render.tileentity.RenderNukeGadget; +import com.hbm.render.tileentity.RenderNukeMan; +import com.hbm.render.tileentity.RenderNukeMike; +import com.hbm.render.tileentity.RenderNukePrototype; +import com.hbm.render.tileentity.RenderNukeTsar; +import com.hbm.render.tileentity.RenderPoleSatelliteReceiver; +import com.hbm.render.tileentity.RenderPoleTop; +import com.hbm.render.tileentity.RenderPuF6Tank; +import com.hbm.render.tileentity.RenderRedBarrel; +import com.hbm.render.tileentity.RenderRotationTester; +import com.hbm.render.tileentity.RenderSteelPoles; +import com.hbm.render.tileentity.RenderTapeRecorder; +import com.hbm.render.tileentity.RenderTestBombAdvanced; +import com.hbm.render.tileentity.RenderTestContainer; +import com.hbm.render.tileentity.RenderTestMissile; +import com.hbm.render.tileentity.RenderTestRender; +import com.hbm.render.tileentity.RenderUF6Tank; +import com.hbm.render.tileentity.RenderYellowBarrel; +import com.hbm.render.tileentity.RendererObjTester; import com.hbm.tileentity.TileEntityBombMulti; import com.hbm.tileentity.TileEntityCable; import com.hbm.tileentity.TileEntityCrashedBomb; @@ -164,6 +194,8 @@ public class ClientProxy extends ServerProxy @Override public void registerRenderInfo() { + MinecraftForge.EVENT_BUS.register(new ModEventHandlerClient()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestRender.class, new RenderTestRender()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestContainer.class, new RenderTestContainer()); @@ -213,6 +245,8 @@ public class ClientProxy extends ServerProxy RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeTau.class, new RenderSnowball(ModItems.grenade_tau)); RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeLemon.class, new RenderSnowball(ModItems.grenade_lemon)); RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeMk2.class, new RenderSnowball(ModItems.grenade_mk2)); + RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeZOMG.class, new RenderSnowball(ModItems.grenade_zomg)); + RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeASchrab.class, new RenderSnowball(ModItems.grenade_aschrab)); RenderingRegistry.registerEntityRenderingHandler(EntitySchrab.class, new RenderFlare()); @@ -225,6 +259,8 @@ public class ClientProxy extends ServerProxy RenderingRegistry.registerEntityRenderingHandler(EntityNukeCloudSmall.class, new RenderSmallNukeAlt()); RenderingRegistry.registerEntityRenderingHandler(EntityNukeCloudBig.class, new RenderBigNuke()); RenderingRegistry.registerEntityRenderingHandler(EntityCloudFleija.class, new RenderCloudFleija()); + RenderingRegistry.registerEntityRenderingHandler(EntityNukeCloudNoShroom.class, new RenderNoCloud()); + RenderingRegistry.registerEntityRenderingHandler(EntityFalloutRain.class, new RenderFallout()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoTapeRecorder.class, new RenderTapeRecorder()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoSteelPoles.class, new RenderSteelPoles()); @@ -243,15 +279,29 @@ public class ClientProxy extends ServerProxy MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_schrabidium, new ItemRenderRevolverSchrabidium()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_cursed, new ItemRenderRevolverCursed()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman, new ItemRenderFatMan()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_mirv, new ItemRenderMIRVLauncher()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_bf, new ItemRenderBFLauncher()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_xvl1456, new ItemRenderXVL1456()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_zomg, new ItemRenderZOMG()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_osipr, new ItemRenderOSIPR()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_mp, new ItemRenderMP()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_inverted, new ItemRenderRevolverInverted()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_mp40, new ItemRenderMP40()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_emp, new ItemRenderEMPRay()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_immolator, new ItemRenderImmolator()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_cryolator, new ItemRenderCryolator()); RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class, new RenderRocket()); RenderingRegistry.registerEntityRenderingHandler(EntityMiniNuke.class, new RenderMiniNuke()); + RenderingRegistry.registerEntityRenderingHandler(EntityMiniMIRV.class, new RenderMiniMIRV()); + RenderingRegistry.registerEntityRenderingHandler(EntityBaleflare.class, new RenderBaleflare()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman_ammo, new ItemRenderMiniNuke()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_mirv_ammo, new ItemRenderMIRV()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_bf_ammo, new ItemRenderBaleflare()); RenderingRegistry.registerEntityRenderingHandler(EntityRainbow.class, new RenderRainbow()); + RenderingRegistry.registerEntityRenderingHandler(EntityFire.class, new RenderFireball(ModItems.energy_ball)); + RenderingRegistry.registerEntityRenderingHandler(EntityPlasmaBeam.class, new RenderBeam()); + RenderingRegistry.registerEntityRenderingHandler(EntityLN2.class, new RenderLN2(ModItems.energy_ball)); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukePrototype.class, new RenderNukePrototype()); @@ -280,7 +330,7 @@ public class ClientProxy extends ServerProxy RenderingRegistry.registerEntityRenderingHandler(EntityMissileNuclear.class, new RenderMissileNuclear()); RenderingRegistry.registerEntityRenderingHandler(EntityMissileMirv.class, new RenderMissileMirv()); - RenderingRegistry.registerEntityRenderingHandler(EntityMirv.class, new RenderMirv()); + RenderingRegistry.registerEntityRenderingHandler(EntityMIRV.class, new RenderMirv()); RenderingRegistry.registerEntityRenderingHandler(EntityMissileEndo.class, new RenderMissileThermo()); RenderingRegistry.registerEntityRenderingHandler(EntityMissileExo.class, new RenderMissileThermo()); @@ -305,6 +355,8 @@ public class ClientProxy extends ServerProxy RenderingRegistry.registerEntityRenderingHandler(EntitySmokeFX.class, new ModEffectRenderer(ModItems.nuclear_waste)); RenderingRegistry.registerEntityRenderingHandler(EntityBSmokeFX.class, new BSmokeRenderer(ModItems.nuclear_waste)); RenderingRegistry.registerEntityRenderingHandler(EntityCombineBall.class, new RenderSnowball(ModItems.energy_ball)); + RenderingRegistry.registerEntityRenderingHandler(EntityDischarge.class, new ElectricityRenderer(ModItems.discharge)); + RenderingRegistry.registerEntityRenderingHandler(EntityEMPBlast.class, new RenderEMPBlast()); RenderingRegistry.addNewArmourRendererPrefix("5"); RenderingRegistry.addNewArmourRendererPrefix("6"); diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index e7d452a32..c267d5910 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -33,6 +33,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.plate_schrabidium, 16), new Object[] { "TT", "TT", 'T', ModItems.ingot_schrabidium}); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_gold, 16), new Object[] { "TT", "TT", 'T', "ingotGold" })); GameRegistry.addRecipe(new ItemStack(ModItems.plate_advanced_alloy, 16), new Object[] { "TT", "TT", 'T', ModItems.ingot_advanced_alloy}); + GameRegistry.addRecipe(new ItemStack(ModItems.plate_combine_steel, 16), new Object[] { "TT", "TT", 'T', ModItems.ingot_combine_steel}); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.wire_red_copper, 6), new Object[] { "CCC", 'S', Items.string, 'C', "ingotRedstoneAlloy" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.wire_tungsten, 6), new Object[] { "CCC", 'S', Items.string, 'C', "ingotTungsten" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.wire_aluminium, 6), new Object[] { "CCC", 'S', Items.string, 'C', "ingotAluminum" })); @@ -40,13 +41,17 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.wire_gold, 6), new Object[] { "CCC", 'S', Items.string, 'C', "ingotGold" })); GameRegistry.addRecipe(new ItemStack(ModItems.wire_schrabidium, 6), new Object[] { "CCC", 'S', Items.string, 'C', ModItems.ingot_schrabidium }); GameRegistry.addRecipe(new ItemStack(ModItems.wire_advanced_alloy, 6), new Object[] { "CCC", 'S', Items.string, 'C', ModItems.ingot_advanced_alloy }); + GameRegistry.addRecipe(new ItemStack(ModItems.wire_magnetized_tungsten, 6), new Object[] { "CCC", 'S', Items.string, 'C', ModItems.ingot_magnetized_tungsten }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_cloth, 4), new Object[] { "LN", "LN", 'L', Items.leather, 'N', "nuggetLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_cloth, 8), new Object[] { "SCS", "CPC", "SCS", 'S', Items.string, 'P', Items.leather, 'C', "dustLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.filter_coal, 1), new Object[] { "SCS", "CPC", "SCS", 'S', Items.string, 'P', Items.paper, 'C', "dustCoal" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.plate_mixed, 3), new Object[] { "ANA", "NCN", "ANA", 'A', ModItems.plate_advanced_alloy, 'N', "plateDenseLead", 'C', ModItems.plate_combine_steel })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.circuit_aluminium, 1), new Object[] { "RAR", "ASA", "RAR", 'S', "plateSteel", 'R', "dustRedstone", 'A', ModItems.wire_aluminium })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.circuit_copper, 1), new Object[] { "RAR", "ASA", "RAR", 'S', ModItems.circuit_aluminium, 'R', "dustGlowstone", 'A', ModItems.wire_copper })); - GameRegistry.addRecipe(new ItemStack(ModItems.circuit_red_copper, 1), new Object[] { "RAR", "ASA", "RAR", 'S', ModItems.circuit_copper, 'R', new ItemStack(Items.dye, 1, 4), 'A', ModItems.wire_red_copper }); - GameRegistry.addRecipe(new ItemStack(ModItems.circuit_gold, 1), new Object[] { "RAR", "ASA", "RAR", 'S', ModItems.circuit_red_copper, 'R', Items.ender_pearl, 'A', ModItems.wire_gold }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.circuit_schrabidium, 1), new Object[] { "RAR", "ASA", "RAR", 'S', ModItems.circuit_gold, 'R', "gemDiamond", 'A', ModItems.wire_schrabidium })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.circuit_copper, 1), new Object[] { "RAR", "ASA", "RAR", 'S', ModItems.circuit_aluminium, 'R', "dustNetherQuartz", 'A', ModItems.wire_copper })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.circuit_red_copper, 1), new Object[] { "RAR", "ASA", "RAR", 'S', ModItems.circuit_copper, 'R', "dustGold", 'A', ModItems.wire_red_copper })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.circuit_gold, 1), new Object[] { "RAR", "ASA", "RAR", 'S', ModItems.circuit_red_copper, 'R', "dustLapis", 'A', ModItems.wire_gold })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.circuit_schrabidium, 1), new Object[] { "RAR", "ASA", "RAR", 'S', ModItems.circuit_gold, 'R', "dustDiamond", 'A', ModItems.wire_schrabidium })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "sulfur", "salpeter", Items.coal })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "sulfur", "salpeter", new ItemStack(Items.coal, 1, 1) })); @@ -54,8 +59,8 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.gunpowder, 3), new Object[] { "dustSulfur", "dustSalpeter", new ItemStack(Items.coal, 1, 1) })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.cell_empty, 6), new Object[] { "SSS", "G G", "SSS", 'S', "plateSteel", 'G', Item.getItemFromBlock(Blocks.glass_pane) })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_uf6, 1), new Object[] { ModItems.cell_empty, "ingotUranium", "dustFluorite", "dustFluorite", "dustFluorite", Items.water_bucket })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_puf6, 1), new Object[] { ModItems.cell_empty, "ingotPlutonium", "dustFluorite", "dustFluorite", "dustFluorite", Items.water_bucket })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_uf6, 1), new Object[] { ModItems.cell_empty, "dustUranium", "dustFluorite", "dustFluorite", "dustFluorite", Items.water_bucket })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_puf6, 1), new Object[] { ModItems.cell_empty, "dustPlutonium", "dustFluorite", "dustFluorite", "dustFluorite", Items.water_bucket })); GameRegistry.addRecipe(new ItemStack(ModItems.cell_deuterium, 8), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.cell_empty, 'T', ModItems.mike_deut }); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_sas3, 1), new Object[] { ModItems.cell_empty, ModItems.powder_schrabidium, "dustSulfur", "dustSulfur" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_sas3, 1), new Object[] { ModItems.cell_empty, ModItems.powder_schrabidium, "sulfur", "sulfur" })); @@ -77,9 +82,13 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_lead), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_lead }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_trinitite), 1), new Object[] { "###", "###", "###", '#', ModItems.trinitite }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_waste), 1), new Object[] { "###", "###", "###", '#', ModItems.nuclear_waste }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_scrap), 1), new Object[] { "##", "##", '#', ModItems.scrap }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_scrap), 1), new Object[] { "###", "###", "###", '#', ModItems.dust }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_beryllium), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_beryllium }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_schrabidium), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_schrabidium }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_advanced_alloy), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_advanced_alloy }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_magnetized_tungsten), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_magnetized_tungsten }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_combine_steel), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_combine_steel }); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 1), new Object[] { "nuggetUranium235", "nuggetUranium235", "nuggetUranium235", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_plutonium_fuel, 1), new Object[] { "nuggetPlutonium238", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium239", "nuggetPlutonium240", "nuggetPlutonium240", "nuggetPlutonium240" })); @@ -107,10 +116,8 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.ingot_beryllium, 9), new Object[] { "#", '#', Item.getItemFromBlock(ModBlocks.block_beryllium) }); GameRegistry.addRecipe(new ItemStack(ModItems.ingot_schrabidium, 9), new Object[] { "#", '#', Item.getItemFromBlock(ModBlocks.block_schrabidium) }); GameRegistry.addRecipe(new ItemStack(ModItems.ingot_advanced_alloy, 9), new Object[] { "#", '#', Item.getItemFromBlock(ModBlocks.block_advanced_alloy) }); - - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_lead, 2), new Object[] { "ingotLead", "ingotLead" })); - GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_neptunium, 2), new Object[] { "ingotNeptunium", "ingotNeptunium" })); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.powder_schrabidium, 2), new Object[] { ModItems.ingot_schrabidium, ModItems.ingot_schrabidium }); + GameRegistry.addRecipe(new ItemStack(ModItems.ingot_magnetized_tungsten, 9), new Object[] { "#", '#', Item.getItemFromBlock(ModBlocks.block_magnetized_tungsten) }); + GameRegistry.addRecipe(new ItemStack(ModItems.ingot_combine_steel, 9), new Object[] { "#", '#', Item.getItemFromBlock(ModBlocks.block_combine_steel) }); GameRegistry.addRecipe(new ItemStack(ModItems.ingot_plutonium, 1), new Object[] { "###", "###", "###", '#', ModItems.nugget_plutonium }); GameRegistry.addRecipe(new ItemStack(ModItems.nugget_plutonium, 9), new Object[] { "#", '#', ModItems.ingot_plutonium }); @@ -208,9 +215,9 @@ public class CraftingManager { GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_water, 1), new Object[] { ModItems.rod_empty, Items.water_bucket }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_water, 1), new Object[] { ModItems.rod_dual_empty, Items.water_bucket, Items.water_bucket }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_water, 1), new Object[] { ModItems.rod_quad_empty, Items.water_bucket, Items.water_bucket, Items.water_bucket, Items.water_bucket }); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_coolant, 1), new Object[] { ModItems.rod_empty, Items.water_bucket, new ItemStack(Items.dye, 1, 4) }); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_dual_coolant, 1), new Object[] { ModItems.rod_dual_empty, Items.water_bucket, Items.water_bucket, new ItemStack(Items.dye, 1, 4), new ItemStack(Items.dye, 1, 4) }); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_coolant, 1), new Object[] { ModItems.rod_quad_empty, Items.water_bucket, Items.water_bucket, Items.water_bucket, Items.water_bucket, new ItemStack(Items.dye, 1, 4), new ItemStack(Items.dye, 1, 4), new ItemStack(Items.dye, 1, 4), new ItemStack(Items.dye, 1, 4) }); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.rod_coolant, 1), new Object[] { ModItems.rod_empty, Items.water_bucket, "dustLapis" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.rod_dual_coolant, 1), new Object[] { ModItems.rod_dual_empty, Items.water_bucket, Items.water_bucket, "dustLapis", "dustLapis" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.rod_quad_coolant, 1), new Object[] { ModItems.rod_quad_empty, Items.water_bucket, Items.water_bucket, Items.water_bucket, Items.water_bucket, "dustLapis", "dustLapis", "dustLapis", "dustLapis" })); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nugget_uranium, 6), new Object[] { ModItems.rod_uranium }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.nugget_u235, 6), new Object[] { ModItems.rod_u235 }); @@ -295,6 +302,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_copper_torus, 2), new Object[] { "PCP", "C C", "PCP", 'P', "plateIron", 'C', ModItems.coil_copper })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_advanced_torus, 2), new Object[] { "PCP", "C C", "PCP", 'P', "plateIron", 'C', ModItems.coil_advanced_alloy })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_tungsten, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_tungsten, 'I', "ingotIron" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.coil_magnetized_tungsten, 1), new Object[] { "WWW", "WIW", "WWW", 'W', ModItems.wire_magnetized_tungsten, 'I', "ingotIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.tank_steel, 1), new Object[] { "STS", "S S", "STS", 'S', "plateSteel", 'T', "plateTitanium" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.motor, 1), new Object[] { " R ", "ICI", "ITI", 'R', ModItems.wire_red_copper, 'T', ModItems.coil_copper_torus, 'I', "plateIron", 'C', ModItems.coil_copper })); GameRegistry.addRecipe(new ItemStack(ModItems.centrifuge_element, 1), new Object[] { " T ", "WTW", "RMR", 'R', ModItems.wire_red_copper, 'T', ModItems.tank_steel, 'M', ModItems.motor, 'W', ModItems.coil_tungsten }); @@ -343,6 +351,16 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.thruster_small, 1), new Object[] { "AS ", "AH ", " L ", 'A', ModItems.wire_aluminium, 'S', "plateSteel", 'H', ModItems.hull_small_steel, 'L', ModItems.hull_small_steel })); GameRegistry.addRecipe(new ItemStack(ModItems.thruster_medium, 1), new Object[] { "AS ", "AH ", " L ", 'A', ModItems.wire_copper, 'S', ModItems.thruster_small, 'H', ModItems.hull_small_steel, 'L', ModItems.hull_big_steel }); GameRegistry.addRecipe(new ItemStack(ModItems.thruster_large, 1), new Object[] { "AS ", "AH ", " L ", 'A', ModItems.wire_red_copper, 'S', ModItems.thruster_medium, 'H', ModItems.hull_big_steel, 'L', ModItems.hull_big_steel }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.lemon, 1), new Object[] { " D ", "DSD", " D ", 'D', new ItemStack(Items.dye, 1, 11), 'S', "stone" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.chopper_blades, 1), new Object[] { "CCC", "SIS", " I ", 'C', ModItems.plate_combine_steel, 'S', "plateSteel", 'I', ModItems.ingot_combine_steel })); + GameRegistry.addRecipe(new ItemStack(ModItems.chopper_gun, 1), new Object[] { " PI", "WWC", " PM", 'P', ModItems.plate_combine_steel, 'W', ModItems.wire_magnetized_tungsten, 'I', ModItems.ingot_combine_steel, 'C', ModItems.coil_magnetized_tungsten, 'M', ModItems.motor }); + GameRegistry.addRecipe(new ItemStack(ModItems.chopper_head, 1), new Object[] { " GI", "WIB", "WCB", 'G', ModBlocks.reinforced_glass, 'W', ModItems.wire_magnetized_tungsten, 'I', ModItems.ingot_combine_steel, 'C', ModBlocks.fwatz_computer, 'B', ModBlocks.block_combine_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.chopper_tail, 1), new Object[] { "PPP", "IIM", " PR", 'P', ModItems.plate_combine_steel, 'I', ModItems.ingot_combine_steel, 'M', ModItems.motor, 'R', ModItems.chopper_blades }); + GameRegistry.addRecipe(new ItemStack(ModItems.chopper_torso, 1), new Object[] { "IMI", "MBB", "RCI", 'P', ModItems.plate_combine_steel, 'I', ModItems.ingot_combine_steel, 'M', ModItems.motor, 'B', ModBlocks.block_combine_steel, 'R', ModItems.chopper_blades, 'C', ModBlocks.fwatz_computer }); + GameRegistry.addRecipe(new ItemStack(ModItems.chopper_wing, 1), new Object[] { "III", " PP", " PP", 'P', ModItems.plate_combine_steel, 'I', ModItems.ingot_combine_steel }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.telepad, 1), new Object[] { "CPC", "SUS", "WWW", 'C', ModItems.plate_combine_steel, 'P', ModItems.plate_schrabidium, 'S', "plateSteel", 'U', ModItems.circuit_schrabidium, 'W', ModItems.wire_gold })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.entanglement_kit, 1), new Object[] { "CEC", "PDP", "CSC", 'C', ModItems.coil_magnetized_tungsten, 'P', "plateDenseLead", 'S', ModItems.singularity_super_heated, 'E', ModItems.singularity_counter_resonant, 'D', ModItems.powder_power })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.entanglement_kit, 1), new Object[] { "CSC", "PDP", "CEC", 'C', ModItems.coil_magnetized_tungsten, 'P', "plateDenseLead", 'S', ModItems.singularity_super_heated, 'E', ModItems.singularity_counter_resonant, 'D', ModItems.powder_power })); GameRegistry.addRecipe(new ItemStack(ModItems.missile_generic, 1), new Object[] { "W", "T", "M", 'W', ModItems.warhead_generic_small, 'T', ModItems.fuel_tank_small, 'M', ModItems.thruster_small }); GameRegistry.addRecipe(new ItemStack(ModItems.missile_incendiary, 1), new Object[] { "W", "T", "M", 'W', ModItems.warhead_incendiary_small, 'T', ModItems.fuel_tank_small, 'M', ModItems.thruster_small }); @@ -380,6 +398,9 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_converter_rf_he), 1), new Object[] { "SSS", "CRC", "SSS", 'S', ModItems.ingot_beryllium, 'C', ModItems.coil_copper, 'R', ModItems.coil_copper_torus }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_schrabidium_transmutator), 1), new Object[] { "TST", "ARA", "BBB", 'S', ModItems.nugget_schrabidium , 'T', "ingotTitanium", 'A', Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 'R', Item.getItemFromBlock(ModBlocks.machine_reactor), 'B', Item.getItemFromBlock(ModBlocks.machine_battery) })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_diesel), 1), new Object[] { "HTH", "PRP", "SFS", 'S', "ingotSteel", 'T', ModItems.tank_steel, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'R', "ingotRedstoneAlloy", 'F', Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off) })); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_shredder), 1), new Object[] { "SHS", "MBM", "CFC", 'H', ModItems.hull_big_steel, 'S', ModBlocks.steel_beam, 'M', ModItems.motor, 'B', Blocks.iron_bars, 'C', ModBlocks.red_wire_coated, 'F', Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off) }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_combine_factory), 1), new Object[] { "HCH", "STS", "RFR", 'H', ModItems.tank_steel, 'C', ModItems.coil_advanced_torus, 'S', "plateSteel", 'T', ModBlocks.block_magnetized_tungsten, 'R', ModItems.wire_red_copper, 'F', Item.getItemFromBlock(ModBlocks.machine_difurnace_off) })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_teleporter), 1), new Object[] { "TPT", "EKE", "AMA", 'T', "plateTitanium", 'P', ModItems.telepad, 'E', ModItems.powder_power, 'K', ModItems.entanglement_kit, 'A', "plateAdvanced", 'M', ModBlocks.fwatz_computer })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 1), new Object[] { "PIP", "I I", "PIP", 'P', "plateTitanium", 'I', "ingotTitanium" })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_furnace), 1), new Object[] { "HMH", "MFM", "HMH", 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 'M', ModItems.motor, 'F', Item.getItemFromBlock(Blocks.furnace) }); @@ -400,6 +421,21 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.singularity, 1), new Object[] { "ESE", "SBS", "ESE", 'E', ModItems.nugget_euphemium, 'S', ModItems.cell_anti_schrabidium, 'B', Item.getItemFromBlock(ModBlocks.block_schrabidium) }); GameRegistry.addRecipe(new ItemStack(ModItems.singularity_counter_resonant, 1), new Object[] { "CTC", "TST", "CTC", 'C', ModItems.plate_combine_steel, 'T', ModItems.ingot_magnetized_tungsten, 'S', ModItems.singularity }); + GameRegistry.addRecipe(new ItemStack(ModItems.singularity_super_heated, 1), new Object[] { "CTC", "TST", "CTC", 'C', ModItems.plate_advanced_alloy, 'T', ModItems.powder_power, 'S', ModItems.singularity }); + GameRegistry.addRecipe(new ItemStack(ModItems.black_hole, 1), new Object[] { "SSS", "SCS", "SSS", 'C', ModItems.singularity, 'S', ModItems.crystal_xen }); + GameRegistry.addRecipe(new ItemStack(ModItems.crystal_xen, 1), new Object[] { "EEE", "EIE", "EEE", 'E', ModItems.powder_power, 'I', ModItems.ingot_euphemium }); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.screwdriver, 1), new Object[] { " I", " I ", "S ", 'S', "ingotSteel", 'I', "ingotIron" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.overfuse, 1), new Object[] { ModItems.screwdriver, "dustNeptunium", ModItems.powder_iodine, ModItems.powder_thorium, ModItems.powder_astatine, ModItems.powder_neodymium, ModItems.flame_pony, ModItems.black_hole, ModItems.blades_schrabidium })); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_aluminium, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateAluminum", 'I', "ingotAluminum" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_gold, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateGold", 'I', "ingotGold" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_iron, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateIron", 'I', "ingotIron" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_steel, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateSteel", 'I', "ingotSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_titanium, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateTitanium", 'I', "ingotTitanium" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_advanced_alloy, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateAdvanced", 'I', "ingotAdvanced" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_combine_steel, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateCMBSteel", 'I', "ingotCMBSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.blades_schrabidium, 1), new Object[] { " P ", "PIP", " P ", 'P', "plateSchrabidium", 'I', "ingotSchrabidium" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reactor_element), 1), new Object[] { "SCS", "CSC", "SCS", 'S', "ingotSteel", 'C', ModItems.rod_quad_empty })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reactor_control), 1), new Object[] { "SLS", "SLS", "SLS", 'S', "ingotSteel", 'L', "ingotLead" })); @@ -410,21 +446,31 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fusion_conductor), 1), new Object[] { "SSS", "CCC", "SSS", 'S', "plateSteel", 'C', ModItems.coil_advanced_alloy })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fusion_center), 1), new Object[] { "TMT", "TWT", "TMT", 'T', "ingotTungsten", 'M', Item.getItemFromBlock(ModBlocks.fusion_conductor), 'W', Item.getItemFromBlock(ModBlocks.red_wire_coated) })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fusion_motor), 1), new Object[] { "MTM", "TTT", "MTM", 'T', "ingotTitanium", 'M', ModItems.motor })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fusion_heater), 1), new Object[] { "TTT", "CCC", "TTT", 'T', "ingotTungsten", 'C', ModItems.coil_tungsten })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fusion_heater), 1), new Object[] { "TTT", "CCC", "TTT", 'T', "ingotTungsten", 'C', ModItems.magnetron })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fusion_hatch), 1), new Object[] { "TTT", "TFT", "TTT", 'T', Item.getItemFromBlock(ModBlocks.fusion_heater), 'F', Item.getItemFromBlock(Blocks.furnace) }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fusion_core), 1), new Object[] { "CWC", "CRC", "CWC", 'C', ModItems.circuit_gold, 'W', Item.getItemFromBlock(ModBlocks.red_wire_coated), 'R', Item.getItemFromBlock(ModBlocks.fusion_center) }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_element), 2), new Object[] { "TET", "ERE", "TET", 'T', "ingotTungsten", 'R', Item.getItemFromBlock(ModBlocks.fusion_conductor), 'E', Item.getItemFromBlock(ModBlocks.reactor_element) })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_control), 2), new Object[] { "TMT", "MWM", "TMT", 'T', ModItems.ingot_advanced_alloy, 'M', Item.getItemFromBlock(ModBlocks.reactor_control), 'W', ModItems.coil_copper_torus }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_cooler), 1), new Object[] { "SCS", "CNC", "SCS", 'N', "blockSteel", 'C', ModItems.rod_quad_coolant, 'S', ModItems.powder_neptunium })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_cooler), 1), new Object[] { "SCS", "CNC", "SCS", 'N', "blockSteel", 'C', ModItems.rod_quad_coolant, 'S', "dustNetherQuartz" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_end), 1), new Object[] { "TST", "SBS", "TST", 'T', "ingotTungsten", 'S', "ingotSteel", 'B', "blockLead" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_conductor), 1), new Object[] { "TWT", "FNF", "TWT", 'T', "ingotTungsten", 'W', Item.getItemFromBlock(ModBlocks.red_wire_coated), 'F', ModItems.fuse, 'N', "nuggetSchrabidium" })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_hatch), 1), new Object[] { "RRR", "RFR", "RRR", 'R', Item.getItemFromBlock(ModBlocks.reinforced_brick), 'F', Item.getItemFromBlock(Blocks.furnace) }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.watz_core), 1), new Object[] { "CWC", "CRC", "CWC", 'C', ModItems.circuit_schrabidium, 'W', Item.getItemFromBlock(ModBlocks.watz_conductor), 'R', Item.getItemFromBlock(ModBlocks.block_meteor) }); + + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_conductor), 1), new Object[] { "SSS", "CCC", "SSS", 'S', ModItems.plate_combine_steel, 'C', ModItems.coil_magnetized_tungsten }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_cooler), 1), new Object[] { "IPI", "IPI", "IPI", 'I', "ingotTitanium", 'P', "plateTitanium" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_tank), 1), new Object[] { "CGC", "GGG", "CGC", 'C', ModItems.plate_combine_steel, 'G', "paneGlass" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_scaffold), 1), new Object[] { "IPI", "P P", "IPI", 'I', "ingotTungsten", 'P', "plateDenseLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_hatch), 1), new Object[] { "SSS", "SFS", "SSS", 'S', ModBlocks.fwatz_scaffold, 'F', Blocks.furnace })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_computer), 1), new Object[] { "DTD", "TMT", "DTD", 'D', "dustDiamond", 'T', "dustMagnetizedTungsten", 'M', ModBlocks.block_meteor })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.fwatz_core), 1), new Object[] { "CMC", "MAM", "CMC", 'C', ModItems.circuit_schrabidium, 'M', ModBlocks.fwatz_computer, 'A', ModBlocks.fwatz_conductor })); - GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_light), 8), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.fence, 'B', Blocks.brick_block }); - GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_concrete), 8), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.stone }); - GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_obsidian), 8), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.obsidian }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_light), 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.fence, 'B', Blocks.brick_block }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_concrete), 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.stone }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_obsidian), 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.obsidian }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.cmb_brick), 4), new Object[] { "PPP", "PIP", "PPP", 'P', ModItems.plate_combine_steel, 'I', ModItems.ingot_combine_steel }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.cmb_brick_reinforced), 8), new Object[] { "TBT", "BCB", "TBT", 'T', ModBlocks.block_magnetized_tungsten, 'B', ModBlocks.brick_concrete, 'C', ModBlocks.cmb_brick }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_brick), 8), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', ModBlocks.brick_concrete }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_glass), 8), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.glass }); @@ -442,7 +488,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_roof), 2), new Object[] { "SSS", 'S', "ingotSteel" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_scaffold), 8), new Object[] { "SSS", " S ", "SSS", 'S', "ingotSteel" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " S ", 'S', "plateSteel", 'W', Item.getItemFromBlock(Blocks.log) })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " SW", 'S', "plateSteel", 'W', "plateIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_rpg_ammo, 8), new Object[] { "SI ", "ITI", " I ", 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSS", " RW", 'S', "plateSteel", 'W', Item.getItemFromBlock(Blocks.planks), 'R', ModItems.wire_aluminium })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_ammo, 16), new Object[] { "L", "S", 'L', "plateLead", 'S', Items.gunpowder })); @@ -450,12 +496,23 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_iron_ammo, 16), new Object[] { "L", "S", 'L', "plateIron", 'S', Items.gunpowder })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_gold, 1), new Object[] { "SSS", " RW", 'S', "plateGold", 'W', "ingotGold", 'R', ModItems.wire_gold })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_gold_ammo, 16), new Object[] { "L", "S", 'L', ModItems.plate_gold, 'S', Items.gunpowder })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead, 1), new Object[] { "SSS", " RW", 'S', "plateLead", 'W', "ingotTungsten", 'R', ModItems.wire_tungsten })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", 'L', "paneGlass", 'S', ModItems.ingot_u235 })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", 'L', "paneGlass", 'S', ModItems.ingot_pu239 })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", 'L', "paneGlass", 'S', ModItems.nuclear_waste })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_lead_ammo, 16), new Object[] { "L", "S", 'L', "paneGlass", 'S', ModItems.trinitite })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_schrabidium, 1), new Object[] { "SSS", " RW", 'S', ModItems.plate_schrabidium, 'W', "ingotTungsten", 'R', ModItems.wire_schrabidium })); GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_schrabidium_ammo, 16), new Object[] { "L", "S", 'L', ModItems.plate_schrabidium, 'S', Items.gunpowder }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTM", "SRI", 'S', "plateSteel", 'I', "ingotSteel", 'R', ModItems.wire_red_copper, 'T', "plateTitanium", 'M', ModItems.motor })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_revolver_cursed_ammo, 32), new Object[] { "L", "L", 'L', "plateSteel", 'S', Items.gunpowder })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "III", "WPH", 'S', "plateSteel", 'I', "ingotSteel", 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston) })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman_ammo, 2), new Object[] { " S ", "SPS", "ITI", 'S', "plateSteel", 'P', ModItems.ingot_pu239, 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mirv, 1), new Object[] { "LLL", "WFW", "SSS", 'S', "plateSteel", 'L', "plateLead", 'W', ModItems.wire_gold, 'F', ModItems.gun_fatman })); + GameRegistry.addRecipe(new ItemStack(ModItems.gun_mirv_ammo, 1), new Object[] { "NNN", "NSN", "NNN", 'S', ModItems.hull_small_steel, 'N', ModItems.gun_fatman_ammo }); + 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[] { "III", " SW", " S ", 'S', "plateSteel", 'I', "ingotSteel", 'W', "plankWood" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp40_ammo, 16), new Object[] { "P", "G", 'P', "plateCopper", 'G', Items.gunpowder })); 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.circuit_copper })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 64), new Object[] { "SSS", "SRS", "SSS", 'S', "plateSteel", 'R', ModItems.rod_quad_uranium_fuel_depleted })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 32), new Object[] { " S ", "SRS", " S ", 'S', "plateSteel", 'R', ModItems.rod_dual_uranium_fuel_depleted })); @@ -463,6 +520,20 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', "plateSteel", 'R', ModItems.rod_uranium_fuel_depleted })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { " S ", " R ", " S ", 'S', "plateSteel", 'R', "U238" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_xvl1456_ammo, 16), new Object[] { "SRS", 'S', "plateSteel", 'R', "U238" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr, 1), new Object[] { "CCT", "WWI", "MCC", 'C', ModItems.plate_combine_steel, 'T', "ingotTungsten", 'W', ModItems.wire_magnetized_tungsten, 'I', ModItems.ingot_magnetized_tungsten, 'M', ModItems.coil_magnetized_tungsten })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr_ammo, 16), new Object[] { "G", "R", "S", 'G', "dustGlowstone", 'R', "dustRedstone", 'S', "plateSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr_ammo, 16), new Object[] { "R", "G", "S", 'G', "dustGlowstone", 'R', "dustRedstone", 'S', "plateSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_osipr_ammo2, 1), new Object[] { " C ", "PPP", " C ", 'C', ModItems.plate_combine_steel, 'P', ModItems.powder_power })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator, 1), new Object[] { "WCC", "PMT", "WAA", 'W', ModItems.wire_gold, 'C', "plateCopper", 'P', "plateAdvanced", 'M', ModItems.motor, 'T', ModItems.tank_steel, 'A', "plateSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator_ammo, 16), new Object[] { "SPS", "PCP", "SPS", 'S', "plateSteel", 'C', "dustCoal", 'P', ModItems.powder_fire })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator_ammo, 16), new Object[] { " F ", "SFS", " F ", 'S', "plateSteel", 'F', ModItems.canister_fuel })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_immolator_ammo, 24), new Object[] { " F ", "SFS", " F ", 'S', "plateSteel", 'F', ModItems.canister_napalm })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_cryolator, 1), new Object[] { "SSS", "IWL", "LMI", 'S', "plateSteel", 'I', "plateIron", 'L', Items.leather, 'M', ModItems.motor, 'W', ModItems.wire_aluminium })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_zomg, 1), new Object[] { "PRR", "CCS", "PXX", 'P', ModItems.plate_paa, 'R', "plateDenseLead", 'S', ModItems.singularity_counter_resonant, 'X', ModItems.crystal_xen, 'C', ModItems.coil_magnetized_tungsten})); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp, 1), new Object[] { "EEE", "SSM", "III", 'E', ModItems.ingot_euphemium, 'S', "plateSteel", 'I', "ingotSteel", 'M', ModItems.motor})); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mp_ammo, 32), new Object[] { "G", "C", 'G', "plateGold", 'C', "plateCopper", 'S', Items.gunpowder })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_emp, 1), new Object[] { "CPG", "CMF", "CPI", 'C', ModItems.coil_copper, 'P', "plateLead", 'G', ModItems.circuit_gold, 'M', ModItems.magnetron, 'I', "ingotTungsten", 'F', ModItems.fuse })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_emp_ammo, 8), new Object[] { "IGI", "IPI", "IPI", 'G', "plateGold", 'I', "plateIron", 'P', ModItems.powder_power })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_generic, 4), new Object[] { "RS ", "ITI", " I ", 'I', "plateIron", 'R', ModItems.wire_red_copper, 'S', "plateSteel", 'T', Item.getItemFromBlock(Blocks.tnt) })); GameRegistry.addRecipe(new ItemStack(ModItems.grenade_strong, 2), new Object[] { " G ", "SGS", " S ", 'G', ModItems.grenade_generic, 'S', Items.gunpowder }); @@ -475,8 +546,13 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.grenade_gas, 2), new Object[] { " G ", "CGC", " C ", 'G', ModItems.grenade_generic, 'C', ModItems.pellet_gas }); GameRegistry.addRecipe(new ItemStack(ModItems.grenade_schrabidium, 2), new Object[] { " G ", "CFC", " C ", 'G', ModItems.grenade_generic, 'C', ModItems.ingot_schrabidium, 'F', ModItems.grenade_flare }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_nuclear, 1), new Object[] {"RS ", "ITI", " I ", 'I', "plateIron", 'R', ModItems.wire_red_copper, 'S', "plateSteel", 'T', ModItems.gun_fatman_ammo })); - GameRegistry.addRecipe(new ItemStack(ModItems.grenade_plasma, 2), new Object[] { " G ", "SGS", " S ", 'G', ModItems.grenade_generic, 'S', ModItems.wire_advanced_alloy }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_plasma, 1), new Object[] {"RS ", "ICI", "TID", 'I', "plateIron", 'R', ModItems.wire_red_copper, 'S', "plateSteel", 'C', ModItems.coil_advanced_torus, 'D', ModItems.cell_deuterium, 'T', ModItems.cell_tritium })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_tau, 1), new Object[] {"RS ", "ITI", "UIU", 'I', "plateLead", 'R', ModItems.wire_red_copper, 'S', "plateAdvanced", 'T', ModItems.coil_advanced_torus, 'U', ModItems.gun_xvl1456_ammo })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_zomg, 1), new Object[] {"RC ", "PXP", "NPN", 'P', ModItems.plate_paa, 'R', ModItems.wire_red_copper, 'C', "plateCMBSteel", 'X', ModItems.crystal_xen, 'N', ModItems.powder_power })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_aschrab, 1), new Object[] {"RS ", "ITI", " S ", 'I', "paneGlassColorless", 'R', ModItems.wire_red_copper, 'S', "plateSteel", 'T', ModItems.cell_anti_schrabidium })); + GameRegistry.addRecipe(new ItemStack(ModItems.grenade_mk2, 2), new Object[] { " G ", "SGS", " S ", 'G', ModItems.grenade_strong, 'S', Items.gunpowder }); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.grenade_lemon, 1), new Object[] { ModItems.lemon, ModItems.grenade_strong })); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.gun_moist_nugget, 12), new Object[] { Items.bread, Items.wheat, Items.cooked_chicken, Items.egg }); GameRegistry.addRecipe(new ItemStack(ModItems.bomb_waffle, 1), new Object[] { "WEW", "MPM", "WEW", 'W', Items.wheat, 'E', Items.egg, 'M', Items.milk_bucket, 'P', ModItems.man_core }); GameRegistry.addRecipe(new ItemStack(ModItems.schnitzel_vegan, 3), new Object[] { "RWR", "WPW", "RWR", 'W', ModItems.nuclear_waste, 'R', Items.reeds, 'P', Items.pumpkin_seeds }); @@ -530,6 +606,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_fire, 4), new Object[] { Items.blaze_powder, "dustSulfur", "dustRedstone" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_poison, 4), new Object[] { Items.spider_eye, "dustRedstone", "gemQuartz" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.pellet_gas, 2), new Object[] { Items.water_bucket, "dustGlowstone", "plateSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.magnetron, 2), new Object[] { "PWP", "ITI", "PWP", 'P', "plateAdvanced", 'I', "ingotAdvanced", 'W', ModItems.wire_tungsten, 'T', ModItems.coil_tungsten })); GameRegistry.addRecipe(new ItemStack(ModItems.flame_pony, 1), new Object[] { " O ", "DPD", " O ", 'D', new ItemStack(Items.dye, 1, 7), 'O', new ItemStack(Items.dye, 1, 5), 'P', Items.paper }); GameRegistry.addRecipe(new ItemStack(ModItems.flame_conspiracy, 1), new Object[] { " S ", "STS", " S ", 'S', ModItems.canister_fuel, 'T', ModItems.ingot_steel }); @@ -572,8 +649,8 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced, 1, 200), new Object[] { " A ", "PLP", "PSP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "sulfur", 'L', "dustLead" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced, 1, 200), new Object[] { " A ", "PSP", "PLP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "dustSulfur", 'L', "dustLead" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced, 1, 200), new Object[] { " A ", "PLP", "PSP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "dustSulfur", 'L', "dustLead" })); - GameRegistry.addRecipe(new ItemStack(ModItems.battery_schrabidium, 1, 1000), new Object[] { " A ", "PNP", "PSP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium }); - GameRegistry.addRecipe(new ItemStack(ModItems.battery_schrabidium, 1, 1000), new Object[] { " A ", "PSP", "PNP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium }); + GameRegistry.addRecipe(new ItemStack(ModItems.battery_schrabidium, 1, 10000), new Object[] { " A ", "PNP", "PSP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium }); + GameRegistry.addRecipe(new ItemStack(ModItems.battery_schrabidium, 1, 10000), new Object[] { " A ", "PSP", "PNP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.energy_core, 1), new Object[] { "PCW", "TRD", "PCW", 'P', ModItems.plate_advanced_alloy, 'C', ModItems.coil_advanced_alloy, 'W', ModItems.wire_advanced_alloy, 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', "ingotTungsten" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.energy_core, 1), new Object[] { "PCW", "TDR", "PCW", 'P', ModItems.plate_advanced_alloy, 'C', ModItems.coil_advanced_alloy, 'W', ModItems.wire_advanced_alloy, 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', "ingotTungsten" })); @@ -612,19 +689,35 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.alloy_pickaxe, 1), new Object[] { "III", " S ", " S ", 'I', ModItems.ingot_advanced_alloy, 'S', Items.stick }); GameRegistry.addRecipe(new ItemStack(ModItems.alloy_axe, 1), new Object[] { "II", "IS", " S", 'I', ModItems.ingot_advanced_alloy, 'S', Items.stick }); GameRegistry.addRecipe(new ItemStack(ModItems.alloy_shovel, 1), new Object[] { "I", "S", "S", 'I', ModItems.ingot_advanced_alloy, 'S', Items.stick }); - GameRegistry.addRecipe(new ItemStack(ModItems.alloy_hoe, 1), new Object[] { "II", " S", " S", 'I', ModItems.ingot_advanced_alloy, 'S', Items.stick }); + GameRegistry.addRecipe(new ItemStack(ModItems.alloy_hoe, 1), new Object[] { "II", " S", " S", 'I', ModItems.ingot_combine_steel, 'S', Items.stick }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_combine_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_combine_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_combine_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.ingot_combine_steel }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_sword, 1), new Object[] { "I", "I", "S", 'I', ModItems.ingot_combine_steel, 'S', Items.stick }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_pickaxe, 1), new Object[] { "III", " S ", " S ", 'I', ModItems.ingot_combine_steel, 'S', Items.stick }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_axe, 1), new Object[] { "II", "IS", " S", 'I', ModItems.ingot_combine_steel, 'S', Items.stick }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_shovel, 1), new Object[] { "I", "S", "S", 'I', ModItems.ingot_combine_steel, 'S', Items.stick }); + GameRegistry.addRecipe(new ItemStack(ModItems.cmb_hoe, 1), new Object[] { "II", " S", " S", 'I', ModItems.ingot_combine_steel, 'S', Items.stick }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.chainsaw, 1), new Object[] { "TTG", "SSM", 'T', "plateIron", 'S', "plateSteel", 'M', ModItems.motor, 'G', ModItems.circuit_gold })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.tank_waste, 1), new Object[] { "PTP", "PTP", "PTP", 'T', ModItems.tank_steel, 'P', "plateSteel" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_helmet, 1), new Object[] { "EEE", "EIE", " P ", 'E', ModItems.hazmat_cloth, 'I', Item.getItemFromBlock(Blocks.glass_pane), 'P', "plateSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_helmet, 1), new Object[] { "EEE", "EIE", "FPF", 'E', ModItems.hazmat_cloth, 'I', "paneGlass", 'P', "plateSteel", 'F', ModItems.filter_coal })); GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.hazmat_cloth }); GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.hazmat_cloth }); GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.hazmat_cloth }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.hazmat_paa_helmet, 1), new Object[] { "EEE", "IEI", "FPF", 'E', ModItems.plate_paa, 'I', "paneGlass", 'P', "plateSteel", 'F', ModItems.filter_coal })); + GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_paa_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.plate_paa }); + GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_paa_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.plate_paa }); + GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_paa_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.plate_paa }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.paa_plate, 1), new Object[] { "E E", "NEN", "ENE", 'E', ModItems.plate_paa, 'N', "plateDenseLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.paa_legs, 1), new Object[] { "EEE", "N N", "E E", 'E', ModItems.plate_paa, 'N', "plateDenseLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.paa_boots, 1), new Object[] { "E E", "N N", 'E', ModItems.plate_paa, 'N', "plateDenseLead" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.goggles, 1), new Object[] { "P P", "GPG", 'G', Item.getItemFromBlock(Blocks.glass_pane), 'P', "plateSteel" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask, 1), new Object[] { "PPP", "GPG", " P ", 'G', Item.getItemFromBlock(Blocks.glass_pane), 'P', "plateSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.goggles, 1), new Object[] { "P P", "GPG", 'G', "paneGlass", 'P', "plateSteel" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask, 1), new Object[] { "PPP", "GPG", "FPF", 'G', "paneGlass", 'P', "plateSteel", 'F', ModItems.filter_coal })); GameRegistry.addRecipe(new ItemStack(ModItems.cape_radiation, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 11), 'D', new ItemStack(Items.dye, 1, 11), 'I', ModItems.nuclear_waste }); GameRegistry.addRecipe(new ItemStack(ModItems.cape_gasmask, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 4), 'D', new ItemStack(Items.dye, 1, 0), 'I', ModItems.gas_mask }); @@ -635,7 +728,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.igniter, 1), new Object[] { " W", "SC", "CE", 'S', "plateSteel", 'W', ModItems.wire_schrabidium, 'C', ModItems.circuit_schrabidium, 'E', ModItems.ingot_euphemium })); GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_euphemium }); - GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_plate, 1), new Object[] { "E E", "EWE", "EEE", 'E', ModItems.ingot_euphemium, 'W', ModItems.watch }); + GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_plate, 1), new Object[] { "EWE", "EEE", "EEE", 'E', ModItems.ingot_euphemium, 'W', ModItems.watch }); GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_euphemium }); GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_boots, 1), new Object[] { "E E", "E E", 'E', ModItems.ingot_euphemium }); GameRegistry.addRecipe(new ItemStack(ModItems.watch, 1), new Object[] { "LEL", "EWE", "LEL", 'E', ModItems.ingot_euphemium, 'L', new ItemStack(Items.dye, 1, 4), 'W', Items.clock }); @@ -643,31 +736,79 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.mask_of_infamy, 1), new Object[] { "III", "III", " I ", 'I', "plateIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.designator, 1), new Object[] { " A", "#B#", "#B#", '#', "plateIron", 'A', "plateSteel", 'B', ModItems.circuit_red_copper })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.linker, 1), new Object[] { "I I", "ICI", "GGG", 'I', "plateIron", 'G', "plateGold", 'C', ModItems.circuit_gold })); GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_hammer, 1), new Object[] { "BBB", "BBB", " S ", 'B', Item.getItemFromBlock(ModBlocks.block_schrabidium), 'S', Items.stick }); GameRegistry.addRecipe(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', ModItems.ingot_euphemium, 'S', Items.stick }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', "sulfur", 'S', Items.stick })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', "dustSulfur", 'S', Items.stick })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.remote, 1), new Object[] { "I", "S", 'I', "dustRedstone", 'S', "plateIron" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.crowbar, 1), new Object[] { "II", " I", " I", 'I', "ingotSteel" })); + + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_power, 5), new Object[] { "dustRedstone", "dustGlowstone", "dustDiamond", "dustNeptunium", "dustMagnetizedTungsten" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.coal, 1), new Object[] { "#", '#', "dustCoal" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.quartz, 1), new Object[] { "#", '#', "dustQuartz" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.quartz, 1), new Object[] { "#", '#', "dustNetherQuartz" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.dye, 1, 4), new Object[] { "#", '#', "dustLapis" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.diamond, 1), new Object[] { "#", '#', "dustDiamond" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.emerald, 1), new Object[] { "#", '#', "dustEmerald" })); + if(MainRegistry.enableNITAN) + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.canister_NITAN, 1), new Object[] { ModItems.canister_empty, ModItems.canister_napalm, ModItems.powder_neptunium, ModItems.powder_iodine, ModItems.powder_thorium, ModItems.powder_astatine, ModItems.powder_neodymium }); + + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.record_lc, 1), new Object[] { " S ", "SDS", " S ", 'S', "ingotSteel", 'D', "dustLapis" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.record_ss, 1), new Object[] { " S ", "SDS", " S ", 'S', "ingotSteel", 'D', "dustAdvanced" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.record_vc, 1), new Object[] { " S ", "SDS", " S ", 'S', "ingotSteel", 'D', "dustCMBSteel" })); + + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_advanced_alloy, 4), new Object[] { "dustRedstone", "dustIron", "dustCoal", "dustCopper" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_advanced_alloy, 3), new Object[] { "dustIron", "dustCoal", "dustRedstoneAlloy" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_advanced_alloy, 3), new Object[] { "dustRedstone", "dustSteel", "dustCopper" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_advanced_alloy, 2), new Object[] { "dustRedstoneAlloy", "dustSteel" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_magnetized_tungsten, 1), new Object[] { "dustTungsten", "nuggetSchrabidium" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_red_copper, 2), new Object[] { "dustRedstone", "dustCopper" })); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.powder_steel, 2), new Object[] { "dustIron", "dustCoal" })); + GameRegistry.addRecipe(new ItemStack(ModItems.chopper, 1), new Object[] { "BBB", "HTF", "GWW", 'B', ModItems.chopper_blades, 'H', ModItems.chopper_head, 'T', ModItems.chopper_torso, 'F', ModItems.chopper_tail, 'G', ModItems.chopper_gun, 'W', ModItems.chopper_wing }); } public static void AddSmeltingRec() { GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_uranium), new ItemStack(ModItems.ingot_uranium), 6.0F); + GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_nether_uranium), new ItemStack(ModItems.ingot_uranium), 12.0F); + GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_nether_plutonium), new ItemStack(ModItems.ingot_plutonium), 24.0F); GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_titanium), new ItemStack(ModItems.ingot_titanium), 3.0F); GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_copper), new ItemStack(ModItems.ingot_copper), 2.5F); GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_tungsten), new ItemStack(ModItems.ingot_tungsten), 6.0F); + GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_nether_tungsten), new ItemStack(ModItems.ingot_tungsten), 12.0F); GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_aluminium), new ItemStack(ModItems.ingot_aluminium), 2.5F); GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_lead), new ItemStack(ModItems.ingot_lead), 3.0F); GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_beryllium), new ItemStack(ModItems.ingot_beryllium), 2.0F); - GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_schrabidium), new ItemStack(ModItems.ingot_schrabidium), 126.0F); + GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_schrabidium), new ItemStack(ModItems.ingot_schrabidium), 128.0F); + GameRegistry.addSmelting(Item.getItemFromBlock(ModBlocks.ore_nether_schrabidium), new ItemStack(ModItems.ingot_schrabidium), 256.0F); GameRegistry.addSmelting(ModItems.powder_lead, new ItemStack(ModItems.ingot_lead), 1.0F); GameRegistry.addSmelting(ModItems.powder_neptunium, new ItemStack(ModItems.ingot_neptunium), 1.0F); GameRegistry.addSmelting(ModItems.powder_schrabidium, new ItemStack(ModItems.ingot_schrabidium), 5.0F); + GameRegistry.addSmelting(ModItems.powder_aluminium, new ItemStack(ModItems.ingot_aluminium), 1.0F); + GameRegistry.addSmelting(ModItems.powder_beryllium, new ItemStack(ModItems.ingot_beryllium), 1.0F); + GameRegistry.addSmelting(ModItems.powder_copper, new ItemStack(ModItems.ingot_copper), 1.0F); + GameRegistry.addSmelting(ModItems.powder_gold, new ItemStack(Items.gold_ingot), 1.0F); + GameRegistry.addSmelting(ModItems.powder_iron, new ItemStack(Items.iron_ingot), 1.0F); + GameRegistry.addSmelting(ModItems.powder_titanium, new ItemStack(ModItems.ingot_titanium), 1.0F); + GameRegistry.addSmelting(ModItems.powder_tungsten, new ItemStack(ModItems.ingot_tungsten), 1.0F); + GameRegistry.addSmelting(ModItems.powder_uranium, new ItemStack(ModItems.ingot_uranium), 1.0F); + GameRegistry.addSmelting(ModItems.powder_plutonium, new ItemStack(ModItems.ingot_plutonium), 1.0F); + GameRegistry.addSmelting(ModItems.powder_advanced_alloy, new ItemStack(ModItems.ingot_advanced_alloy), 1.0F); + GameRegistry.addSmelting(ModItems.powder_combine_steel, new ItemStack(ModItems.ingot_combine_steel), 1.0F); + GameRegistry.addSmelting(ModItems.powder_magnetized_tungsten, new ItemStack(ModItems.ingot_magnetized_tungsten), 1.0F); + GameRegistry.addSmelting(ModItems.powder_red_copper, new ItemStack(ModItems.ingot_red_copper), 1.0F); + GameRegistry.addSmelting(ModItems.powder_steel, new ItemStack(ModItems.ingot_steel), 1.0F); + GameRegistry.addSmelting(ModItems.powder_lithium, new ItemStack(ModItems.lithium), 1.0F); + + GameRegistry.addSmelting(ModItems.combine_scrap, new ItemStack(ModItems.ingot_combine_steel), 1.0F); + GameRegistry.addSmelting(ModItems.tank_waste, new ItemStack(ModItems.tank_waste), 0.0F); - GameRegistry.addSmelting(Items.bone, new ItemStack(Items.slime_ball, 3), 1.5F); - GameRegistry.addSmelting(new ItemStack(Items.dye, 1, 15), new ItemStack(Items.slime_ball, 1), 0.5F); - GameRegistry.addSmelting(ModItems.tank_waste, new ItemStack(ModItems.tank_waste), 0); + GameRegistry.addSmelting(Items.bone, new ItemStack(Items.slime_ball, 3), 0.0F); + GameRegistry.addSmelting(new ItemStack(Items.dye, 1, 15), new ItemStack(Items.slime_ball, 1), 0.0F); + GameRegistry.addSmelting(new ItemStack(Blocks.gravel, 1), new ItemStack(Blocks.cobblestone, 1), 0.0F); } } diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index c2990d68a..62d42fb4a 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -25,64 +25,76 @@ import com.hbm.creativetabs.BlockTab; import com.hbm.creativetabs.NukeTab; import com.hbm.creativetabs.PartsTab; import com.hbm.creativetabs.TestTab; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityChopperMine; -import com.hbm.entity.EntityCloudFleija; -import com.hbm.entity.EntityCombineBall; -import com.hbm.entity.EntityGrenadeCluster; -import com.hbm.entity.EntityGrenadeElectric; -import com.hbm.entity.EntityGrenadeFire; -import com.hbm.entity.EntityGrenadeFlare; -import com.hbm.entity.EntityGrenadeFrag; -import com.hbm.entity.EntityGrenadeGas; -import com.hbm.entity.EntityGrenadeGeneric; -import com.hbm.entity.EntityGrenadeLemon; -import com.hbm.entity.EntityGrenadeMk2; -import com.hbm.entity.EntityGrenadeNuclear; -import com.hbm.entity.EntityGrenadeNuke; -import com.hbm.entity.EntityGrenadePlasma; -import com.hbm.entity.EntityGrenadePoison; -import com.hbm.entity.EntityGrenadeSchrabidium; -import com.hbm.entity.EntityGrenadeStrong; -import com.hbm.entity.EntityGrenadeTau; -import com.hbm.entity.EntityHunterChopper; -import com.hbm.entity.EntityMiniNuke; -import com.hbm.entity.EntityMirv; -import com.hbm.entity.EntityMissileAntiBallistic; -import com.hbm.entity.EntityMissileBunkerBuster; -import com.hbm.entity.EntityMissileBurst; -import com.hbm.entity.EntityMissileBusterStrong; -import com.hbm.entity.EntityMissileCluster; -import com.hbm.entity.EntityMissileClusterStrong; -import com.hbm.entity.EntityMissileDrill; -import com.hbm.entity.EntityMissileEndo; -import com.hbm.entity.EntityMissileExo; -import com.hbm.entity.EntityMissileGeneric; -import com.hbm.entity.EntityMissileIncendiary; -import com.hbm.entity.EntityMissileIncendiaryStrong; -import com.hbm.entity.EntityMissileInferno; -import com.hbm.entity.EntityMissileMirv; -import com.hbm.entity.EntityMissileNuclear; -import com.hbm.entity.EntityMissileRain; -import com.hbm.entity.EntityMissileStrong; -import com.hbm.entity.EntityNuclearCreeper; -import com.hbm.entity.EntityNukeCloudBig; -import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosion; -import com.hbm.entity.EntityNukeExplosionAdvanced; -import com.hbm.entity.EntityRainbow; -import com.hbm.entity.EntityRocket; -import com.hbm.entity.EntitySchrab; -import com.hbm.entity.EntityTestMissile; +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.effect.EntityEMPBlast; +import com.hbm.entity.effect.EntityFalloutRain; +import com.hbm.entity.effect.EntityNukeCloudBig; +import com.hbm.entity.effect.EntityNukeCloudNoShroom; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.grenade.EntityGrenadeASchrab; +import com.hbm.entity.grenade.EntityGrenadeCluster; +import com.hbm.entity.grenade.EntityGrenadeElectric; +import com.hbm.entity.grenade.EntityGrenadeFire; +import com.hbm.entity.grenade.EntityGrenadeFlare; +import com.hbm.entity.grenade.EntityGrenadeFrag; +import com.hbm.entity.grenade.EntityGrenadeGas; +import com.hbm.entity.grenade.EntityGrenadeGeneric; +import com.hbm.entity.grenade.EntityGrenadeLemon; +import com.hbm.entity.grenade.EntityGrenadeMk2; +import com.hbm.entity.grenade.EntityGrenadeNuclear; +import com.hbm.entity.grenade.EntityGrenadeNuke; +import com.hbm.entity.grenade.EntityGrenadePlasma; +import com.hbm.entity.grenade.EntityGrenadePoison; +import com.hbm.entity.grenade.EntityGrenadeSchrabidium; +import com.hbm.entity.grenade.EntityGrenadeStrong; +import com.hbm.entity.grenade.EntityGrenadeTau; +import com.hbm.entity.grenade.EntityGrenadeZOMG; +import com.hbm.entity.logic.EntityNukeExplosion; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.missile.EntityMIRV; +import com.hbm.entity.missile.EntityMissileAntiBallistic; +import com.hbm.entity.missile.EntityMissileBunkerBuster; +import com.hbm.entity.missile.EntityMissileBurst; +import com.hbm.entity.missile.EntityMissileBusterStrong; +import com.hbm.entity.missile.EntityMissileCluster; +import com.hbm.entity.missile.EntityMissileClusterStrong; +import com.hbm.entity.missile.EntityMissileDrill; +import com.hbm.entity.missile.EntityMissileEndo; +import com.hbm.entity.missile.EntityMissileExo; +import com.hbm.entity.missile.EntityMissileGeneric; +import com.hbm.entity.missile.EntityMissileIncendiary; +import com.hbm.entity.missile.EntityMissileIncendiaryStrong; +import com.hbm.entity.missile.EntityMissileInferno; +import com.hbm.entity.missile.EntityMissileMirv; +import com.hbm.entity.missile.EntityMissileNuclear; +import com.hbm.entity.missile.EntityMissileRain; +import com.hbm.entity.missile.EntityMissileStrong; +import com.hbm.entity.missile.EntityTestMissile; +import com.hbm.entity.mob.EntityHunterChopper; +import com.hbm.entity.mob.EntityNuclearCreeper; +import com.hbm.entity.particle.EntityBSmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; +import com.hbm.entity.projectile.EntityBaleflare; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityChopperMine; +import com.hbm.entity.projectile.EntityCombineBall; +import com.hbm.entity.projectile.EntityDischarge; +import com.hbm.entity.projectile.EntityFire; +import com.hbm.entity.projectile.EntityLN2; +import com.hbm.entity.projectile.EntityMiniMIRV; +import com.hbm.entity.projectile.EntityMiniNuke; +import com.hbm.entity.projectile.EntityPlasmaBeam; +import com.hbm.entity.projectile.EntityRainbow; +import com.hbm.entity.projectile.EntityRocket; +import com.hbm.entity.projectile.EntitySchrab; import com.hbm.gui.MachineRecipes; import com.hbm.gui.MachineRecipes.ShredderRecipe; import com.hbm.handler.FuelHandler; +import com.hbm.handler.GUIHandler; import com.hbm.items.ModItems; import com.hbm.lib.HbmWorld; import com.hbm.lib.Library; import com.hbm.lib.RefStrings; -import com.hbm.particles.EntityBSmokeFX; -import com.hbm.particles.EntitySmokeFX; import com.hbm.tileentity.TileEntityBombMulti; import com.hbm.tileentity.TileEntityCable; import com.hbm.tileentity.TileEntityConverterHeRf; @@ -111,6 +123,7 @@ import com.hbm.tileentity.TileEntityMachinePuF6Tank; import com.hbm.tileentity.TileEntityMachineReactor; import com.hbm.tileentity.TileEntityMachineSchrabidiumTransmutator; import com.hbm.tileentity.TileEntityMachineShredder; +import com.hbm.tileentity.TileEntityMachineTeleporter; import com.hbm.tileentity.TileEntityMachineUF6Tank; import com.hbm.tileentity.TileEntityNukeBoy; import com.hbm.tileentity.TileEntityNukeFleija; @@ -161,6 +174,7 @@ public class MainRegistry public static ToolMaterial enumToolMaterialSteel = EnumHelper.addToolMaterial("STEEL", 2, 500, 7.5F, 2.0F, 10); public static ToolMaterial enumToolMaterialTitanium = EnumHelper.addToolMaterial("TITANIUM", 3, 750, 9.0F, 2.5F, 15); public static ToolMaterial enumToolMaterialAlloy= EnumHelper.addToolMaterial("ALLOY", 3, 2000, 15.0F, 5.0F, 5); + public static ToolMaterial enumToolMaterialCmb = EnumHelper.addToolMaterial("CMB", 3, 8500, 40.0F, 50F, 100); //Armor Materials public static ArmorMaterial enumArmorMaterialEmerald = EnumHelper.addArmorMaterial("TEST", 2500, new int[] {3, 8, 6, 3}, 30); @@ -170,7 +184,9 @@ public class MainRegistry public static ArmorMaterial enumArmorMaterialT45 = EnumHelper.addArmorMaterial("T45", 1000, new int[] {2, 5, 4, 1}, 0); public static ArmorMaterial enumArmorMaterialSteel = EnumHelper.addArmorMaterial("STEEL", 20, new int[] {2, 6, 5, 2}, 5); public static ArmorMaterial enumArmorMaterialTitanium = EnumHelper.addArmorMaterial("TITANIUM", 25, new int[] {3, 8, 6, 3}, 9); - public static ArmorMaterial enumArmorMaterialAlloy = EnumHelper.addArmorMaterial("ALLOY", 50, new int[] {3, 8, 6, 3}, 12); + public static ArmorMaterial enumArmorMaterialAlloy = EnumHelper.addArmorMaterial("ALLOY", 40, new int[] {3, 8, 6, 3}, 12); + public static ArmorMaterial enumArmorMaterialPaa = EnumHelper.addArmorMaterial("PAA", 75, new int[] {3, 8, 6, 3}, 25); + public static ArmorMaterial enumArmorMaterialCmb = EnumHelper.addArmorMaterial("CMB", 60, new int[] {3, 8, 6, 3}, 50); //Creative Tabs public static CreativeTabs tabTest = new TestTab(CreativeTabs.getNextID(), "tabTest"); @@ -180,9 +196,12 @@ public class MainRegistry public static boolean enableDebugMode = true; public static boolean enableMycelium = false; + public static boolean enablePlutoniumOre = false; public static boolean enableDungeons = true; public static boolean enableMDOres = true; public static boolean enableBarrels = false; + public static boolean enableNITAN = true; + public static boolean enableNukeClouds = true; public static int uraniumSpawn = 7; public static int titaniumSpawn = 8; public static int sulfurSpawn = 5; @@ -238,6 +257,8 @@ public class MainRegistry Library.superuser.add("3af1c262-61c0-4b12-a4cb-424cc3a9c8c0"); Library.superuser.add("4729b498-a81c-42fd-8acd-20d6d9f759e0"); Library.superuser.add("c3f5e449-6d8c-4fe3-acc9-47ef50e7e7ae"); + + Library.initBooks(); enumArmorMaterialSchrabidium.customCraftingMaterial = ModItems.ingot_schrabidium; enumArmorMaterialHazmat.customCraftingMaterial = ModItems.hazmat_cloth; @@ -245,12 +266,15 @@ public class MainRegistry enumArmorMaterialTitanium.customCraftingMaterial = ModItems.ingot_titanium; enumArmorMaterialSteel.customCraftingMaterial = ModItems.ingot_steel; enumArmorMaterialAlloy.customCraftingMaterial = ModItems.ingot_advanced_alloy; + enumArmorMaterialPaa.customCraftingMaterial = ModItems.plate_paa; + enumArmorMaterialCmb.customCraftingMaterial = ModItems.ingot_combine_steel; enumToolMaterialSchrabidium.setRepairItem(new ItemStack(ModItems.ingot_schrabidium)); enumToolMaterialHammer.setRepairItem(new ItemStack(Item.getItemFromBlock(ModBlocks.block_schrabidium))); enumToolMaterialChainsaw.setRepairItem(new ItemStack(ModItems.ingot_steel)); enumToolMaterialTitanium.setRepairItem(new ItemStack(ModItems.ingot_titanium)); enumToolMaterialSteel.setRepairItem(new ItemStack(ModItems.ingot_steel)); enumToolMaterialAlloy.setRepairItem(new ItemStack(ModItems.ingot_advanced_alloy)); + enumToolMaterialCmb.setRepairItem(new ItemStack(ModItems.ingot_combine_steel)); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GUIHandler()); GameRegistry.registerTileEntity(TileEntityTestBombAdvanced.class, "tilentity_testbombadvanced"); @@ -302,6 +326,7 @@ public class MainRegistry GameRegistry.registerTileEntity(TileEntityMachineShredder.class, "tileentity_machine_shredder"); GameRegistry.registerTileEntity(TileEntityMachineCMBFactory.class, "tileentity_machine_cmb"); GameRegistry.registerTileEntity(TileEntityFWatzCore.class, "tileentity_fwatz_multiblock"); + GameRegistry.registerTileEntity(TileEntityMachineTeleporter.class, "tileentity_teleblock"); EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true); EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true); @@ -338,7 +363,7 @@ public class MainRegistry EntityRegistry.registerModEntity(EntityMissileEndo.class, "entity_missile_endo", 32, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityMissileExo.class, "entity_missile_exo", 33, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityMissileMirv.class, "entity_missile_mirv", 34, this, 1000, 1, true); - EntityRegistry.registerModEntity(EntityMirv.class, "entity_mirvlet", 35, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityMIRV.class, "entity_mirvlet", 35, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityMiniNuke.class, "entity_mini_nuke", 36, this, 1000, 1, true); EntityRegistry.registerModEntity(EntitySmokeFX.class, "entity_smoke_fx", 37, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityNukeCloudBig.class, "entity_nuke_cloud_big", 38, this, 1000, 1, true); @@ -352,9 +377,20 @@ public class MainRegistry EntityRegistry.registerModEntity(EntityGrenadeLemon.class, "entity_grenade_lemon", 46, this, 500, 1, true); EntityRegistry.registerModEntity(EntityCloudFleija.class, "entity_cloud_fleija", 47, this, 500, 1, true); EntityRegistry.registerModEntity(EntityGrenadeMk2.class, "entity_grenade_mk2", 48, this, 500, 1, true); - + EntityRegistry.registerModEntity(EntityGrenadeZOMG.class, "entity_grenade_zomg", 49, this, 500, 1, true); + EntityRegistry.registerModEntity(EntityGrenadeASchrab.class, "entity_grenade_aschrab", 50, this, 500, 1, true); + EntityRegistry.registerModEntity(EntityNukeCloudNoShroom.class, "entity_nuke_cloud_no", 51, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityFalloutRain.class, "entity_fallout", 52, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityDischarge.class, "entity_emp_discharge", 53, this, 500, 1, true); + EntityRegistry.registerModEntity(EntityEMPBlast.class, "entity_emp_blast", 54, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityMiniMIRV.class, "entity_mini_mirv", 55, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityBaleflare.class, "entity_bf_projectile", 56, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityFire.class, "entity_fire", 57, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityPlasmaBeam.class, "entity_immolator_beam", 58, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityLN2.class, "entity_LN2", 59, this, 1000, 1, true); + EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00); - EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0xffffff, 0xffffff); + EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72); } @EventHandler @@ -378,9 +414,6 @@ public class MainRegistry OreDictionary.registerOre("dustSulfur", ModItems.sulfur); OreDictionary.registerOre("dustNiter", ModItems.niter); OreDictionary.registerOre("dustSalpeter", ModItems.niter); - OreDictionary.registerOre("sulfur", ModItems.sulfur); - OreDictionary.registerOre("niter", ModItems.niter); - OreDictionary.registerOre("salpeter", ModItems.niter); OreDictionary.registerOre("dustLead", ModItems.powder_lead); OreDictionary.registerOre("dustNeptunium", ModItems.powder_neptunium); OreDictionary.registerOre("ingotCopper", ModItems.ingot_copper); @@ -421,9 +454,12 @@ public class MainRegistry OreDictionary.registerOre("plateIron", ModItems.plate_iron); OreDictionary.registerOre("plateGold", ModItems.plate_gold); OreDictionary.registerOre("plateAdvanced", ModItems.plate_advanced_alloy); + OreDictionary.registerOre("plateSchrabidium", ModItems.plate_schrabidium); + OreDictionary.registerOre("plateCMBSteel", ModItems.plate_combine_steel); OreDictionary.registerOre("dustIron", ModItems.powder_iron); OreDictionary.registerOre("dustGold", ModItems.powder_gold); OreDictionary.registerOre("dustUranium", ModItems.powder_uranium); + OreDictionary.registerOre("dustPlutonium", ModItems.powder_plutonium); OreDictionary.registerOre("dustTitanium", ModItems.powder_titanium); OreDictionary.registerOre("dustTungsten", ModItems.powder_tungsten); OreDictionary.registerOre("dustCopper", ModItems.powder_copper); @@ -434,6 +470,7 @@ public class MainRegistry OreDictionary.registerOre("dustLapis", ModItems.powder_lapis); OreDictionary.registerOre("dustCoal", ModItems.powder_coal); OreDictionary.registerOre("dustAdvanced", ModItems.powder_advanced_alloy); + OreDictionary.registerOre("dustAdvancedAlloy", ModItems.powder_advanced_alloy); OreDictionary.registerOre("dustCMBSteel", ModItems.powder_combine_steel); OreDictionary.registerOre("dustMagnetizedTungsten", ModItems.powder_magnetized_tungsten); OreDictionary.registerOre("dustRedAlloy", ModItems.powder_red_copper); @@ -457,6 +494,12 @@ public class MainRegistry OreDictionary.registerOre("oreLead", ModBlocks.ore_lead); OreDictionary.registerOre("oreBeryllium", ModBlocks.ore_beryllium); + OreDictionary.registerOre("oreUranium", ModBlocks.ore_nether_uranium); + OreDictionary.registerOre("orePlutonium", ModBlocks.ore_nether_plutonium); + OreDictionary.registerOre("oreTungsten", ModBlocks.ore_nether_tungsten); + OreDictionary.registerOre("oreSulfur", ModBlocks.ore_nether_sulfur); + OreDictionary.registerOre("oreSchrabidium", ModBlocks.ore_nether_schrabidium); + OreDictionary.registerOre("blockUranium", ModBlocks.block_uranium); OreDictionary.registerOre("blockTitanium", ModBlocks.block_titanium); OreDictionary.registerOre("blockSulfur", ModBlocks.block_sulfur); @@ -491,7 +534,6 @@ public class MainRegistry recipes.overridePreSetRecipe(new ItemStack(ModItems.scrap), new ItemStack(ModItems.dust)); recipes.overridePreSetRecipe(new ItemStack(ModItems.dust), new ItemStack(ModItems.dust)); recipes.overridePreSetRecipe(new ItemStack(Blocks.glowstone), new ItemStack(Items.glowstone_dust, 4)); - recipes.overridePreSetRecipe(new ItemStack(Items.dye, 1, 4), new ItemStack(ModItems.powder_lapis)); recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 0), new ItemStack(ModItems.powder_quartz, 4)); recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 1), new ItemStack(ModItems.powder_quartz, 4)); recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_block, 1, 2), new ItemStack(ModItems.powder_quartz, 4)); @@ -499,6 +541,39 @@ public class MainRegistry recipes.overridePreSetRecipe(new ItemStack(Blocks.stone_slab, 1, 7), new ItemStack(ModItems.powder_quartz, 2)); recipes.overridePreSetRecipe(new ItemStack(Items.quartz), new ItemStack(ModItems.powder_quartz)); recipes.overridePreSetRecipe(new ItemStack(Blocks.quartz_ore), new ItemStack(ModItems.powder_quartz, 2)); + recipes.overridePreSetRecipe(new ItemStack(ModBlocks.ore_nether_fire), new ItemStack(ModItems.powder_fire, 6)); + recipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_light), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete), new ItemStack(Blocks.gravel, 1)); + recipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_obsidian), new ItemStack(ModBlocks.gravel_obsidian, 1)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.obsidian), new ItemStack(ModBlocks.gravel_obsidian, 1)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stone), new ItemStack(Blocks.gravel, 1)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.cobblestone), new ItemStack(Blocks.gravel, 1)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.gravel, 1)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.brick_block), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.brick_stairs), new ItemStack(Items.clay_ball, 3)); + recipes.overridePreSetRecipe(new ItemStack(Items.flower_pot), new ItemStack(Items.clay_ball, 3)); + recipes.overridePreSetRecipe(new ItemStack(Items.brick), new ItemStack(Items.clay_ball, 1)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.sandstone), new ItemStack(Blocks.sand, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.sandstone_stairs), new ItemStack(Blocks.sand, 6)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.clay), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.hardened_clay), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 0), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 1), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 2), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 3), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 4), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 5), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 6), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 7), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 8), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 9), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 10), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 11), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 12), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 13), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 14), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, 15), new ItemStack(Items.clay_ball, 4)); + recipes.overridePreSetRecipe(new ItemStack(Blocks.tnt), new ItemStack(Items.gunpowder, 5)); recipes.PrintRecipes(); } @@ -515,9 +590,12 @@ public class MainRegistry config.load(); enableDebugMode = config.get(Configuration.CATEGORY_GENERAL, "1.0_enableDebugMode", false).getBoolean(false); enableMycelium = config.get(Configuration.CATEGORY_GENERAL, "1.1_enableMyceliumSpread", false).getBoolean(false); - enableDungeons = config.get(Configuration.CATEGORY_GENERAL, "1.2_enableDungeonSpawn", true).getBoolean(true); - enableMDOres = config.get(Configuration.CATEGORY_GENERAL, "1.3_enableOresInModdedDimensions", true).getBoolean(true); - enableBarrels = config.get(Configuration.CATEGORY_GENERAL, "1.4_enableNuclearBarrelSpawn", false).getBoolean(false); + enablePlutoniumOre = config.get(Configuration.CATEGORY_GENERAL, "1.2_enablePlutoniumNetherOre", false).getBoolean(false); + enableDungeons = config.get(Configuration.CATEGORY_GENERAL, "1.3_enableDungeonSpawn", true).getBoolean(true); + enableMDOres = config.get(Configuration.CATEGORY_GENERAL, "1.4_enableOresInModdedDimensions", true).getBoolean(true); + enableBarrels = config.get(Configuration.CATEGORY_GENERAL, "1.5_enableNuclearBarrelSpawn", false).getBoolean(false); + enableNITAN = config.get(Configuration.CATEGORY_GENERAL, "1.6_enableNITANChestSpawn", true).getBoolean(true); + enableNukeClouds = config.get(Configuration.CATEGORY_GENERAL, "1.7_enableMushroomClouds", true).getBoolean(true); Property PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.0_uraniumSpawnrate", 7); PuraniumSpawn.comment = "Ammount of uranium ore veins per chunk"; diff --git a/com/hbm/main/ModEventHandlerClient.java b/com/hbm/main/ModEventHandlerClient.java new file mode 100644 index 000000000..ac9f4765e --- /dev/null +++ b/com/hbm/main/ModEventHandlerClient.java @@ -0,0 +1,92 @@ +package com.hbm.main; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.entity.mob.EntityHunterChopper; +import com.hbm.entity.projectile.EntityChopperMine; +import com.hbm.lib.Library; +import com.hbm.sound.MovingSoundChopper; +import com.hbm.sound.MovingSoundChopperMine; +import com.hbm.sound.MovingSoundCrashing; +import com.hbm.sound.MovingSoundPlayerLoop; +import com.hbm.sound.MovingSoundXVL1456; +import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound; + +import codechicken.lib.render.IFaceRenderer; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.client.Minecraft; +import net.minecraft.client.audio.PositionedSound; +import net.minecraft.client.multiplayer.WorldClient; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.event.sound.PlaySoundEvent17; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; + +public class ModEventHandlerClient { + + @SubscribeEvent + public void onPlaySound(PlaySoundEvent17 e) { + ResourceLocation r = e.sound.getPositionedSoundLocation(); + + WorldClient wc = Minecraft.getMinecraft().theWorld; + + //Alright, alright, I give the fuck up, you've wasted my time enough with this bullshit. You win. + //A winner is you. + //Conglaturations. + //Fuck you. + + if(r.toString().equals("hbm:misc.nullTau") && Library.getClosestPlayerForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null) + { + EntityPlayer ent = Library.getClosestPlayerForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2); + + if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop) == null) { + MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundXVL1456(new ResourceLocation("hbm:weapon.tauChargeLoop2"), ent, EnumHbmSound.soundTauLoop)); + MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).setPitch(0.5F); + } else { + if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).getPitch() < 1.5F) + MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).setPitch(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).getPitch() + 0.01F); + } + } + + if(r.toString().equals("hbm:misc.nullChopper") && Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null) + { + EntityHunterChopper ent = Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2); + + if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundChopperLoop) == null) { + MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundChopper(new ResourceLocation("hbm:entity.chopperFlyingLoop"), ent, EnumHbmSound.soundChopperLoop)); + MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundChopperLoop).setVolume(10.0F); + } + } + + if(r.toString().equals("hbm:misc.nullCrashing") && Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null) + { + EntityHunterChopper ent = Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2); + + if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundCrashingLoop) == null) { + MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundCrashing(new ResourceLocation("hbm:entity.chopperCrashingLoop"), ent, EnumHbmSound.soundCrashingLoop)); + MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundCrashingLoop).setVolume(10.0F); + } + } + + if(r.toString().equals("hbm:misc.nullMine") && Library.getClosestMineForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null) + { + EntityChopperMine ent = Library.getClosestMineForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2); + + if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundMineLoop) == null) { + MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundChopperMine(new ResourceLocation("hbm:entity.chopperMineLoop"), ent, EnumHbmSound.soundMineLoop)); + MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundMineLoop).setVolume(10.0F); + } + } + + for(MovingSoundPlayerLoop sounds : MovingSoundPlayerLoop.globalSoundList) + { + if(!sounds.init || sounds.isDonePlaying()) { + sounds.init = true; + sounds.setDone(false); + Minecraft.getMinecraft().getSoundHandler().playSound(sounds); + } + } + } +} diff --git a/com/hbm/main/NEIConfig.java b/com/hbm/main/NEIConfig.java index 5c2af2cf7..3d2706692 100644 --- a/com/hbm/main/NEIConfig.java +++ b/com/hbm/main/NEIConfig.java @@ -1,7 +1,7 @@ package com.hbm.main; import com.hbm.blocks.ModBlocks; -import com.hbm.gui.GUITestDiFurnace; +import com.hbm.gui.gui.GUITestDiFurnace; import com.hbm.handler.AlloyFurnaceRecipeHandler; import com.hbm.handler.CentrifugeRecipeHandler; import com.hbm.handler.ReactorRecipeHandler; diff --git a/com/hbm/render/ModelMP.java b/com/hbm/render/ModelMP.java deleted file mode 100644 index 88eba8e59..000000000 --- a/com/hbm/render/ModelMP.java +++ /dev/null @@ -1,247 +0,0 @@ -// Date: 29.08.2016 12:31:19 -// Template version 1.1 -// Java generated by Techne -// Keep in mind that you still need to fill in some blanks -// - ZeuX - - - - - - -package com.hbm.render; - -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.entity.Entity; - -public class ModelMP extends ModelBase -{ - //fields - ModelRenderer Shape1; - ModelRenderer Shape2; - ModelRenderer Shape3; - ModelRenderer Shape4; - ModelRenderer Shape5; - ModelRenderer Shape6; - ModelRenderer Shape7; - ModelRenderer Shape8; - ModelRenderer Shape9; - ModelRenderer Shape10; - ModelRenderer Shape11; - ModelRenderer Shape12; - ModelRenderer Shape13; - ModelRenderer Shape14; - ModelRenderer Shape15; - ModelRenderer Shape16; - ModelRenderer Shape17; - ModelRenderer Shape18; - ModelRenderer Shape19; - ModelRenderer Shape20; - ModelRenderer Shape21; - ModelRenderer Shape22; - ModelRenderer Shape23; - ModelRenderer Shape24; - ModelRenderer Shape25; - - public ModelMP() - { - textureWidth = 128; - textureHeight = 64; - - Shape1 = new ModelRenderer(this, 0, 0); - Shape1.addBox(0F, 0F, 0F, 3, 6, 1); - Shape1.setRotationPoint(-25F, -3F, -2F); - Shape1.setTextureSize(128, 64); - Shape1.mirror = true; - setRotation(Shape1, 0F, 0F, 0F); - Shape2 = new ModelRenderer(this, 8, 0); - Shape2.addBox(0F, 0F, 0F, 3, 6, 1); - Shape2.setRotationPoint(-25F, -3F, 2F); - Shape2.setTextureSize(128, 64); - Shape2.mirror = true; - setRotation(Shape2, 0F, 0F, 0F); - Shape3 = new ModelRenderer(this, 0, 8); - Shape3.addBox(0F, 0F, 0F, 2, 3, 3); - Shape3.setRotationPoint(-24F, 0F, -1F); - Shape3.setTextureSize(128, 64); - Shape3.mirror = true; - setRotation(Shape3, 0F, 0F, 0F); - Shape4 = new ModelRenderer(this, 0, 14); - Shape4.addBox(0F, 0F, 0F, 20, 3, 1); - Shape4.setRotationPoint(-22F, -3F, -2F); - Shape4.setTextureSize(128, 64); - Shape4.mirror = true; - setRotation(Shape4, 0F, 0F, 0F); - Shape5 = new ModelRenderer(this, 0, 18); - Shape5.addBox(0F, 0F, 0F, 20, 3, 1); - Shape5.setRotationPoint(-22F, -3F, 2F); - Shape5.setTextureSize(128, 64); - Shape5.mirror = true; - setRotation(Shape5, 0F, 0F, 0F); - Shape6 = new ModelRenderer(this, 0, 22); - Shape6.addBox(0F, 0F, 0F, 24, 1, 3); - Shape6.setRotationPoint(-24F, -1F, -1F); - Shape6.setTextureSize(128, 64); - Shape6.mirror = true; - setRotation(Shape6, 0F, 0F, 0F); - Shape7 = new ModelRenderer(this, 0, 26); - Shape7.addBox(0F, 0F, 0F, 26, 4, 5); - Shape7.setRotationPoint(-25F, 3F, -2F); - Shape7.setTextureSize(128, 64); - Shape7.mirror = true; - setRotation(Shape7, 0F, 0F, 0F); - Shape8 = new ModelRenderer(this, 16, 0); - Shape8.addBox(0F, 0F, 0F, 3, 6, 1); - Shape8.setRotationPoint(-2F, -3F, -2F); - Shape8.setTextureSize(128, 64); - Shape8.mirror = true; - setRotation(Shape8, 0F, 0F, 0F); - Shape9 = new ModelRenderer(this, 24, 0); - Shape9.addBox(0F, 0F, 0F, 3, 6, 1); - Shape9.setRotationPoint(-2F, -3F, 2F); - Shape9.setTextureSize(128, 64); - Shape9.mirror = true; - setRotation(Shape9, 0F, 0F, 0F); - Shape10 = new ModelRenderer(this, 90, 22); - Shape10.addBox(0F, 0F, 0F, 11, 3, 3); - Shape10.setRotationPoint(-2F, 0F, -1F); - Shape10.setTextureSize(128, 64); - Shape10.mirror = true; - setRotation(Shape10, 0F, 0F, 0F); - Shape11 = new ModelRenderer(this, 19, 38); - Shape11.addBox(0F, 0F, 0F, 26, 1, 4); - Shape11.setRotationPoint(-25F, 7F, -1.5F); - Shape11.setTextureSize(128, 64); - Shape11.mirror = true; - setRotation(Shape11, 0F, 0F, 0F); - Shape12 = new ModelRenderer(this, 78, 35); - Shape12.addBox(0F, 0F, 0F, 20, 5, 5); - Shape12.setRotationPoint(-25F, 8F, -2F); - Shape12.setTextureSize(128, 64); - Shape12.mirror = true; - setRotation(Shape12, 0F, 0F, 0F); - Shape13 = new ModelRenderer(this, 54, 45); - Shape13.addBox(0F, 0F, 0F, 32, 2, 5); - Shape13.setRotationPoint(-5F, 8F, -2F); - Shape13.setTextureSize(128, 64); - Shape13.mirror = true; - setRotation(Shape13, 0F, 0F, 0F); - Shape14 = new ModelRenderer(this, 108, 28); - Shape14.addBox(0F, -6F, 0F, 8, 6, 1); - Shape14.setRotationPoint(1F, 8F, -2F); - Shape14.setTextureSize(128, 64); - Shape14.mirror = true; - setRotation(Shape14, -0.0872665F, 0F, 0F); - Shape15 = new ModelRenderer(this, 84, 52); - Shape15.addBox(0F, 0F, 0F, 18, 9, 3); - Shape15.setRotationPoint(9F, -1F, -1F); - Shape15.setTextureSize(128, 64); - Shape15.mirror = true; - setRotation(Shape15, 0F, 0F, 0F); - Shape16 = new ModelRenderer(this, 0, 43); - Shape16.addBox(0F, -9F, 0F, 18, 9, 1); - Shape16.setRotationPoint(9F, 8F, -2F); - Shape16.setTextureSize(128, 64); - Shape16.mirror = true; - setRotation(Shape16, -0.0872665F, 0F, 0F); - Shape17 = new ModelRenderer(this, 90, 28); - Shape17.addBox(0F, -6F, -1F, 8, 6, 1); - Shape17.setRotationPoint(1F, 8F, 3F); - Shape17.setTextureSize(128, 64); - Shape17.mirror = true; - setRotation(Shape17, 0.0872665F, 0F, 0F); - Shape18 = new ModelRenderer(this, 46, 54); - Shape18.addBox(0F, -9F, -1F, 18, 9, 1); - Shape18.setRotationPoint(9F, 8F, 3F); - Shape18.setTextureSize(128, 64); - Shape18.mirror = true; - setRotation(Shape18, 0.0872665F, 0F, 0F); - Shape19 = new ModelRenderer(this, 0, 35); - Shape19.addBox(0F, -3F, 0F, 4, 3, 5); - Shape19.setRotationPoint(-5F, 13F, -2F); - Shape19.setTextureSize(128, 64); - Shape19.mirror = true; - setRotation(Shape19, 0F, 0F, -0.8726646F); - Shape20 = new ModelRenderer(this, 0, 53); - Shape20.addBox(0F, 0F, 0F, 18, 6, 5); - Shape20.setRotationPoint(9F, 10F, -2F); - Shape20.setTextureSize(128, 64); - Shape20.mirror = true; - setRotation(Shape20, 0F, 0F, 0F); - Shape21 = new ModelRenderer(this, 42, 16); - Shape21.addBox(0F, 0F, 0F, 3, 5, 1); - Shape21.setRotationPoint(1F, 10F, 0F); - Shape21.setTextureSize(128, 64); - Shape21.mirror = true; - setRotation(Shape21, 0F, 0F, 0F); - Shape22 = new ModelRenderer(this, 62, 27); - Shape22.addBox(0F, 0F, 0F, 11, 1, 3); - Shape22.setRotationPoint(-2F, 15F, -1F); - Shape22.setTextureSize(128, 64); - Shape22.mirror = true; - setRotation(Shape22, 0F, 0F, 0F); - Shape23 = new ModelRenderer(this, 62, 31); - Shape23.addBox(-6F, -1F, 0F, 6, 1, 3); - Shape23.setRotationPoint(-2F, 16F, -1F); - Shape23.setTextureSize(128, 64); - Shape23.mirror = true; - setRotation(Shape23, 0F, 0F, 0.5235988F); - Shape24 = new ModelRenderer(this, 20, 10); - Shape24.addBox(0F, 0F, 0F, 2, 1, 3); - Shape24.setRotationPoint(-21F, -2F, -1F); - Shape24.setTextureSize(128, 64); - Shape24.mirror = true; - setRotation(Shape24, 0F, 0F, 0F); - Shape25 = new ModelRenderer(this, 10, 10); - Shape25.addBox(0F, 0F, 0F, 2, 1, 3); - Shape25.setRotationPoint(-5F, -2F, -1F); - Shape25.setTextureSize(128, 64); - Shape25.mirror = true; - setRotation(Shape25, 0F, 0F, 0F); - } - - public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) - { - super.render(entity, f, f1, f2, f3, f4, f5); - setRotationAngles(f, f1, f2, f3, f4, f5, entity); - Shape1.render(f5); - Shape2.render(f5); - Shape3.render(f5); - Shape4.render(f5); - Shape5.render(f5); - Shape6.render(f5); - Shape7.render(f5); - Shape8.render(f5); - Shape9.render(f5); - Shape10.render(f5); - Shape11.render(f5); - Shape12.render(f5); - Shape13.render(f5); - Shape14.render(f5); - Shape15.render(f5); - Shape16.render(f5); - Shape17.render(f5); - Shape18.render(f5); - Shape19.render(f5); - Shape20.render(f5); - Shape21.render(f5); - Shape22.render(f5); - Shape23.render(f5); - Shape24.render(f5); - Shape25.render(f5); - } - - private void setRotation(ModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } - - public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) - { - super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - } - -} diff --git a/com/hbm/render/entity/BSmokeRenderer.java b/com/hbm/render/entity/BSmokeRenderer.java new file mode 100644 index 000000000..ea9f576d3 --- /dev/null +++ b/com/hbm/render/entity/BSmokeRenderer.java @@ -0,0 +1,143 @@ +package com.hbm.render.entity; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import java.util.concurrent.Callable; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import com.hbm.entity.particle.EntityBSmokeFX; +import com.hbm.entity.particle.EntitySmokeFX; +import com.hbm.items.ModItems; +import com.hbm.lib.RefStrings; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.particle.EntityDiggingFX; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.renderer.ActiveRenderInfo; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.crash.CrashReport; +import net.minecraft.crash.CrashReportCategory; +import net.minecraft.entity.Entity; +import net.minecraft.entity.projectile.EntityPotion; +import net.minecraft.item.Item; +import net.minecraft.item.ItemPotion; +import net.minecraft.potion.PotionHelper; +import net.minecraft.util.IIcon; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.ReportedException; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; + +public class BSmokeRenderer extends Render { + private Item field_94151_a; + private int field_94150_f; + private static final String __OBFID = "CL_00001008"; + + public BSmokeRenderer(Item p_i1259_1_, int p_i1259_2_) { + this.field_94151_a = p_i1259_1_; + this.field_94150_f = p_i1259_2_; + } + + public BSmokeRenderer(Item p_i1260_1_) { + this(p_i1260_1_, 0); + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, + * always casting down its argument and then handing it off to a worker + * function which does the actual work. In all probabilty, the class Render + * is generic (Render= fx.maxAge / 8 * 7) { + field_94151_a = ModItems.b_smoke8; + } + + if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) { + field_94151_a = ModItems.b_smoke7; + } + + if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) { + field_94151_a = ModItems.b_smoke6; + } + + if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) { + field_94151_a = ModItems.b_smoke5; + } + + if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) { + field_94151_a = ModItems.b_smoke4; + } + + if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) { + field_94151_a = ModItems.b_smoke3; + } + + if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) { + field_94151_a = ModItems.b_smoke2; + } + + if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) { + field_94151_a = ModItems.b_smoke1; + } + + IIcon iicon = field_94151_a.getIconFromDamage(0); + + if (iicon != null) { + GL11.glPushMatrix(); + GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glScalef(0.5F, 0.5F, 0.5F); + GL11.glScalef(7.5F, 7.5F, 7.5F); + this.bindEntityTexture(p_76986_1_); + Tessellator tessellator = Tessellator.instance; + + this.func_77026_a(tessellator, iicon); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } + } + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called + * unless you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return TextureMap.locationItemsTexture; + } + + private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) { + float f = p_77026_2_.getMinU(); + float f1 = p_77026_2_.getMaxU(); + float f2 = p_77026_2_.getMinV(); + float f3 = p_77026_2_.getMaxV(); + float f4 = 1.0F; + float f5 = 0.5F; + float f6 = 0.25F; + GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); + p_77026_1_.startDrawingQuads(); + p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); + p_77026_1_.addVertexWithUV((double) (0.0F - f5), (double) (0.0F - f6), 0.0D, (double) f, (double) f3); + p_77026_1_.addVertexWithUV((double) (f4 - f5), (double) (0.0F - f6), 0.0D, (double) f1, (double) f3); + p_77026_1_.addVertexWithUV((double) (f4 - f5), (double) (f4 - f6), 0.0D, (double) f1, (double) f2); + p_77026_1_.addVertexWithUV((double) (0.0F - f5), (double) (f4 - f6), 0.0D, (double) f, (double) f2); + p_77026_1_.draw(); + } +} diff --git a/com/hbm/render/entity/ElectricityRenderer.java b/com/hbm/render/entity/ElectricityRenderer.java new file mode 100644 index 000000000..b5d3ca856 --- /dev/null +++ b/com/hbm/render/entity/ElectricityRenderer.java @@ -0,0 +1,84 @@ +package com.hbm.render.entity; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import com.hbm.entity.particle.EntityBSmokeFX; +import com.hbm.items.ModItems; + +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; + +public class ElectricityRenderer extends Render { + private Item field_94151_a; + private int field_94150_f; + private static final String __OBFID = "CL_00001008"; + + public ElectricityRenderer(Item p_i1259_1_, int p_i1259_2_) { + this.field_94151_a = p_i1259_1_; + this.field_94150_f = p_i1259_2_; + } + + public ElectricityRenderer(Item p_i1260_1_) { + this(p_i1260_1_, 0); + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, + * always casting down its argument and then handing it off to a worker + * function which does the actual work. In all probabilty, the class Render + * is generic (Render= fx.maxAge / 8 * 7) { + field_94151_a = ModItems.smoke8; + } + + if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) { + field_94151_a = ModItems.smoke7; + } + + if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) { + field_94151_a = ModItems.smoke6; + } + + if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) { + field_94151_a = ModItems.smoke5; + } + + if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) { + field_94151_a = ModItems.smoke4; + } + + if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) { + field_94151_a = ModItems.smoke3; + } + + if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) { + field_94151_a = ModItems.smoke2; + } + + if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) { + field_94151_a = ModItems.smoke1; + } + + IIcon iicon = field_94151_a.getIconFromDamage(0); + + if (iicon != null) { + GL11.glPushMatrix(); + GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glScalef(0.5F, 0.5F, 0.5F); + GL11.glScalef(7.5F, 7.5F, 7.5F); + this.bindEntityTexture(p_76986_1_); + Tessellator tessellator = Tessellator.instance; + + this.func_77026_a(tessellator, iicon); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } + } + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called + * unless you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return TextureMap.locationItemsTexture; + } + + private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) { + float f = p_77026_2_.getMinU(); + float f1 = p_77026_2_.getMaxU(); + float f2 = p_77026_2_.getMinV(); + float f3 = p_77026_2_.getMaxV(); + float f4 = 1.0F; + float f5 = 0.5F; + float f6 = 0.25F; + GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); + p_77026_1_.startDrawingQuads(); + p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); + p_77026_1_.addVertexWithUV((double) (0.0F - f5), (double) (0.0F - f6), 0.0D, (double) f, (double) f3); + p_77026_1_.addVertexWithUV((double) (f4 - f5), (double) (0.0F - f6), 0.0D, (double) f1, (double) f3); + p_77026_1_.addVertexWithUV((double) (f4 - f5), (double) (f4 - f6), 0.0D, (double) f1, (double) f2); + p_77026_1_.addVertexWithUV((double) (0.0F - f5), (double) (f4 - f6), 0.0D, (double) f, (double) f2); + p_77026_1_.draw(); + } +} diff --git a/com/hbm/render/entity/RenderBaleflare.java b/com/hbm/render/entity/RenderBaleflare.java new file mode 100644 index 000000000..adb946c4f --- /dev/null +++ b/com/hbm/render/entity/RenderBaleflare.java @@ -0,0 +1,39 @@ +package com.hbm.render.entity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelBaleflare; +import com.hbm.render.model.ModelMiniNuke; + +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +public class RenderBaleflare extends Render { + + private ModelBaleflare miniNuke; + + public RenderBaleflare() { + miniNuke = new ModelBaleflare(); + } + + @Override + public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + + GL11.glPushMatrix(); + GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); + GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_ + 180, 0.0F, 0.0F, 1.0F); + GL11.glScalef(1.5F, 1.5F, 1.5F); + + bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/BaleFlare.png")); + miniNuke.renderAll(0.0625F); + GL11.glPopMatrix(); + } + + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return new ResourceLocation(RefStrings.MODID + ":textures/models/BaleFlare.png"); + } +} diff --git a/com/hbm/render/entity/RenderBeam.java b/com/hbm/render/entity/RenderBeam.java new file mode 100644 index 000000000..7a4911906 --- /dev/null +++ b/com/hbm/render/entity/RenderBeam.java @@ -0,0 +1,86 @@ +package com.hbm.render.entity; + +import java.util.Random; + +import org.lwjgl.opengl.GL11; + +import com.hbm.entity.projectile.EntityPlasmaBeam; +import com.hbm.entity.projectile.EntityRainbow; +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelBullet; +import com.hbm.render.model.ModelMiniNuke; + +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +public class RenderBeam extends Render { + + Random rand = new Random(); + + @Override + public void doRender(Entity rocket, double x, double y, double z, float p_76986_8_, float p_76986_9_) { + float radius = 0.12F; + //float radius = 0.06F; + int distance = 4; + Tessellator tessellator = Tessellator.instance; + + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + GL11.glTranslatef((float) x, (float) y, (float) z); + + GL11.glRotatef(rocket.rotationYaw, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-rocket.rotationPitch, 1.0F, 0.0F, 0.0F); + + boolean red = false; + boolean green = true; + boolean blue = false; + + for (float o = 0; o <= radius; o += radius / 8) { + float color = 1f - (o * 8.333f); + if (color < 0) + color = 0; + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); + tessellator.addVertex(0 + o, 0 - o, 0); + tessellator.addVertex(0 + o, 0 + o, 0); + tessellator.addVertex(0 + o, 0 + o, 0 + distance); + tessellator.addVertex(0 + o, 0 - o, 0 + distance); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); + tessellator.addVertex(0 - o, 0 - o, 0); + tessellator.addVertex(0 + o, 0 - o, 0); + tessellator.addVertex(0 + o, 0 - o, 0 + distance); + tessellator.addVertex(0 - o, 0 - o, 0 + distance); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); + tessellator.addVertex(0 - o, 0 + o, 0); + tessellator.addVertex(0 - o, 0 - o, 0); + tessellator.addVertex(0 - o, 0 - o, 0 + distance); + tessellator.addVertex(0 - o, 0 + o, 0 + distance); + tessellator.draw(); + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_F(red ? 1 : color, green ? 1 : color, blue ? 1 : color, 1f); + tessellator.addVertex(0 + o, 0 + o, 0); + tessellator.addVertex(0 - o, 0 + o, 0); + tessellator.addVertex(0 - o, 0 + o, 0 + distance); + tessellator.addVertex(0 + o, 0 + o, 0 + distance); + tessellator.draw(); + } + GL11.glDisable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glPopMatrix(); + } + + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return new ResourceLocation(RefStrings.MODID + ":textures/models/PlasmaBeam.png"); + } +} diff --git a/com/hbm/render/RenderBigNuke.java b/com/hbm/render/entity/RenderBigNuke.java similarity index 98% rename from com/hbm/render/RenderBigNuke.java rename to com/hbm/render/entity/RenderBigNuke.java index 17f689ea0..2dd0666d4 100644 --- a/com/hbm/render/RenderBigNuke.java +++ b/com/hbm/render/entity/RenderBigNuke.java @@ -1,11 +1,11 @@ -package com.hbm.render; +package com.hbm.render.entity; import java.util.Random; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityNukeCloudBig; -import com.hbm.entity.EntityNukeCloudSmall; +import com.hbm.entity.effect.EntityNukeCloudBig; +import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.RenderHelper; diff --git a/com/hbm/render/RenderChopperMine.java b/com/hbm/render/entity/RenderChopperMine.java similarity index 88% rename from com/hbm/render/RenderChopperMine.java rename to com/hbm/render/entity/RenderChopperMine.java index 591cc1dea..98cc2b6b1 100644 --- a/com/hbm/render/RenderChopperMine.java +++ b/com/hbm/render/entity/RenderChopperMine.java @@ -1,9 +1,10 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityBullet; +import com.hbm.entity.projectile.EntityBullet; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelChopperMine; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/RenderCloudFleija.java b/com/hbm/render/entity/RenderCloudFleija.java similarity index 93% rename from com/hbm/render/RenderCloudFleija.java rename to com/hbm/render/entity/RenderCloudFleija.java index cf901fc46..c389457d7 100644 --- a/com/hbm/render/RenderCloudFleija.java +++ b/com/hbm/render/entity/RenderCloudFleija.java @@ -1,11 +1,11 @@ -package com.hbm.render; +package com.hbm.render.entity; import java.util.Random; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityCloudFleija; -import com.hbm.entity.EntityNukeCloudBig; +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.effect.EntityNukeCloudBig; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.RenderHelper; diff --git a/com/hbm/render/entity/RenderEMPBlast.java b/com/hbm/render/entity/RenderEMPBlast.java new file mode 100644 index 000000000..474ad43d5 --- /dev/null +++ b/com/hbm/render/entity/RenderEMPBlast.java @@ -0,0 +1,58 @@ +package com.hbm.render.entity; + +import java.util.Random; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import com.hbm.entity.effect.EntityEMPBlast; +import com.hbm.entity.effect.EntityNukeCloudNoShroom; +import com.hbm.entity.particle.EntityBSmokeFX; +import com.hbm.items.ModItems; +import com.hbm.lib.RefStrings; + +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.AdvancedModelLoader; +import net.minecraftforge.client.model.IModelCustom; + +public class RenderEMPBlast extends Render { + + private static final ResourceLocation ringModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/Ring.obj"); + private IModelCustom ringModel; + private ResourceLocation ringTexture; + + public RenderEMPBlast() { + ringModel = AdvancedModelLoader.loadModel(ringModelRL); + ringTexture = new ResourceLocation(RefStrings.MODID, "textures/models/EMPBlast.png"); + } + + @Override + public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + this.renderRing((EntityEMPBlast)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); + } + + public void renderRing(EntityEMPBlast p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + + GL11.glPushMatrix(); + GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glScalef(p_76986_1_.scale, 1F, p_76986_1_.scale); + + bindTexture(ringTexture); + ringModel.renderAll(); + GL11.glPopMatrix(); + } + + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return null; + } +} diff --git a/com/hbm/render/entity/RenderFallout.java b/com/hbm/render/entity/RenderFallout.java new file mode 100644 index 000000000..1ea6e063a --- /dev/null +++ b/com/hbm/render/entity/RenderFallout.java @@ -0,0 +1,287 @@ +package com.hbm.render.entity; + +import java.util.Random; + +import org.lwjgl.opengl.GL11; + +import com.hbm.entity.effect.EntityFalloutRain; +import com.hbm.lib.RefStrings; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.multiplayer.WorldClient; +import net.minecraft.client.renderer.OpenGlHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Timer; +import net.minecraft.util.Vec3; +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraftforge.client.IRenderHandler; + +public class RenderFallout extends Render { + + private Minecraft mc; + private Random random = new Random(); + float[] rainXCoords; + float[] rainYCoords; + private int rendererUpdateCount; + long lastTime = System.nanoTime(); + private static final ResourceLocation falloutTexture = new ResourceLocation(RefStrings.MODID, + "textures/entity/fallout.png"); + + @Override + public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, + float p_76986_9_) { + + if (p_76986_1_ instanceof EntityFalloutRain) + this.render((EntityFalloutRain) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); + + } + + public void render(EntityFalloutRain p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, + float p_76986_8_, float p_76986_9_) { + + this.mc = Minecraft.getMinecraft(); + + EntityLivingBase entitylivingbase = this.mc.renderViewEntity; + Vec3 vector = Vec3.createVectorHelper(entitylivingbase.posX - p_76986_1_.posX, + entitylivingbase.posY - p_76986_1_.posY, entitylivingbase.posZ - p_76986_1_.posZ); + + double d = vector.lengthVector(); + + if (d <= p_76986_1_.getScale()) { + rendererUpdateCount++; + long time = System.nanoTime(); + float t = (time - lastTime) / 50000000; + if (t <= 1.0F) + renderRainSnow(t); + else + renderRainSnow(1.0F); + + lastTime = time; + } + } + + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return null; + } + + protected void renderRainSnow(float p_78474_1_) { + + IRenderHandler renderer = null; + if ((renderer = this.mc.theWorld.provider.getWeatherRenderer()) != null) { + renderer.render(p_78474_1_, this.mc.theWorld, mc); + return; + } + + // float f1 = this.mc.theWorld.getRainStrength(p_78474_1_); + + float f1 = 1; + + if (f1 > 0.0F) { + // this.enableLightmap((double)p_78474_1_); + + if (this.rainXCoords == null) { + this.rainXCoords = new float[1024]; + this.rainYCoords = new float[1024]; + + for (int i = 0; i < 32; ++i) { + for (int j = 0; j < 32; ++j) { + float f2 = (float) (j - 16); + float f3 = (float) (i - 16); + float f4 = MathHelper.sqrt_float(f2 * f2 + f3 * f3); + this.rainXCoords[i << 5 | j] = -f3 / f4; + this.rainYCoords[i << 5 | j] = f2 / f4; + } + } + } + + EntityLivingBase entitylivingbase = this.mc.renderViewEntity; + WorldClient worldclient = this.mc.theWorld; + int k2 = MathHelper.floor_double(entitylivingbase.posX); + int l2 = MathHelper.floor_double(entitylivingbase.posY); + int i3 = MathHelper.floor_double(entitylivingbase.posZ); + Tessellator tessellator = Tessellator.instance; + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glNormal3f(0.0F, 1.0F, 0.0F); + GL11.glEnable(GL11.GL_BLEND); + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F); + double d0 = entitylivingbase.lastTickPosX + + (entitylivingbase.posX - entitylivingbase.lastTickPosX) * (double) p_78474_1_; + double d1 = entitylivingbase.lastTickPosY + + (entitylivingbase.posY - entitylivingbase.lastTickPosY) * (double) p_78474_1_; + double d2 = entitylivingbase.lastTickPosZ + + (entitylivingbase.posZ - entitylivingbase.lastTickPosZ) * (double) p_78474_1_; + int k = MathHelper.floor_double(d1); + byte b0 = 5; + + if (this.mc.gameSettings.fancyGraphics) { + b0 = 10; + } + + boolean flag = false; + byte b1 = -1; + float f5 = (float) this.rendererUpdateCount + p_78474_1_; + + if (this.mc.gameSettings.fancyGraphics) { + b0 = 10; + } + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + flag = false; + + for (int l = i3 - b0; l <= i3 + b0; ++l) { + for (int i1 = k2 - b0; i1 <= k2 + b0; ++i1) { + int j1 = (l - i3 + 16) * 32 + i1 - k2 + 16; + float f6 = this.rainXCoords[j1] * 0.5F; + float f7 = this.rainYCoords[j1] * 0.5F; + BiomeGenBase biomegenbase = worldclient.getBiomeGenForCoords(i1, l); + + if (true) { + int k1 = worldclient.getPrecipitationHeight(i1, l); + int l1 = l2 - b0; + int i2 = l2 + b0; + + if (l1 < k1) { + l1 = k1; + } + + if (i2 < k1) { + i2 = k1; + } + + float f8 = 1.0F; + int j2 = k1; + + if (k1 < k) { + j2 = k; + } + + if (l1 != i2) { + this.random.setSeed((long) (i1 * i1 * 3121 + i1 * 45238971 ^ l * l * 418711 + l * 13761)); + float f9 = biomegenbase.getFloatTemperature(i1, l1, l); + float f10; + double d4; + + /* + * if (false) { if (b1 != 0) { if (b1 >= 0) { + * tessellator.draw(); } + * + * b1 = 0; + * this.mc.getTextureManager().bindTexture(this. + * falloutTexture); tessellator.startDrawingQuads(); + * //System.out.println("Called!"); } + * + * f10 = ((float)(this.rendererUpdateCount + i1 * i1 + * * 3121 + i1 * 45238971 + l * l * 418711 + l * + * 13761 & 31) + p_78474_1_) / 32.0F * (3.0F + + * this.random.nextFloat()); double d3 = + * (double)((float)i1 + 0.5F) - + * entitylivingbase.posX; d4 = (double)((float)l + + * 0.5F) - entitylivingbase.posZ; float f12 = + * MathHelper.sqrt_double(d3 * d3 + d4 * d4) / + * (float)b0; float f13 = 1.0F; + * tessellator.setBrightness(worldclient. + * getLightBrightnessForSkyBlocks(i1, j2, l, 0)); + * tessellator.setColorRGBA_F(f13, f13, f13, ((1.0F + * - f12 * f12) * 0.5F + 0.5F) * f1); + * tessellator.setTranslation(-d0 * 1.0D, -d1 * + * 1.0D, -d2 * 1.0D); + * tessellator.addVertexWithUV((double)((float)i1 - + * f6) + 0.5D, (double)l1, (double)((float)l - f7) + + * 0.5D, (double)(0.0F * f8), (double)((float)l1 * + * f8 / 4.0F + f10 * f8)); + * tessellator.addVertexWithUV((double)((float)i1 + + * f6) + 0.5D, (double)l1, (double)((float)l + f7) + + * 0.5D, (double)(1.0F * f8), (double)((float)l1 * + * f8 / 4.0F + f10 * f8)); + * tessellator.addVertexWithUV((double)((float)i1 + + * f6) + 0.5D, (double)i2, (double)((float)l + f7) + + * 0.5D, (double)(1.0F * f8), (double)((float)i2 * + * f8 / 4.0F + f10 * f8)); + * tessellator.addVertexWithUV((double)((float)i1 - + * f6) + 0.5D, (double)i2, (double)((float)l - f7) + + * 0.5D, (double)(0.0F * f8), (double)((float)i2 * + * f8 / 4.0F + f10 * f8)); + * tessellator.setTranslation(0.0D, 0.0D, 0.0D); } + * else + */ + { + if (b1 != 1) { + if (b1 >= 0) { + tessellator.draw(); + } + + b1 = 1; + this.mc.getTextureManager().bindTexture(this.falloutTexture); + tessellator.startDrawingQuads(); + } + + f10 = ((float) (this.rendererUpdateCount & 511) + p_78474_1_) / 512.0F; + float f16 = this.random.nextFloat() + f5 * 0.01F * (float) this.random.nextGaussian(); + float f11 = this.random.nextFloat() + f5 * (float) this.random.nextGaussian() * 0.001F; + d4 = (double) ((float) i1 + 0.5F) - entitylivingbase.posX; + double d5 = (double) ((float) l + 0.5F) - entitylivingbase.posZ; + float f14 = MathHelper.sqrt_double(d4 * d4 + d5 * d5) / (float) b0; + float f15 = 1.0F; + tessellator.setBrightness( + (worldclient.getLightBrightnessForSkyBlocks(i1, j2, l, 0) * 3 + 15728880) / 4); + tessellator.setColorRGBA_F(f15, f15, f15, ((1.0F - f14 * f14) * 0.3F + 0.5F) * f1); + tessellator.setTranslation(-d0 * 1.0D, -d1 * 1.0D, -d2 * 1.0D); + tessellator.addVertexWithUV((double) ((float) i1 - f6) + 0.5D, (double) l1, + (double) ((float) l - f7) + 0.5D, (double) (0.0F * f8 + f16), + (double) ((float) l1 * f8 / 4.0F + f10 * f8 + f11)); + tessellator.addVertexWithUV((double) ((float) i1 + f6) + 0.5D, (double) l1, + (double) ((float) l + f7) + 0.5D, (double) (1.0F * f8 + f16), + (double) ((float) l1 * f8 / 4.0F + f10 * f8 + f11)); + tessellator.addVertexWithUV((double) ((float) i1 + f6) + 0.5D, (double) i2, + (double) ((float) l + f7) + 0.5D, (double) (1.0F * f8 + f16), + (double) ((float) i2 * f8 / 4.0F + f10 * f8 + f11)); + tessellator.addVertexWithUV((double) ((float) i1 - f6) + 0.5D, (double) i2, + (double) ((float) l - f7) + 0.5D, (double) (0.0F * f8 + f16), + (double) ((float) i2 * f8 / 4.0F + f10 * f8 + f11)); + tessellator.setTranslation(0.0D, 0.0D, 0.0D); + } + } + } + } + } + + if (b1 >= 0) { + tessellator.draw(); + // System.out.println("Fired!"); + } + + GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glDisable(GL11.GL_BLEND); + GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F); + // this.disableLightmap((double)p_78474_1_); + } + } + + /* + * public void enableLightmap(double p_78463_1_) { + * OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); + * GL11.glMatrixMode(GL11.GL_TEXTURE); GL11.glLoadIdentity(); float f = + * 0.00390625F; GL11.glScalef(f, f, f); GL11.glTranslatef(8.0F, 8.0F, 8.0F); + * GL11.glMatrixMode(GL11.GL_MODELVIEW); + * this.mc.getTextureManager().bindTexture(this.locationLightMap); + * GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, + * GL11.GL_LINEAR); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, + * GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); + * GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, + * GL11.GL_LINEAR); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, + * GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); + * GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, + * GL11.GL_CLAMP); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, + * GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP); GL11.glColor4f(1.0F, 1.0F, 1.0F, + * 1.0F); GL11.glEnable(GL11.GL_TEXTURE_2D); + * OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); } + */ + +} diff --git a/com/hbm/render/ModEffectRenderer.java b/com/hbm/render/entity/RenderFireball.java similarity index 60% rename from com/hbm/render/ModEffectRenderer.java rename to com/hbm/render/entity/RenderFireball.java index 5f5a61d76..466c293ca 100644 --- a/com/hbm/render/ModEffectRenderer.java +++ b/com/hbm/render/entity/RenderFireball.java @@ -1,54 +1,32 @@ -package com.hbm.render; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.concurrent.Callable; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import com.hbm.entity.particle.EntitySmokeFX; +import com.hbm.entity.projectile.EntityFire; import com.hbm.items.ModItems; -import com.hbm.lib.RefStrings; -import com.hbm.particles.EntitySmokeFX; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.particle.EntityDiggingFX; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.crash.CrashReport; -import net.minecraft.crash.CrashReportCategory; import net.minecraft.entity.Entity; -import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.item.Item; -import net.minecraft.item.ItemPotion; -import net.minecraft.potion.PotionHelper; import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.ReportedException; import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; -public class ModEffectRenderer extends Render -{ +public class RenderFireball extends Render { private Item field_94151_a; private int field_94150_f; private static final String __OBFID = "CL_00001008"; - public ModEffectRenderer(Item p_i1259_1_, int p_i1259_2_) + public RenderFireball(Item p_i1259_1_, int p_i1259_2_) { this.field_94151_a = p_i1259_1_; this.field_94150_f = p_i1259_2_; } - public ModEffectRenderer(Item p_i1260_1_) + public RenderFireball(Item p_i1260_1_) { this(p_i1260_1_, 0); } @@ -61,48 +39,58 @@ public class ModEffectRenderer extends Render */ public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { - if(p_76986_1_ instanceof EntitySmokeFX) + if(p_76986_1_ instanceof EntityFire) { - EntitySmokeFX fx = (EntitySmokeFX)p_76986_1_; + EntityFire fx = (EntityFire)p_76986_1_; - if(fx.particleAge < fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7) + if(fx.ticksExisted <= fx.maxAge && fx.ticksExisted >= fx.maxAge / 10 * 9) { - field_94151_a = ModItems.smoke8; + field_94151_a = ModItems.flame_10; } - if(fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) + if(fx.ticksExisted < fx.maxAge / 10 * 9 && fx.ticksExisted >= fx.maxAge / 10 * 8) { - field_94151_a = ModItems.smoke7; + field_94151_a = ModItems.flame_9; } - if(fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) + if(fx.ticksExisted < fx.maxAge / 10 * 8 && fx.ticksExisted >= fx.maxAge / 10 * 7) { - field_94151_a = ModItems.smoke6; + field_94151_a = ModItems.flame_8; } - if(fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) + if(fx.ticksExisted < fx.maxAge / 10 * 7 && fx.ticksExisted >= fx.maxAge / 10 * 6) { - field_94151_a = ModItems.smoke5; + field_94151_a = ModItems.flame_7; } - if(fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) + if(fx.ticksExisted < fx.maxAge / 10 * 6 && fx.ticksExisted >= fx.maxAge / 10 * 5) { - field_94151_a = ModItems.smoke4; + field_94151_a = ModItems.flame_6; } - if(fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) + if(fx.ticksExisted < fx.maxAge / 10 * 5 && fx.ticksExisted >= fx.maxAge / 10 * 4) { - field_94151_a = ModItems.smoke3; + field_94151_a = ModItems.flame_5; } - if(fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) + if(fx.ticksExisted < fx.maxAge / 10 * 4 && fx.ticksExisted >= fx.maxAge / 10 * 3) { - field_94151_a = ModItems.smoke2; + field_94151_a = ModItems.flame_4; + } + + if(fx.ticksExisted < fx.maxAge / 10 * 3 && fx.ticksExisted >= fx.maxAge / 10 * 2) + { + field_94151_a = ModItems.flame_3; + } + + if(fx.ticksExisted < fx.maxAge / 10 * 2 && fx.ticksExisted >= fx.maxAge / 10 * 1) + { + field_94151_a = ModItems.flame_2; } - if(fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) + if(fx.ticksExisted < fx.maxAge / 10 && fx.ticksExisted >= 0 && !fx.isDead) { - field_94151_a = ModItems.smoke1; + field_94151_a = ModItems.flame_1; } IIcon iicon = field_94151_a.getIconFromDamage(0); @@ -114,6 +102,7 @@ public class ModEffectRenderer extends Render GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glScalef(7.5F, 7.5F, 7.5F); + GL11.glTranslatef(0.0F, -0.25F, 0.0F); this.bindEntityTexture(p_76986_1_); Tessellator tessellator = Tessellator.instance; diff --git a/com/hbm/render/RenderFlare.java b/com/hbm/render/entity/RenderFlare.java similarity index 99% rename from com/hbm/render/RenderFlare.java rename to com/hbm/render/entity/RenderFlare.java index 81220c5cc..96bbbf59a 100644 --- a/com/hbm/render/RenderFlare.java +++ b/com/hbm/render/entity/RenderFlare.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.entity; import java.util.Random; diff --git a/com/hbm/render/RenderHunterChopper.java b/com/hbm/render/entity/RenderHunterChopper.java similarity index 74% rename from com/hbm/render/RenderHunterChopper.java rename to com/hbm/render/entity/RenderHunterChopper.java index 185197d34..d230479e7 100644 --- a/com/hbm/render/RenderHunterChopper.java +++ b/com/hbm/render/entity/RenderHunterChopper.java @@ -1,13 +1,16 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityHunterChopper; +import com.hbm.entity.mob.EntityHunterChopper; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; +import com.hbm.render.model.ModelHunterChopper; +import com.hbm.render.model.ProtoCopter; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; +import net.minecraft.entity.boss.BossStatus; import net.minecraft.util.ResourceLocation; public class RenderHunterChopper extends Render { @@ -23,6 +26,7 @@ public class RenderHunterChopper extends Render { @Override public void doRender(Entity rocket, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + BossStatus.setBossStatus((EntityHunterChopper)rocket, true); GL11.glPushMatrix(); GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_); GL11.glTranslatef(0.0625F * 0, 0.0625F * 32, 0.0625F * 0); @@ -36,10 +40,10 @@ public class RenderHunterChopper extends Render { GL11.glRotatef(rocket.prevRotationYaw + (rocket.rotationYaw - rocket.prevRotationYaw) * p_76986_9_ - 90.0F, 0, 1.0F, 0); GL11.glRotatef(rocket.prevRotationPitch + (rocket.rotationPitch - rocket.prevRotationPitch) * p_76986_9_, 0, 0, 1.0F); - bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/TheGadget3_.png")); + bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/entity/chopper.png")); - if(rocket instanceof EntityHunterChopper) - mine2.setGunRotations((EntityHunterChopper)rocket, yaw, pitch); + //if(rocket instanceof EntityHunterChopper) + // mine2.setGunRotations((EntityHunterChopper)rocket, yaw, pitch); mine2.renderAll(0.0625F); GL11.glPopMatrix(); @@ -47,6 +51,6 @@ public class RenderHunterChopper extends Render { @Override protected ResourceLocation getEntityTexture(Entity p_110775_1_) { - return new ResourceLocation(RefStrings.MODID + ":textures/models/TheGadget3_.png"); + return new ResourceLocation(RefStrings.MODID + ":textures/entity/chopper.png"); } } diff --git a/com/hbm/render/BSmokeRenderer.java b/com/hbm/render/entity/RenderLN2.java similarity index 60% rename from com/hbm/render/BSmokeRenderer.java rename to com/hbm/render/entity/RenderLN2.java index 7dcd75cd0..ee24a5b76 100644 --- a/com/hbm/render/BSmokeRenderer.java +++ b/com/hbm/render/entity/RenderLN2.java @@ -1,55 +1,32 @@ -package com.hbm.render; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.concurrent.Callable; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; +import com.hbm.entity.projectile.EntityFire; +import com.hbm.entity.projectile.EntityLN2; import com.hbm.items.ModItems; -import com.hbm.lib.RefStrings; -import com.hbm.particles.EntityBSmokeFX; -import com.hbm.particles.EntitySmokeFX; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.particle.EntityDiggingFX; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.crash.CrashReport; -import net.minecraft.crash.CrashReportCategory; import net.minecraft.entity.Entity; -import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.item.Item; -import net.minecraft.item.ItemPotion; -import net.minecraft.potion.PotionHelper; import net.minecraft.util.IIcon; -import net.minecraft.util.MathHelper; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.ReportedException; import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; -public class BSmokeRenderer extends Render -{ +public class RenderLN2 extends Render { private Item field_94151_a; private int field_94150_f; private static final String __OBFID = "CL_00001008"; - public BSmokeRenderer(Item p_i1259_1_, int p_i1259_2_) + public RenderLN2(Item p_i1259_1_, int p_i1259_2_) { this.field_94151_a = p_i1259_1_; this.field_94150_f = p_i1259_2_; } - public BSmokeRenderer(Item p_i1260_1_) + public RenderLN2(Item p_i1260_1_) { this(p_i1260_1_, 0); } @@ -62,48 +39,58 @@ public class BSmokeRenderer extends Render */ public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { - if(p_76986_1_ instanceof EntityBSmokeFX) + if(p_76986_1_ instanceof EntityLN2) { - EntityBSmokeFX fx = (EntityBSmokeFX)p_76986_1_; + EntityLN2 fx = (EntityLN2)p_76986_1_; - if(fx.particleAge < fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7) + if(fx.ticksExisted <= fx.maxAge && fx.ticksExisted >= fx.maxAge / 10 * 9) { - field_94151_a = ModItems.b_smoke8; + field_94151_a = ModItems.ln2_10; } - if(fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) + if(fx.ticksExisted < fx.maxAge / 10 * 9 && fx.ticksExisted >= fx.maxAge / 10 * 8) { - field_94151_a = ModItems.b_smoke7; + field_94151_a = ModItems.ln2_9; } - if(fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) + if(fx.ticksExisted < fx.maxAge / 10 * 8 && fx.ticksExisted >= fx.maxAge / 10 * 7) { - field_94151_a = ModItems.b_smoke6; + field_94151_a = ModItems.ln2_8; } - if(fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) + if(fx.ticksExisted < fx.maxAge / 10 * 7 && fx.ticksExisted >= fx.maxAge / 10 * 6) { - field_94151_a = ModItems.b_smoke5; + field_94151_a = ModItems.ln2_7; } - if(fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) + if(fx.ticksExisted < fx.maxAge / 10 * 6 && fx.ticksExisted >= fx.maxAge / 10 * 5) { - field_94151_a = ModItems.b_smoke4; + field_94151_a = ModItems.ln2_6; } - if(fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) + if(fx.ticksExisted < fx.maxAge / 10 * 5 && fx.ticksExisted >= fx.maxAge / 10 * 4) { - field_94151_a = ModItems.b_smoke3; + field_94151_a = ModItems.ln2_5; } - if(fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) + if(fx.ticksExisted < fx.maxAge / 10 * 4 && fx.ticksExisted >= fx.maxAge / 10 * 3) { - field_94151_a = ModItems.b_smoke2; + field_94151_a = ModItems.ln2_4; + } + + if(fx.ticksExisted < fx.maxAge / 10 * 3 && fx.ticksExisted >= fx.maxAge / 10 * 2) + { + field_94151_a = ModItems.ln2_3; + } + + if(fx.ticksExisted < fx.maxAge / 10 * 2 && fx.ticksExisted >= fx.maxAge / 10 * 1) + { + field_94151_a = ModItems.ln2_2; } - if(fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) + if(fx.ticksExisted < fx.maxAge / 10 && fx.ticksExisted >= 0 && !fx.isDead) { - field_94151_a = ModItems.b_smoke1; + field_94151_a = ModItems.ln2_1; } IIcon iicon = field_94151_a.getIconFromDamage(0); @@ -115,6 +102,7 @@ public class BSmokeRenderer extends Render GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glScalef(7.5F, 7.5F, 7.5F); + GL11.glTranslatef(0.0F, -0.25F, 0.0F); this.bindEntityTexture(p_76986_1_); Tessellator tessellator = Tessellator.instance; @@ -152,4 +140,5 @@ public class BSmokeRenderer extends Render p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2); p_77026_1_.draw(); } + } diff --git a/com/hbm/render/entity/RenderMiniMIRV.java b/com/hbm/render/entity/RenderMiniMIRV.java new file mode 100644 index 000000000..169d34c2d --- /dev/null +++ b/com/hbm/render/entity/RenderMiniMIRV.java @@ -0,0 +1,39 @@ +package com.hbm.render.entity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelMIRV; +import com.hbm.render.model.ModelMiniNuke; + +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +public class RenderMiniMIRV extends Render { + + private ModelMIRV miniNuke; + + public RenderMiniMIRV() { + miniNuke = new ModelMIRV(); + } + + @Override + public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + + GL11.glPushMatrix(); + GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); + GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_ + 180, 0.0F, 0.0F, 1.0F); + GL11.glScalef(1.5F, 1.5F, 1.5F); + + bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/MIRV.png")); + miniNuke.renderAll(0.0625F); + GL11.glPopMatrix(); + } + + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return new ResourceLocation(RefStrings.MODID + ":textures/models/MIRV.png"); + } +} diff --git a/com/hbm/render/RenderMiniNuke.java b/com/hbm/render/entity/RenderMiniNuke.java similarity index 94% rename from com/hbm/render/RenderMiniNuke.java rename to com/hbm/render/entity/RenderMiniNuke.java index 3e8c788dd..ecfdc6bd2 100644 --- a/com/hbm/render/RenderMiniNuke.java +++ b/com/hbm/render/entity/RenderMiniNuke.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelMiniNuke; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/RenderMirv.java b/com/hbm/render/entity/RenderMirv.java similarity index 98% rename from com/hbm/render/RenderMirv.java rename to com/hbm/render/entity/RenderMirv.java index d0815f2f6..018c754b3 100644 --- a/com/hbm/render/RenderMirv.java +++ b/com/hbm/render/entity/RenderMirv.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderMissileGeneric.java b/com/hbm/render/entity/RenderMissileGeneric.java similarity index 90% rename from com/hbm/render/RenderMissileGeneric.java rename to com/hbm/render/entity/RenderMissileGeneric.java index a390ffd9b..7f0abd3ed 100644 --- a/com/hbm/render/RenderMissileGeneric.java +++ b/com/hbm/render/entity/RenderMissileGeneric.java @@ -1,11 +1,11 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityMissileBunkerBuster; -import com.hbm.entity.EntityMissileCluster; -import com.hbm.entity.EntityMissileGeneric; -import com.hbm.entity.EntityMissileIncendiary; +import com.hbm.entity.missile.EntityMissileBunkerBuster; +import com.hbm.entity.missile.EntityMissileCluster; +import com.hbm.entity.missile.EntityMissileGeneric; +import com.hbm.entity.missile.EntityMissileIncendiary; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.entity.Render; diff --git a/com/hbm/render/RenderMissileHuge.java b/com/hbm/render/entity/RenderMissileHuge.java similarity index 84% rename from com/hbm/render/RenderMissileHuge.java rename to com/hbm/render/entity/RenderMissileHuge.java index fef9552a2..b541d52ee 100644 --- a/com/hbm/render/RenderMissileHuge.java +++ b/com/hbm/render/entity/RenderMissileHuge.java @@ -1,15 +1,15 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityMissileBunkerBuster; -import com.hbm.entity.EntityMissileBurst; -import com.hbm.entity.EntityMissileCluster; -import com.hbm.entity.EntityMissileDrill; -import com.hbm.entity.EntityMissileGeneric; -import com.hbm.entity.EntityMissileIncendiary; -import com.hbm.entity.EntityMissileInferno; -import com.hbm.entity.EntityMissileRain; +import com.hbm.entity.missile.EntityMissileBunkerBuster; +import com.hbm.entity.missile.EntityMissileBurst; +import com.hbm.entity.missile.EntityMissileCluster; +import com.hbm.entity.missile.EntityMissileDrill; +import com.hbm.entity.missile.EntityMissileGeneric; +import com.hbm.entity.missile.EntityMissileIncendiary; +import com.hbm.entity.missile.EntityMissileInferno; +import com.hbm.entity.missile.EntityMissileRain; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.entity.Render; diff --git a/com/hbm/render/RenderMissileMirv.java b/com/hbm/render/entity/RenderMissileMirv.java similarity index 98% rename from com/hbm/render/RenderMissileMirv.java rename to com/hbm/render/entity/RenderMissileMirv.java index 2b19ba82b..f89c74552 100644 --- a/com/hbm/render/RenderMissileMirv.java +++ b/com/hbm/render/entity/RenderMissileMirv.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderMissileNuclear.java b/com/hbm/render/entity/RenderMissileNuclear.java similarity index 98% rename from com/hbm/render/RenderMissileNuclear.java rename to com/hbm/render/entity/RenderMissileNuclear.java index 5e6b386e2..99edaa4a7 100644 --- a/com/hbm/render/RenderMissileNuclear.java +++ b/com/hbm/render/entity/RenderMissileNuclear.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderMissileStrong.java b/com/hbm/render/entity/RenderMissileStrong.java similarity index 90% rename from com/hbm/render/RenderMissileStrong.java rename to com/hbm/render/entity/RenderMissileStrong.java index 4e092545e..e99e7f88e 100644 --- a/com/hbm/render/RenderMissileStrong.java +++ b/com/hbm/render/entity/RenderMissileStrong.java @@ -1,11 +1,11 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityMissileBusterStrong; -import com.hbm.entity.EntityMissileClusterStrong; -import com.hbm.entity.EntityMissileIncendiaryStrong; -import com.hbm.entity.EntityMissileStrong; +import com.hbm.entity.missile.EntityMissileBusterStrong; +import com.hbm.entity.missile.EntityMissileClusterStrong; +import com.hbm.entity.missile.EntityMissileIncendiaryStrong; +import com.hbm.entity.missile.EntityMissileStrong; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.entity.Render; diff --git a/com/hbm/render/RenderMissileThermo.java b/com/hbm/render/entity/RenderMissileThermo.java similarity index 93% rename from com/hbm/render/RenderMissileThermo.java rename to com/hbm/render/entity/RenderMissileThermo.java index f60352f7f..fd9205836 100644 --- a/com/hbm/render/RenderMissileThermo.java +++ b/com/hbm/render/entity/RenderMissileThermo.java @@ -1,9 +1,9 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityMissileEndo; -import com.hbm.entity.EntityMissileExo; +import com.hbm.entity.missile.EntityMissileEndo; +import com.hbm.entity.missile.EntityMissileExo; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.entity.Render; diff --git a/com/hbm/render/entity/RenderNoCloud.java b/com/hbm/render/entity/RenderNoCloud.java new file mode 100644 index 000000000..0826317d9 --- /dev/null +++ b/com/hbm/render/entity/RenderNoCloud.java @@ -0,0 +1,137 @@ +package com.hbm.render.entity; + +import java.util.Random; + +import org.lwjgl.opengl.GL11; + +import com.hbm.entity.effect.EntityNukeCloudNoShroom; +import com.hbm.lib.RefStrings; + +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.model.AdvancedModelLoader; +import net.minecraftforge.client.model.IModelCustom; + +public class RenderNoCloud extends Render { + + private static final ResourceLocation objTesterModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/NukeCloudSmall.obj"); + private IModelCustom blastModel; + private ResourceLocation blastTexture; + private static final ResourceLocation ringModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/Ring.obj"); + private IModelCustom ringModel; + private ResourceLocation ringTexture; + private static final ResourceLocation ringBigModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/RingBig.obj"); + private IModelCustom ringBigModel; + private ResourceLocation ringBigTexture; + public float scale = 0; + public float ring = 0; + + public RenderNoCloud() { + blastModel = AdvancedModelLoader.loadModel(objTesterModelRL); + blastTexture = new ResourceLocation(RefStrings.MODID, "textures/models/NukeCloudFire.png"); + ringModel = AdvancedModelLoader.loadModel(ringModelRL); + ringTexture = new ResourceLocation(RefStrings.MODID, "textures/models/Ring2.png"); + ringBigModel = AdvancedModelLoader.loadModel(ringBigModelRL); + ringBigTexture = new ResourceLocation(RefStrings.MODID, "textures/models/Ring2.png"); + scale = 0; + ring = 0; + } + + @Override + public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + if(((EntityNukeCloudNoShroom)p_76986_1_).age > 100) + { } else { + this.renderFlare((EntityNukeCloudNoShroom)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); + } + this.renderRing((EntityNukeCloudNoShroom)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); + } + + public void renderRing(EntityNukeCloudNoShroom p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + + GL11.glPushMatrix(); + GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glTranslatef(0.0F, 18F, 0.0F); + //ring += 0.1F; + GL11.glScalef(p_76986_1_.ring * 10, 30F, p_76986_1_.ring * 10); + + bindTexture(ringTexture); + ringModel.renderAll(); + GL11.glPopMatrix(); + } + + public void renderFlare(EntityNukeCloudNoShroom p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { + + Tessellator tessellator = Tessellator.instance; + RenderHelper.disableStandardItemLighting(); + float f1 = (p_76986_1_.ticksExisted + 2.0F) / 200.0F; + float f2 = 0.0F; + int count = 250; + + if(p_76986_1_.ticksExisted < 250) + { + count = p_76986_1_.ticksExisted * 3; + } + + if (f1 > 0.8F) + { + f2 = (f1 - 0.8F) / 0.2F; + } + + Random random = new Random(432L); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glShadeModel(GL11.GL_SMOOTH); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); + GL11.glDisable(GL11.GL_ALPHA_TEST); + GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glDepthMask(false); + GL11.glPushMatrix(); + //GL11.glTranslatef(0.0F, -1.0F, -2.0F); + GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_ + 15, (float)p_76986_6_); + GL11.glScalef(5F, 5F, 5F); + + //for (int i = 0; (float)i < (f1 + f1 * f1) / 2.0F * 60.0F; ++i) + for(int i = 0; i < count; i++) + { + GL11.glRotatef(random.nextFloat() * 360.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(random.nextFloat() * 360.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(random.nextFloat() * 360.0F, 0.0F, 0.0F, 1.0F); + GL11.glRotatef(random.nextFloat() * 360.0F, 1.0F, 0.0F, 0.0F); + GL11.glRotatef(random.nextFloat() * 360.0F, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(random.nextFloat() * 360.0F + f1 * 90.0F, 0.0F, 0.0F, 1.0F); + tessellator.startDrawing(6); + float f3 = random.nextFloat() * 20.0F + 5.0F + f2 * 10.0F; + float f4 = random.nextFloat() * 2.0F + 1.0F + f2 * 2.0F; + //tessellator.setColorRGBA_I(16777215, (int)(255.0F * (1.0F - f2))); + tessellator.setColorRGBA_I(59345715, (int)(255.0F * (1.0F - f2))); + tessellator.addVertex(0.0D, 0.0D, 0.0D); + //tessellator.setColorRGBA_I(16711935, 0); + tessellator.setColorRGBA_I(59345735, 0); + tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4); + tessellator.addVertex(0.866D * f4, f3, -0.5F * f4); + tessellator.addVertex(0.0D, f3, 1.0F * f4); + tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4); + tessellator.draw(); + } + + GL11.glPopMatrix(); + GL11.glDepthMask(true); + GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glDisable(GL11.GL_BLEND); + GL11.glShadeModel(GL11.GL_FLAT); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glEnable(GL11.GL_ALPHA_TEST); + RenderHelper.enableStandardItemLighting(); + } + + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return null; + } +} diff --git a/com/hbm/render/RenderNuclearCreeper.java b/com/hbm/render/entity/RenderNuclearCreeper.java similarity index 98% rename from com/hbm/render/RenderNuclearCreeper.java rename to com/hbm/render/entity/RenderNuclearCreeper.java index 4d56e1bc2..79017938f 100644 --- a/com/hbm/render/RenderNuclearCreeper.java +++ b/com/hbm/render/entity/RenderNuclearCreeper.java @@ -1,8 +1,8 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.lib.RefStrings; import net.minecraft.client.model.ModelBase; diff --git a/com/hbm/render/RenderRainbow.java b/com/hbm/render/entity/RenderRainbow.java similarity index 96% rename from com/hbm/render/RenderRainbow.java rename to com/hbm/render/entity/RenderRainbow.java index fc42bdfcc..a4dedba17 100644 --- a/com/hbm/render/RenderRainbow.java +++ b/com/hbm/render/entity/RenderRainbow.java @@ -1,11 +1,11 @@ -package com.hbm.render; +package com.hbm.render.entity; import java.util.Random; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityRainbow; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityRainbow; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.Tessellator; diff --git a/com/hbm/render/RenderRocket.java b/com/hbm/render/entity/RenderRocket.java similarity index 92% rename from com/hbm/render/RenderRocket.java rename to com/hbm/render/entity/RenderRocket.java index 70d9677c7..391e3b332 100644 --- a/com/hbm/render/RenderRocket.java +++ b/com/hbm/render/entity/RenderRocket.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; @@ -9,9 +9,10 @@ import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import com.hbm.entity.EntityBullet; -import com.hbm.entity.EntityRocket; +import com.hbm.entity.projectile.EntityBullet; +import com.hbm.entity.projectile.EntityRocket; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelBullet; @SideOnly(Side.CLIENT) public class RenderRocket extends Render { diff --git a/com/hbm/render/RenderSmallNuke.java b/com/hbm/render/entity/RenderSmallNuke.java similarity index 97% rename from com/hbm/render/RenderSmallNuke.java rename to com/hbm/render/entity/RenderSmallNuke.java index 35eb3747a..d3c646d94 100644 --- a/com/hbm/render/RenderSmallNuke.java +++ b/com/hbm/render/entity/RenderSmallNuke.java @@ -1,8 +1,8 @@ -package com.hbm.render; +package com.hbm.render.entity; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityNukeCloudSmall; +import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.entity.Render; diff --git a/com/hbm/render/RenderSmallNukeAlt.java b/com/hbm/render/entity/RenderSmallNukeAlt.java similarity index 98% rename from com/hbm/render/RenderSmallNukeAlt.java rename to com/hbm/render/entity/RenderSmallNukeAlt.java index 59783c0b8..ceb3b873b 100644 --- a/com/hbm/render/RenderSmallNukeAlt.java +++ b/com/hbm/render/entity/RenderSmallNukeAlt.java @@ -1,10 +1,10 @@ -package com.hbm.render; +package com.hbm.render.entity; import java.util.Random; import org.lwjgl.opengl.GL11; -import com.hbm.entity.EntityNukeCloudSmall; +import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.lib.RefStrings; import net.minecraft.client.renderer.RenderHelper; diff --git a/com/hbm/render/item/ItemRenderBFLauncher.java b/com/hbm/render/item/ItemRenderBFLauncher.java new file mode 100644 index 000000000..760dc55fc --- /dev/null +++ b/com/hbm/render/item/ItemRenderBFLauncher.java @@ -0,0 +1,72 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelBFLauncher; +import com.hbm.render.model.ModelMIRVLauncher; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderBFLauncher implements IItemRenderer { + + protected ModelBFLauncher swordModel; + + public ItemRenderBFLauncher() { + swordModel = new ModelBFLauncher(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/BFLauncher.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); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/BFLauncher.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(1.5F, 1.5F, 1.5F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/item/ItemRenderBaleflare.java b/com/hbm/render/item/ItemRenderBaleflare.java new file mode 100644 index 000000000..36efc1b06 --- /dev/null +++ b/com/hbm/render/item/ItemRenderBaleflare.java @@ -0,0 +1,70 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelBaleflare; +import com.hbm.render.model.ModelMIRV; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderBaleflare implements IItemRenderer { + + protected ModelBaleflare swordModel; + + public ItemRenderBaleflare() { + swordModel = new ModelBaleflare(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/BaleFlare.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.glScalef(1.5F, 1.5F, 1.5F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/BaleFlare.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.glScalef(2.0F, 2.0F, 2.0F); + GL11.glScalef(1.5F, 1.5F, 1.5F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/ItemRenderBigSword.java b/com/hbm/render/item/ItemRenderBigSword.java similarity index 95% rename from com/hbm/render/ItemRenderBigSword.java rename to com/hbm/render/item/ItemRenderBigSword.java index 9300e2db6..cf02767f0 100644 --- a/com/hbm/render/ItemRenderBigSword.java +++ b/com/hbm/render/item/ItemRenderBigSword.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelBigSword; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/item/ItemRenderCryolator.java b/com/hbm/render/item/ItemRenderCryolator.java new file mode 100644 index 000000000..dbfda1bcf --- /dev/null +++ b/com/hbm/render/item/ItemRenderCryolator.java @@ -0,0 +1,75 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelCryolator; +import com.hbm.render.model.ModelImmolator; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderCryolator implements IItemRenderer { + + protected ModelCryolator swordModel; + + public ItemRenderCryolator() { + swordModel = new ModelCryolator(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelCryolator.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); + GL11.glTranslatef(-0.2F, -0.1F, -0.1F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelCryolator.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(1.25F, 1.25F, 1.25F); + GL11.glTranslatef(-0.8F, 0.0F, 0.0F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + default: break; + } + } +} \ No newline at end of file diff --git a/com/hbm/render/ItemRenderDecoBlock.java b/com/hbm/render/item/ItemRenderDecoBlock.java similarity index 95% rename from com/hbm/render/ItemRenderDecoBlock.java rename to com/hbm/render/item/ItemRenderDecoBlock.java index c842e349a..29c1663fc 100644 --- a/com/hbm/render/ItemRenderDecoBlock.java +++ b/com/hbm/render/item/ItemRenderDecoBlock.java @@ -1,9 +1,14 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.blocks.ModBlocks; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelSteelBeam; +import com.hbm.render.model.ModelSteelCorner; +import com.hbm.render.model.ModelSteelRoof; +import com.hbm.render.model.ModelSteelScaffold; +import com.hbm.render.model.ModelSteelWall; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/item/ItemRenderEMPRay.java b/com/hbm/render/item/ItemRenderEMPRay.java new file mode 100644 index 000000000..f7ea7fd7d --- /dev/null +++ b/com/hbm/render/item/ItemRenderEMPRay.java @@ -0,0 +1,82 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelEMPRay; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderEMPRay implements IItemRenderer { + + protected ModelEMPRay swordModel; + + public ItemRenderEMPRay() { + swordModel = new ModelEMPRay(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + float f = 0; + + if((Entity)data[1] instanceof EntityPlayer) + //f = ((EntityPlayer)data[1]).getItemInUseCount() > 0 && ((Entity)data[1]).isSneaking() ? 0.05F : 0; + f = (((EntityPlayer)data[1]).getItemInUse() != null &&((EntityPlayer)data[1]).getItemInUse().getItemUseAction() == EnumAction.bow) ? 0.15F : 0; + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEMPRay.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.glScalef(0.5F, 0.5F, 0.5F); + //GL11.glTranslatef(-0.4F, -0.1F, 0.1F); + GL11.glTranslatef(-0.8F, -0.2F, 0.0F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEMPRay.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.5F, 0.5F, 0.5F); + GL11.glTranslatef(-1.8F, -0.2F, 0.2F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, f); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/ItemRenderFatMan.java b/com/hbm/render/item/ItemRenderFatMan.java similarity index 96% rename from com/hbm/render/ItemRenderFatMan.java rename to com/hbm/render/item/ItemRenderFatMan.java index 1eedc64da..5cf795745 100644 --- a/com/hbm/render/ItemRenderFatMan.java +++ b/com/hbm/render/item/ItemRenderFatMan.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelFatman; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/item/ItemRenderImmolator.java b/com/hbm/render/item/ItemRenderImmolator.java new file mode 100644 index 000000000..2c32d8ed1 --- /dev/null +++ b/com/hbm/render/item/ItemRenderImmolator.java @@ -0,0 +1,79 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.main.MainRegistry; +import com.hbm.render.model.ModelEMPRay; +import com.hbm.render.model.ModelImmolator; +import com.hbm.render.model.ModelMP40; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderImmolator implements IItemRenderer { + + protected ModelImmolator swordModel; + + public ItemRenderImmolator() { + swordModel = new ModelImmolator(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelImmolator.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); + GL11.glTranslatef(-0.2F, -0.1F, -0.1F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelImmolator.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(1.25F, 1.25F, 1.25F); + GL11.glTranslatef(-0.8F, 0.0F, 0.0F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/item/ItemRenderMIRV.java b/com/hbm/render/item/ItemRenderMIRV.java new file mode 100644 index 000000000..d3f416e1a --- /dev/null +++ b/com/hbm/render/item/ItemRenderMIRV.java @@ -0,0 +1,70 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelMIRV; +import com.hbm.render.model.ModelMiniNuke; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderMIRV implements IItemRenderer { + + protected ModelMIRV swordModel; + + public ItemRenderMIRV() { + swordModel = new ModelMIRV(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/MIRV.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.glScalef(1.5F, 1.5F, 1.5F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/MIRV.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.glScalef(2.0F, 2.0F, 2.0F); + GL11.glScalef(1.5F, 1.5F, 1.5F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/item/ItemRenderMIRVLauncher.java b/com/hbm/render/item/ItemRenderMIRVLauncher.java new file mode 100644 index 000000000..cbae1972c --- /dev/null +++ b/com/hbm/render/item/ItemRenderMIRVLauncher.java @@ -0,0 +1,72 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelFatman; +import com.hbm.render.model.ModelMIRVLauncher; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderMIRVLauncher implements IItemRenderer { + + protected ModelMIRVLauncher swordModel; + + public ItemRenderMIRVLauncher() { + swordModel = new ModelMIRVLauncher(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/MIRVLauncher.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); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/MIRVLauncher.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(1.5F, 1.5F, 1.5F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/ItemRenderMP.java b/com/hbm/render/item/ItemRenderMP.java similarity index 97% rename from com/hbm/render/ItemRenderMP.java rename to com/hbm/render/item/ItemRenderMP.java index ed717bce6..ec83e495d 100644 --- a/com/hbm/render/ItemRenderMP.java +++ b/com/hbm/render/item/ItemRenderMP.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelMP; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/item/ItemRenderMP40.java b/com/hbm/render/item/ItemRenderMP40.java new file mode 100644 index 000000000..fa3253aca --- /dev/null +++ b/com/hbm/render/item/ItemRenderMP40.java @@ -0,0 +1,76 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.main.MainRegistry; +import com.hbm.render.model.ModelMP40; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderMP40 implements IItemRenderer { + + protected ModelMP40 swordModel; + + public ItemRenderMP40() { + swordModel = new ModelMP40(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelMP40.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.glScalef(0.5F, 0.5F, 0.5F); + //GL11.glTranslatef(-0.4F, -0.1F, 0.1F); + GL11.glTranslatef(-0.8F, -0.2F, 0.0F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + GL11.glEnable(GL11.GL_CULL_FACE); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelMP40.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.5F, 0.5F, 0.5F); + GL11.glTranslatef(-1.8F, -0.2F, 0.2F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/ItemRenderMiniNuke.java b/com/hbm/render/item/ItemRenderMiniNuke.java similarity index 96% rename from com/hbm/render/ItemRenderMiniNuke.java rename to com/hbm/render/item/ItemRenderMiniNuke.java index 924177de3..c322acf27 100644 --- a/com/hbm/render/ItemRenderMiniNuke.java +++ b/com/hbm/render/item/ItemRenderMiniNuke.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelMiniNuke; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderNukeGadget.java b/com/hbm/render/item/ItemRenderNukeGadget.java similarity index 98% rename from com/hbm/render/ItemRenderNukeGadget.java rename to com/hbm/render/item/ItemRenderNukeGadget.java index f0cb9d950..f43392a2b 100644 --- a/com/hbm/render/ItemRenderNukeGadget.java +++ b/com/hbm/render/item/ItemRenderNukeGadget.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/ItemRenderOSIPR.java b/com/hbm/render/item/ItemRenderOSIPR.java similarity index 97% rename from com/hbm/render/ItemRenderOSIPR.java rename to com/hbm/render/item/ItemRenderOSIPR.java index 91a7a4e9e..cc1af635a 100644 --- a/com/hbm/render/ItemRenderOSIPR.java +++ b/com/hbm/render/item/ItemRenderOSIPR.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelOSIPR; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderPoleTop.java b/com/hbm/render/item/ItemRenderPoleTop.java similarity index 96% rename from com/hbm/render/ItemRenderPoleTop.java rename to com/hbm/render/item/ItemRenderPoleTop.java index 868b47464..4cf24e815 100644 --- a/com/hbm/render/ItemRenderPoleTop.java +++ b/com/hbm/render/item/ItemRenderPoleTop.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelPoleTop; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderRedstoneSword.java b/com/hbm/render/item/ItemRenderRedstoneSword.java similarity index 95% rename from com/hbm/render/ItemRenderRedstoneSword.java rename to com/hbm/render/item/ItemRenderRedstoneSword.java index 54a9f5650..c4afae33c 100644 --- a/com/hbm/render/ItemRenderRedstoneSword.java +++ b/com/hbm/render/item/ItemRenderRedstoneSword.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelSword; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderRevolver.java b/com/hbm/render/item/ItemRenderRevolver.java similarity index 96% rename from com/hbm/render/ItemRenderRevolver.java rename to com/hbm/render/item/ItemRenderRevolver.java index 32e75dec7..d2057ba16 100644 --- a/com/hbm/render/ItemRenderRevolver.java +++ b/com/hbm/render/item/ItemRenderRevolver.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelRevolver; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderRevolverCursed.java b/com/hbm/render/item/ItemRenderRevolverCursed.java similarity index 96% rename from com/hbm/render/ItemRenderRevolverCursed.java rename to com/hbm/render/item/ItemRenderRevolverCursed.java index 87b65b299..3a71fa2f7 100644 --- a/com/hbm/render/ItemRenderRevolverCursed.java +++ b/com/hbm/render/item/ItemRenderRevolverCursed.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelGun; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderRevolverGold.java b/com/hbm/render/item/ItemRenderRevolverGold.java similarity index 96% rename from com/hbm/render/ItemRenderRevolverGold.java rename to com/hbm/render/item/ItemRenderRevolverGold.java index dea2930da..d11c2053a 100644 --- a/com/hbm/render/ItemRenderRevolverGold.java +++ b/com/hbm/render/item/ItemRenderRevolverGold.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelRevolver; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/item/ItemRenderRevolverInverted.java b/com/hbm/render/item/ItemRenderRevolverInverted.java new file mode 100644 index 000000000..57197ded5 --- /dev/null +++ b/com/hbm/render/item/ItemRenderRevolverInverted.java @@ -0,0 +1,69 @@ +package com.hbm.render.item; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelRevolver; + +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.IItemRenderer; +import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.IItemRenderer.ItemRendererHelper; + +public class ItemRenderRevolverInverted implements IItemRenderer { + + protected ModelRevolver swordModel; + + public ItemRenderRevolverInverted() { + swordModel = new ModelRevolver(); + } + + @Override + public boolean handleRenderType(ItemStack item, ItemRenderType type) { + switch(type) { + case EQUIPPED: + case EQUIPPED_FIRST_PERSON: + case ENTITY: + return true; + default: return false; + } + } + + @Override + public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { + return false; + } + + @Override + public void renderItem(ItemRenderType type, ItemStack item, Object... data) { + switch(type) { + case EQUIPPED_FIRST_PERSON: + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolver.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.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + break; + case EQUIPPED: + case ENTITY: + GL11.glPushMatrix(); + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelRevolver.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.glScalef(2.0F, 2.0F, 2.0F); + GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); + swordModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + default: break; + } + } +} diff --git a/com/hbm/render/ItemRenderRevolverIron.java b/com/hbm/render/item/ItemRenderRevolverIron.java similarity index 96% rename from com/hbm/render/ItemRenderRevolverIron.java rename to com/hbm/render/item/ItemRenderRevolverIron.java index be32a1c90..ab2a99f40 100644 --- a/com/hbm/render/ItemRenderRevolverIron.java +++ b/com/hbm/render/item/ItemRenderRevolverIron.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelRevolver; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderRevolverLead.java b/com/hbm/render/item/ItemRenderRevolverLead.java similarity index 96% rename from com/hbm/render/ItemRenderRevolverLead.java rename to com/hbm/render/item/ItemRenderRevolverLead.java index 929796b46..b61d70b2b 100644 --- a/com/hbm/render/ItemRenderRevolverLead.java +++ b/com/hbm/render/item/ItemRenderRevolverLead.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelRevolver; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderRevolverSchrabidium.java b/com/hbm/render/item/ItemRenderRevolverSchrabidium.java similarity index 96% rename from com/hbm/render/ItemRenderRevolverSchrabidium.java rename to com/hbm/render/item/ItemRenderRevolverSchrabidium.java index 9f1c19c4e..d7e788412 100644 --- a/com/hbm/render/ItemRenderRevolverSchrabidium.java +++ b/com/hbm/render/item/ItemRenderRevolverSchrabidium.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelRevolver; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderRocket.java b/com/hbm/render/item/ItemRenderRocket.java similarity index 96% rename from com/hbm/render/ItemRenderRocket.java rename to com/hbm/render/item/ItemRenderRocket.java index e1ba03cdf..7576960c1 100644 --- a/com/hbm/render/ItemRenderRocket.java +++ b/com/hbm/render/item/ItemRenderRocket.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelRocket; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderRpg.java b/com/hbm/render/item/ItemRenderRpg.java similarity index 96% rename from com/hbm/render/ItemRenderRpg.java rename to com/hbm/render/item/ItemRenderRpg.java index ed9a2d015..a4660c262 100644 --- a/com/hbm/render/ItemRenderRpg.java +++ b/com/hbm/render/item/ItemRenderRpg.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelAt4; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderSatelliteReceiver.java b/com/hbm/render/item/ItemRenderSatelliteReceiver.java similarity index 96% rename from com/hbm/render/ItemRenderSatelliteReceiver.java rename to com/hbm/render/item/ItemRenderSatelliteReceiver.java index c14eb83e1..1987dd8db 100644 --- a/com/hbm/render/ItemRenderSatelliteReceiver.java +++ b/com/hbm/render/item/ItemRenderSatelliteReceiver.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelSatelliteReceiver; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderSteelPoles.java b/com/hbm/render/item/ItemRenderSteelPoles.java similarity index 96% rename from com/hbm/render/ItemRenderSteelPoles.java rename to com/hbm/render/item/ItemRenderSteelPoles.java index 3c37ca48d..a49137871 100644 --- a/com/hbm/render/ItemRenderSteelPoles.java +++ b/com/hbm/render/item/ItemRenderSteelPoles.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelPoles; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderTapeRecorder.java b/com/hbm/render/item/ItemRenderTapeRecorder.java similarity index 96% rename from com/hbm/render/ItemRenderTapeRecorder.java rename to com/hbm/render/item/ItemRenderTapeRecorder.java index ecce0577c..fab8dad1e 100644 --- a/com/hbm/render/ItemRenderTapeRecorder.java +++ b/com/hbm/render/item/ItemRenderTapeRecorder.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelTapeRecorder; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ItemRenderTestBombAdvanced.java b/com/hbm/render/item/ItemRenderTestBombAdvanced.java similarity index 96% rename from com/hbm/render/ItemRenderTestBombAdvanced.java rename to com/hbm/render/item/ItemRenderTestBombAdvanced.java index dbf954dd0..f630bfecd 100644 --- a/com/hbm/render/ItemRenderTestBombAdvanced.java +++ b/com/hbm/render/item/ItemRenderTestBombAdvanced.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelTestBombAdvanced; import com.hbm.tileentity.TileEntityTestBombAdvanced; import net.minecraft.client.Minecraft; diff --git a/com/hbm/render/ItemRenderTestContainer.java b/com/hbm/render/item/ItemRenderTestContainer.java similarity index 96% rename from com/hbm/render/ItemRenderTestContainer.java rename to com/hbm/render/item/ItemRenderTestContainer.java index 0c854914d..09a3efa96 100644 --- a/com/hbm/render/ItemRenderTestContainer.java +++ b/com/hbm/render/item/ItemRenderTestContainer.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.item; import com.hbm.tileentity.TileEntityTestContainer; diff --git a/com/hbm/render/ItemRenderXVL1456.java b/com/hbm/render/item/ItemRenderXVL1456.java similarity index 85% rename from com/hbm/render/ItemRenderXVL1456.java rename to com/hbm/render/item/ItemRenderXVL1456.java index 5686092d7..6da056cf8 100644 --- a/com/hbm/render/ItemRenderXVL1456.java +++ b/com/hbm/render/item/ItemRenderXVL1456.java @@ -1,13 +1,15 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; -import com.hbm.items.GunXVL1456; +import com.hbm.items.weapon.GunXVL1456; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelXVL1456; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; @@ -42,7 +44,8 @@ public class ItemRenderXVL1456 implements IItemRenderer { public void renderItem(ItemRenderType type, ItemStack item, Object... data) { float f = 0; if((Entity)data[1] instanceof EntityPlayer) - f = ((EntityPlayer)data[1]).getItemInUseCount() > 0 && ((Entity)data[1]).isSneaking() ? 0.05F : 0; + //f = ((EntityPlayer)data[1]).getItemInUseCount() > 0 && ((Entity)data[1]).isSneaking() ? 0.05F : 0; + f = (((EntityPlayer)data[1]).getItemInUse() != null &&((EntityPlayer)data[1]).getItemInUse().getItemUseAction() == EnumAction.bow) ? 0.05F : 0; switch(type) { case EQUIPPED_FIRST_PERSON: GL11.glPushMatrix(); diff --git a/com/hbm/render/ItemRenderZOMG.java b/com/hbm/render/item/ItemRenderZOMG.java similarity index 97% rename from com/hbm/render/ItemRenderZOMG.java rename to com/hbm/render/item/ItemRenderZOMG.java index bd01e833c..7d7093678 100644 --- a/com/hbm/render/ItemRenderZOMG.java +++ b/com/hbm/render/item/ItemRenderZOMG.java @@ -1,9 +1,10 @@ -package com.hbm.render; +package com.hbm.render.item; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; +import com.hbm.render.model.ModelZOMG; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; diff --git a/com/hbm/render/ModelAt4.java b/com/hbm/render/model/ModelAt4.java similarity index 99% rename from com/hbm/render/ModelAt4.java rename to com/hbm/render/model/ModelAt4.java index 14fdf0701..a662a7a87 100644 --- a/com/hbm/render/ModelAt4.java +++ b/com/hbm/render/model/ModelAt4.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/model/ModelBFLauncher.java b/com/hbm/render/model/ModelBFLauncher.java new file mode 100644 index 000000000..fa56f60de --- /dev/null +++ b/com/hbm/render/model/ModelBFLauncher.java @@ -0,0 +1,253 @@ +// Date: 14.11.2016 11:46:56 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelBFLauncher extends ModelBase { + // fields + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + ModelRenderer Shape8; + ModelRenderer Shape9; + ModelRenderer Shape10; + ModelRenderer Shape11; + ModelRenderer Shape12; + ModelRenderer Shape27; + ModelRenderer Shape28; + ModelRenderer Shape30; + ModelRenderer Shape31; + ModelRenderer Shape32; + ModelRenderer Shape33; + ModelRenderer Shape13; + ModelRenderer Shape14; + ModelRenderer Shape15; + ModelRenderer Shape16; + ModelRenderer Shape17; + ModelRenderer Shape18; + ModelRenderer Shape19; + ModelRenderer Shape20; + + public ModelBFLauncher() { + textureWidth = 128; + textureHeight = 64; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(0F, 0F, 0F, 40, 2, 4); + Shape1.setRotationPoint(-20F, 0F, 0F); + Shape1.setTextureSize(128, 64); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 6); + Shape2.addBox(0F, 0F, 0F, 6, 2, 2); + Shape2.setRotationPoint(-19F, 2F, 1F); + Shape2.setTextureSize(128, 64); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 0, 10); + Shape3.addBox(0F, 0F, 0F, 1, 4, 1); + Shape3.setRotationPoint(-12F, 2F, 1.5F); + Shape3.setTextureSize(128, 64); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + Shape4 = new ModelRenderer(this, 16, 6); + Shape4.addBox(0F, 0F, 0F, 6, 1, 4); + Shape4.setRotationPoint(-10F, 2F, 0F); + Shape4.setTextureSize(128, 64); + Shape4.mirror = true; + setRotation(Shape4, 0F, 0F, 0F); + Shape5 = new ModelRenderer(this, 0, 15); + Shape5.addBox(0F, 0F, 0F, 2, 3, 1); + Shape5.setRotationPoint(-7F, 3F, 1.5F); + Shape5.setTextureSize(128, 64); + Shape5.mirror = true; + setRotation(Shape5, 0F, 0F, 0F); + Shape6 = new ModelRenderer(this, 4, 10); + Shape6.addBox(0F, 0F, 0F, 3, 3, 1); + Shape6.setRotationPoint(-10F, 3F, 1.5F); + Shape6.setTextureSize(128, 64); + Shape6.mirror = true; + setRotation(Shape6, 0F, 0F, 0F); + Shape7 = new ModelRenderer(this, 12, 10); + Shape7.addBox(-1F, 0F, 0F, 1, 2, 1); + Shape7.setRotationPoint(-7F, 3F, 1.5F); + Shape7.setTextureSize(128, 64); + Shape7.mirror = true; + setRotation(Shape7, 0F, 0F, 0.5235988F); + Shape8 = new ModelRenderer(this, 36, 6); + Shape8.addBox(0F, 0F, 0F, 10, 1, 4); + Shape8.setRotationPoint(-3F, 2F, 0F); + Shape8.setTextureSize(128, 64); + Shape8.mirror = true; + setRotation(Shape8, 0F, 0F, 0F); + Shape9 = new ModelRenderer(this, 64, 6); + Shape9.addBox(0F, 0F, 0F, 2, 3, 2); + Shape9.setRotationPoint(7F, 2F, 1F); + Shape9.setTextureSize(128, 64); + Shape9.mirror = true; + setRotation(Shape9, 0F, 0F, 0F); + Shape10 = new ModelRenderer(this, 88, 0); + Shape10.addBox(0F, 0F, 0F, 3, 4, 4); + Shape10.setRotationPoint(17F, -4F, 0F); + Shape10.setTextureSize(128, 64); + Shape10.mirror = true; + setRotation(Shape10, 0F, 0F, 0F); + Shape11 = new ModelRenderer(this, 72, 6); + Shape11.addBox(0F, 0F, 0F, 2, 3, 1); + Shape11.setRotationPoint(18F, -7F, 0F); + Shape11.setTextureSize(128, 64); + Shape11.mirror = true; + setRotation(Shape11, 0F, 0F, 0F); + Shape12 = new ModelRenderer(this, 78, 6); + Shape12.addBox(0F, 0F, 0F, 2, 3, 1); + Shape12.setRotationPoint(18F, -7F, 3F); + Shape12.setTextureSize(128, 64); + Shape12.mirror = true; + setRotation(Shape12, 0F, 0F, 0F); + Shape27 = new ModelRenderer(this, 18, 27); + Shape27.addBox(0F, 0F, 0F, 2, 5, 1); + Shape27.setRotationPoint(13F, -5F, 1.5F); + Shape27.setTextureSize(128, 64); + Shape27.mirror = true; + setRotation(Shape27, 0F, 0F, 0F); + Shape28 = new ModelRenderer(this, 84, 6); + Shape28.addBox(0F, 0F, 0F, 1, 3, 1); + Shape28.setRotationPoint(16F, -3F, 1.5F); + Shape28.setTextureSize(128, 64); + Shape28.mirror = true; + setRotation(Shape28, 0F, 0F, 0F); + Shape30 = new ModelRenderer(this, 30, 15); + Shape30.addBox(0F, 0F, 0F, 12, 2, 2); + Shape30.setRotationPoint(-7F, -1F, 4F); + Shape30.setTextureSize(128, 64); + Shape30.mirror = true; + setRotation(Shape30, 0F, 0F, 0F); + Shape31 = new ModelRenderer(this, 44, 19); + Shape31.addBox(0F, 0F, 0F, 14, 1, 1); + Shape31.setRotationPoint(5F, -0.5F, 4.5F); + Shape31.setTextureSize(128, 64); + Shape31.mirror = true; + setRotation(Shape31, 0F, 0F, 0F); + Shape32 = new ModelRenderer(this, 12, 27); + Shape32.addBox(0F, 0F, 0F, 1, 1, 1); + Shape32.setRotationPoint(18F, -0.5F, 3.5F); + Shape32.setTextureSize(128, 64); + Shape32.mirror = true; + setRotation(Shape32, 0F, 0F, 0F); + Shape33 = new ModelRenderer(this, 24, 29); + Shape33.addBox(0F, 0F, 0F, 31, 1, 2); + Shape33.setRotationPoint(-18F, -1F, 1F); + Shape33.setTextureSize(128, 64); + Shape33.mirror = true; + setRotation(Shape33, 0F, 0F, 0F); + Shape13 = new ModelRenderer(this, 0, 34); + Shape13.addBox(0F, 0F, 0F, 22, 5, 3); + Shape13.setRotationPoint(-15F, -6F, 0.5F); + Shape13.setTextureSize(128, 64); + Shape13.mirror = true; + setRotation(Shape13, 0F, 0F, 0F); + Shape14 = new ModelRenderer(this, 0, 42); + Shape14.addBox(0F, 0F, 0F, 22, 3, 5); + Shape14.setRotationPoint(-15F, -5F, -0.5F); + Shape14.setTextureSize(128, 64); + Shape14.mirror = true; + setRotation(Shape14, 0F, 0F, 0F); + Shape15 = new ModelRenderer(this, 0, 50); + Shape15.addBox(0F, 0F, 0F, 1, 3, 3); + Shape15.setRotationPoint(-16F, -5F, 0.5F); + Shape15.setTextureSize(128, 64); + Shape15.mirror = true; + setRotation(Shape15, 0F, 0F, 0F); + Shape16 = new ModelRenderer(this, 8, 50); + Shape16.addBox(0F, 0F, 0F, 2, 3, 3); + Shape16.setRotationPoint(7F, -5F, 0.5F); + Shape16.setTextureSize(128, 64); + Shape16.mirror = true; + setRotation(Shape16, 0F, 0F, 0F); + Shape17 = new ModelRenderer(this, 18, 50); + Shape17.addBox(0F, 0F, 0F, 4, 1, 3); + Shape17.setRotationPoint(9F, -2F, 0.5F); + Shape17.setTextureSize(128, 64); + Shape17.mirror = true; + setRotation(Shape17, 0F, 0F, 0F); + Shape18 = new ModelRenderer(this, 32, 50); + Shape18.addBox(0F, 0F, 0F, 4, 1, 3); + Shape18.setRotationPoint(9F, -6F, 0.5F); + Shape18.setTextureSize(128, 64); + Shape18.mirror = true; + setRotation(Shape18, 0F, 0F, 0F); + Shape19 = new ModelRenderer(this, 46, 50); + Shape19.addBox(0F, 0F, 0F, 4, 3, 1); + Shape19.setRotationPoint(9F, -5F, -0.5F); + Shape19.setTextureSize(128, 64); + Shape19.mirror = true; + setRotation(Shape19, 0F, 0F, 0F); + Shape20 = new ModelRenderer(this, 56, 50); + Shape20.addBox(0F, 0F, 0F, 4, 3, 1); + Shape20.setRotationPoint(9F, -5F, 3.5F); + Shape20.setTextureSize(128, 64); + Shape20.mirror = true; + setRotation(Shape20, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Shape1.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape2.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + Shape3.render(f5); + Shape4.render(f5); + Shape5.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape6.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + Shape7.render(f5); + Shape8.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape9.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + Shape10.render(f5); + Shape11.render(f5); + Shape12.render(f5); + Shape27.render(f5); + Shape28.render(f5); + Shape30.render(f5); + Shape31.render(f5); + Shape32.render(f5); + Shape33.render(f5); + Shape13.render(f5); + Shape14.render(f5); + Shape15.render(f5); + Shape16.render(f5); + Shape17.render(f5); + Shape18.render(f5); + Shape19.render(f5); + Shape20.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/model/ModelBaleflare.java b/com/hbm/render/model/ModelBaleflare.java new file mode 100644 index 000000000..3dce06925 --- /dev/null +++ b/com/hbm/render/model/ModelBaleflare.java @@ -0,0 +1,112 @@ +// Date: 14.11.2016 12:21:58 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelBaleflare extends ModelBase { + // fields + ModelRenderer Shape9; + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + + public ModelBaleflare() { + textureWidth = 128; + textureHeight = 32; + + Shape9 = new ModelRenderer(this, 0, 0); + Shape9.addBox(0F, 0F, 0F, 22, 5, 3); + Shape9.setRotationPoint(-11F, -2.5F, -1.5F); + Shape9.setTextureSize(128, 32); + Shape9.mirror = true; + setRotation(Shape9, 0F, 0F, 0F); + Shape1 = new ModelRenderer(this, 0, 8); + Shape1.addBox(0F, 0F, 0F, 22, 3, 5); + Shape1.setRotationPoint(-11F, -1.5F, -2.5F); + Shape1.setTextureSize(128, 32); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 16); + Shape2.addBox(0F, 0F, 0F, 1, 3, 3); + Shape2.setRotationPoint(-12F, -1.5F, -1.5F); + Shape2.setTextureSize(128, 32); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 8, 16); + Shape3.addBox(0F, 0F, 0F, 2, 3, 3); + Shape3.setRotationPoint(11F, -1.5F, -1.5F); + Shape3.setTextureSize(128, 32); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + Shape4 = new ModelRenderer(this, 18, 16); + Shape4.addBox(0F, 0F, 0F, 4, 1, 3); + Shape4.setRotationPoint(13F, 1.5F, -1.5F); + Shape4.setTextureSize(128, 32); + Shape4.mirror = true; + setRotation(Shape4, 0F, 0F, 0F); + Shape5 = new ModelRenderer(this, 32, 16); + Shape5.addBox(0F, 0F, 0F, 4, 1, 3); + Shape5.setRotationPoint(13F, -2.5F, -1.5F); + Shape5.setTextureSize(128, 32); + Shape5.mirror = true; + setRotation(Shape5, 0F, 0F, 0F); + Shape6 = new ModelRenderer(this, 46, 16); + Shape6.addBox(0F, 0F, 0F, 4, 3, 1); + Shape6.setRotationPoint(13F, -1.5F, -2.5F); + Shape6.setTextureSize(128, 32); + Shape6.mirror = true; + setRotation(Shape6, 0F, 0F, 0F); + Shape7 = new ModelRenderer(this, 56, 16); + Shape7.addBox(0F, 0F, 0F, 4, 3, 1); + Shape7.setRotationPoint(13F, -1.5F, 1.5F); + Shape7.setTextureSize(128, 32); + Shape7.mirror = true; + setRotation(Shape7, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Shape9.render(f5); + Shape1.render(f5); + Shape2.render(f5); + Shape3.render(f5); + Shape4.render(f5); + Shape5.render(f5); + Shape6.render(f5); + Shape7.render(f5); + } + + public void renderAll(float f5) { + Shape9.render(f5); + Shape1.render(f5); + Shape2.render(f5); + Shape3.render(f5); + Shape4.render(f5); + Shape5.render(f5); + Shape6.render(f5); + Shape7.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/ModelBigSword.java b/com/hbm/render/model/ModelBigSword.java similarity index 98% rename from com/hbm/render/ModelBigSword.java rename to com/hbm/render/model/ModelBigSword.java index db06b1b84..29765119a 100644 --- a/com/hbm/render/ModelBigSword.java +++ b/com/hbm/render/model/ModelBigSword.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelBullet.java b/com/hbm/render/model/ModelBullet.java similarity index 97% rename from com/hbm/render/ModelBullet.java rename to com/hbm/render/model/ModelBullet.java index edf824414..3c5e42547 100644 --- a/com/hbm/render/ModelBullet.java +++ b/com/hbm/render/model/ModelBullet.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelChopperMine.java b/com/hbm/render/model/ModelChopperMine.java similarity index 97% rename from com/hbm/render/ModelChopperMine.java rename to com/hbm/render/model/ModelChopperMine.java index c3d5bfd16..7588d445d 100644 --- a/com/hbm/render/ModelChopperMine.java +++ b/com/hbm/render/model/ModelChopperMine.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelCloak.java b/com/hbm/render/model/ModelCloak.java similarity index 99% rename from com/hbm/render/ModelCloak.java rename to com/hbm/render/model/ModelCloak.java index b56ed5c9d..44b4f684e 100644 --- a/com/hbm/render/ModelCloak.java +++ b/com/hbm/render/model/ModelCloak.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.model; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/model/ModelCryolator.java b/com/hbm/render/model/ModelCryolator.java new file mode 100644 index 000000000..7b2ef6f69 --- /dev/null +++ b/com/hbm/render/model/ModelCryolator.java @@ -0,0 +1,415 @@ +// Date: 26.11.2016 20:13:04 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelCryolator extends ModelBase { + // fields + ModelRenderer Body; + ModelRenderer Barrel1; + ModelRenderer Barrel2; + ModelRenderer BarrelBack; + ModelRenderer BarrelNozzle; + ModelRenderer TankF1; + ModelRenderer TankF2; + ModelRenderer TankF3; + ModelRenderer TankB1; + ModelRenderer TankB2; + ModelRenderer TankB3; + ModelRenderer Drum1; + ModelRenderer Drum2; + ModelRenderer BodyBACK; + ModelRenderer PipeLPlate; + ModelRenderer BodyBottom; + ModelRenderer Handle; + ModelRenderer Trigger; + ModelRenderer CoolingBlock; + ModelRenderer BodyCenter; + ModelRenderer PipeRPlate; + ModelRenderer StockTop; + ModelRenderer StockFront; + ModelRenderer StockBack; + ModelRenderer StockBottom; + ModelRenderer PipeLPlateB; + ModelRenderer PipeRPlateB; + ModelRenderer StockConnector; + ModelRenderer PipeTL; + ModelRenderer PipeBL; + ModelRenderer PipeTR; + ModelRenderer PipeBR; + ModelRenderer PipeL; + ModelRenderer PipiR; + ModelRenderer ConnectorFront; + ModelRenderer ConnectorBFront; + ModelRenderer ConnectorBBack; + ModelRenderer Connector; + ModelRenderer ConnectorStrut; + ModelRenderer PipeLarge; + ModelRenderer PipeLargeBack; + ModelRenderer PipiLargeConnector; + ModelRenderer PlateFront; + ModelRenderer ScaffoldFront; + ModelRenderer ScaffoldBottom; + ModelRenderer ScaffoldBack; + + public ModelCryolator() { + textureWidth = 128; + textureHeight = 64; + + Body = new ModelRenderer(this, 0, 6); + Body.addBox(0F, 0F, 0F, 15, 2, 3); + Body.setRotationPoint(-12F, 0F, -1.5F); + Body.setTextureSize(128, 64); + Body.mirror = true; + setRotation(Body, 0F, 0F, 0F); + Barrel1 = new ModelRenderer(this, 0, 57); + Barrel1.addBox(0F, 0F, 0F, 2, 4, 3); + Barrel1.setRotationPoint(-15F, 0F, -1.5F); + Barrel1.setTextureSize(128, 64); + Barrel1.mirror = true; + setRotation(Barrel1, 0F, 0F, 0F); + Barrel2 = new ModelRenderer(this, 10, 57); + Barrel2.addBox(0F, 0F, 0F, 2, 3, 4); + Barrel2.setRotationPoint(-15F, 0.5F, -2F); + Barrel2.setTextureSize(128, 64); + Barrel2.mirror = true; + setRotation(Barrel2, 0F, 0F, 0F); + BarrelBack = new ModelRenderer(this, 0, 51); + BarrelBack.addBox(0F, 0F, 0F, 1, 3, 3); + BarrelBack.setRotationPoint(-13F, 0.5F, -1.5F); + BarrelBack.setTextureSize(128, 64); + BarrelBack.mirror = true; + setRotation(BarrelBack, 0F, 0F, 0F); + BarrelNozzle = new ModelRenderer(this, 0, 49); + BarrelNozzle.addBox(0F, 0F, 0F, 1, 1, 1); + BarrelNozzle.setRotationPoint(-15.5F, 0.5F, -0.5F); + BarrelNozzle.setTextureSize(128, 64); + BarrelNozzle.mirror = true; + setRotation(BarrelNozzle, 0F, 0F, 0F); + TankF1 = new ModelRenderer(this, 22, 55); + TankF1.addBox(0F, 0F, 0F, 4, 5, 4); + TankF1.setRotationPoint(-10.5F, 2F, -2F); + TankF1.setTextureSize(128, 64); + TankF1.mirror = true; + setRotation(TankF1, 0F, 0F, 0F); + TankF2 = new ModelRenderer(this, 38, 56); + TankF2.addBox(0F, 0F, 0F, 6, 4, 4); + TankF2.setRotationPoint(-11.5F, 2.5F, -2F); + TankF2.setTextureSize(128, 64); + TankF2.mirror = true; + setRotation(TankF2, 0F, 0F, 0F); + TankF3 = new ModelRenderer(this, 58, 55); + TankF3.addBox(0F, 0F, 0F, 4, 4, 5); + TankF3.setRotationPoint(-10.5F, 2.5F, -2.5F); + TankF3.setTextureSize(128, 64); + TankF3.mirror = true; + setRotation(TankF3, 0F, 0F, 0F); + TankB1 = new ModelRenderer(this, 8, 52); + TankB1.addBox(0F, 0F, 0F, 4, 2, 3); + TankB1.setRotationPoint(-5F, 3F, -1.5F); + TankB1.setTextureSize(128, 64); + TankB1.mirror = true; + setRotation(TankB1, 0F, 0F, 0F); + TankB2 = new ModelRenderer(this, 0, 42); + TankB2.addBox(0F, 0F, 0F, 2, 4, 3); + TankB2.setRotationPoint(-4F, 2F, -1.5F); + TankB2.setTextureSize(128, 64); + TankB2.mirror = true; + setRotation(TankB2, 0F, 0F, 0F); + TankB3 = new ModelRenderer(this, 0, 36); + TankB3.addBox(0F, 0F, 0F, 2, 2, 4); + TankB3.setRotationPoint(-4F, 3F, -2F); + TankB3.setTextureSize(128, 64); + TankB3.mirror = true; + setRotation(TankB3, 0F, 0F, 0F); + Drum1 = new ModelRenderer(this, 38, 49); + Drum1.addBox(0F, 0F, 0F, 6, 4, 3); + Drum1.setRotationPoint(-2F, 6F, -4F); + Drum1.setTextureSize(128, 64); + Drum1.mirror = true; + setRotation(Drum1, 0F, 0F, 0F); + Drum2 = new ModelRenderer(this, 24, 46); + Drum2.addBox(0F, 0F, 0F, 4, 6, 3); + Drum2.setRotationPoint(-1F, 5F, -4F); + Drum2.setTextureSize(128, 64); + Drum2.mirror = true; + setRotation(Drum2, 0F, 0F, 0F); + BodyBACK = new ModelRenderer(this, 38, 44); + BodyBACK.addBox(0F, 0F, 0F, 7, 2, 3); + BodyBACK.setRotationPoint(3F, 0F, -1.5F); + BodyBACK.setTextureSize(128, 64); + BodyBACK.mirror = true; + setRotation(BodyBACK, 0F, 0F, 0.2617994F); + PipeLPlate = new ModelRenderer(this, 10, 46); + PipeLPlate.addBox(0F, 0F, 0F, 2, 4, 2); + PipeLPlate.setRotationPoint(-1F, 1F, -3F); + PipeLPlate.setTextureSize(128, 64); + PipeLPlate.mirror = true; + setRotation(PipeLPlate, 0F, 0F, 0F); + BodyBottom = new ModelRenderer(this, 26, 41); + BodyBottom.addBox(0F, 0F, 0F, 4, 3, 2); + BodyBottom.setRotationPoint(3F, 2F, -1F); + BodyBottom.setTextureSize(128, 64); + BodyBottom.mirror = true; + setRotation(BodyBottom, 0F, 0F, 0F); + Handle = new ModelRenderer(this, 0, 29); + Handle.addBox(0F, 0F, 0F, 2, 5, 2); + Handle.setRotationPoint(5F, 5F, -1F); + Handle.setTextureSize(128, 64); + Handle.mirror = true; + setRotation(Handle, 0F, 0F, -0.2617994F); + Trigger = new ModelRenderer(this, 10, 43); + Trigger.addBox(0F, 0F, 0F, 3, 2, 1); + Trigger.setRotationPoint(3F, 5F, -0.5F); + Trigger.setTextureSize(128, 64); + Trigger.mirror = true; + setRotation(Trigger, 0F, 0F, 0F); + CoolingBlock = new ModelRenderer(this, 58, 46); + CoolingBlock.addBox(0F, 0F, 0F, 3, 6, 3); + CoolingBlock.setRotationPoint(-1F, 6F, 0.5F); + CoolingBlock.setTextureSize(128, 64); + CoolingBlock.mirror = true; + setRotation(CoolingBlock, 0F, 0F, 0.2617994F); + BodyCenter = new ModelRenderer(this, 12, 33); + BodyCenter.addBox(0F, 0F, 0F, 3, 8, 2); + BodyCenter.setRotationPoint(-0.5F, 2F, -1F); + BodyCenter.setTextureSize(128, 64); + BodyCenter.mirror = true; + setRotation(BodyCenter, 0F, 0F, 0F); + PipeRPlate = new ModelRenderer(this, 0, 21); + PipeRPlate.addBox(0F, 0F, 0F, 2, 6, 2); + PipeRPlate.setRotationPoint(-1F, 1F, 1F); + PipeRPlate.setTextureSize(128, 64); + PipeRPlate.mirror = true; + setRotation(PipeRPlate, 0F, 0F, 0F); + StockTop = new ModelRenderer(this, 38, 39); + StockTop.addBox(0F, 0F, 0F, 6, 2, 3); + StockTop.setRotationPoint(9F, 1.8F, -1.5F); + StockTop.setTextureSize(128, 64); + StockTop.mirror = true; + setRotation(StockTop, 0F, 0F, 0F); + StockFront = new ModelRenderer(this, 30, 34); + StockFront.addBox(0F, 0F, 0F, 2, 5, 2); + StockFront.setRotationPoint(10F, 3F, -1F); + StockFront.setTextureSize(128, 64); + StockFront.mirror = true; + setRotation(StockFront, 0F, 0F, 0F); + StockBack = new ModelRenderer(this, 38, 32); + StockBack.addBox(0F, 0F, 0F, 2, 5, 2); + StockBack.setRotationPoint(13F, 3F, -1F); + StockBack.setTextureSize(128, 64); + StockBack.mirror = true; + setRotation(StockBack, 0F, 0F, 0F); + StockBottom = new ModelRenderer(this, 46, 35); + StockBottom.addBox(0F, 0F, 0F, 1, 2, 2); + StockBottom.setRotationPoint(12F, 6F, -1F); + StockBottom.setTextureSize(128, 64); + StockBottom.mirror = true; + setRotation(StockBottom, 0F, 0F, 0F); + PipeLPlateB = new ModelRenderer(this, 8, 28); + PipeLPlateB.addBox(0F, 0F, 0F, 3, 3, 2); + PipeLPlateB.setRotationPoint(4F, 2F, -3F); + PipeLPlateB.setTextureSize(128, 64); + PipeLPlateB.mirror = true; + setRotation(PipeLPlateB, 0F, 0F, 0F); + PipeRPlateB = new ModelRenderer(this, 8, 23); + PipeRPlateB.addBox(0F, 0F, 0F, 3, 3, 2); + PipeRPlateB.setRotationPoint(4F, 2F, 1F); + PipeRPlateB.setTextureSize(128, 64); + PipeRPlateB.mirror = true; + setRotation(PipeRPlateB, 0F, 0F, 0F); + StockConnector = new ModelRenderer(this, 22, 30); + StockConnector.addBox(0F, -1F, 0F, 5, 1, 3); + StockConnector.setRotationPoint(6F, 5F, -1.5F); + StockConnector.setTextureSize(128, 64); + StockConnector.mirror = true; + setRotation(StockConnector, 0F, 0F, 0.3490659F); + PipeTL = new ModelRenderer(this, 58, 44); + PipeTL.addBox(0F, 0F, 0F, 12, 1, 1); + PipeTL.setRotationPoint(-3F, 2.3F, -2.5F); + PipeTL.setTextureSize(128, 64); + PipeTL.mirror = true; + setRotation(PipeTL, 0F, 0F, 0F); + PipeBL = new ModelRenderer(this, 56, 40); + PipeBL.addBox(0F, 0F, 0F, 10, 1, 1); + PipeBL.setRotationPoint(-1F, 3.7F, -2.5F); + PipeBL.setTextureSize(128, 64); + PipeBL.mirror = true; + setRotation(PipeBL, 0F, 0F, 0F); + PipeTR = new ModelRenderer(this, 56, 42); + PipeTR.addBox(0F, 0F, 0F, 12, 1, 1); + PipeTR.setRotationPoint(-3F, 2.3F, 1.5F); + PipeTR.setTextureSize(128, 64); + PipeTR.mirror = true; + setRotation(PipeTR, 0F, 0F, 0F); + PipeBR = new ModelRenderer(this, 56, 38); + PipeBR.addBox(0F, 0F, 0F, 10, 1, 1); + PipeBR.setRotationPoint(-1F, 3.7F, 1.5F); + PipeBR.setTextureSize(128, 64); + PipeBR.mirror = true; + setRotation(PipeBR, 0F, 0F, 0F); + PipeL = new ModelRenderer(this, 52, 36); + PipeL.addBox(0F, 0F, 0F, 11, 1, 1); + PipeL.setRotationPoint(-13F, 1.5F, -2.5F); + PipeL.setTextureSize(128, 64); + PipeL.mirror = true; + setRotation(PipeL, 0F, 0F, 0F); + PipiR = new ModelRenderer(this, 52, 34); + PipiR.addBox(0F, 0F, 0F, 11, 1, 1); + PipiR.setRotationPoint(-13F, 1.5F, 1.5F); + PipiR.setTextureSize(128, 64); + PipiR.mirror = true; + setRotation(PipiR, 0F, 0F, 0F); + ConnectorFront = new ModelRenderer(this, 0, 17); + ConnectorFront.addBox(0F, 0F, 0F, 3, 3, 1); + ConnectorFront.setRotationPoint(-14.5F, 4F, -0.5F); + ConnectorFront.setTextureSize(128, 64); + ConnectorFront.mirror = true; + setRotation(ConnectorFront, 0F, 0F, 0F); + ConnectorBFront = new ModelRenderer(this, 8, 18); + ConnectorBFront.addBox(0F, 0F, -1F, 1, 4, 1); + ConnectorBFront.setRotationPoint(-14F, 6F, 0.5F); + ConnectorBFront.setTextureSize(128, 64); + ConnectorBFront.mirror = true; + setRotation(ConnectorBFront, -0.7853982F, 0F, 0F); + ConnectorBBack = new ModelRenderer(this, 12, 18); + ConnectorBBack.addBox(0F, 0F, -1F, 1, 4, 1); + ConnectorBBack.setRotationPoint(-3F, 6F, 0.5F); + ConnectorBBack.setTextureSize(128, 64); + ConnectorBBack.mirror = true; + setRotation(ConnectorBBack, -0.7853982F, 0F, 0F); + Connector = new ModelRenderer(this, 18, 26); + Connector.addBox(0F, 3.5F, -1.5F, 12, 2, 2); + Connector.setRotationPoint(-14F, 6F, 0.5F); + Connector.setTextureSize(128, 64); + Connector.mirror = true; + setRotation(Connector, -0.7853982F, 0F, 0F); + ConnectorStrut = new ModelRenderer(this, 18, 24); + ConnectorStrut.addBox(0F, 2F, -1F, 10, 1, 1); + ConnectorStrut.setRotationPoint(-13F, 6F, 0.5F); + ConnectorStrut.setTextureSize(128, 64); + ConnectorStrut.mirror = true; + setRotation(ConnectorStrut, -0.7853982F, 0F, 0F); + PipeLarge = new ModelRenderer(this, 46, 30); + PipeLarge.addBox(0F, 0F, 0F, 8, 2, 2); + PipeLarge.setRotationPoint(-9.5F, 7F, -1F); + PipeLarge.setTextureSize(128, 64); + PipeLarge.mirror = true; + setRotation(PipeLarge, 0F, 0F, 0F); + PipeLargeBack = new ModelRenderer(this, 46, 22); + PipeLargeBack.addBox(0F, 0F, 0F, 2, 7, 1); + PipeLargeBack.setRotationPoint(-4F, 2F, 2F); + PipeLargeBack.setTextureSize(128, 64); + PipeLargeBack.mirror = true; + setRotation(PipeLargeBack, 0F, 0F, 0F); + PipiLargeConnector = new ModelRenderer(this, 40, 23); + PipiLargeConnector.addBox(0F, 0F, 0F, 2, 2, 1); + PipiLargeConnector.setRotationPoint(-4F, 7F, 1F); + PipiLargeConnector.setTextureSize(128, 64); + PipiLargeConnector.mirror = true; + setRotation(PipiLargeConnector, 0F, 0F, 0F); + PlateFront = new ModelRenderer(this, 20, 15); + PlateFront.addBox(0F, 0F, 0F, 1, 4, 5); + PlateFront.setRotationPoint(-13F, 1.5F, -2.5F); + PlateFront.setTextureSize(128, 64); + PlateFront.mirror = true; + setRotation(PlateFront, 0F, 0F, 0.6108652F); + ScaffoldFront = new ModelRenderer(this, 0, 13); + ScaffoldFront.addBox(0F, 0F, 0F, 1, 1, 3); + ScaffoldFront.setRotationPoint(-13F, 7F, -0.5F); + ScaffoldFront.setTextureSize(128, 64); + ScaffoldFront.mirror = true; + setRotation(ScaffoldFront, 0F, 0F, 0F); + ScaffoldBottom = new ModelRenderer(this, 0, 11); + ScaffoldBottom.addBox(0F, 0F, 0F, 8, 1, 1); + ScaffoldBottom.setRotationPoint(-12F, 7F, 1.5F); + ScaffoldBottom.setTextureSize(128, 64); + ScaffoldBottom.mirror = true; + setRotation(ScaffoldBottom, 0F, 0F, 0F); + ScaffoldBack = new ModelRenderer(this, 32, 18); + ScaffoldBack.addBox(0F, 0F, 0F, 1, 5, 1); + ScaffoldBack.setRotationPoint(-5F, 2.5F, 1.5F); + ScaffoldBack.setTextureSize(128, 64); + ScaffoldBack.mirror = true; + setRotation(ScaffoldBack, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Body.render(f5); + Barrel1.render(f5); + Barrel2.render(f5); + BarrelBack.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + BarrelNozzle.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + TankF1.render(f5); + TankF2.render(f5); + TankF3.render(f5); + TankB1.render(f5); + TankB2.render(f5); + TankB3.render(f5); + Drum1.render(f5); + Drum2.render(f5); + BodyBACK.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + PipeLPlate.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + BodyBottom.render(f5); + Handle.render(f5); + Trigger.render(f5); + CoolingBlock.render(f5); + BodyCenter.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + PipeRPlate.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + StockTop.render(f5); + StockFront.render(f5); + StockBack.render(f5); + StockBottom.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + PipeLPlateB.render(f5); + PipeRPlateB.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + StockConnector.render(f5); + PipeTL.render(f5); + PipeBL.render(f5); + PipeTR.render(f5); + PipeBR.render(f5); + PipeL.render(f5); + PipiR.render(f5); + ConnectorFront.render(f5); + ConnectorBFront.render(f5); + ConnectorBBack.render(f5); + Connector.render(f5); + ConnectorStrut.render(f5); + PipeLarge.render(f5); + PipeLargeBack.render(f5); + PipiLargeConnector.render(f5); + PlateFront.render(f5); + ScaffoldFront.render(f5); + ScaffoldBottom.render(f5); + ScaffoldBack.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/model/ModelEMPRay.java b/com/hbm/render/model/ModelEMPRay.java new file mode 100644 index 000000000..9f98c5412 --- /dev/null +++ b/com/hbm/render/model/ModelEMPRay.java @@ -0,0 +1,392 @@ +// Date: 07.11.2016 21:36:37 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + + + + + + +package com.hbm.render.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelEMPRay extends ModelBase +{ + //fields + ModelRenderer Body; + ModelRenderer BodyConnector; + ModelRenderer BodyFront; + ModelRenderer BodyPlateLeft; + ModelRenderer BodyPlateRight; + ModelRenderer BodyPlateBottom; + ModelRenderer Rib1; + ModelRenderer Rib2; + ModelRenderer Rib3; + ModelRenderer Rib4; + ModelRenderer Rib5; + ModelRenderer Rib6; + ModelRenderer Rib7; + ModelRenderer Stock; + ModelRenderer StockBottom; + ModelRenderer StockPlate; + ModelRenderer CrankPivot; + ModelRenderer CrankPlate; + ModelRenderer CrankHandleBase; + ModelRenderer CrankHandle; + ModelRenderer HandlePivot; + ModelRenderer HandleLeft; + ModelRenderer HandleRight; + ModelRenderer Handle; + ModelRenderer ShieldTop; + ModelRenderer ShieldBottom; + ModelRenderer Battery; + ModelRenderer BatteryTop; + ModelRenderer BatteryBottom; + ModelRenderer Wire; + ModelRenderer SpindelPivot; + ModelRenderer SpindelBase1; + ModelRenderer Coil1; + ModelRenderer SpindelTip1; + ModelRenderer SpindelBase2; + ModelRenderer Coil2; + ModelRenderer SpindelTip2; + ModelRenderer SpindelBase3; + ModelRenderer Coil3; + ModelRenderer SpindelTip3; + ModelRenderer WireRight; + ModelRenderer WireLeft; + + public ModelEMPRay() + { + textureWidth = 256; + textureHeight = 128; + + Body = new ModelRenderer(this, 0, 96); + Body.addBox(0F, 0F, 0F, 20, 16, 16); + Body.setRotationPoint(0F, 0F, -8F); + Body.setTextureSize(64, 32); + Body.mirror = true; + setRotation(Body, 0F, 0F, 0F); + BodyConnector = new ModelRenderer(this, 0, 80); + BodyConnector.addBox(0F, 0F, 0F, 15, 8, 8); + BodyConnector.setRotationPoint(-15F, 0F, -4F); + BodyConnector.setTextureSize(64, 32); + BodyConnector.mirror = true; + setRotation(BodyConnector, 0F, 0F, 0F); + BodyFront = new ModelRenderer(this, 72, 96); + BodyFront.addBox(0F, 0F, 0F, 5, 16, 16); + BodyFront.setRotationPoint(-20F, 0F, -8F); + BodyFront.setTextureSize(64, 32); + BodyFront.mirror = true; + setRotation(BodyFront, 0F, 0F, 0F); + BodyPlateLeft = new ModelRenderer(this, 46, 84); + BodyPlateLeft.addBox(-16F, 0F, 0F, 16, 8, 4); + BodyPlateLeft.setRotationPoint(0F, 0F, -8F); + BodyPlateLeft.setTextureSize(64, 32); + BodyPlateLeft.mirror = true; + setRotation(BodyPlateLeft, 0F, 0.2617994F, 0F); + BodyPlateRight = new ModelRenderer(this, 86, 84); + BodyPlateRight.addBox(-16F, 0F, -4F, 16, 8, 4); + BodyPlateRight.setRotationPoint(0F, 0F, 8F); + BodyPlateRight.setTextureSize(64, 32); + BodyPlateRight.mirror = true; + setRotation(BodyPlateRight, 0F, -0.2617994F, 0F); + BodyPlateBottom = new ModelRenderer(this, 0, 65); + BodyPlateBottom.addBox(-18F, -7F, 0F, 18, 7, 8); + BodyPlateBottom.setRotationPoint(0F, 16F, -4F); + BodyPlateBottom.setTextureSize(64, 32); + BodyPlateBottom.mirror = true; + setRotation(BodyPlateBottom, 0F, 0F, 0.4886922F); + Rib1 = new ModelRenderer(this, 240, 0); + Rib1.addBox(0F, 0F, 0F, 0, 8, 8); + Rib1.setRotationPoint(-13.5F, 8F, -4F); + Rib1.setTextureSize(64, 32); + Rib1.mirror = true; + setRotation(Rib1, 0F, 0F, 0F); + Rib2 = new ModelRenderer(this, 222, 0); + Rib2.addBox(0F, 0F, 0F, 0, 8, 9); + Rib2.setRotationPoint(-11.5F, 8F, -4.5F); + Rib2.setTextureSize(64, 32); + Rib2.mirror = true; + setRotation(Rib2, 0F, 0F, 0F); + Rib3 = new ModelRenderer(this, 202, 0); + Rib3.addBox(0F, 0F, 0F, 0, 8, 10); + Rib3.setRotationPoint(-9.5F, 8F, -5F); + Rib3.setTextureSize(64, 32); + Rib3.mirror = true; + setRotation(Rib3, 0F, 0F, 0F); + Rib4 = new ModelRenderer(this, 180, 0); + Rib4.addBox(0F, 0F, 0F, 0, 8, 11); + Rib4.setRotationPoint(-7.5F, 8F, -5.5F); + Rib4.setTextureSize(64, 32); + Rib4.mirror = true; + setRotation(Rib4, 0F, 0F, 0F); + Rib5 = new ModelRenderer(this, 156, 0); + Rib5.addBox(0F, 0F, 0F, 0, 8, 12); + Rib5.setRotationPoint(-5.5F, 8F, -6F); + Rib5.setTextureSize(64, 32); + Rib5.mirror = true; + setRotation(Rib5, 0F, 0F, 0F); + Rib6 = new ModelRenderer(this, 130, 0); + Rib6.addBox(0F, 0F, 0F, 0, 8, 13); + Rib6.setRotationPoint(-3.5F, 8F, -6.5F); + Rib6.setTextureSize(64, 32); + Rib6.mirror = true; + setRotation(Rib6, 0F, 0F, 0F); + Rib7 = new ModelRenderer(this, 102, 0); + Rib7.addBox(0F, 0F, 0F, 0, 8, 14); + Rib7.setRotationPoint(-1.5F, 8F, -7F); + Rib7.setTextureSize(64, 32); + Rib7.mirror = true; + setRotation(Rib7, 0F, 0F, 0F); + Stock = new ModelRenderer(this, 114, 116); + Stock.addBox(0F, 0F, 0F, 25, 6, 6); + Stock.setRotationPoint(20F, 10F, -3F); + Stock.setTextureSize(64, 32); + Stock.mirror = true; + setRotation(Stock, 0F, 0F, 0F); + StockBottom = new ModelRenderer(this, 114, 104); + StockBottom.addBox(0F, 0F, 0F, 4, 6, 6); + StockBottom.setRotationPoint(41F, 16F, -3F); + StockBottom.setTextureSize(64, 32); + StockBottom.mirror = true; + setRotation(StockBottom, 0F, 0F, 0F); + StockPlate = new ModelRenderer(this, 134, 92); + StockPlate.addBox(0F, -18F, 0F, 6, 18, 6); + StockPlate.setRotationPoint(41F, 22F, -3F); + StockPlate.setTextureSize(64, 32); + StockPlate.mirror = true; + setRotation(StockPlate, 0F, 0F, -1.22173F); + CrankPivot = new ModelRenderer(this, 0, 63); + CrankPivot.addBox(0F, -0.5F, -0.5F, 3, 1, 1); + CrankPivot.setRotationPoint(20F, 2F, 0F); + CrankPivot.setTextureSize(64, 32); + CrankPivot.mirror = true; + setRotation(CrankPivot, -0.4363323F, 0F, 0F); + CrankPlate = new ModelRenderer(this, 0, 55); + CrankPlate.addBox(0F, -1F, -1F, 1, 6, 2); + CrankPlate.setRotationPoint(21.5F, 2F, 0F); + CrankPlate.setTextureSize(64, 32); + CrankPlate.mirror = true; + setRotation(CrankPlate, -0.4363323F, 0F, 0F); + CrankHandleBase = new ModelRenderer(this, 0, 53); + CrankHandleBase.addBox(0F, 3.5F, -0.5F, 2, 1, 1); + CrankHandleBase.setRotationPoint(22F, 2F, 0F); + CrankHandleBase.setTextureSize(64, 32); + CrankHandleBase.mirror = true; + setRotation(CrankHandleBase, -0.4363323F, 0F, 0F); + CrankHandle = new ModelRenderer(this, 0, 49); + CrankHandle.addBox(0F, 3F, -1F, 6, 2, 2); + CrankHandle.setRotationPoint(24F, 2F, 0F); + CrankHandle.setTextureSize(64, 32); + CrankHandle.mirror = true; + setRotation(CrankHandle, -0.4363323F, 0F, 0F); + HandlePivot = new ModelRenderer(this, 52, 60); + HandlePivot.addBox(-1F, -1F, 0F, 2, 2, 22); + HandlePivot.setRotationPoint(7F, 7F, -11F); + HandlePivot.setTextureSize(64, 32); + HandlePivot.mirror = true; + setRotation(HandlePivot, 0F, 0F, 0.4363323F); + HandleLeft = new ModelRenderer(this, 100, 67); + HandleLeft.addBox(-1.5F, -14F, 0F, 3, 16, 1); + HandleLeft.setRotationPoint(7F, 7F, -9.5F); + HandleLeft.setTextureSize(64, 32); + HandleLeft.mirror = true; + setRotation(HandleLeft, 0F, 0F, 0.4363323F); + HandleRight = new ModelRenderer(this, 108, 67); + HandleRight.addBox(-1.5F, -14F, 0F, 3, 16, 1); + HandleRight.setRotationPoint(7F, 7F, 8.5F); + HandleRight.setTextureSize(64, 32); + HandleRight.mirror = true; + setRotation(HandleRight, 0F, 0F, 0.4363323F); + Handle = new ModelRenderer(this, 52, 31); + Handle.addBox(-2.5F, -19F, 0F, 5, 5, 24); + Handle.setRotationPoint(7F, 7F, -12F); + Handle.setTextureSize(64, 32); + Handle.mirror = true; + setRotation(Handle, 0F, 0F, 0.4363323F); + ShieldTop = new ModelRenderer(this, 64, 0); + ShieldTop.addBox(0F, 0F, 0F, 0, 12, 18); + ShieldTop.setRotationPoint(-11F, -14F, -9F); + ShieldTop.setTextureSize(64, 32); + ShieldTop.mirror = true; + setRotation(ShieldTop, 0F, 0F, 0F); + ShieldBottom = new ModelRenderer(this, 36, 0); + ShieldBottom.addBox(0F, 0F, 0F, 0, 9, 14); + ShieldBottom.setRotationPoint(-11F, -2F, -7F); + ShieldBottom.setTextureSize(64, 32); + ShieldBottom.mirror = true; + setRotation(ShieldBottom, 0F, 0F, -0.6981317F); + Battery = new ModelRenderer(this, 10, 56); + Battery.addBox(0F, 0F, 0F, 4, 6, 3); + Battery.setRotationPoint(13F, 6F, -11F); + Battery.setTextureSize(64, 32); + Battery.mirror = true; + setRotation(Battery, 0F, 0F, 0F); + BatteryTop = new ModelRenderer(this, 24, 60); + BatteryTop.addBox(0F, 0F, 0F, 5, 1, 4); + BatteryTop.setRotationPoint(12.5F, 5F, -11.5F); + BatteryTop.setTextureSize(64, 32); + BatteryTop.mirror = true; + setRotation(BatteryTop, 0F, 0F, 0F); + BatteryBottom = new ModelRenderer(this, 24, 55); + BatteryBottom.addBox(0F, 0F, 0F, 5, 1, 4); + BatteryBottom.setRotationPoint(12.5F, 12F, -11.5F); + BatteryBottom.setTextureSize(64, 32); + BatteryBottom.mirror = true; + setRotation(BatteryBottom, 0F, 0F, 0F); + Wire = new ModelRenderer(this, 0, 44); + Wire.addBox(0F, -4F, 0F, 2, 4, 1); + Wire.setRotationPoint(14F, 5F, -10F); + Wire.setTextureSize(64, 32); + Wire.mirror = true; + setRotation(Wire, -0.5235988F, 0F, 0F); + SpindelPivot = new ModelRenderer(this, 0, 36); + SpindelPivot.addBox(0F, 0F, 0F, 4, 3, 3); + SpindelPivot.setRotationPoint(-24F, 8.5F, -1.5F); + SpindelPivot.setTextureSize(64, 32); + SpindelPivot.mirror = true; + setRotation(SpindelPivot, 0F, 0F, 0F); + SpindelBase1 = new ModelRenderer(this, 0, 27); + SpindelBase1.addBox(0F, -5F, -1F, 2, 5, 2); + SpindelBase1.setRotationPoint(-23F, 10F, 0F); + SpindelBase1.setTextureSize(64, 32); + SpindelBase1.mirror = true; + setRotation(SpindelBase1, 0F, 0F, 0F); + Coil1 = new ModelRenderer(this, 0, 17); + Coil1.addBox(0F, -6F, -2F, 12, 4, 4); + Coil1.setRotationPoint(-35F, 10F, 0F); + Coil1.setTextureSize(64, 32); + Coil1.mirror = true; + setRotation(Coil1, 0F, 0F, 0F); + SpindelTip1 = new ModelRenderer(this, 0, 11); + SpindelTip1.addBox(0F, -5F, -1F, 1, 2, 2); + SpindelTip1.setRotationPoint(-36F, 10F, 0F); + SpindelTip1.setTextureSize(64, 32); + SpindelTip1.mirror = true; + setRotation(SpindelTip1, 0F, 0F, 0F); + SpindelBase2 = new ModelRenderer(this, 0, 27); + SpindelBase2.addBox(0F, -5F, -1F, 2, 5, 2); + SpindelBase2.setRotationPoint(-23F, 10F, 0F); + SpindelBase2.setTextureSize(64, 32); + SpindelBase2.mirror = true; + setRotation(SpindelBase2, 2.094395F, 0F, 0F); + Coil2 = new ModelRenderer(this, 0, 17); + Coil2.addBox(0F, -6F, -2F, 12, 4, 4); + Coil2.setRotationPoint(-35F, 10F, 0F); + Coil2.setTextureSize(64, 32); + Coil2.mirror = true; + setRotation(Coil2, 2.094395F, 0F, 0F); + SpindelTip2 = new ModelRenderer(this, 0, 11); + SpindelTip2.addBox(0F, -5F, -1F, 1, 2, 2); + SpindelTip2.setRotationPoint(-36F, 10F, 0F); + SpindelTip2.setTextureSize(64, 32); + SpindelTip2.mirror = true; + setRotation(SpindelTip2, 2.094395F, 0F, 0F); + SpindelBase3 = new ModelRenderer(this, 0, 27); + SpindelBase3.addBox(0F, -5F, -1F, 2, 5, 2); + SpindelBase3.setRotationPoint(-23F, 10F, 0F); + SpindelBase3.setTextureSize(64, 32); + SpindelBase3.mirror = true; + setRotation(SpindelBase3, -2.094395F, 0F, 0F); + Coil3 = new ModelRenderer(this, 0, 17); + Coil3.addBox(0F, -6F, -2F, 12, 4, 4); + Coil3.setRotationPoint(-35F, 10F, 0F); + Coil3.setTextureSize(64, 32); + Coil3.mirror = true; + setRotation(Coil3, -2.094395F, 0F, 0F); + SpindelTip3 = new ModelRenderer(this, 0, 11); + SpindelTip3.addBox(0F, -5F, -1F, 1, 2, 2); + SpindelTip3.setRotationPoint(-36F, 10F, 0F); + SpindelTip3.setTextureSize(64, 32); + SpindelTip3.mirror = true; + setRotation(SpindelTip3, -2.094395F, 0F, 0F); + WireRight = new ModelRenderer(this, 0, 2); + WireRight.addBox(0F, 0F, 0F, 15, 1, 1); + WireRight.setRotationPoint(-15F, 13F, 4F); + WireRight.setTextureSize(64, 32); + WireRight.mirror = true; + setRotation(WireRight, 0F, 0F, 0F); + WireLeft = new ModelRenderer(this, 0, 0); + WireLeft.addBox(0F, 0F, 0F, 15, 1, 1); + WireLeft.setRotationPoint(-15F, 13F, -5F); + WireLeft.setTextureSize(64, 32); + WireLeft.mirror = true; + setRotation(WireLeft, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, float rot) + { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Body.render(f5); + BodyConnector.render(f5); + BodyFront.render(f5); + BodyPlateLeft.render(f5); + BodyPlateRight.render(f5); + BodyPlateBottom.render(f5); + Rib1.render(f5); + Rib2.render(f5); + Rib3.render(f5); + Rib4.render(f5); + Rib5.render(f5); + Rib6.render(f5); + Rib7.render(f5); + Stock.render(f5); + StockBottom.render(f5); + StockPlate.render(f5); + CrankPivot.render(f5); + CrankPlate.render(f5); + CrankHandleBase.render(f5); + CrankHandle.render(f5); + HandlePivot.render(f5); + HandleLeft.render(f5); + HandleRight.render(f5); + Handle.render(f5); + ShieldTop.render(f5); + ShieldBottom.render(f5); + Battery.render(f5); + BatteryTop.render(f5); + BatteryBottom.render(f5); + Wire.render(f5); + SpindelPivot.render(f5); + SpindelBase1.rotateAngleX += rot; + Coil1.rotateAngleX += rot; + SpindelTip1.rotateAngleX += rot; + SpindelBase2.rotateAngleX += rot; + Coil2.rotateAngleX += rot; + SpindelTip2.rotateAngleX += rot; + SpindelBase3.rotateAngleX += rot; + Coil3.rotateAngleX += rot; + SpindelTip3.rotateAngleX += rot; + SpindelBase1.render(f5); + Coil1.render(f5); + SpindelTip1.render(f5); + SpindelBase2.render(f5); + Coil2.render(f5); + SpindelTip2.render(f5); + SpindelBase3.render(f5); + Coil3.render(f5); + SpindelTip3.render(f5); + WireRight.render(f5); + WireLeft.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/ModelFatman.java b/com/hbm/render/model/ModelFatman.java similarity index 97% rename from com/hbm/render/ModelFatman.java rename to com/hbm/render/model/ModelFatman.java index 3887c5331..a40447b4d 100644 --- a/com/hbm/render/ModelFatman.java +++ b/com/hbm/render/model/ModelFatman.java @@ -9,7 +9,9 @@ -package com.hbm.render; +package com.hbm.render.model; + +import org.lwjgl.opengl.GL11; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; @@ -262,14 +264,20 @@ public class ModelFatman extends ModelBase super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); Shape1.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); Shape2.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); Shape3.render(f5); Shape4.render(f5); Shape5.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); Shape6.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); Shape7.render(f5); Shape8.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); Shape9.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); Shape10.render(f5); Shape11.render(f5); Shape12.render(f5); diff --git a/com/hbm/render/ModelGasMask.java b/com/hbm/render/model/ModelGasMask.java similarity index 99% rename from com/hbm/render/ModelGasMask.java rename to com/hbm/render/model/ModelGasMask.java index b9c18ccf0..8592cb7e5 100644 --- a/com/hbm/render/ModelGasMask.java +++ b/com/hbm/render/model/ModelGasMask.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/ModelGoggles.java b/com/hbm/render/model/ModelGoggles.java similarity index 99% rename from com/hbm/render/ModelGoggles.java rename to com/hbm/render/model/ModelGoggles.java index 8f20778f7..51a1f26b1 100644 --- a/com/hbm/render/ModelGoggles.java +++ b/com/hbm/render/model/ModelGoggles.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/ModelGun.java b/com/hbm/render/model/ModelGun.java similarity index 99% rename from com/hbm/render/ModelGun.java rename to com/hbm/render/model/ModelGun.java index f441558cf..2fcd6f690 100644 --- a/com/hbm/render/ModelGun.java +++ b/com/hbm/render/model/ModelGun.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelHunterChopper.java b/com/hbm/render/model/ModelHunterChopper.java similarity index 95% rename from com/hbm/render/ModelHunterChopper.java rename to com/hbm/render/model/ModelHunterChopper.java index 21115d676..dcc30360f 100644 --- a/com/hbm/render/ModelHunterChopper.java +++ b/com/hbm/render/model/ModelHunterChopper.java @@ -4,9 +4,9 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX -package com.hbm.render; +package com.hbm.render.model; -import com.hbm.entity.EntityHunterChopper; +import com.hbm.entity.mob.EntityHunterChopper; import com.hbm.main.MainRegistry; import net.minecraft.client.model.ModelBase; @@ -65,6 +65,7 @@ public class ModelHunterChopper extends ModelBase { ModelRenderer GunPivot; ModelRenderer GunBarrel; ModelRenderer GunBack; + float f = 0.1F; public ModelHunterChopper() { textureWidth = 256; @@ -245,8 +246,8 @@ public class ModelHunterChopper extends ModelBase { TailRotorBottom.mirror = true; setRotation(TailRotorBottom, 0F, 0F, 0F); TailRotorBlades = new ModelRenderer(this, 120, 120); - TailRotorBlades.addBox(0F, 0F, 0F, 3, 3, 0); - TailRotorBlades.setRotationPoint(17F, 7F, 0F); + TailRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0); + TailRotorBlades.setRotationPoint(17F + 1.5F, 7F + 1.5F, 0F); TailRotorBlades.setTextureSize(256, 128); TailRotorBlades.mirror = true; setRotation(TailRotorBlades, 0F, 0F, 0F); @@ -323,8 +324,8 @@ public class ModelHunterChopper extends ModelBase { TorsoRotorBack.mirror = true; setRotation(TorsoRotorBack, 0F, 0F, 0F); TorsoRotorBlades = new ModelRenderer(this, 112, 120); - TorsoRotorBlades.addBox(0F, 0F, 0F, 3, 3, 0); - TorsoRotorBlades.setRotationPoint(-7F, 8.5F, 0F); + TorsoRotorBlades.addBox(-1.5F, -1.5F, 0F, 3, 3, 0); + TorsoRotorBlades.setRotationPoint(-7F + 1.5F, 8.5F + 1.5F, 0F); TorsoRotorBlades.setTextureSize(256, 128); TorsoRotorBlades.mirror = true; setRotation(TorsoRotorBlades, 0F, 0F, 0F); @@ -422,9 +423,9 @@ public class ModelHunterChopper extends ModelBase { RotorBlades.render(f5); Antenna1.render(f5); Antenna2.render(f5); - GunPivot.render(f5); - GunBarrel.render(f5); - GunBack.render(f5); + //GunPivot.render(f5); + //GunBarrel.render(f5); + //GunBack.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { @@ -485,15 +486,13 @@ public class ModelHunterChopper extends ModelBase { RotorBlades.render(f5); Antenna1.render(f5); Antenna2.render(f5); - GunPivot.render(f5); - GunBarrel.render(f5); - GunBack.render(f5); - } + //GunPivot.render(f5); + //GunBarrel.render(f5); + //GunBack.render(f5); - public void setGunRotations(EntityHunterChopper rocket, float yaw, float pitch) { - setRotation(GunBarrel, 0F, (rocket.getYaw() - yaw) / (180F / (float)Math.PI), (rocket.getPitch() - pitch) / (180F / (float)Math.PI)); - setRotation(GunBack, 0F, (rocket.getYaw() - yaw) / (180F / (float)Math.PI), (rocket.getPitch() - pitch) / (180F / (float)Math.PI)); - //System.out.println(rocket.getYaw()); + RotorBlades.rotateAngleY += f * 5; + TorsoRotorBlades.rotateAngleZ += f * 5; + TailRotorBlades.rotateAngleZ += f * 5; } } diff --git a/com/hbm/render/model/ModelImmolator.java b/com/hbm/render/model/ModelImmolator.java new file mode 100644 index 000000000..0786e1e78 --- /dev/null +++ b/com/hbm/render/model/ModelImmolator.java @@ -0,0 +1,245 @@ +// Date: 22.11.2016 22:40:09 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelImmolator extends ModelBase { + // fields + ModelRenderer CylinderBase; + ModelRenderer CylinderFront; + ModelRenderer PipeBBase; + ModelRenderer PipeB; + ModelRenderer TipBase; + ModelRenderer PipeL; + ModelRenderer PipeLFront; + ModelRenderer TipFront; + ModelRenderer ChamberH; + ModelRenderer ChamberW; + ModelRenderer PipeTBack; + ModelRenderer PipeTBase; + ModelRenderer PipeT; + ModelRenderer PipeTFront; + ModelRenderer Body; + ModelRenderer Tank; + ModelRenderer HandleBase; + ModelRenderer HandleBar; + ModelRenderer HandleGrip; + ModelRenderer BodyPlate; + ModelRenderer ValveFront; + ModelRenderer ValveCenter; + ModelRenderer Stock; + ModelRenderer LatchBase; + ModelRenderer LatchHandle; + ModelRenderer ValveBack; + + public ModelImmolator() { + textureWidth = 64; + textureHeight = 32; + + CylinderBase = new ModelRenderer(this, 0, 0); + CylinderBase.addBox(0F, 0F, 0F, 2, 4, 4); + CylinderBase.setRotationPoint(0F, 0F, -2F); + CylinderBase.setTextureSize(64, 32); + CylinderBase.mirror = true; + setRotation(CylinderBase, 0F, 0F, 0F); + CylinderFront = new ModelRenderer(this, 0, 8); + CylinderFront.addBox(0F, 0F, 0F, 1, 3, 3); + CylinderFront.setRotationPoint(-1F, 0.5F, -1.5F); + CylinderFront.setTextureSize(64, 32); + CylinderFront.mirror = true; + setRotation(CylinderFront, 0F, 0F, 0F); + PipeBBase = new ModelRenderer(this, 0, 14); + PipeBBase.addBox(0F, 0F, 0F, 2, 2, 2); + PipeBBase.setRotationPoint(-2F, 2F, 0F); + PipeBBase.setTextureSize(64, 32); + PipeBBase.mirror = true; + setRotation(PipeBBase, 0F, 0F, 0F); + PipeB = new ModelRenderer(this, 0, 18); + PipeB.addBox(0F, 0F, 0F, 8, 1, 1); + PipeB.setRotationPoint(-10F, 2.5F, 0.5F); + PipeB.setTextureSize(64, 32); + PipeB.mirror = true; + setRotation(PipeB, 0F, 0F, 0F); + TipBase = new ModelRenderer(this, 8, 8); + TipBase.addBox(0F, 0F, 0F, 2, 2, 2); + TipBase.setRotationPoint(-12F, 1.5F, -0.5F); + TipBase.setTextureSize(64, 32); + TipBase.mirror = true; + setRotation(TipBase, 0F, 0F, 0F); + PipeL = new ModelRenderer(this, 0, 20); + PipeL.addBox(0F, 0F, 0F, 7, 1, 1); + PipeL.setRotationPoint(-7F, 2.5F, -1.5F); + PipeL.setTextureSize(64, 32); + PipeL.mirror = true; + setRotation(PipeL, 0F, 0F, 0F); + PipeLFront = new ModelRenderer(this, 0, 22); + PipeLFront.addBox(-4F, 0F, 0F, 4, 1, 1); + PipeLFront.setRotationPoint(-7F, 2.5F, -1.5F); + PipeLFront.setTextureSize(64, 32); + PipeLFront.mirror = true; + setRotation(PipeLFront, 0F, 0.4363323F, 0F); + TipFront = new ModelRenderer(this, 8, 12); + TipFront.addBox(0F, 0F, 0F, 2, 1, 1); + TipFront.setRotationPoint(-14F, 2F, 0F); + TipFront.setTextureSize(64, 32); + TipFront.mirror = true; + setRotation(TipFront, 0F, 0F, 0F); + ChamberH = new ModelRenderer(this, 24, 0); + ChamberH.addBox(0F, 0F, 0F, 4, 5, 4); + ChamberH.setRotationPoint(2F, -0.5F, -2F); + ChamberH.setTextureSize(64, 32); + ChamberH.mirror = true; + setRotation(ChamberH, 0F, 0F, 0F); + ChamberW = new ModelRenderer(this, 40, 0); + ChamberW.addBox(0F, 0F, 0F, 4, 4, 5); + ChamberW.setRotationPoint(2F, 0F, -2.5F); + ChamberW.setTextureSize(64, 32); + ChamberW.mirror = true; + setRotation(ChamberW, 0F, 0F, 0F); + PipeTBack = new ModelRenderer(this, 0, 24); + PipeTBack.addBox(0F, 0F, 0F, 6, 1, 1); + PipeTBack.setRotationPoint(0F, -2F, 2.5F); + PipeTBack.setTextureSize(64, 32); + PipeTBack.mirror = true; + setRotation(PipeTBack, -0.4363323F, 0F, 0F); + PipeTBase = new ModelRenderer(this, 8, 14); + PipeTBase.addBox(0F, 1F, 0F, 1, 2, 1); + PipeTBase.setRotationPoint(1F, -2F, 2.5F); + PipeTBase.setTextureSize(64, 32); + PipeTBase.mirror = true; + setRotation(PipeTBase, -0.4363323F, 0F, 0F); + PipeT = new ModelRenderer(this, 0, 26); + PipeT.addBox(-9F, 0F, 0F, 9, 1, 1); + PipeT.setRotationPoint(0F, -2F, 2.5F); + PipeT.setTextureSize(64, 32); + PipeT.mirror = true; + setRotation(PipeT, -0.4363323F, -0.296706F, -0.4014257F); + PipeTFront = new ModelRenderer(this, 0, 28); + PipeTFront.addBox(0F, 0F, 0F, 3, 1, 1); + PipeTFront.setRotationPoint(-10F, 1.5F, 0F); + PipeTFront.setTextureSize(64, 32); + PipeTFront.mirror = true; + setRotation(PipeTFront, 0F, 0F, 0F); + Body = new ModelRenderer(this, 24, 9); + Body.addBox(0F, 0F, 0F, 10, 4, 4); + Body.setRotationPoint(6F, 0.5F, -1.5F); + Body.setTextureSize(64, 32); + Body.mirror = true; + setRotation(Body, 0F, 0F, 0F); + Tank = new ModelRenderer(this, 12, 0); + Tank.addBox(0F, 0F, 0F, 3, 3, 2); + Tank.setRotationPoint(6F, 1F, -3F); + Tank.setTextureSize(64, 32); + Tank.mirror = true; + setRotation(Tank, 0F, 0F, 0F); + HandleBase = new ModelRenderer(this, 24, 17); + HandleBase.addBox(0F, 0F, 0F, 2, 2, 1); + HandleBase.setRotationPoint(4F, 1F, -3F); + HandleBase.setTextureSize(64, 32); + HandleBase.mirror = true; + setRotation(HandleBase, 0F, 0F, 0F); + HandleBar = new ModelRenderer(this, 30, 17); + HandleBar.addBox(0F, 0F, 0F, 1, 1, 2); + HandleBar.setRotationPoint(4.5F, 1.5F, -5F); + HandleBar.setTextureSize(64, 32); + HandleBar.mirror = true; + setRotation(HandleBar, 0F, 0F, 0F); + HandleGrip = new ModelRenderer(this, 36, 17); + HandleGrip.addBox(0F, 0F, -2F, 1, 1, 2); + HandleGrip.setRotationPoint(4.5F, 1.5F, -5F); + HandleGrip.setTextureSize(64, 32); + HandleGrip.mirror = true; + setRotation(HandleGrip, 0F, -0.3490659F, 0F); + BodyPlate = new ModelRenderer(this, 24, 20); + BodyPlate.addBox(0F, 0F, 0F, 10, 1, 2); + BodyPlate.setRotationPoint(6F, 0F, 0F); + BodyPlate.setTextureSize(64, 32); + BodyPlate.mirror = true; + setRotation(BodyPlate, 0F, 0F, 0F); + ValveFront = new ModelRenderer(this, 0, 30); + ValveFront.addBox(0F, 0F, 0F, 1, 1, 1); + ValveFront.setRotationPoint(8F, -0.5F, 0.5F); + ValveFront.setTextureSize(64, 32); + ValveFront.mirror = true; + setRotation(ValveFront, 0F, 0F, 0F); + ValveCenter = new ModelRenderer(this, 4, 30); + ValveCenter.addBox(0F, 0F, 0F, 1, 1, 1); + ValveCenter.setRotationPoint(11F, -0.5F, 0.5F); + ValveCenter.setTextureSize(64, 32); + ValveCenter.mirror = true; + setRotation(ValveCenter, 0F, 0F, 0F); + Stock = new ModelRenderer(this, 24, 23); + Stock.addBox(0F, 0F, 0F, 2, 4, 2); + Stock.setRotationPoint(16F, 0.5F, 0F); + Stock.setTextureSize(64, 32); + Stock.mirror = true; + setRotation(Stock, 0F, 0F, 0F); + LatchBase = new ModelRenderer(this, 8, 28); + LatchBase.addBox(0F, 0F, 0F, 2, 1, 1); + LatchBase.setRotationPoint(16F, 0.5F, 2F); + LatchBase.setTextureSize(64, 32); + LatchBase.mirror = true; + setRotation(LatchBase, 0F, 0F, 0F); + LatchHandle = new ModelRenderer(this, 32, 23); + LatchHandle.addBox(0F, 0F, 0F, 2, 3, 1); + LatchHandle.setRotationPoint(16F, 0.5F, 3F); + LatchHandle.setTextureSize(64, 32); + LatchHandle.mirror = true; + setRotation(LatchHandle, 0F, 0F, 0F); + ValveBack = new ModelRenderer(this, 8, 30); + ValveBack.addBox(0F, 0F, 0F, 1, 1, 1); + ValveBack.setRotationPoint(17.5F, 1F, 0.5F); + ValveBack.setTextureSize(64, 32); + ValveBack.mirror = true; + setRotation(ValveBack, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + CylinderBase.render(f5); + CylinderFront.render(f5); + PipeBBase.render(f5); + PipeB.render(f5); + TipBase.render(f5); + PipeL.render(f5); + PipeLFront.render(f5); + TipFront.render(f5); + ChamberH.render(f5); + ChamberW.render(f5); + PipeTBack.render(f5); + PipeTBase.render(f5); + PipeT.render(f5); + PipeTFront.render(f5); + Body.render(f5); + Tank.render(f5); + HandleBase.render(f5); + HandleBar.render(f5); + HandleGrip.render(f5); + BodyPlate.render(f5); + ValveFront.render(f5); + ValveCenter.render(f5); + Stock.render(f5); + LatchBase.render(f5); + LatchHandle.render(f5); + ValveBack.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/model/ModelMIRV.java b/com/hbm/render/model/ModelMIRV.java new file mode 100644 index 000000000..fc9f287c6 --- /dev/null +++ b/com/hbm/render/model/ModelMIRV.java @@ -0,0 +1,93 @@ +// Date: 13.11.2016 12:38:48 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + + + + + + +package com.hbm.render.model; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelMIRV extends ModelBase +{ + //fields + ModelRenderer Shape9; + ModelRenderer Shape10; + ModelRenderer Shape11; + ModelRenderer Shape12; + + public ModelMIRV() + { + textureWidth = 64; + textureHeight = 32; + + Shape9 = new ModelRenderer(this, 0, 0); + Shape9.addBox(0F, 0F, 0F, 10, 4, 2); + Shape9.setRotationPoint(-3F, -2F, -1F); + Shape9.setTextureSize(64, 32); + Shape9.mirror = true; + setRotation(Shape9, 0F, 0F, 0F); + Shape10 = new ModelRenderer(this, 0, 6); + Shape10.addBox(0F, 0F, 0F, 10, 2, 4); + Shape10.setRotationPoint(-3F, -1F, -2F); + Shape10.setTextureSize(64, 32); + Shape10.mirror = true; + setRotation(Shape10, 0F, 0F, 0F); + Shape11 = new ModelRenderer(this, 0, 12); + Shape11.addBox(0F, 0F, 0F, 10, 3, 3); + Shape11.setRotationPoint(-3F, -1.5F, -1.5F); + Shape11.setTextureSize(64, 32); + Shape11.mirror = true; + setRotation(Shape11, 0F, 0F, 0F); + Shape12 = new ModelRenderer(this, 0, 18); + Shape12.addBox(0F, 0F, 0F, 4, 1, 1); + Shape12.setRotationPoint(0F, -3F, -1F); + Shape12.setTextureSize(64, 32); + Shape12.mirror = true; + setRotation(Shape12, 0F, 0F, 0F); + } + + public void renderAll(float f5) + { + Shape9.render(f5); + Shape10.render(f5); + Shape11.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape12.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Shape9.render(f5); + Shape10.render(f5); + Shape11.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape12.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/model/ModelMIRVLauncher.java b/com/hbm/render/model/ModelMIRVLauncher.java new file mode 100644 index 000000000..af232b5ae --- /dev/null +++ b/com/hbm/render/model/ModelMIRVLauncher.java @@ -0,0 +1,289 @@ +// Date: 13.11.2016 12:34:14 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + + + + + + +package com.hbm.render.model; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelMIRVLauncher extends ModelBase +{ + //fields + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + ModelRenderer Shape8; + ModelRenderer Shape9; + ModelRenderer Shape10; + ModelRenderer Shape11; + ModelRenderer Shape12; + ModelRenderer Shape13; + ModelRenderer Shape14; + ModelRenderer Shape15; + ModelRenderer Shape16; + ModelRenderer Shape17; + ModelRenderer Shape18; + ModelRenderer Shape27; + ModelRenderer Shape28; + ModelRenderer Shape29; + ModelRenderer Shape30; + ModelRenderer Shape31; + ModelRenderer Shape32; + ModelRenderer Shape33; + ModelRenderer Shape19; + ModelRenderer Shape20; + ModelRenderer Shape21; + ModelRenderer Shape22; + + public ModelMIRVLauncher() + { + textureWidth = 128; + textureHeight = 64; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(0F, 0F, 0F, 40, 2, 4); + Shape1.setRotationPoint(-20F, 0F, 0F); + Shape1.setTextureSize(128, 64); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 0, 6); + Shape2.addBox(0F, 0F, 0F, 6, 2, 2); + Shape2.setRotationPoint(-19F, 2F, 1F); + Shape2.setTextureSize(128, 64); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 0, 10); + Shape3.addBox(0F, 0F, 0F, 1, 4, 1); + Shape3.setRotationPoint(-12F, 2F, 1.5F); + Shape3.setTextureSize(128, 64); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + Shape4 = new ModelRenderer(this, 16, 6); + Shape4.addBox(0F, 0F, 0F, 6, 1, 4); + Shape4.setRotationPoint(-10F, 2F, 0F); + Shape4.setTextureSize(128, 64); + Shape4.mirror = true; + setRotation(Shape4, 0F, 0F, 0F); + Shape5 = new ModelRenderer(this, 0, 15); + Shape5.addBox(0F, 0F, 0F, 2, 3, 1); + Shape5.setRotationPoint(-7F, 3F, 1.5F); + Shape5.setTextureSize(128, 64); + Shape5.mirror = true; + setRotation(Shape5, 0F, 0F, 0F); + Shape6 = new ModelRenderer(this, 4, 10); + Shape6.addBox(0F, 0F, 0F, 3, 3, 1); + Shape6.setRotationPoint(-10F, 3F, 1.5F); + Shape6.setTextureSize(128, 64); + Shape6.mirror = true; + setRotation(Shape6, 0F, 0F, 0F); + Shape7 = new ModelRenderer(this, 12, 10); + Shape7.addBox(-1F, 0F, 0F, 1, 2, 1); + Shape7.setRotationPoint(-7F, 3F, 1.5F); + Shape7.setTextureSize(128, 64); + Shape7.mirror = true; + setRotation(Shape7, 0F, 0F, 0.5235988F); + Shape8 = new ModelRenderer(this, 36, 6); + Shape8.addBox(0F, 0F, 0F, 10, 1, 4); + Shape8.setRotationPoint(-3F, 2F, 0F); + Shape8.setTextureSize(128, 64); + Shape8.mirror = true; + setRotation(Shape8, 0F, 0F, 0F); + Shape9 = new ModelRenderer(this, 64, 6); + Shape9.addBox(0F, 0F, 0F, 2, 3, 2); + Shape9.setRotationPoint(7F, 2F, 1F); + Shape9.setTextureSize(128, 64); + Shape9.mirror = true; + setRotation(Shape9, 0F, 0F, 0F); + Shape10 = new ModelRenderer(this, 88, 0); + Shape10.addBox(0F, 0F, 0F, 3, 4, 4); + Shape10.setRotationPoint(17F, -4F, 0F); + Shape10.setTextureSize(128, 64); + Shape10.mirror = true; + setRotation(Shape10, 0F, 0F, 0F); + Shape11 = new ModelRenderer(this, 72, 6); + Shape11.addBox(0F, 0F, 0F, 2, 3, 1); + Shape11.setRotationPoint(18F, -7F, 0F); + Shape11.setTextureSize(128, 64); + Shape11.mirror = true; + setRotation(Shape11, 0F, 0F, 0F); + Shape12 = new ModelRenderer(this, 78, 6); + Shape12.addBox(0F, 0F, 0F, 2, 3, 1); + Shape12.setRotationPoint(18F, -7F, 3F); + Shape12.setTextureSize(128, 64); + Shape12.mirror = true; + setRotation(Shape12, 0F, 0F, 0F); + Shape13 = new ModelRenderer(this, 0, 19); + Shape13.addBox(0F, -4F, 0F, 22, 4, 0); + Shape13.setRotationPoint(-17F, 0F, 1F); + Shape13.setTextureSize(128, 64); + Shape13.mirror = true; + setRotation(Shape13, 0.4363323F, 0F, 0F); + Shape14 = new ModelRenderer(this, 16, 11); + Shape14.addBox(0F, 0F, 0F, 33, 1, 1); + Shape14.setRotationPoint(-17F, -4F, -1F); + Shape14.setTextureSize(128, 64); + Shape14.mirror = true; + setRotation(Shape14, 0F, 0F, 0F); + Shape15 = new ModelRenderer(this, 0, 23); + Shape15.addBox(0F, -4F, 0F, 22, 4, 0); + Shape15.setRotationPoint(-17F, 0F, 3F); + Shape15.setTextureSize(128, 64); + Shape15.mirror = true; + setRotation(Shape15, -0.4363323F, 0F, 0F); + Shape16 = new ModelRenderer(this, 16, 13); + Shape16.addBox(0F, 0F, 0F, 33, 1, 1); + Shape16.setRotationPoint(-17F, -4F, 4F); + Shape16.setTextureSize(128, 64); + Shape16.mirror = true; + setRotation(Shape16, 0F, 0F, 0F); + Shape17 = new ModelRenderer(this, 44, 25); + Shape17.addBox(0F, -4F, 0F, 8, 4, 0); + Shape17.setRotationPoint(8F, 0F, 1F); + Shape17.setTextureSize(128, 64); + Shape17.mirror = true; + setRotation(Shape17, 0.4363323F, 0F, 0F); + Shape18 = new ModelRenderer(this, 44, 21); + Shape18.addBox(0F, -4F, 0F, 8, 4, 0); + Shape18.setRotationPoint(8F, 0F, 3F); + Shape18.setTextureSize(128, 64); + Shape18.mirror = true; + setRotation(Shape18, -0.4363323F, 0F, 0F); + Shape27 = new ModelRenderer(this, 18, 27); + Shape27.addBox(0F, 0F, 0F, 2, 5, 1); + Shape27.setRotationPoint(13F, -5F, 1.5F); + Shape27.setTextureSize(128, 64); + Shape27.mirror = true; + setRotation(Shape27, 0F, 0F, 0F); + Shape28 = new ModelRenderer(this, 84, 6); + Shape28.addBox(0F, 0F, 0F, 1, 3, 1); + Shape28.setRotationPoint(16F, -3F, 1.5F); + Shape28.setTextureSize(128, 64); + Shape28.mirror = true; + setRotation(Shape28, 0F, 0F, 0F); + Shape29 = new ModelRenderer(this, 6, 15); + Shape29.addBox(0F, 0F, 0F, 10, 2, 2); + Shape29.setRotationPoint(3F, -2F, 1F); + Shape29.setTextureSize(128, 64); + Shape29.mirror = true; + setRotation(Shape29, 0F, 0F, 0F); + Shape30 = new ModelRenderer(this, 30, 15); + Shape30.addBox(0F, 0F, 0F, 12, 2, 2); + Shape30.setRotationPoint(-7F, -1F, 4F); + Shape30.setTextureSize(128, 64); + Shape30.mirror = true; + setRotation(Shape30, 0F, 0F, 0F); + Shape31 = new ModelRenderer(this, 44, 19); + Shape31.addBox(0F, 0F, 0F, 14, 1, 1); + Shape31.setRotationPoint(5F, -0.5F, 4.5F); + Shape31.setTextureSize(128, 64); + Shape31.mirror = true; + setRotation(Shape31, 0F, 0F, 0F); + Shape32 = new ModelRenderer(this, 12, 27); + Shape32.addBox(0F, 0F, 0F, 1, 1, 1); + Shape32.setRotationPoint(18F, -0.5F, 3.5F); + Shape32.setTextureSize(128, 64); + Shape32.mirror = true; + setRotation(Shape32, 0F, 0F, 0F); + Shape33 = new ModelRenderer(this, 24, 29); + Shape33.addBox(0F, 0F, 0F, 21, 1, 2); + Shape33.setRotationPoint(-18F, -1F, 1F); + Shape33.setTextureSize(128, 64); + Shape33.mirror = true; + setRotation(Shape33, 0F, 0F, 0F); + Shape19 = new ModelRenderer(this, 0, 33); + Shape19.addBox(0F, 0F, 0F, 10, 4, 2); + Shape19.setRotationPoint(-9F, -5F, 1F); + Shape19.setTextureSize(128, 64); + Shape19.mirror = true; + setRotation(Shape19, 0F, 0F, 0F); + Shape20 = new ModelRenderer(this, 0, 39); + Shape20.addBox(0F, 0F, 0F, 10, 2, 4); + Shape20.setRotationPoint(-9F, -4F, 0F); + Shape20.setTextureSize(128, 64); + Shape20.mirror = true; + setRotation(Shape20, 0F, 0F, 0F); + Shape21 = new ModelRenderer(this, 0, 45); + Shape21.addBox(0F, 0F, 0F, 10, 3, 3); + Shape21.setRotationPoint(-9F, -4.5F, 0.5F); + Shape21.setTextureSize(128, 64); + Shape21.mirror = true; + setRotation(Shape21, 0F, 0F, 0F); + Shape22 = new ModelRenderer(this, 0, 51); + Shape22.addBox(0F, 0F, 0F, 4, 1, 1); + Shape22.setRotationPoint(-6F, -6F, 1F); + Shape22.setTextureSize(128, 64); + Shape22.mirror = true; + setRotation(Shape22, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Shape1.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape2.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + Shape3.render(f5); + Shape4.render(f5); + Shape5.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape6.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + Shape7.render(f5); + Shape8.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape9.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + Shape10.render(f5); + Shape11.render(f5); + Shape12.render(f5); + Shape13.render(f5); + Shape14.render(f5); + Shape15.render(f5); + Shape16.render(f5); + Shape17.render(f5); + Shape18.render(f5); + Shape27.render(f5); + Shape28.render(f5); + Shape29.render(f5); + Shape30.render(f5); + Shape31.render(f5); + Shape32.render(f5); + Shape33.render(f5); + Shape19.render(f5); + Shape20.render(f5); + Shape21.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Shape22.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) + { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/model/ModelMP.java b/com/hbm/render/model/ModelMP.java new file mode 100644 index 000000000..c5b44d50f --- /dev/null +++ b/com/hbm/render/model/ModelMP.java @@ -0,0 +1,233 @@ +// Date: 29.08.2016 12:31:19 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelMP extends ModelBase { + // fields + ModelRenderer Shape1; + ModelRenderer Shape2; + ModelRenderer Shape3; + ModelRenderer Shape4; + ModelRenderer Shape5; + ModelRenderer Shape6; + ModelRenderer Shape7; + ModelRenderer Shape8; + ModelRenderer Shape9; + ModelRenderer Shape10; + ModelRenderer Shape11; + ModelRenderer Shape12; + ModelRenderer Shape13; + ModelRenderer Shape14; + ModelRenderer Shape15; + ModelRenderer Shape16; + ModelRenderer Shape17; + ModelRenderer Shape18; + ModelRenderer Shape19; + ModelRenderer Shape20; + ModelRenderer Shape21; + ModelRenderer Shape22; + ModelRenderer Shape23; + ModelRenderer Shape24; + ModelRenderer Shape25; + + public ModelMP() { + textureWidth = 128; + textureHeight = 64; + + Shape1 = new ModelRenderer(this, 0, 0); + Shape1.addBox(0F, 0F, 0F, 3, 6, 1); + Shape1.setRotationPoint(-25F, -3F, -2F); + Shape1.setTextureSize(128, 64); + Shape1.mirror = true; + setRotation(Shape1, 0F, 0F, 0F); + Shape2 = new ModelRenderer(this, 8, 0); + Shape2.addBox(0F, 0F, 0F, 3, 6, 1); + Shape2.setRotationPoint(-25F, -3F, 2F); + Shape2.setTextureSize(128, 64); + Shape2.mirror = true; + setRotation(Shape2, 0F, 0F, 0F); + Shape3 = new ModelRenderer(this, 0, 8); + Shape3.addBox(0F, 0F, 0F, 2, 3, 3); + Shape3.setRotationPoint(-24F, 0F, -1F); + Shape3.setTextureSize(128, 64); + Shape3.mirror = true; + setRotation(Shape3, 0F, 0F, 0F); + Shape4 = new ModelRenderer(this, 0, 14); + Shape4.addBox(0F, 0F, 0F, 20, 3, 1); + Shape4.setRotationPoint(-22F, -3F, -2F); + Shape4.setTextureSize(128, 64); + Shape4.mirror = true; + setRotation(Shape4, 0F, 0F, 0F); + Shape5 = new ModelRenderer(this, 0, 18); + Shape5.addBox(0F, 0F, 0F, 20, 3, 1); + Shape5.setRotationPoint(-22F, -3F, 2F); + Shape5.setTextureSize(128, 64); + Shape5.mirror = true; + setRotation(Shape5, 0F, 0F, 0F); + Shape6 = new ModelRenderer(this, 0, 22); + Shape6.addBox(0F, 0F, 0F, 24, 1, 3); + Shape6.setRotationPoint(-24F, -1F, -1F); + Shape6.setTextureSize(128, 64); + Shape6.mirror = true; + setRotation(Shape6, 0F, 0F, 0F); + Shape7 = new ModelRenderer(this, 0, 26); + Shape7.addBox(0F, 0F, 0F, 26, 4, 5); + Shape7.setRotationPoint(-25F, 3F, -2F); + Shape7.setTextureSize(128, 64); + Shape7.mirror = true; + setRotation(Shape7, 0F, 0F, 0F); + Shape8 = new ModelRenderer(this, 16, 0); + Shape8.addBox(0F, 0F, 0F, 3, 6, 1); + Shape8.setRotationPoint(-2F, -3F, -2F); + Shape8.setTextureSize(128, 64); + Shape8.mirror = true; + setRotation(Shape8, 0F, 0F, 0F); + Shape9 = new ModelRenderer(this, 24, 0); + Shape9.addBox(0F, 0F, 0F, 3, 6, 1); + Shape9.setRotationPoint(-2F, -3F, 2F); + Shape9.setTextureSize(128, 64); + Shape9.mirror = true; + setRotation(Shape9, 0F, 0F, 0F); + Shape10 = new ModelRenderer(this, 90, 22); + Shape10.addBox(0F, 0F, 0F, 11, 3, 3); + Shape10.setRotationPoint(-2F, 0F, -1F); + Shape10.setTextureSize(128, 64); + Shape10.mirror = true; + setRotation(Shape10, 0F, 0F, 0F); + Shape11 = new ModelRenderer(this, 19, 38); + Shape11.addBox(0F, 0F, 0F, 26, 1, 4); + Shape11.setRotationPoint(-25F, 7F, -1.5F); + Shape11.setTextureSize(128, 64); + Shape11.mirror = true; + setRotation(Shape11, 0F, 0F, 0F); + Shape12 = new ModelRenderer(this, 78, 35); + Shape12.addBox(0F, 0F, 0F, 20, 5, 5); + Shape12.setRotationPoint(-25F, 8F, -2F); + Shape12.setTextureSize(128, 64); + Shape12.mirror = true; + setRotation(Shape12, 0F, 0F, 0F); + Shape13 = new ModelRenderer(this, 54, 45); + Shape13.addBox(0F, 0F, 0F, 32, 2, 5); + Shape13.setRotationPoint(-5F, 8F, -2F); + Shape13.setTextureSize(128, 64); + Shape13.mirror = true; + setRotation(Shape13, 0F, 0F, 0F); + Shape14 = new ModelRenderer(this, 108, 28); + Shape14.addBox(0F, -6F, 0F, 8, 6, 1); + Shape14.setRotationPoint(1F, 8F, -2F); + Shape14.setTextureSize(128, 64); + Shape14.mirror = true; + setRotation(Shape14, -0.0872665F, 0F, 0F); + Shape15 = new ModelRenderer(this, 84, 52); + Shape15.addBox(0F, 0F, 0F, 18, 9, 3); + Shape15.setRotationPoint(9F, -1F, -1F); + Shape15.setTextureSize(128, 64); + Shape15.mirror = true; + setRotation(Shape15, 0F, 0F, 0F); + Shape16 = new ModelRenderer(this, 0, 43); + Shape16.addBox(0F, -9F, 0F, 18, 9, 1); + Shape16.setRotationPoint(9F, 8F, -2F); + Shape16.setTextureSize(128, 64); + Shape16.mirror = true; + setRotation(Shape16, -0.0872665F, 0F, 0F); + Shape17 = new ModelRenderer(this, 90, 28); + Shape17.addBox(0F, -6F, -1F, 8, 6, 1); + Shape17.setRotationPoint(1F, 8F, 3F); + Shape17.setTextureSize(128, 64); + Shape17.mirror = true; + setRotation(Shape17, 0.0872665F, 0F, 0F); + Shape18 = new ModelRenderer(this, 46, 54); + Shape18.addBox(0F, -9F, -1F, 18, 9, 1); + Shape18.setRotationPoint(9F, 8F, 3F); + Shape18.setTextureSize(128, 64); + Shape18.mirror = true; + setRotation(Shape18, 0.0872665F, 0F, 0F); + Shape19 = new ModelRenderer(this, 0, 35); + Shape19.addBox(0F, -3F, 0F, 4, 3, 5); + Shape19.setRotationPoint(-5F, 13F, -2F); + Shape19.setTextureSize(128, 64); + Shape19.mirror = true; + setRotation(Shape19, 0F, 0F, -0.8726646F); + Shape20 = new ModelRenderer(this, 0, 53); + Shape20.addBox(0F, 0F, 0F, 18, 6, 5); + Shape20.setRotationPoint(9F, 10F, -2F); + Shape20.setTextureSize(128, 64); + Shape20.mirror = true; + setRotation(Shape20, 0F, 0F, 0F); + Shape21 = new ModelRenderer(this, 42, 16); + Shape21.addBox(0F, 0F, 0F, 3, 5, 1); + Shape21.setRotationPoint(1F, 10F, 0F); + Shape21.setTextureSize(128, 64); + Shape21.mirror = true; + setRotation(Shape21, 0F, 0F, 0F); + Shape22 = new ModelRenderer(this, 62, 27); + Shape22.addBox(0F, 0F, 0F, 11, 1, 3); + Shape22.setRotationPoint(-2F, 15F, -1F); + Shape22.setTextureSize(128, 64); + Shape22.mirror = true; + setRotation(Shape22, 0F, 0F, 0F); + Shape23 = new ModelRenderer(this, 62, 31); + Shape23.addBox(-6F, -1F, 0F, 6, 1, 3); + Shape23.setRotationPoint(-2F, 16F, -1F); + Shape23.setTextureSize(128, 64); + Shape23.mirror = true; + setRotation(Shape23, 0F, 0F, 0.5235988F); + Shape24 = new ModelRenderer(this, 20, 10); + Shape24.addBox(0F, 0F, 0F, 2, 1, 3); + Shape24.setRotationPoint(-21F, -2F, -1F); + Shape24.setTextureSize(128, 64); + Shape24.mirror = true; + setRotation(Shape24, 0F, 0F, 0F); + Shape25 = new ModelRenderer(this, 10, 10); + Shape25.addBox(0F, 0F, 0F, 2, 1, 3); + Shape25.setRotationPoint(-5F, -2F, -1F); + Shape25.setTextureSize(128, 64); + Shape25.mirror = true; + setRotation(Shape25, 0F, 0F, 0F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Shape1.render(f5); + Shape2.render(f5); + Shape3.render(f5); + Shape4.render(f5); + Shape5.render(f5); + Shape6.render(f5); + Shape7.render(f5); + Shape8.render(f5); + Shape9.render(f5); + Shape10.render(f5); + Shape11.render(f5); + Shape12.render(f5); + Shape13.render(f5); + Shape14.render(f5); + Shape15.render(f5); + Shape16.render(f5); + Shape17.render(f5); + Shape18.render(f5); + Shape19.render(f5); + Shape20.render(f5); + Shape21.render(f5); + Shape22.render(f5); + Shape23.render(f5); + Shape24.render(f5); + Shape25.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + +} diff --git a/com/hbm/render/model/ModelMP40.java b/com/hbm/render/model/ModelMP40.java new file mode 100644 index 000000000..d60c6c655 --- /dev/null +++ b/com/hbm/render/model/ModelMP40.java @@ -0,0 +1,163 @@ +// Date: 03.11.2016 19:00:33 +// Template version 1.1 +// Java generated by Techne +// Keep in mind that you still need to fill in some blanks +// - ZeuX + +package com.hbm.render.model; + +import org.lwjgl.opengl.GL11; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelMP40 extends ModelBase { + // fields + ModelRenderer Body; + ModelRenderer Barrel; + ModelRenderer Scope; + ModelRenderer ClipPivot; + ModelRenderer ClipPivotBack; + ModelRenderer Clip; + ModelRenderer BarrelBottom; + ModelRenderer BodyStock; + ModelRenderer BodyStockBottom; + ModelRenderer BodyBack; + ModelRenderer Handle; + ModelRenderer TriggerFrame; + ModelRenderer Trigger; + ModelRenderer Bar; + ModelRenderer BarFront; + + public ModelMP40() { + textureWidth = 128; + textureHeight = 64; + + Body = new ModelRenderer(this, 0, 0); + Body.addBox(0F, 0F, 0F, 40, 4, 4); + Body.setRotationPoint(-10F, 0F, -2F); + Body.setTextureSize(128, 64); + Body.mirror = true; + setRotation(Body, 0F, 0F, 0F); + Barrel = new ModelRenderer(this, 88, 0); + Barrel.addBox(0F, 0F, 0F, 17, 2, 2); + Barrel.setRotationPoint(-27F, 1F, -1F); + Barrel.setTextureSize(128, 64); + Barrel.mirror = true; + setRotation(Barrel, 0F, 0F, 0F); + Scope = new ModelRenderer(this, 88, 4); + Scope.addBox(0F, 0F, 0F, 2, 3, 2); + Scope.setRotationPoint(-25F, -2F, -1F); + Scope.setTextureSize(128, 64); + Scope.mirror = true; + setRotation(Scope, 0F, 0F, 0F); + ClipPivot = new ModelRenderer(this, 0, 17); + ClipPivot.addBox(0F, 0F, 0F, 4, 5, 3); + ClipPivot.setRotationPoint(-3F, 4F, -1.5F); + ClipPivot.setTextureSize(128, 64); + ClipPivot.mirror = true; + setRotation(ClipPivot, 0F, 0F, 0F); + ClipPivotBack = new ModelRenderer(this, 14, 17); + ClipPivotBack.addBox(0F, 0F, 0F, 3, 3, 3); + ClipPivotBack.setRotationPoint(1F, 4F, -1.5F); + ClipPivotBack.setTextureSize(128, 64); + ClipPivotBack.mirror = true; + setRotation(ClipPivotBack, 0F, 0F, 0F); + Clip = new ModelRenderer(this, 0, 25); + Clip.addBox(0F, 0F, 0F, 3, 18, 2); + Clip.setRotationPoint(-2.5F, 9F, -1F); + Clip.setTextureSize(128, 64); + Clip.mirror = true; + setRotation(Clip, 0F, 0F, 0F); + BarrelBottom = new ModelRenderer(this, 96, 4); + BarrelBottom.addBox(0F, 0F, 0F, 14, 1, 1); + BarrelBottom.setRotationPoint(-24F, 2.5F, -0.5F); + BarrelBottom.setTextureSize(128, 64); + BarrelBottom.mirror = true; + setRotation(BarrelBottom, 0F, 0F, 0F); + BodyStock = new ModelRenderer(this, 0, 8); + BodyStock.addBox(0F, 0F, 0F, 26, 4, 5); + BodyStock.setRotationPoint(4F, 3F, -2.5F); + BodyStock.setTextureSize(128, 64); + BodyStock.mirror = true; + setRotation(BodyStock, 0F, 0F, 0F); + BodyStockBottom = new ModelRenderer(this, 62, 11); + BodyStockBottom.addBox(0F, 0F, 0F, 26, 3, 3); + BodyStockBottom.setRotationPoint(4F, 7F, -1.5F); + BodyStockBottom.setTextureSize(128, 64); + BodyStockBottom.mirror = true; + setRotation(BodyStockBottom, 0F, 0F, 0F); + BodyBack = new ModelRenderer(this, 10, 25); + BodyBack.addBox(0F, 0F, 0F, 7, 7, 3); + BodyBack.setRotationPoint(30F, 0F, -1.5F); + BodyBack.setTextureSize(128, 64); + BodyBack.mirror = true; + setRotation(BodyBack, 0F, 0F, 0.7853982F); + Handle = new ModelRenderer(this, 30, 17); + Handle.addBox(0F, 0F, 0F, 4, 10, 3); + Handle.setRotationPoint(27F, 10F, -1.5F); + Handle.setTextureSize(128, 64); + Handle.mirror = true; + setRotation(Handle, 0F, 0F, -0.4363323F); + TriggerFrame = new ModelRenderer(this, 44, 17); + TriggerFrame.addBox(0F, 0F, 0F, 6, 4, 2); + TriggerFrame.setRotationPoint(23F, 10F, -1F); + TriggerFrame.setTextureSize(128, 64); + TriggerFrame.mirror = true; + setRotation(TriggerFrame, 0F, 0F, 0F); + Trigger = new ModelRenderer(this, 26, 17); + Trigger.addBox(-1F, 0F, 0F, 1, 3, 1); + Trigger.setRotationPoint(27F, 10F, -0.5F); + Trigger.setTextureSize(128, 64); + Trigger.mirror = true; + setRotation(Trigger, 0F, 0F, 0.4363323F); + Bar = new ModelRenderer(this, 60, 17); + Bar.addBox(0F, 0F, 0F, 23, 1, 1); + Bar.setRotationPoint(7F, 7.5F, -3F); + Bar.setTextureSize(128, 64); + Bar.mirror = true; + setRotation(Bar, 0F, 0F, 0F); + BarFront = new ModelRenderer(this, 0, 45); + BarFront.addBox(-2.5F, -0.5F, 0F, 5, 1, 1); + BarFront.setRotationPoint(7F, 8F, -3F); + BarFront.setTextureSize(128, 64); + BarFront.mirror = true; + setRotation(BarFront, 0F, 0F, 0.7853982F); + } + + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + Body.render(f5); + Barrel.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + Scope.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + ClipPivot.render(f5); + ClipPivotBack.render(f5); + Clip.render(f5); + BarrelBottom.render(f5); + BodyStock.render(f5); + BodyStockBottom.render(f5); + BodyBack.render(f5); + Handle.render(f5); + GL11.glDisable(GL11.GL_CULL_FACE); + TriggerFrame.render(f5); + GL11.glEnable(GL11.GL_CULL_FACE); + Trigger.render(f5); + Bar.render(f5); + BarFront.render(f5); + } + + private void setRotation(ModelRenderer model, float x, float y, float z) { + model.rotateAngleX = x; + model.rotateAngleY = y; + model.rotateAngleZ = z; + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } + +} diff --git a/com/hbm/render/ModelMiniNuke.java b/com/hbm/render/model/ModelMiniNuke.java similarity index 99% rename from com/hbm/render/ModelMiniNuke.java rename to com/hbm/render/model/ModelMiniNuke.java index 378a5c24b..52b4a9b04 100644 --- a/com/hbm/render/ModelMiniNuke.java +++ b/com/hbm/render/model/ModelMiniNuke.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelOSIPR.java b/com/hbm/render/model/ModelOSIPR.java similarity index 99% rename from com/hbm/render/ModelOSIPR.java rename to com/hbm/render/model/ModelOSIPR.java index 1e010e334..2e4989757 100644 --- a/com/hbm/render/ModelOSIPR.java +++ b/com/hbm/render/model/ModelOSIPR.java @@ -4,7 +4,7 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelPoleTop.java b/com/hbm/render/model/ModelPoleTop.java similarity index 98% rename from com/hbm/render/ModelPoleTop.java rename to com/hbm/render/model/ModelPoleTop.java index b7c563d2a..deb9cc0c2 100644 --- a/com/hbm/render/ModelPoleTop.java +++ b/com/hbm/render/model/ModelPoleTop.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelPoles.java b/com/hbm/render/model/ModelPoles.java similarity index 99% rename from com/hbm/render/ModelPoles.java rename to com/hbm/render/model/ModelPoles.java index c327ec84b..8c18b69ed 100644 --- a/com/hbm/render/ModelPoles.java +++ b/com/hbm/render/model/ModelPoles.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelRPG.java b/com/hbm/render/model/ModelRPG.java similarity index 99% rename from com/hbm/render/ModelRPG.java rename to com/hbm/render/model/ModelRPG.java index 12ef72b00..a09361821 100644 --- a/com/hbm/render/ModelRPG.java +++ b/com/hbm/render/model/ModelRPG.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelRainbow.java b/com/hbm/render/model/ModelRainbow.java similarity index 99% rename from com/hbm/render/ModelRainbow.java rename to com/hbm/render/model/ModelRainbow.java index 7cb770333..d92a080cd 100644 --- a/com/hbm/render/ModelRainbow.java +++ b/com/hbm/render/model/ModelRainbow.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelRevolver.java b/com/hbm/render/model/ModelRevolver.java similarity index 92% rename from com/hbm/render/ModelRevolver.java rename to com/hbm/render/model/ModelRevolver.java index 4407a30a1..5a22711b0 100644 --- a/com/hbm/render/ModelRevolver.java +++ b/com/hbm/render/model/ModelRevolver.java @@ -9,7 +9,9 @@ -package com.hbm.render; +package com.hbm.render.model; + +import org.lwjgl.opengl.GL11; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; @@ -115,6 +117,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); + GL11.glDisable(GL11.GL_CULL_FACE); Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); @@ -127,21 +130,7 @@ public void render(Entity entity, float f, float f1, float f2, float f3, float f Shape10.render(f5); Shape11.render(f5); Shape12.render(f5); - } - - public void renderModel(float f) { - Shape1.render(f); - Shape2.render(f); - Shape3.render(f); - Shape4.render(f); - Shape5.render(f); - Shape6.render(f); - Shape7.render(f); - Shape8.render(f); - Shape9.render(f); - Shape10.render(f); - Shape11.render(f); - Shape12.render(f); + GL11.glEnable(GL11.GL_CULL_FACE); } private void setRotation(ModelRenderer model, float x, float y, float z) diff --git a/com/hbm/render/ModelRocket.java b/com/hbm/render/model/ModelRocket.java similarity index 98% rename from com/hbm/render/ModelRocket.java rename to com/hbm/render/model/ModelRocket.java index bf5296f72..d27be67f4 100644 --- a/com/hbm/render/ModelRocket.java +++ b/com/hbm/render/model/ModelRocket.java @@ -4,7 +4,7 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelRotationTester.java b/com/hbm/render/model/ModelRotationTester.java similarity index 98% rename from com/hbm/render/ModelRotationTester.java rename to com/hbm/render/model/ModelRotationTester.java index ddefcbc8a..083645b02 100644 --- a/com/hbm/render/ModelRotationTester.java +++ b/com/hbm/render/model/ModelRotationTester.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelSatelliteReceiver.java b/com/hbm/render/model/ModelSatelliteReceiver.java similarity index 99% rename from com/hbm/render/ModelSatelliteReceiver.java rename to com/hbm/render/model/ModelSatelliteReceiver.java index 8185e4ff0..f02181d8c 100644 --- a/com/hbm/render/ModelSatelliteReceiver.java +++ b/com/hbm/render/model/ModelSatelliteReceiver.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelStatue.java b/com/hbm/render/model/ModelStatue.java similarity index 99% rename from com/hbm/render/ModelStatue.java rename to com/hbm/render/model/ModelStatue.java index bca573a4b..2b00d13d3 100644 --- a/com/hbm/render/ModelStatue.java +++ b/com/hbm/render/model/ModelStatue.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelSteelBeam.java b/com/hbm/render/model/ModelSteelBeam.java similarity index 97% rename from com/hbm/render/ModelSteelBeam.java rename to com/hbm/render/model/ModelSteelBeam.java index bb179e583..2626ccb3f 100644 --- a/com/hbm/render/ModelSteelBeam.java +++ b/com/hbm/render/model/ModelSteelBeam.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelSteelCorner.java b/com/hbm/render/model/ModelSteelCorner.java similarity index 98% rename from com/hbm/render/ModelSteelCorner.java rename to com/hbm/render/model/ModelSteelCorner.java index ef80fdb68..46be6fa19 100644 --- a/com/hbm/render/ModelSteelCorner.java +++ b/com/hbm/render/model/ModelSteelCorner.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelSteelRoof.java b/com/hbm/render/model/ModelSteelRoof.java similarity index 98% rename from com/hbm/render/ModelSteelRoof.java rename to com/hbm/render/model/ModelSteelRoof.java index f24f6b766..f0263e805 100644 --- a/com/hbm/render/ModelSteelRoof.java +++ b/com/hbm/render/model/ModelSteelRoof.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelSteelScaffold.java b/com/hbm/render/model/ModelSteelScaffold.java similarity index 99% rename from com/hbm/render/ModelSteelScaffold.java rename to com/hbm/render/model/ModelSteelScaffold.java index bf5605251..6e736a19d 100644 --- a/com/hbm/render/ModelSteelScaffold.java +++ b/com/hbm/render/model/ModelSteelScaffold.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelSteelWall.java b/com/hbm/render/model/ModelSteelWall.java similarity index 98% rename from com/hbm/render/ModelSteelWall.java rename to com/hbm/render/model/ModelSteelWall.java index 430761bcd..6810eac5a 100644 --- a/com/hbm/render/ModelSteelWall.java +++ b/com/hbm/render/model/ModelSteelWall.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelSword.java b/com/hbm/render/model/ModelSword.java similarity index 99% rename from com/hbm/render/ModelSword.java rename to com/hbm/render/model/ModelSword.java index 376aa19a7..19d4e7c62 100644 --- a/com/hbm/render/ModelSword.java +++ b/com/hbm/render/model/ModelSword.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelT45Boots.java b/com/hbm/render/model/ModelT45Boots.java similarity index 99% rename from com/hbm/render/ModelT45Boots.java rename to com/hbm/render/model/ModelT45Boots.java index ce50698de..4c4b76cdd 100644 --- a/com/hbm/render/ModelT45Boots.java +++ b/com/hbm/render/model/ModelT45Boots.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/ModelT45Chest.java b/com/hbm/render/model/ModelT45Chest.java similarity index 99% rename from com/hbm/render/ModelT45Chest.java rename to com/hbm/render/model/ModelT45Chest.java index 700463700..9654506cf 100644 --- a/com/hbm/render/ModelT45Chest.java +++ b/com/hbm/render/model/ModelT45Chest.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/ModelT45Helmet.java b/com/hbm/render/model/ModelT45Helmet.java similarity index 99% rename from com/hbm/render/ModelT45Helmet.java rename to com/hbm/render/model/ModelT45Helmet.java index c072140a5..05dde3b77 100644 --- a/com/hbm/render/ModelT45Helmet.java +++ b/com/hbm/render/model/ModelT45Helmet.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/ModelT45Legs.java b/com/hbm/render/model/ModelT45Legs.java similarity index 99% rename from com/hbm/render/ModelT45Legs.java rename to com/hbm/render/model/ModelT45Legs.java index 56a5689bb..dcae46fbb 100644 --- a/com/hbm/render/ModelT45Legs.java +++ b/com/hbm/render/model/ModelT45Legs.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/ModelTapeRecorder.java b/com/hbm/render/model/ModelTapeRecorder.java similarity index 98% rename from com/hbm/render/ModelTapeRecorder.java rename to com/hbm/render/model/ModelTapeRecorder.java index d7e0327c9..8f0c79145 100644 --- a/com/hbm/render/ModelTapeRecorder.java +++ b/com/hbm/render/model/ModelTapeRecorder.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelTestBombAdvanced.java b/com/hbm/render/model/ModelTestBombAdvanced.java similarity index 99% rename from com/hbm/render/ModelTestBombAdvanced.java rename to com/hbm/render/model/ModelTestBombAdvanced.java index 9e092d0ff..07c1ea779 100644 --- a/com/hbm/render/ModelTestBombAdvanced.java +++ b/com/hbm/render/model/ModelTestBombAdvanced.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelTestRender.java b/com/hbm/render/model/ModelTestRender.java similarity index 97% rename from com/hbm/render/ModelTestRender.java rename to com/hbm/render/model/ModelTestRender.java index e4477244e..7c02b0da5 100644 --- a/com/hbm/render/ModelTestRender.java +++ b/com/hbm/render/model/ModelTestRender.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelXVL1456.java b/com/hbm/render/model/ModelXVL1456.java similarity index 99% rename from com/hbm/render/ModelXVL1456.java rename to com/hbm/render/model/ModelXVL1456.java index c0f151bf5..466fe9f9e 100644 --- a/com/hbm/render/ModelXVL1456.java +++ b/com/hbm/render/model/ModelXVL1456.java @@ -4,7 +4,7 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ModelZOMG.java b/com/hbm/render/model/ModelZOMG.java similarity index 99% rename from com/hbm/render/ModelZOMG.java rename to com/hbm/render/model/ModelZOMG.java index dac30ad59..efdab04c5 100644 --- a/com/hbm/render/ModelZOMG.java +++ b/com/hbm/render/model/ModelZOMG.java @@ -4,7 +4,7 @@ // Keep in mind that you still need to fill in some blanks // - ZeuX -package com.hbm.render; +package com.hbm.render.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; diff --git a/com/hbm/render/ProtoCopter.java b/com/hbm/render/model/ProtoCopter.java similarity index 99% rename from com/hbm/render/ProtoCopter.java rename to com/hbm/render/model/ProtoCopter.java index c508bcc3f..3aacc44a8 100644 --- a/com/hbm/render/ProtoCopter.java +++ b/com/hbm/render/model/ProtoCopter.java @@ -9,7 +9,7 @@ -package com.hbm.render; +package com.hbm.render.model; import com.hbm.main.MainRegistry; diff --git a/com/hbm/render/RenderBombMulti.java b/com/hbm/render/tileentity/RenderBombMulti.java similarity index 97% rename from com/hbm/render/RenderBombMulti.java rename to com/hbm/render/tileentity/RenderBombMulti.java index 78deabce8..623a380ef 100644 --- a/com/hbm/render/RenderBombMulti.java +++ b/com/hbm/render/tileentity/RenderBombMulti.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderBombMultiLarge.java b/com/hbm/render/tileentity/RenderBombMultiLarge.java similarity index 97% rename from com/hbm/render/RenderBombMultiLarge.java rename to com/hbm/render/tileentity/RenderBombMultiLarge.java index 0141a1522..d814e0959 100644 --- a/com/hbm/render/RenderBombMultiLarge.java +++ b/com/hbm/render/tileentity/RenderBombMultiLarge.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderCable.java b/com/hbm/render/tileentity/RenderCable.java similarity index 96% rename from com/hbm/render/RenderCable.java rename to com/hbm/render/tileentity/RenderCable.java index f74402b1e..cf9232e06 100644 --- a/com/hbm/render/RenderCable.java +++ b/com/hbm/render/tileentity/RenderCable.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; @@ -70,8 +70,8 @@ public class RenderCable extends TileEntitySpecialRenderer { tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP); tesseract.draw(); - // Mühsam muss ich hier im BSH meine genialen Mods schreiben, obwohl ich die Zeit eigentlich doch besser nutzen könnte. - // Da mir das aber Spaß macht, wird auch in Zukunft gutes Zeug von mir geben (und damit meine ich NICHT Drogen, etc.) + // M�hsam muss ich hier im BSH meine genialen Mods schreiben, obwohl ich die Zeit eigentlich doch besser nutzen k�nnte. + // Da mir das aber Spa� macht, wird auch in Zukunft gutes Zeug von mir geben (und damit meine ich NICHT Drogen, etc.) // Danke. //I didn't write this, but I'm gonna leave it there. diff --git a/com/hbm/render/RenderCentrifuge.java b/com/hbm/render/tileentity/RenderCentrifuge.java similarity index 97% rename from com/hbm/render/RenderCentrifuge.java rename to com/hbm/render/tileentity/RenderCentrifuge.java index 15e49287f..b0e2e3ad7 100644 --- a/com/hbm/render/RenderCentrifuge.java +++ b/com/hbm/render/tileentity/RenderCentrifuge.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderCrashedBomb.java b/com/hbm/render/tileentity/RenderCrashedBomb.java similarity index 97% rename from com/hbm/render/RenderCrashedBomb.java rename to com/hbm/render/tileentity/RenderCrashedBomb.java index a1ae3ed2f..8d993a06b 100644 --- a/com/hbm/render/RenderCrashedBomb.java +++ b/com/hbm/render/tileentity/RenderCrashedBomb.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderDecoBlock.java b/com/hbm/render/tileentity/RenderDecoBlock.java similarity index 94% rename from com/hbm/render/RenderDecoBlock.java rename to com/hbm/render/tileentity/RenderDecoBlock.java index 56dd989e2..2c1baf00c 100644 --- a/com/hbm/render/RenderDecoBlock.java +++ b/com/hbm/render/tileentity/RenderDecoBlock.java @@ -1,9 +1,14 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.blocks.ModBlocks; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelSteelBeam; +import com.hbm.render.model.ModelSteelCorner; +import com.hbm.render.model.ModelSteelRoof; +import com.hbm.render.model.ModelSteelScaffold; +import com.hbm.render.model.ModelSteelWall; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderDecoBlockAlt.java b/com/hbm/render/tileentity/RenderDecoBlockAlt.java similarity index 96% rename from com/hbm/render/RenderDecoBlockAlt.java rename to com/hbm/render/tileentity/RenderDecoBlockAlt.java index 656c9ac1d..667410613 100644 --- a/com/hbm/render/RenderDecoBlockAlt.java +++ b/com/hbm/render/tileentity/RenderDecoBlockAlt.java @@ -1,9 +1,11 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelGun; +import com.hbm.render.model.ModelStatue; import com.hbm.tileentity.TileEntityDecoBlockAltF; import com.hbm.tileentity.TileEntityDecoBlockAltG; import com.hbm.tileentity.TileEntityDecoBlockAltW; diff --git a/com/hbm/render/RenderDecoItem.java b/com/hbm/render/tileentity/RenderDecoItem.java similarity index 93% rename from com/hbm/render/RenderDecoItem.java rename to com/hbm/render/tileentity/RenderDecoItem.java index 75279a72f..218da4918 100644 --- a/com/hbm/render/RenderDecoItem.java +++ b/com/hbm/render/tileentity/RenderDecoItem.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; diff --git a/com/hbm/render/RenderLaunchPadTier1.java b/com/hbm/render/tileentity/RenderLaunchPadTier1.java similarity index 99% rename from com/hbm/render/RenderLaunchPadTier1.java rename to com/hbm/render/tileentity/RenderLaunchPadTier1.java index c2b370f0e..e2ab6e781 100644 --- a/com/hbm/render/RenderLaunchPadTier1.java +++ b/com/hbm/render/tileentity/RenderLaunchPadTier1.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderNukeBoy.java b/com/hbm/render/tileentity/RenderNukeBoy.java similarity index 97% rename from com/hbm/render/RenderNukeBoy.java rename to com/hbm/render/tileentity/RenderNukeBoy.java index 2d06f7dee..9c9ccdc5e 100644 --- a/com/hbm/render/RenderNukeBoy.java +++ b/com/hbm/render/tileentity/RenderNukeBoy.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderNukeFleija.java b/com/hbm/render/tileentity/RenderNukeFleija.java similarity index 97% rename from com/hbm/render/RenderNukeFleija.java rename to com/hbm/render/tileentity/RenderNukeFleija.java index 1cd49ca2d..ae5eb6556 100644 --- a/com/hbm/render/RenderNukeFleija.java +++ b/com/hbm/render/tileentity/RenderNukeFleija.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderNukeGadget.java b/com/hbm/render/tileentity/RenderNukeGadget.java similarity index 97% rename from com/hbm/render/RenderNukeGadget.java rename to com/hbm/render/tileentity/RenderNukeGadget.java index 532e1e37c..7f84f01d6 100644 --- a/com/hbm/render/RenderNukeGadget.java +++ b/com/hbm/render/tileentity/RenderNukeGadget.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderNukeMan.java b/com/hbm/render/tileentity/RenderNukeMan.java similarity index 97% rename from com/hbm/render/RenderNukeMan.java rename to com/hbm/render/tileentity/RenderNukeMan.java index feed16c91..2ac10cd18 100644 --- a/com/hbm/render/RenderNukeMan.java +++ b/com/hbm/render/tileentity/RenderNukeMan.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderNukeMike.java b/com/hbm/render/tileentity/RenderNukeMike.java similarity index 97% rename from com/hbm/render/RenderNukeMike.java rename to com/hbm/render/tileentity/RenderNukeMike.java index 9d752b45d..d935e2e71 100644 --- a/com/hbm/render/RenderNukeMike.java +++ b/com/hbm/render/tileentity/RenderNukeMike.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderNukePrototype.java b/com/hbm/render/tileentity/RenderNukePrototype.java similarity index 97% rename from com/hbm/render/RenderNukePrototype.java rename to com/hbm/render/tileentity/RenderNukePrototype.java index c33fe2392..4db2bac08 100644 --- a/com/hbm/render/RenderNukePrototype.java +++ b/com/hbm/render/tileentity/RenderNukePrototype.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderNukeTsar.java b/com/hbm/render/tileentity/RenderNukeTsar.java similarity index 97% rename from com/hbm/render/RenderNukeTsar.java rename to com/hbm/render/tileentity/RenderNukeTsar.java index 69bc46110..ade93d563 100644 --- a/com/hbm/render/RenderNukeTsar.java +++ b/com/hbm/render/tileentity/RenderNukeTsar.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderPoleSatelliteReceiver.java b/com/hbm/render/tileentity/RenderPoleSatelliteReceiver.java similarity index 93% rename from com/hbm/render/RenderPoleSatelliteReceiver.java rename to com/hbm/render/tileentity/RenderPoleSatelliteReceiver.java index b53fd3136..e6510d6b1 100644 --- a/com/hbm/render/RenderPoleSatelliteReceiver.java +++ b/com/hbm/render/tileentity/RenderPoleSatelliteReceiver.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelSatelliteReceiver; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderPoleTop.java b/com/hbm/render/tileentity/RenderPoleTop.java similarity index 92% rename from com/hbm/render/RenderPoleTop.java rename to com/hbm/render/tileentity/RenderPoleTop.java index c3a2abf09..00172dcd3 100644 --- a/com/hbm/render/RenderPoleTop.java +++ b/com/hbm/render/tileentity/RenderPoleTop.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelPoleTop; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderPuF6Tank.java b/com/hbm/render/tileentity/RenderPuF6Tank.java similarity index 97% rename from com/hbm/render/RenderPuF6Tank.java rename to com/hbm/render/tileentity/RenderPuF6Tank.java index 9eb04ab20..3a2d1aebf 100644 --- a/com/hbm/render/RenderPuF6Tank.java +++ b/com/hbm/render/tileentity/RenderPuF6Tank.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderRedBarrel.java b/com/hbm/render/tileentity/RenderRedBarrel.java similarity index 92% rename from com/hbm/render/RenderRedBarrel.java rename to com/hbm/render/tileentity/RenderRedBarrel.java index 32ac94b88..fbf7682da 100644 --- a/com/hbm/render/RenderRedBarrel.java +++ b/com/hbm/render/tileentity/RenderRedBarrel.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelTestRender; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderRotationTester.java b/com/hbm/render/tileentity/RenderRotationTester.java similarity index 93% rename from com/hbm/render/RenderRotationTester.java rename to com/hbm/render/tileentity/RenderRotationTester.java index 22a8a7c81..010d853a2 100644 --- a/com/hbm/render/RenderRotationTester.java +++ b/com/hbm/render/tileentity/RenderRotationTester.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelRotationTester; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderSteelPoles.java b/com/hbm/render/tileentity/RenderSteelPoles.java similarity index 94% rename from com/hbm/render/RenderSteelPoles.java rename to com/hbm/render/tileentity/RenderSteelPoles.java index 8fa9a6c2e..6554fa83f 100644 --- a/com/hbm/render/RenderSteelPoles.java +++ b/com/hbm/render/tileentity/RenderSteelPoles.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelPoles; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderTapeRecorder.java b/com/hbm/render/tileentity/RenderTapeRecorder.java similarity index 93% rename from com/hbm/render/RenderTapeRecorder.java rename to com/hbm/render/tileentity/RenderTapeRecorder.java index 385a07049..eda7689e3 100644 --- a/com/hbm/render/RenderTapeRecorder.java +++ b/com/hbm/render/tileentity/RenderTapeRecorder.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelTapeRecorder; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderTestBombAdvanced.java b/com/hbm/render/tileentity/RenderTestBombAdvanced.java similarity index 91% rename from com/hbm/render/RenderTestBombAdvanced.java rename to com/hbm/render/tileentity/RenderTestBombAdvanced.java index 87bd7c29c..d9a3d6224 100644 --- a/com/hbm/render/RenderTestBombAdvanced.java +++ b/com/hbm/render/tileentity/RenderTestBombAdvanced.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelTestBombAdvanced; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderTestContainer.java b/com/hbm/render/tileentity/RenderTestContainer.java similarity index 99% rename from com/hbm/render/RenderTestContainer.java rename to com/hbm/render/tileentity/RenderTestContainer.java index dc8c78946..1e9907364 100644 --- a/com/hbm/render/RenderTestContainer.java +++ b/com/hbm/render/tileentity/RenderTestContainer.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.relauncher.Side; diff --git a/com/hbm/render/RenderTestMissile.java b/com/hbm/render/tileentity/RenderTestMissile.java similarity index 97% rename from com/hbm/render/RenderTestMissile.java rename to com/hbm/render/tileentity/RenderTestMissile.java index f25a04808..2e4c6c788 100644 --- a/com/hbm/render/RenderTestMissile.java +++ b/com/hbm/render/tileentity/RenderTestMissile.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderTestRender.java b/com/hbm/render/tileentity/RenderTestRender.java similarity index 92% rename from com/hbm/render/RenderTestRender.java rename to com/hbm/render/tileentity/RenderTestRender.java index 0a7701a6c..900bef7d0 100644 --- a/com/hbm/render/RenderTestRender.java +++ b/com/hbm/render/tileentity/RenderTestRender.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelTestRender; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RenderUF6Tank.java b/com/hbm/render/tileentity/RenderUF6Tank.java similarity index 97% rename from com/hbm/render/RenderUF6Tank.java rename to com/hbm/render/tileentity/RenderUF6Tank.java index 583f778bf..fe3cb232b 100644 --- a/com/hbm/render/RenderUF6Tank.java +++ b/com/hbm/render/tileentity/RenderUF6Tank.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/render/RenderYellowBarrel.java b/com/hbm/render/tileentity/RenderYellowBarrel.java similarity index 92% rename from com/hbm/render/RenderYellowBarrel.java rename to com/hbm/render/tileentity/RenderYellowBarrel.java index 90b771501..13c104b05 100644 --- a/com/hbm/render/RenderYellowBarrel.java +++ b/com/hbm/render/tileentity/RenderYellowBarrel.java @@ -1,8 +1,9 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelTestRender; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; diff --git a/com/hbm/render/RendererObjTester.java b/com/hbm/render/tileentity/RendererObjTester.java similarity index 97% rename from com/hbm/render/RendererObjTester.java rename to com/hbm/render/tileentity/RendererObjTester.java index 4c50cb98f..6ad79d388 100644 --- a/com/hbm/render/RendererObjTester.java +++ b/com/hbm/render/tileentity/RendererObjTester.java @@ -1,4 +1,4 @@ -package com.hbm.render; +package com.hbm.render.tileentity; import org.lwjgl.opengl.GL11; diff --git a/com/hbm/sound/MovingSoundChopper.java b/com/hbm/sound/MovingSoundChopper.java new file mode 100644 index 000000000..9cd550c8c --- /dev/null +++ b/com/hbm/sound/MovingSoundChopper.java @@ -0,0 +1,25 @@ +package com.hbm.sound; + +import com.hbm.entity.mob.EntityHunterChopper; +import com.hbm.items.ModItems; +import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +public class MovingSoundChopper extends MovingSoundPlayerLoop { + + public MovingSoundChopper(ResourceLocation p_i45104_1_, Entity player, EnumHbmSound type) { + super(p_i45104_1_, player, type); + } + + @Override + public void update() { + super.update(); + + if(player instanceof EntityHunterChopper && ((EntityHunterChopper)player).getIsDying()) + this.stop(); + } +} diff --git a/com/hbm/sound/MovingSoundChopperMine.java b/com/hbm/sound/MovingSoundChopperMine.java new file mode 100644 index 000000000..912b056ef --- /dev/null +++ b/com/hbm/sound/MovingSoundChopperMine.java @@ -0,0 +1,14 @@ +package com.hbm.sound; + +import com.hbm.entity.mob.EntityHunterChopper; +import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound; + +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +public class MovingSoundChopperMine extends MovingSoundPlayerLoop { + + public MovingSoundChopperMine(ResourceLocation p_i45104_1_, Entity player, EnumHbmSound type) { + super(p_i45104_1_, player, type); + } +} diff --git a/com/hbm/sound/MovingSoundCrashing.java b/com/hbm/sound/MovingSoundCrashing.java new file mode 100644 index 000000000..a4913a60a --- /dev/null +++ b/com/hbm/sound/MovingSoundCrashing.java @@ -0,0 +1,22 @@ +package com.hbm.sound; + +import com.hbm.entity.mob.EntityHunterChopper; +import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound; + +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +public class MovingSoundCrashing extends MovingSoundPlayerLoop { + + public MovingSoundCrashing(ResourceLocation p_i45104_1_, Entity player, EnumHbmSound type) { + super(p_i45104_1_, player, type); + } + + @Override + public void update() { + super.update(); + + if(player instanceof EntityHunterChopper && !((EntityHunterChopper)player).getIsDying()) + this.stop(); + } +} diff --git a/com/hbm/sound/MovingSoundPlayerLoop.java b/com/hbm/sound/MovingSoundPlayerLoop.java new file mode 100644 index 000000000..f3d0a5e7d --- /dev/null +++ b/com/hbm/sound/MovingSoundPlayerLoop.java @@ -0,0 +1,75 @@ +package com.hbm.sound; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.client.audio.MovingSound; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ResourceLocation; + +public abstract class MovingSoundPlayerLoop extends MovingSound { + + public static List globalSoundList = new ArrayList(); + public List playerForSound = new ArrayList(); + public Entity player; + public enum EnumHbmSound { soundTauLoop, soundChopperLoop, soundCrashingLoop, soundMineLoop }; + public EnumHbmSound type; + public boolean init; + + public MovingSoundPlayerLoop(ResourceLocation res, Entity player, EnumHbmSound type) { + super(res); + this.player = player; + this.type = type; + this.init = false; + this.repeat = true; + if(MovingSoundPlayerLoop.getSoundByPlayer(player, type) == null) + globalSoundList.add(this); + } + + @Override + public void update() { + + if(player != null) { + this.xPosF = (float)player.posX; + this.yPosF = (float)player.posY; + this.zPosF = (float)player.posZ; + } + + if(player == null || player.isDead) + this.stop(); + } + + public void stop() { + + this.donePlaying = true; + this.repeat = false; + while(MovingSoundPlayerLoop.getSoundByPlayer(player, type) != null) + globalSoundList.remove(MovingSoundPlayerLoop.getSoundByPlayer(player, type)); + + this.player = null; + } + + public static MovingSoundPlayerLoop getSoundByPlayer(Entity player, EnumHbmSound type) { + + for(MovingSoundPlayerLoop sound : globalSoundList) { + if(sound.player == player && sound.type == type) + return sound; + } + + return null; + } + + public void setPitch(float f) { + this.field_147663_c = f; + } + + public void setVolume(float f) { + this.volume = f; + } + + public void setDone(boolean b) { + this.donePlaying = b; + } + +} diff --git a/com/hbm/sound/MovingSoundXVL1456.java b/com/hbm/sound/MovingSoundXVL1456.java new file mode 100644 index 000000000..2bee857e1 --- /dev/null +++ b/com/hbm/sound/MovingSoundXVL1456.java @@ -0,0 +1,34 @@ +package com.hbm.sound; + +import com.hbm.items.ModItems; + +import net.minecraft.client.audio.MovingSound; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +public class MovingSoundXVL1456 extends MovingSoundPlayerLoop { + + public MovingSoundXVL1456(ResourceLocation p_i45104_1_, Entity player, EnumHbmSound type) { + super(p_i45104_1_, player, type); + this.setPitch(0.5F); + } + + @Override + public void update() { + super.update(); + + ItemStack i = null; + + if(this.player != null) { + i = ((EntityPlayer)this.player).getItemInUse(); + } + + //this.setPitch(this.getPitch() + 0.1F); + + if(i == null || (i != null && i.getItem() != ModItems.gun_xvl1456) || !((EntityPlayer)this.player).isSneaking() || ((EntityPlayer)this.player).getItemInUseDuration() <= 0) + this.stop(); + } +} \ No newline at end of file diff --git a/com/hbm/tileentity/TileEntityFWatzCore.java b/com/hbm/tileentity/TileEntityFWatzCore.java index a8562af8d..0da146e29 100644 --- a/com/hbm/tileentity/TileEntityFWatzCore.java +++ b/com/hbm/tileentity/TileEntityFWatzCore.java @@ -6,13 +6,13 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.calc.UnionOfTileEntitiesAndBooleans; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.IReactor; import com.hbm.interfaces.ISource; import com.hbm.items.ModItems; -import com.hbm.items.WatzFuel; +import com.hbm.items.special.WatzFuel; import com.hbm.lib.Library; import com.hbm.main.MainRegistry; import com.hbm.world.FWatz; @@ -215,8 +215,6 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory, { return true; } - - //return false; } @Override @@ -266,7 +264,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory, @Override public void updateEntity() { - if (this.isStructureValid(this.worldObj) && !this.worldObj.isRemote) { + if (this.isStructureValid(this.worldObj)) { age++; if (age >= 20) { @@ -276,11 +274,9 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory, if (age == 9 || age == 19) ffgeuaInit(); - if (hasFuse() && getSingularityType() > 0) { + if (hasFuse() && getSingularityType() > 0 && isStructureValid(worldObj)) { if(cooldown) { - this.emptyPlasma(); - int i = getSingularityType(); if(i == 1) @@ -302,37 +298,42 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory, } else { int i = getSingularityType(); - this.fillPlasma(); + boolean isWorking = false; if(i == 1 && amat - 750 >= 0 && aSchrab - 750 >= 0) { cool -= 150; amat -= 750; aSchrab -= 750; power += 500000; + isWorking = true; } if(i == 2 && amat - 750 >= 0 && aSchrab - 350 >= 0) { cool -= 75; amat -= 350; aSchrab -= 300; power += 250000; + isWorking = true; } if(i == 3 && amat - 750 >= 0 && aSchrab - 1400 >= 0) { cool -= 300; amat -= 750; aSchrab -= 1400; power += 1000000; + isWorking = true; } if(i == 4 && amat - 1000 >= 0 && aSchrab - 1000 >= 0) { cool -= 100; amat -= 1000; aSchrab -= 1000; power += 1000000; + isWorking = true; } if(i == 5 && amat - 150 >= 0 && aSchrab - 150 >= 0) { cool -= 150; amat -= 150; aSchrab -= 150; power += 10000000; + isWorking = true; } if(power > maxPower) @@ -401,14 +402,22 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory, this.aSchrab = maxASchrab; } } + + if(this.isRunning() && (amat <= 0 || aSchrab <= 0 || !hasFuse() || getSingularityType() == 0) || cooldown || !this.isStructureValid(worldObj)) + this.emptyPlasma(); + + if(!this.isRunning() && amat >= 1000 && aSchrab >= 1000 && hasFuse() && getSingularityType() > 0 && !cooldown && this.isStructureValid(worldObj)) + this.fillPlasma(); } public void fillPlasma() { - FWatz.fillPlasma(worldObj, this.xCoord, this.yCoord, this.zCoord); + if(!this.worldObj.isRemote) + FWatz.fillPlasma(worldObj, this.xCoord, this.yCoord, this.zCoord); } public void emptyPlasma() { - FWatz.emptyPlasma(worldObj, this.xCoord, this.yCoord, this.zCoord); + if(!this.worldObj.isRemote) + FWatz.emptyPlasma(worldObj, this.xCoord, this.yCoord, this.zCoord); } public boolean isRunning() { diff --git a/com/hbm/tileentity/TileEntityMachineCMBFactory.java b/com/hbm/tileentity/TileEntityMachineCMBFactory.java index 264cf66e9..fba85b901 100644 --- a/com/hbm/tileentity/TileEntityMachineCMBFactory.java +++ b/com/hbm/tileentity/TileEntityMachineCMBFactory.java @@ -1,8 +1,8 @@ package com.hbm.tileentity; import com.hbm.interfaces.IConsumer; -import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; diff --git a/com/hbm/tileentity/TileEntityMachineCoal.java b/com/hbm/tileentity/TileEntityMachineCoal.java index 8745e9e70..7f2acb509 100644 --- a/com/hbm/tileentity/TileEntityMachineCoal.java +++ b/com/hbm/tileentity/TileEntityMachineCoal.java @@ -20,8 +20,8 @@ import com.hbm.calc.UnionOfTileEntitiesAndBooleans; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; -import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; import com.hbm.lib.Library; public class TileEntityMachineCoal extends TileEntity implements ISidedInventory, ISource { @@ -121,7 +121,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory if(stack.getItem() instanceof ItemBattery) return true; if(i == 1) - if(stack.getItem() == Items.coal || stack.getItem() == Item.getItemFromBlock(Blocks.coal_block)) + if(stack.getItem() == Items.coal || stack.getItem() == ModItems.powder_coal || stack.getItem() == Item.getItemFromBlock(Blocks.coal_block)) return true; return false; @@ -333,6 +333,15 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory slots[1] = null; } } + if(slots[1] != null && slots[1].getItem() == ModItems.powder_coal && burnTime <= 0) + { + slots[1].stackSize -= 1; + burnTime = 200; + if(slots[1].stackSize == 0) + { + slots[1] = null; + } + } if(slots[1] != null && slots[1].getItem() == Item.getItemFromBlock(Blocks.coal_block) && burnTime <= 0) { slots[1].stackSize -= 1; @@ -362,11 +371,15 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory } public boolean isItemValid() { - + if(slots[1] != null && slots[1].getItem() == Items.coal) { return true; } + if(slots[1] != null && slots[1].getItem() == ModItems.powder_coal) + { + return true; + } if(slots[1] != null && slots[1].getItem() == Item.getItemFromBlock(Blocks.coal_block)) { return true; diff --git a/com/hbm/tileentity/TileEntityMachineDeuterium.java b/com/hbm/tileentity/TileEntityMachineDeuterium.java index 8cbec0898..c48612fd9 100644 --- a/com/hbm/tileentity/TileEntityMachineDeuterium.java +++ b/com/hbm/tileentity/TileEntityMachineDeuterium.java @@ -2,8 +2,8 @@ package com.hbm.tileentity; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; -import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; diff --git a/com/hbm/tileentity/TileEntityMachineDiesel.java b/com/hbm/tileentity/TileEntityMachineDiesel.java index 33ba1788c..7d053d90b 100644 --- a/com/hbm/tileentity/TileEntityMachineDiesel.java +++ b/com/hbm/tileentity/TileEntityMachineDiesel.java @@ -8,8 +8,8 @@ import com.hbm.calc.UnionOfTileEntitiesAndBooleans; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; -import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; import com.hbm.lib.Library; import net.minecraft.block.Block; @@ -26,21 +26,23 @@ import net.minecraft.tileentity.TileEntity; public class TileEntityMachineDiesel extends TileEntity implements ISidedInventory, ISource { private ItemStack slots[]; - + public int power; public int diesel; public int soundCycle = 0; public static final int maxPower = 10000; + public int powerCap = 10000; + public int superTimer; public static final int maxDiesel = 10000; public int age = 0; public List list = new ArrayList(); - - private static final int[] slots_top = new int[] {0}; - private static final int[] slots_bottom = new int[] {1, 2}; - private static final int[] slots_side = new int[] {2}; - + + private static final int[] slots_top = new int[] { 0 }; + private static final int[] slots_bottom = new int[] { 1, 2 }; + private static final int[] slots_side = new int[] { 2 }; + private String customName; - + public TileEntityMachineDiesel() { slots = new ItemStack[3]; } @@ -57,21 +59,19 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento @Override public ItemStack getStackInSlotOnClosing(int i) { - if(slots[i] != null) - { + if (slots[i] != null) { ItemStack itemStack = slots[i]; slots[i] = null; return itemStack; } else { - return null; + return null; } } @Override public void setInventorySlotContents(int i, ItemStack itemStack) { slots[i] = itemStack; - if(itemStack != null && itemStack.stackSize > getInventoryStackLimit()) - { + if (itemStack != null && itemStack.stackSize > getInventoryStackLimit()) { itemStack.stackSize = getInventoryStackLimit(); } } @@ -85,7 +85,7 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento public boolean hasCustomInventoryName() { return this.customName != null && this.customName.length() > 0; } - + public void setCustomName(String name) { this.customName = name; } @@ -97,99 +97,98 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento @Override public boolean isUseableByPlayer(EntityPlayer player) { - if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) - { + if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { return false; - }else{ - return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64; + } else { + return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64; } } - - //You scrubs aren't needed for anything (right now) + + // You scrubs aren't needed for anything (right now) @Override - public void openInventory() {} + public void openInventory() { + } + @Override - public void closeInventory() {} + public void closeInventory() { + } @Override public boolean isItemValidForSlot(int i, ItemStack stack) { - if(i == 0) - if(stack.getItem() == ModItems.canister_fuel || stack.getItem() == Item.getItemFromBlock(ModBlocks.red_barrel)) + if (i == 0) + if (stack.getItem() == ModItems.canister_fuel || stack.getItem() == ModItems.canister_NITAN + || stack.getItem() == Item.getItemFromBlock(ModBlocks.red_barrel)) return true; - if(i == 2) - if(stack.getItem() instanceof ItemBattery) + if (i == 2) + if (stack.getItem() instanceof ItemBattery) return true; - + return false; } - + @Override public ItemStack decrStackSize(int i, int j) { - if(slots[i] != null) - { - if(slots[i].stackSize <= j) - { + if (slots[i] != null) { + if (slots[i].stackSize <= j) { ItemStack itemStack = slots[i]; slots[i] = null; return itemStack; } ItemStack itemStack1 = slots[i].splitStack(j); - if (slots[i].stackSize == 0) - { + if (slots[i].stackSize == 0) { slots[i] = null; } - + return itemStack1; } else { return null; } } - + @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("items", 10); - - this.power = nbt.getShort("powerTime"); + + this.power = nbt.getInteger("powerTime"); this.diesel = nbt.getShort("diesel"); + this.powerCap = nbt.getInteger("powerCap"); + this.superTimer = nbt.getInteger("superTimer"); slots = new ItemStack[getSizeInventory()]; - - for(int i = 0; i < list.tagCount(); i++) - { + + for (int i = 0; i < list.tagCount(); i++) { NBTTagCompound nbt1 = list.getCompoundTagAt(i); byte b0 = nbt1.getByte("slot"); - if(b0 >= 0 && b0 < slots.length) - { + if (b0 >= 0 && b0 < slots.length) { slots[b0] = ItemStack.loadItemStackFromNBT(nbt1); } } } - + @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setShort("powerTime", (short) power); + nbt.setInteger("powerTime", power); nbt.setShort("diesel", (short) diesel); + nbt.setInteger("powerCap", powerCap); + nbt.setInteger("superTimer", superTimer); NBTTagList list = new NBTTagList(); - - for(int i = 0; i < slots.length; i++) - { - if(slots[i] != null) - { + + for (int i = 0; i < slots.length; i++) { + if (slots[i] != null) { NBTTagCompound nbt1 = new NBTTagCompound(); - nbt1.setByte("slot", (byte)i); + nbt1.setByte("slot", (byte) i); slots[i].writeToNBT(nbt1); list.appendTag(nbt1); } } nbt.setTag("items", list); } - + @Override - public int[] getAccessibleSlotsFromSide(int p_94128_1_) - { - return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side); - } + public int[] getAccessibleSlotsFromSide(int p_94128_1_) { + return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side); + } @Override public boolean canInsertItem(int i, ItemStack itemStack, int j) { @@ -198,126 +197,159 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento @Override public boolean canExtractItem(int i, ItemStack itemStack, int j) { - if(i == 1) - if(itemStack.getItem() == ModItems.canister_empty || itemStack.getItem() == ModItems.tank_steel) + if (i == 1) + if (itemStack.getItem() == ModItems.canister_empty || itemStack.getItem() == ModItems.tank_steel) return true; - if(i == 2) - if(itemStack.getItemDamage() == 0) + if (i == 2) + if (itemStack.getItemDamage() == 0) return true; - + return false; } - + public int getDieselScaled(int i) { return (diesel * i) / maxDiesel; } - + public int getPowerScaled(int i) { - return (power * i) / maxPower; + return (power * i) / powerCap; } - + @Override public void updateEntity() { if (!worldObj.isRemote) { - age++; - if(age >= 20) - { - age = 0; - } - - if(age == 9 || age == 19) - ffgeuaInit(); - - if(slots[0] != null && slots[0].getItem() == ModItems.inf_diesel) - { - diesel = maxDiesel; - } - - if(slots[0] != null && slots[0].getItem() == ModItems.canister_fuel && diesel + 625 <= maxDiesel) - { - if(slots[1] == null || slots[1] != null && slots[1].getItem() == slots[0].getItem().getContainerItem() && slots[1].stackSize < slots[1].getMaxStackSize()) - { - if(slots[1] == null) - slots[1] = new ItemStack(slots[0].getItem().getContainerItem()); - else - slots[1].stackSize++; - - slots[0].stackSize--; - if(slots[0].stackSize <= 0) - slots[0] = null; - - diesel += 625; + age++; + if (age >= 20) { + age = 0; } - } - - if(slots[0] != null && slots[0].getItem() == Item.getItemFromBlock(ModBlocks.red_barrel) && diesel + 5000 <= maxDiesel) - { - if(slots[1] == null || slots[1] != null && slots[1].getItem() == ModItems.tank_steel && slots[1].stackSize < slots[1].getMaxStackSize()) + + if(superTimer > 0) { - if(slots[1] == null) - slots[1] = new ItemStack(ModItems.tank_steel); - else - slots[1].stackSize++; - - slots[0].stackSize--; - if(slots[0].stackSize <= 0) - slots[0] = null; - - diesel += 5000; + superTimer--; + powerCap = 1000000000; + } + + if(superTimer <= 0 && powerCap != maxPower) + { + powerCap = maxPower; + + if(worldObj.getBlock(this.xCoord, this.yCoord + 1, this.zCoord) == Blocks.air) + worldObj.setBlock(this.xCoord, this.yCoord + 1, this.zCoord, Blocks.fire); } - } - //Battery Item - if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_generic && slots[2].getItemDamage() > 0) - { - power -= 100; - slots[2].setItemDamage(slots[2].getItemDamage() - 1); - } - if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_advanced && slots[2].getItemDamage() > 0) - { - power -= 100; - slots[2].setItemDamage(slots[2].getItemDamage() - 1); - } - if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_schrabidium && slots[2].getItemDamage() > 0) - { - power -= 100; - slots[2].setItemDamage(slots[2].getItemDamage() - 1); - } - if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.factory_core_titanium && slots[2].getItemDamage() > 0) - { - power -= 100; - slots[2].setItemDamage(slots[2].getItemDamage() - 1); - } - if(power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.factory_core_advanced && slots[2].getItemDamage() > 0) - { - power -= 100; - slots[2].setItemDamage(slots[2].getItemDamage() - 1); - } - - generate(); + if (age == 9 || age == 19) + ffgeuaInit(); + + if (slots[0] != null && slots[0].getItem() == ModItems.inf_diesel) { + diesel = maxDiesel; + } + + if (slots[0] != null && slots[0].getItem() == ModItems.canister_fuel && diesel + 625 <= maxDiesel) { + if (slots[1] == null || slots[1] != null && slots[1].getItem() == slots[0].getItem().getContainerItem() + && slots[1].stackSize < slots[1].getMaxStackSize()) { + if (slots[1] == null) + slots[1] = new ItemStack(slots[0].getItem().getContainerItem()); + else + slots[1].stackSize++; + + slots[0].stackSize--; + if (slots[0].stackSize <= 0) + slots[0] = null; + + diesel += 625; + } + } + + if (slots[0] != null && slots[0].getItem() == ModItems.canister_NITAN && diesel + 625 <= maxDiesel) { + if (slots[1] == null || slots[1] != null && slots[1].getItem() == slots[0].getItem().getContainerItem() + && slots[1].stackSize < slots[1].getMaxStackSize()) { + if (slots[1] == null) + slots[1] = new ItemStack(slots[0].getItem().getContainerItem()); + else + slots[1].stackSize++; + + slots[0].stackSize--; + if (slots[0].stackSize <= 0) + slots[0] = null; + + diesel += 625; + superTimer += 200; + } + } + + if (slots[0] != null && slots[0].getItem() == Item.getItemFromBlock(ModBlocks.red_barrel) + && diesel + 5000 <= maxDiesel) { + if (slots[1] == null || slots[1] != null && slots[1].getItem() == ModItems.tank_steel + && slots[1].stackSize < slots[1].getMaxStackSize()) { + if (slots[1] == null) + slots[1] = new ItemStack(ModItems.tank_steel); + else + slots[1].stackSize++; + + slots[0].stackSize--; + if (slots[0].stackSize <= 0) + slots[0] = null; + + diesel += 5000; + } + } + + // Battery Item + if (power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_generic + && slots[2].getItemDamage() > 0) { + power -= 100; + slots[2].setItemDamage(slots[2].getItemDamage() - 1); + } + if (power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_advanced + && slots[2].getItemDamage() > 0) { + power -= 100; + slots[2].setItemDamage(slots[2].getItemDamage() - 1); + } + if (power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.battery_schrabidium + && slots[2].getItemDamage() > 0) { + power -= 100; + slots[2].setItemDamage(slots[2].getItemDamage() - 1); + } + if (power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.factory_core_titanium + && slots[2].getItemDamage() > 0) { + power -= 100; + slots[2].setItemDamage(slots[2].getItemDamage() - 1); + } + if (power - 100 >= 0 && slots[2] != null && slots[2].getItem() == ModItems.factory_core_advanced + && slots[2].getItemDamage() > 0) { + power -= 100; + slots[2].setItemDamage(slots[2].getItemDamage() - 1); + } + + generate(); } } - - public void generate() { - if(diesel > 0) - { - if(soundCycle == 0) - this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "fireworks.blast", 1.0F, 0.5F); - soundCycle++; - - if(soundCycle >= 3) - soundCycle = 0; - - diesel -= 10; - if(diesel < 0) - diesel = 0; - - if(power + 25 <= maxPower) - { + public void generate() { + if (diesel > 0) { + if (soundCycle == 0) { + if(this.superTimer > 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "fireworks.blast", 1.0F, 1.0F); + else + this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "fireworks.blast", 1.0F, 0.5F); + } + soundCycle++; + + if (soundCycle >= 3 && this.superTimer <= 0) + soundCycle = 0; + if(this.superTimer > 0) + soundCycle = 0; + + diesel -= 10; + if (diesel < 0) + diesel = 0; + + if (power + 25 <= powerCap && this.superTimer <= 0) { power += 25; + } else if (power + 1000000000 <= powerCap && this.superTimer > 0) { + power += 1000000000; } else { - power = maxPower; + power = powerCap; } } } @@ -327,36 +359,30 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento Block block = this.worldObj.getBlock(x, y, z); TileEntity tileentity = this.worldObj.getTileEntity(x, y, z); - if(block == ModBlocks.factory_titanium_conductor && this.worldObj.getBlock(x, y + 1, z) == ModBlocks.factory_titanium_core) - { + if (block == ModBlocks.factory_titanium_conductor + && this.worldObj.getBlock(x, y + 1, z) == ModBlocks.factory_titanium_core) { tileentity = this.worldObj.getTileEntity(x, y + 1, z); } - if(block == ModBlocks.factory_titanium_conductor && this.worldObj.getBlock(x, y - 1, z) == ModBlocks.factory_titanium_core) - { + if (block == ModBlocks.factory_titanium_conductor + && this.worldObj.getBlock(x, y - 1, z) == ModBlocks.factory_titanium_core) { tileentity = this.worldObj.getTileEntity(x, y - 1, z); } - if(block == ModBlocks.factory_advanced_conductor && this.worldObj.getBlock(x, y + 1, z) == ModBlocks.factory_advanced_core) - { + if (block == ModBlocks.factory_advanced_conductor + && this.worldObj.getBlock(x, y + 1, z) == ModBlocks.factory_advanced_core) { tileentity = this.worldObj.getTileEntity(x, y + 1, z); } - if(block == ModBlocks.factory_advanced_conductor && this.worldObj.getBlock(x, y - 1, z) == ModBlocks.factory_advanced_core) - { + if (block == ModBlocks.factory_advanced_conductor + && this.worldObj.getBlock(x, y - 1, z) == ModBlocks.factory_advanced_core) { tileentity = this.worldObj.getTileEntity(x, y - 1, z); } - - if(tileentity instanceof IConductor) - { - if(tileentity instanceof TileEntityCable) - { - if(Library.checkUnionList(((TileEntityCable)tileentity).uoteab, this)) - { - for(int i = 0; i < ((TileEntityCable)tileentity).uoteab.size(); i++) - { - if(((TileEntityCable)tileentity).uoteab.get(i).source == this) - { - if(((TileEntityCable)tileentity).uoteab.get(i).ticked != newTact) - { - ((TileEntityCable)tileentity).uoteab.get(i).ticked = newTact; + + if (tileentity instanceof IConductor) { + if (tileentity instanceof TileEntityCable) { + if (Library.checkUnionList(((TileEntityCable) tileentity).uoteab, this)) { + for (int i = 0; i < ((TileEntityCable) tileentity).uoteab.size(); i++) { + if (((TileEntityCable) tileentity).uoteab.get(i).source == this) { + if (((TileEntityCable) tileentity).uoteab.get(i).ticked != newTact) { + ((TileEntityCable) tileentity).uoteab.get(i).ticked = newTact; ffgeua(x, y + 1, z, getTact()); ffgeua(x, y - 1, z, getTact()); ffgeua(x - 1, y, z, getTact()); @@ -367,20 +393,15 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento } } } else { - ((TileEntityCable)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleans(this, newTact)); + ((TileEntityCable) tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleans(this, newTact)); } } - if(tileentity instanceof TileEntityWireCoated) - { - if(Library.checkUnionList(((TileEntityWireCoated)tileentity).uoteab, this)) - { - for(int i = 0; i < ((TileEntityWireCoated)tileentity).uoteab.size(); i++) - { - if(((TileEntityWireCoated)tileentity).uoteab.get(i).source == this) - { - if(((TileEntityWireCoated)tileentity).uoteab.get(i).ticked != newTact) - { - ((TileEntityWireCoated)tileentity).uoteab.get(i).ticked = newTact; + if (tileentity instanceof TileEntityWireCoated) { + if (Library.checkUnionList(((TileEntityWireCoated) tileentity).uoteab, this)) { + for (int i = 0; i < ((TileEntityWireCoated) tileentity).uoteab.size(); i++) { + if (((TileEntityWireCoated) tileentity).uoteab.get(i).source == this) { + if (((TileEntityWireCoated) tileentity).uoteab.get(i).ticked != newTact) { + ((TileEntityWireCoated) tileentity).uoteab.get(i).ticked = newTact; ffgeua(x, y + 1, z, getTact()); ffgeua(x, y - 1, z, getTact()); ffgeua(x - 1, y, z, getTact()); @@ -391,28 +412,23 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento } } } else { - ((TileEntityWireCoated)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleans(this, newTact)); + ((TileEntityWireCoated) tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleans(this, newTact)); } } } - - if(tileentity instanceof IConsumer && newTact && !(tileentity instanceof TileEntityMachineBattery && ((TileEntityMachineBattery)tileentity).conducts)) - { - list.add((IConsumer)tileentity); + + if (tileentity instanceof IConsumer && newTact && !(tileentity instanceof TileEntityMachineBattery + && ((TileEntityMachineBattery) tileentity).conducts)) { + list.add((IConsumer) tileentity); } - - if(!newTact) - { + + if (!newTact) { int size = list.size(); - if(size > 0) - { + if (size > 0) { int part = this.power / size; - for(IConsumer consume : list) - { - if(consume.getPower() < consume.getMaxPower()) - { - if(consume.getMaxPower() - consume.getPower() >= part) - { + for (IConsumer consume : list) { + if (consume.getPower() < consume.getMaxPower()) { + if (consume.getMaxPower() - consume.getPower() >= part) { this.power -= part; consume.setPower(consume.getPower() + part); } else { @@ -435,13 +451,12 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento ffgeua(this.xCoord, this.yCoord, this.zCoord - 1, getTact()); ffgeua(this.xCoord, this.yCoord, this.zCoord + 1, getTact()); } - + public boolean getTact() { - if(age >= 0 && age < 10) - { + if (age >= 0 && age < 10) { return true; } - + return false; } } diff --git a/com/hbm/tileentity/TileEntityMachineElectricFurnace.java b/com/hbm/tileentity/TileEntityMachineElectricFurnace.java index 695aad1aa..fa5d59ffb 100644 --- a/com/hbm/tileentity/TileEntityMachineElectricFurnace.java +++ b/com/hbm/tileentity/TileEntityMachineElectricFurnace.java @@ -4,8 +4,8 @@ import com.hbm.blocks.MachineElectricFurnace; import com.hbm.gui.MachineRecipes; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; -import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; diff --git a/com/hbm/tileentity/TileEntityMachineGenerator.java b/com/hbm/tileentity/TileEntityMachineGenerator.java index cf73c9273..1d978fec3 100644 --- a/com/hbm/tileentity/TileEntityMachineGenerator.java +++ b/com/hbm/tileentity/TileEntityMachineGenerator.java @@ -11,9 +11,9 @@ import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; -import com.hbm.items.ItemBattery; -import com.hbm.items.ItemFuelRod; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; +import com.hbm.items.special.ItemFuelRod; import com.hbm.lib.Library; import net.minecraft.block.Block; diff --git a/com/hbm/tileentity/TileEntityMachineSchrabidiumTransmutator.java b/com/hbm/tileentity/TileEntityMachineSchrabidiumTransmutator.java index c6dd4863d..78a0838b4 100644 --- a/com/hbm/tileentity/TileEntityMachineSchrabidiumTransmutator.java +++ b/com/hbm/tileentity/TileEntityMachineSchrabidiumTransmutator.java @@ -3,8 +3,8 @@ package com.hbm.tileentity; import java.util.Random; import com.hbm.interfaces.IConsumer; -import com.hbm.items.ItemBattery; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory; diff --git a/com/hbm/tileentity/TileEntityMachineShredder.java b/com/hbm/tileentity/TileEntityMachineShredder.java index dd6a51133..5a54cd37e 100644 --- a/com/hbm/tileentity/TileEntityMachineShredder.java +++ b/com/hbm/tileentity/TileEntityMachineShredder.java @@ -8,9 +8,9 @@ import com.hbm.gui.MachineRecipes; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; -import com.hbm.items.ItemBattery; -import com.hbm.items.ItemBlades; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; +import com.hbm.items.special.ItemBlades; import com.hbm.lib.Library; import net.minecraft.block.Block; diff --git a/com/hbm/tileentity/TileEntityMachineTeleporter.java b/com/hbm/tileentity/TileEntityMachineTeleporter.java new file mode 100644 index 000000000..48eb92abe --- /dev/null +++ b/com/hbm/tileentity/TileEntityMachineTeleporter.java @@ -0,0 +1,116 @@ +package com.hbm.tileentity; + +import java.util.List; + +import com.hbm.interfaces.IConsumer; +import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; +import com.hbm.lib.ModDamageSource; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Items; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; + +public class TileEntityMachineTeleporter extends TileEntity implements IConsumer { + + public int power = 0; + public int targetX = 0; + public int targetY = 0; + public int targetZ = 0; + public boolean linked = false; + // true: send; false: receive + public boolean mode = false; + public static final int maxPower = 100000; + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + + power = nbt.getInteger("power"); + targetX = nbt.getInteger("x1"); + targetY = nbt.getInteger("y1"); + targetZ = nbt.getInteger("z1"); + linked = nbt.getBoolean("linked"); + mode = nbt.getBoolean("mode"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + + nbt.setInteger("power", power); + nbt.setInteger("x1", targetX); + nbt.setInteger("y1", targetY); + nbt.setInteger("z1", targetZ); + nbt.setBoolean("linked", linked); + nbt.setBoolean("mode", mode); + } + + @Override + public void updateEntity() { + + boolean b0 = false; + + if (!this.worldObj.isRemote) { + List entities = this.worldObj.getEntitiesWithinAABB(Entity.class, + AxisAlignedBB.getBoundingBox(this.xCoord - 0.5, this.yCoord, this.zCoord - 0.5, this.xCoord + 1.5, + this.yCoord + 2, this.zCoord + 1.5)); + if (!entities.isEmpty()) + for (Entity e : entities) { + if(e.ticksExisted >= 10) { + teleport(e); + b0 = true; + } + } + } + + if(b0) + worldObj.spawnParticle("cloud", xCoord + 0.5, yCoord + 1, zCoord + 0.5, 0.0D, 0.1D, 0.0D); + } + + public void teleport(Entity entity) { + + if (!this.linked || !this.mode || this.power < 50000) + return; + + TileEntity te = this.worldObj.getTileEntity(targetX, targetY, targetZ); + + if (te == null || !(te instanceof TileEntityMachineTeleporter) || ((TileEntityMachineTeleporter) te).mode) { + entity.attackEntityFrom(ModDamageSource.teleporter, Float.POSITIVE_INFINITY); + } else { + if ((entity instanceof EntityPlayerMP)) { + ((EntityPlayerMP) entity).setPositionAndUpdate(this.targetX + 0.5D, + this.targetY + 1.5D + entity.getYOffset(), this.targetZ + 0.5D); + } else { + entity.setPositionAndRotation(this.targetX + 0.5D, this.targetY + 1.5D + entity.getYOffset(), + this.targetZ + 0.5D, entity.rotationYaw, entity.rotationPitch); + } + } + + this.power -= 50000; + } + + @Override + public void setPower(int i) { + power = i; + } + + @Override + public int getPower() { + return power; + } + + @Override + public int getMaxPower() { + return maxPower; + } +} diff --git a/com/hbm/tileentity/TileEntityNukeFurnace.java b/com/hbm/tileentity/TileEntityNukeFurnace.java index 3e2958b6b..62e8ba9cb 100644 --- a/com/hbm/tileentity/TileEntityNukeFurnace.java +++ b/com/hbm/tileentity/TileEntityNukeFurnace.java @@ -1,9 +1,9 @@ package com.hbm.tileentity; import com.hbm.blocks.MachineNukeFurnace; -import com.hbm.items.ItemCustomLore; -import com.hbm.items.ItemFuelRod; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemCustomLore; +import com.hbm.items.special.ItemFuelRod; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory; diff --git a/com/hbm/tileentity/TileEntityReactorMultiblock.java b/com/hbm/tileentity/TileEntityReactorMultiblock.java index 3644b2d88..65e080d27 100644 --- a/com/hbm/tileentity/TileEntityReactorMultiblock.java +++ b/com/hbm/tileentity/TileEntityReactorMultiblock.java @@ -8,17 +8,17 @@ import java.util.Random; import com.hbm.blocks.MachineGenerator; import com.hbm.blocks.ModBlocks; import com.hbm.calc.UnionOfTileEntitiesAndBooleans; -import com.hbm.entity.EntityNuclearCreeper; -import com.hbm.entity.EntityNukeCloudSmall; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.effect.EntityNukeCloudSmall; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.explosion.ExplosionNukeGeneric; import com.hbm.explosion.ExplosionParticle; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.IReactor; import com.hbm.interfaces.ISource; -import com.hbm.items.ItemFuelRod; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemFuelRod; import com.hbm.lib.Library; import net.minecraft.block.Block; diff --git a/com/hbm/tileentity/TileEntityWatzCore.java b/com/hbm/tileentity/TileEntityWatzCore.java index 5a16b6ade..41be04851 100644 --- a/com/hbm/tileentity/TileEntityWatzCore.java +++ b/com/hbm/tileentity/TileEntityWatzCore.java @@ -6,13 +6,13 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.calc.UnionOfTileEntitiesAndBooleans; -import com.hbm.entity.EntityNukeExplosionAdvanced; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.IReactor; import com.hbm.interfaces.ISource; import com.hbm.items.ModItems; -import com.hbm.items.WatzFuel; +import com.hbm.items.special.WatzFuel; import com.hbm.lib.Library; import com.hbm.main.MainRegistry; diff --git a/com/hbm/tileentity/TileEntityYellowBarrel.java b/com/hbm/tileentity/TileEntityYellowBarrel.java index 1cd61f181..1a5766601 100644 --- a/com/hbm/tileentity/TileEntityYellowBarrel.java +++ b/com/hbm/tileentity/TileEntityYellowBarrel.java @@ -3,7 +3,7 @@ package com.hbm.tileentity; import java.util.HashSet; import java.util.List; -import com.hbm.entity.EntityNuclearCreeper; +import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.lib.Library; import net.minecraft.entity.Entity; diff --git a/com/hbm/world/FWatz.java b/com/hbm/world/FWatz.java index ced3d09e8..e17be5f7e 100644 --- a/com/hbm/world/FWatz.java +++ b/com/hbm/world/FWatz.java @@ -520,8 +520,9 @@ public class FWatz { for(int k = 0; k < 19; k++) { String c = fwatz[j][i].substring(k, k + 1); - if(c.equals("P") && world.getBlock(x + i, y + j, z + k) == ModBlocks.fwatz_plasma) - world.setBlock(x + i, y + j, z + k, Blocks.air); + if(c.equals("P")) + if(world.getBlock(x + i, y + j, z + k) == ModBlocks.fwatz_plasma) + world.setBlock(x + i, y + j, z + k, Blocks.air); } } } @@ -541,7 +542,7 @@ public class FWatz { for(int k = 0; k < 19; k++) { String c = fwatz[j][i].substring(k, k + 1); - if(c == "P" && world.getBlock(x + i, y + j, z + k) == ModBlocks.plasma) + if(c.equals("P") && world.getBlock(x + i, y + j, z + k) == ModBlocks.fwatz_plasma) flag = true; } }