more mini nukes, mirvs and all that jazz
@ -501,6 +501,16 @@ item.ammo_grenade_phosphorus.name=40mm Granate (WP)
|
||||
item.ammo_grenade_sleek.name=40mm Granate (IF-F&E)
|
||||
item.ammo_grenade_toxic.name=40mm Granate (Chemisch)
|
||||
item.ammo_grenade_tracer.name=40mm Übungsgranate
|
||||
item.ammo_mirv.name=Mini-MIRV
|
||||
item.ammo_mirv_high.name=Mini-MIRV (Stark)
|
||||
item.ammo_mirv_low.name=Mini-MIRV (Schwach)
|
||||
item.ammo_mirv_safe.name=Mini-MIRV (Sicher)
|
||||
item.ammo_nuke.name=Miniatombombe
|
||||
item.ammo_nuke_high.name=Miniatombombe (Stark)
|
||||
item.ammo_nuke_low.name=Miniatombombe (Schwach)
|
||||
item.ammo_nuke_pumpkin.name=Kürbisbombe
|
||||
item.ammo_nuke_safe.name=Miniatombombe (Sicher)
|
||||
item.ammo_nuke_tots.name=Miniatombombe (Kleine Knirpse)
|
||||
item.ammo_rocket.name=84mm Rakete
|
||||
item.ammo_rocket_canister.name=84mm Rakete (Katusche)
|
||||
item.ammo_rocket_emp.name=84mm Rakete (Impuls)
|
||||
@ -560,6 +570,7 @@ item.assembly_lacunae.name=5mm Patronensatz
|
||||
item.assembly_lead.name=Glaspatronensatz
|
||||
item.assembly_nightmare.name=Nightmare-Patronensatz
|
||||
item.assembly_nopip.name=.44er Patronensatz
|
||||
item.assembly_nuke.name=Miniatombombengehäuse
|
||||
item.assembly_pip.name=Verdorbener .44er Patronensatz
|
||||
item.assembly_schrabidium.name=Schrabidiumpatronensatz
|
||||
item.assembly_smg.name=9mm Patronensatz
|
||||
@ -1075,7 +1086,7 @@ item.gun_emp_ammo.name=Energiezelle
|
||||
item.gun_euthanasia.name=Euthanasia
|
||||
item.gun_euthanasia_ammo.name=Spritze
|
||||
item.gun_fatman.name=M42 Nukleares Katapult "Fat Man"
|
||||
item.gun_fatman_ammo.name=Miniatombombe
|
||||
item.gun_fatman_ammo.name=Miniatombombe (LEGACY)
|
||||
item.gun_flamer.name=Herr Topaz
|
||||
item.gun_flechette.name=Flechet-Gewehr
|
||||
item.gun_folly.name=Prototyp Digamma "Irrsinn"
|
||||
@ -1099,7 +1110,7 @@ item.gun_lever_action_sonata.name=Verkehrter Mare's Leg
|
||||
item.gun_lever_action_sonata_2.name=§cSonatas Mikrophon§r
|
||||
item.gun_minigun.name=CZ53 Persönliche Minigun
|
||||
item.gun_mirv.name=M42 Nukleares Katapult "Experimentelles MIRV"
|
||||
item.gun_mirv_ammo.name=Achtfaches MIRV
|
||||
item.gun_mirv_ammo.name=Achtfaches MIRV (LEGACY)
|
||||
item.gun_moist_nugget.name=Mosin-Nagant
|
||||
item.gun_mp.name=Maschinengewehr des Pazifisten
|
||||
item.gun_mp40.name=Maschinenpistole
|
||||
|
||||
@ -501,6 +501,16 @@ item.ammo_grenade_phosphorus.name=40mm Grenade (WP)
|
||||
item.ammo_grenade_sleek.name=40mm Grenade (IF-R&D)
|
||||
item.ammo_grenade_toxic.name=40mm Grenade (Chemical)
|
||||
item.ammo_grenade_tracer.name=40mm Training Grenade
|
||||
item.ammo_mirv.name=Mini MIRV
|
||||
item.ammo_mirv_high.name=Mini MIRV (High Yield)
|
||||
item.ammo_mirv_low.name=Mini MIRV (Low Yield)
|
||||
item.ammo_mirv_safe.name=Mini MIRV (Safe)
|
||||
item.ammo_nuke.name=Mini Nuke
|
||||
item.ammo_nuke_high.name=Mini Nuke (High Yield)
|
||||
item.ammo_nuke_low.name=Mini Nuke (Low Yield)
|
||||
item.ammo_nuke_pumpkin.name=Pumpkin Bomb
|
||||
item.ammo_nuke_safe.name=Mini Nuke (Safe)
|
||||
item.ammo_nuke_tots.name=Mini Nuke (Tiny Tots)
|
||||
item.ammo_rocket.name=84mm Rocket
|
||||
item.ammo_rocket_canister.name=84mm Rocket (Canister Shot)
|
||||
item.ammo_rocket_emp.name=84mm Rocket (Pulse)
|
||||
@ -560,6 +570,7 @@ item.assembly_lacunae.name=.5mm Assembly
|
||||
item.assembly_lead.name=Glass Bullet Assembly
|
||||
item.assembly_nightmare.name=Nightmare Bullet Assembly
|
||||
item.assembly_nopip.name=.44 Magnum Assembly
|
||||
item.assembly_nuke.name=Mini Muke Shell
|
||||
item.assembly_pip.name=Tainted Bullet Assembly
|
||||
item.assembly_schrabidium.name=Schrabidium Bullet Assembly
|
||||
item.assembly_smg.name=9mm Assembly
|
||||
@ -1075,7 +1086,7 @@ item.gun_emp_ammo.name=Energy Cell
|
||||
item.gun_euthanasia.name=Euthanasia
|
||||
item.gun_euthanasia_ammo.name=Syringe
|
||||
item.gun_fatman.name=M42 Nuclear Catapult "Fat Man"
|
||||
item.gun_fatman_ammo.name=Mini Nuke
|
||||
item.gun_fatman_ammo.name=Mini Nuke (LEGACY)
|
||||
item.gun_flamer.name=Mister Topaz
|
||||
item.gun_flechette.name=Flechette Rifle
|
||||
item.gun_folly.name=Prototype Digamma "Folly"
|
||||
@ -1099,7 +1110,7 @@ item.gun_lever_action_sonata.name=Flipped Mare's Leg
|
||||
item.gun_lever_action_sonata_2.name=§cSonata's Microphone§r
|
||||
item.gun_minigun.name=CZ53 Personal Minigun
|
||||
item.gun_mirv.name=M42 Nuclear Catapult "Experimental MIRV"
|
||||
item.gun_mirv_ammo.name=Eightfold MIRV
|
||||
item.gun_mirv_ammo.name=Eightfold MIRV (LEGACY)
|
||||
item.gun_moist_nugget.name=Mosin-Nagant
|
||||
item.gun_mp.name=Pacifist's Machine Gun
|
||||
item.gun_mp40.name=Submachine Gun
|
||||
|
||||
BIN
src/main/java/assets/hbm/textures/items/ammo_balefire.png
Normal file
|
After Width: | Height: | Size: 211 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_balefire_high.png
Normal file
|
After Width: | Height: | Size: 228 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_mirv.png
Normal file
|
After Width: | Height: | Size: 311 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_mirv_high.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_mirv_low.png
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_mirv_safe.png
Normal file
|
After Width: | Height: | Size: 323 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_nuke.png
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_nuke_high.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_nuke_low.png
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_nuke_pumpkin.png
Normal file
|
After Width: | Height: | Size: 347 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_nuke_safe.png
Normal file
|
After Width: | Height: | Size: 364 B |
BIN
src/main/java/assets/hbm/textures/items/ammo_nuke_tots.png
Normal file
|
After Width: | Height: | Size: 311 B |
BIN
src/main/java/assets/hbm/textures/items/assembly_nuke.png
Normal file
|
After Width: | Height: | Size: 359 B |
BIN
src/main/java/assets/hbm/textures/items/ingot_steel_dusted.png
Normal file
|
After Width: | Height: | Size: 677 B |
|
After Width: | Height: | Size: 289 B |
@ -122,7 +122,7 @@ public class BlockOre extends Block {
|
||||
case 28: return ModItems.pellet_rtg_weak;
|
||||
case 29: return ModItems.rtg_unit;
|
||||
case 30: return ModItems.gun_spark_ammo;
|
||||
case 31: return ModItems.gun_fatman_ammo;
|
||||
case 31: return ModItems.ammo_nuke_low;
|
||||
case 32: return ModItems.gun_mirv_ammo;
|
||||
case 33: return ModItems.gun_defabricator_ammo;
|
||||
case 34: return ModItems.gun_osipr_ammo2;
|
||||
|
||||
@ -24,7 +24,7 @@ public class ConsumableRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bomb_caller, 1, 1), new Object[] { "TTT", "TRT", "TTT", 'T', ModItems.grenade_gascan, 'R', ModItems.detonator_laser });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bomb_caller, 1, 2), new Object[] { "TTT", "TRT", "TTT", 'T', ModItems.pellet_gas, 'R', ModItems.detonator_laser });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bomb_caller, 1, 3), new Object[] { "TRT", 'T', ModItems.grenade_cloud, 'R', ModItems.detonator_laser });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bomb_caller, 1, 4), new Object[] { "TRT", 'T', ModItems.gun_fatman_ammo, 'R', ModItems.detonator_laser });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bomb_caller, 1, 4), new Object[] { "TR", 'T', ModItems.ammo_nuke_high, 'R', ModItems.detonator_laser });
|
||||
|
||||
//Food
|
||||
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 });
|
||||
|
||||
@ -23,7 +23,7 @@ public class WeaponRecipes {
|
||||
|
||||
//Missiles
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_taint, 1), new Object[] { ModItems.missile_assembly, ModItems.bucket_mud, ModItems.powder_spark_mix, ModItems.powder_magic });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_micro, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.gun_fatman_ammo });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_micro, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.ammo_nuke_high });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_bhole, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.grenade_black_hole });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.grenade_aschrab });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.missile_schrabidium, 1), new Object[] { ModItems.missile_assembly, ModItems.ducttape, ModItems.cell_sas3, ModItems.circuit_targeting_tier4 });
|
||||
@ -156,6 +156,8 @@ public class WeaponRecipes {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ammo_12gauge, 1), new Object[] { ModItems.gun_uboinik_ammo });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ammo_20gauge, 1), new Object[] { ModItems.gun_lever_action_ammo });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ammo_20gauge_slug, 1), new Object[] { ModItems.gun_bolt_action_ammo });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ammo_nuke_high, 1), new Object[] { ModItems.gun_fatman_ammo });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.ammo_mirv_high, 1), new Object[] { ModItems.gun_mirv_ammo });
|
||||
|
||||
//Ammo assemblies
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.pellet_flechette, 1), new Object[] { " L ", " L ", "LLL", 'L', "nuggetLead" }));
|
||||
@ -207,6 +209,7 @@ public class WeaponRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.gun_revolver_nightmare2_ammo, 6), new Object[] { "I", "C", "P", 'I', ModItems.powder_power, 'C', ModItems.casing_buckshot, 'P', ModItems.primer_buckshot });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_calamity, 12), new Object[] { " I ", "GCG", " P ", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_actionexpress, 12), new Object[] { " I", "GC", " P", 'I', "ingotLead", 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50 }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.assembly_nuke, 1), new Object[] { " WP", "SEP", " WP", 'W', ModItems.wire_aluminium, 'P', "plateSteel", 'S', ModItems.hull_small_steel, 'E', ModItems.ingot_semtex }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_dart, 16), new Object[] { "IPI", "ICI", "IPI", 'I', ModItems.plate_polymer, 'P', "plateIron", 'C', new ItemStack(ModItems.fluid_tank_full, 1, FluidType.WATZ.ordinal()) }));
|
||||
|
||||
//Ammo types
|
||||
@ -270,7 +273,7 @@ public class WeaponRecipes {
|
||||
|
||||
//Folly shells
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.folly_bullet, 1), new Object[] { " S ", "STS", "SMS", 'S', ModItems.ingot_starmetal, 'T', ModItems.powder_magic, 'M', ModBlocks.block_meteor });
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.folly_bullet_nuclear, 1), new Object[] { " N ", "UTU", "UTU", 'N', ModItems.gun_fatman_ammo, 'U', "ingotIron", 'T', "blockTungsten" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.folly_bullet_nuclear, 1), new Object[] { " N ", "UTU", "UTU", 'N', ModItems.ammo_nuke, 'U', "ingotIron", 'T', "blockTungsten" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.folly_bullet_du, 1), new Object[] { " U ", "UDU", "UTU", 'U', "blockUranium238", 'D', "blockDesh", 'T', "blockTungsten" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.folly_shell, 1), new Object[] { "IPI", "IPI", "IMI", 'I', "ingotIron", 'P', "plateIron", 'M', ModItems.primer_50 }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_folly, 1), new Object[] { " B ", "MEM", " S ", 'B', ModItems.folly_bullet, 'M', ModItems.powder_magic, 'E', ModItems.powder_power, 'S', ModItems.folly_shell });
|
||||
@ -307,6 +310,20 @@ public class WeaponRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_finned, 1), new Object[] { "G", "R", 'G', Items.feather, 'R', ModItems.ammo_grenade });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_kampf, 2), new Object[] { "G", "R", 'G', ModItems.ammo_rocket, 'R', ModItems.ammo_grenade });
|
||||
|
||||
//Mini Nuke
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_nuke, 1), new Object[] { "P", "S", "P", 'P', ModItems.nugget_pu239, 'S', ModItems.assembly_nuke });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_nuke_low, 1), new Object[] { "P", "S", 'P', ModItems.nugget_pu239, 'S', ModItems.assembly_nuke });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_nuke_high, 1), new Object[] { "PPP", "PSP", "PPP", 'P', ModItems.nugget_pu239, 'S', ModItems.assembly_nuke });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_nuke_tots, 1), new Object[] { "PPP", "PIP", "PPP", 'P', ModItems.pellet_cluster, 'I', ModItems.ingot_pu239 });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_nuke_safe, 1), new Object[] { "G", "N", 'G', Items.glowstone_dust, 'N', ModItems.ammo_nuke_low });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_nuke_pumpkin, 1), new Object[] { " T ", "TST", " T ", 'T', Blocks.tnt, 'S', ModItems.assembly_nuke });
|
||||
|
||||
//MIRV
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_mirv, 1), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke, 'C', ModItems.cap_aluminium, 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_mirv_low, 1), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke_low, 'C', ModItems.cap_aluminium, 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_mirv_high, 1), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke_high, 'C', ModItems.cap_aluminium, 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_mirv_safe, 1), new Object[] { "NNN", "CDS", "NNN", 'N', ModItems.ammo_nuke_safe, 'C', ModItems.cap_aluminium, 'D', ModBlocks.det_cord, 'S', ModItems.hull_small_steel });
|
||||
|
||||
//Flamer fuel
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_fuel, 1), new Object[] { " P ", "BDB", " P ", 'P', "plateSteel", 'B', ModItems.bolt_tungsten, 'D', ModItems.canister_fuel }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_fuel_napalm, 1), new Object[] { " P ", "BDB", " P ", 'P', "plateSteel", 'B', ModItems.bolt_tungsten, 'D', ModItems.canister_napalm }));
|
||||
@ -384,7 +401,7 @@ public class WeaponRecipes {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_ap, 4), new Object[] { "C", "P", "T", 'C', ModItems.circuit_targeting_tier2, 'P', "plateIron", 'T', ModItems.ingot_semtex }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_he, 1), new Object[] { " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', ModItems.ingot_semtex }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.mine_shrap, 2), new Object[] { "LLL", " C ", "PTP", 'C', ModItems.circuit_targeting_tier2, 'P', "plateSteel", 'T', ModBlocks.det_cord, 'L', ModItems.pellet_buckshot }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.mine_fat, 1), new Object[] { "CDN", 'C', ModItems.circuit_targeting_tier2, 'D', ModItems.ducttape, 'N', ModItems.gun_fatman_ammo });
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.mine_fat, 1), new Object[] { "CDN", 'C', ModItems.circuit_targeting_tier2, 'D', ModItems.ducttape, 'N', ModItems.ammo_nuke });
|
||||
|
||||
//Nuke parts
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gadget_explosive8, 1), new Object[] { "EEE", "EPE", "EEE", 'E', ModItems.gadget_explosive, 'P', "plateAluminum" }));
|
||||
|
||||
@ -24,6 +24,8 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
public int speed;
|
||||
public int length;
|
||||
|
||||
public boolean mute = false;
|
||||
|
||||
public boolean fallout = true;
|
||||
private int falloutAdd = 0;
|
||||
|
||||
@ -59,9 +61,11 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
data.incrementRad(worldObj, (int)this.posX, (int)this.posZ, rad, radMax);
|
||||
}
|
||||
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
if(rand.nextInt(5) == 0)
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
if(!mute) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
if(rand.nextInt(5) == 0)
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
|
||||
ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.length * 2);
|
||||
|
||||
@ -182,5 +186,9 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
falloutAdd = fallout;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public EntityNukeExplosionMK4 mute() {
|
||||
this.mute = true;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ public class EntityMissileMicro extends EntityMissileBaseAdvanced {
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.gun_fatman_ammo, 1);
|
||||
return new ItemStack(ModItems.ammo_nuke_high, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -261,7 +261,7 @@ public class EntityNuclearCreeper extends EntityMob {
|
||||
this.dropItem(ModItems.fusion_core, 1);
|
||||
}
|
||||
if(i == 10)
|
||||
this.dropItem(ModItems.gun_fatman_ammo, 1);
|
||||
this.dropItem(ModItems.ammo_nuke_high, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -45,6 +45,16 @@ public class ExplosionNT extends Explosion {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExplosionNT addAllAttrib(List<ExAttrib> attrib) {
|
||||
atttributes.addAll(attrib);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void explode() {
|
||||
doExplosionA();
|
||||
doExplosionB(false);
|
||||
}
|
||||
|
||||
public void doExplosionA()
|
||||
{
|
||||
float f = this.explosionSize;
|
||||
|
||||
@ -180,9 +180,23 @@ public class BulletConfigSyncingUtil {
|
||||
public static int ROCKET_PHOSPHORUS_LASER = i++;
|
||||
|
||||
public static int NUKE_NORMAL = i++;
|
||||
public static int NUKE_MIRV = i++;
|
||||
public static int NUKE_LOW = i++;
|
||||
public static int NUKE_HIGH = i++;
|
||||
public static int NUKE_TOTS = i++;
|
||||
public static int NUKE_SAFE = i++;
|
||||
public static int NUKE_PUMPKIN = i++;
|
||||
public static int NUKE_PROTO_NORMAL = i++;
|
||||
public static int NUKE_PROTO_LOW = i++;
|
||||
public static int NUKE_PROTO_HIGH = i++;
|
||||
public static int NUKE_PROTO_TOTS = i++;
|
||||
public static int NUKE_PROTO_SAFE = i++;
|
||||
public static int NUKE_PROTO_PUMPKIN = i++;
|
||||
public static int NUKE_MIRV_NORMAL = i++;
|
||||
public static int NUKE_MIRV_LOW = i++;
|
||||
public static int NUKE_MIRV_HIGH = i++;
|
||||
public static int NUKE_MIRV_SAFE = i++;
|
||||
|
||||
public static int NUKE_AMAT = i++;
|
||||
public static int NUKE_PROTO = i++;
|
||||
|
||||
public static int ZOMG_BOLT = i++;
|
||||
|
||||
@ -375,10 +389,24 @@ public class BulletConfigSyncingUtil {
|
||||
configSet.put(ROCKET_NUKE_LASER, GunRocketFactory.getRocketNukeConfig().setToGuided());
|
||||
configSet.put(ROCKET_CHAINSAW_LASER, GunRocketFactory.getRocketRPCConfig().setToGuided());
|
||||
configSet.put(ROCKET_TOXIC_LASER, GunRocketFactory.getRocketChlorineConfig().setToGuided());
|
||||
|
||||
|
||||
configSet.put(NUKE_NORMAL, GunFatmanFactory.getNukeConfig());
|
||||
configSet.put(NUKE_MIRV, GunFatmanFactory.getMirvConfig());
|
||||
configSet.put(NUKE_PROTO, GunFatmanFactory.getNukeProtoConfig());
|
||||
configSet.put(NUKE_LOW, GunFatmanFactory.getNukeLowConfig());
|
||||
configSet.put(NUKE_HIGH, GunFatmanFactory.getNukeHighConfig());
|
||||
configSet.put(NUKE_TOTS, GunFatmanFactory.getNukeTotsConfig());
|
||||
configSet.put(NUKE_SAFE, GunFatmanFactory.getNukeSafeConfig());
|
||||
configSet.put(NUKE_PUMPKIN, GunFatmanFactory.getNukePumpkinConfig());
|
||||
configSet.put(NUKE_PROTO_NORMAL, GunFatmanFactory.getNukeConfig().accuracyMod(20F));
|
||||
configSet.put(NUKE_PROTO_LOW, GunFatmanFactory.getNukeLowConfig().accuracyMod(20F));
|
||||
configSet.put(NUKE_PROTO_HIGH, GunFatmanFactory.getNukeHighConfig().accuracyMod(20F));
|
||||
configSet.put(NUKE_PROTO_TOTS, GunFatmanFactory.getNukeTotsConfig().accuracyMod(20F));
|
||||
configSet.put(NUKE_PROTO_SAFE, GunFatmanFactory.getNukeSafeConfig().accuracyMod(20F));
|
||||
configSet.put(NUKE_PROTO_PUMPKIN, GunFatmanFactory.getNukePumpkinConfig().accuracyMod(20F));
|
||||
configSet.put(NUKE_MIRV_NORMAL, GunFatmanFactory.getMirvConfig());
|
||||
configSet.put(NUKE_MIRV_LOW, GunFatmanFactory.getMirvLowConfig());
|
||||
configSet.put(NUKE_MIRV_HIGH, GunFatmanFactory.getMirvHighConfig());
|
||||
configSet.put(NUKE_MIRV_SAFE, GunFatmanFactory.getMirvSafeConfig());
|
||||
|
||||
configSet.put(NUKE_AMAT, GunFatmanFactory.getBalefireConfig());
|
||||
|
||||
configSet.put(ZOMG_BOLT, GunEnergyFactory.getZOMGBoltConfig());
|
||||
|
||||
@ -145,4 +145,10 @@ public class BulletConfiguration {
|
||||
this.vPFX = "greendust";
|
||||
return this;
|
||||
}
|
||||
|
||||
public BulletConfiguration accuracyMod(float mod) {
|
||||
|
||||
this.spread *= mod;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.particle.EntityBSmokeFX;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
@ -15,6 +21,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
@ -240,13 +247,96 @@ public class BulletConfigFactory {
|
||||
bullet.bounceMod = 1.0;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = false;
|
||||
bullet.nuke = BombConfig.fatmanRadius;
|
||||
bullet.style = BulletConfiguration.STYLE_NUKE;
|
||||
bullet.plink = BulletConfiguration.PLINK_GRENADE;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sizes:
|
||||
* 0 - safe
|
||||
* 1 - tot
|
||||
* 2 - small
|
||||
* 3 - medium
|
||||
* 4 - big
|
||||
*/
|
||||
public static void nuclearExplosion(EntityBulletBase bullet, int x, int y, int z, boolean small, int size) {
|
||||
|
||||
if(!bullet.worldObj.isRemote) {
|
||||
|
||||
double posX = bullet.posX;
|
||||
double posY = bullet.posY + 0.5;
|
||||
double posZ = bullet.posZ;
|
||||
|
||||
if(y >= 0) {
|
||||
posX = x + 0.5;
|
||||
posY = y + 1.5;
|
||||
posZ = z + 0.5;
|
||||
}
|
||||
|
||||
//all sizes have the same animation except tiny tots
|
||||
if(size != 1) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "muke");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY + 0.5, posZ), new TargetPoint(bullet.dimension, bullet.posX, bullet.posY, bullet.posZ, 250));
|
||||
bullet.worldObj.playSoundEffect(x, y, z, "hbm:weapon.mukeExplosion", 15.0F, 1.0F);
|
||||
} else {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "tinytot");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY + 0.5, posZ), new TargetPoint(bullet.dimension, bullet.posX, bullet.posY, bullet.posZ, 250));
|
||||
bullet.worldObj.playSoundEffect(x, y, z, "hbm:weapon.mukeExplosion", 15.0F, 1.0F);
|
||||
}
|
||||
|
||||
//no shrapnels for large mukes and tinty tots
|
||||
if(size != 4 && size != 1)
|
||||
ExplosionLarge.spawnShrapnels(bullet.worldObj, posX, posY, posZ, 25);
|
||||
|
||||
if(size == 0) {
|
||||
ExplosionNukeGeneric.dealDamage(bullet.worldObj, posX, posY, posZ, 45);
|
||||
|
||||
} else if(size > 0 && size < 4) {
|
||||
List<ExAttrib> attribs = new ArrayList();
|
||||
attribs.add(ExAttrib.FIRE);
|
||||
attribs.add(ExAttrib.NOPARTICLE);
|
||||
attribs.add(ExAttrib.NOSOUND);
|
||||
attribs.add(ExAttrib.NODROP);
|
||||
attribs.add(ExAttrib.NOHURT);
|
||||
|
||||
switch(size) {
|
||||
case 1: new ExplosionNT(bullet.worldObj, null, posX, posY, posZ, 10F).addAllAttrib(attribs).explode();
|
||||
ExplosionNukeGeneric.dealDamage(bullet.worldObj, posX, posY, posZ, 30); break;
|
||||
|
||||
case 2: new ExplosionNT(bullet.worldObj, null, posX, posY, posZ, 15F).addAllAttrib(attribs).explode();
|
||||
ExplosionNukeGeneric.dealDamage(bullet.worldObj, posX, posY, posZ, 45); break;
|
||||
|
||||
case 3: new ExplosionNT(bullet.worldObj, null, posX, posY, posZ, 15F).addAllAttrib(attribs).explode();
|
||||
new ExplosionNT(bullet.worldObj, null, posX + 7, posY, posZ, 10F).addAllAttrib(attribs).explode();
|
||||
new ExplosionNT(bullet.worldObj, null, posX - 7, posY, posZ, 10F).addAllAttrib(attribs).explode();
|
||||
new ExplosionNT(bullet.worldObj, null, posX, posY, posZ + 7, 10F).addAllAttrib(attribs).explode();
|
||||
new ExplosionNT(bullet.worldObj, null, posX, posY, posZ - 7, 10F).addAllAttrib(attribs).explode();
|
||||
ExplosionNukeGeneric.dealDamage(bullet.worldObj, posX, posY, posZ, 55); break;
|
||||
}
|
||||
|
||||
} else if(size == 4) {
|
||||
bullet.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(bullet.worldObj, BombConfig.fatmanRadius, posX, posY, posZ).mute());
|
||||
}
|
||||
|
||||
//radiation is 50 RAD/s in the epicenter, times the radMod
|
||||
|
||||
float radMod = size * 0.33F;
|
||||
|
||||
//radMod for safe nukes is the same as for low yield
|
||||
if(size == 0)
|
||||
radMod = 0.66F;
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int j = -2; j <= 2; j++)
|
||||
if(i + j < 4)
|
||||
RadiationSavedData.incrementRad(bullet.worldObj, (int)posX + i * 16, (int)posZ + j * 16, 50 / (Math.abs(i) + Math.abs(j) + 1) * radMod, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public static IBulletImpactBehavior getPhosphorousEffect(final int radius, final int duration, final int count, final double motion) {
|
||||
|
||||
IBulletImpactBehavior impact = new IBulletImpactBehavior() {
|
||||
|
||||
@ -49,6 +49,11 @@ public class GunFatmanFactory {
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_LOW);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_HIGH);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_TOTS);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_SAFE);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_PUMPKIN);
|
||||
config.durability = 1000;
|
||||
|
||||
return config;
|
||||
@ -62,7 +67,10 @@ public class GunFatmanFactory {
|
||||
config.manufacturer = "Fort Strong";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_MIRV);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_LOW);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_HIGH);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_MIRV_SAFE);
|
||||
config.durability = 1000;
|
||||
|
||||
return config;
|
||||
@ -103,7 +111,12 @@ public class GunFatmanFactory {
|
||||
config.manufacturer = "Fort Strong";
|
||||
|
||||
config.config = new ArrayList<Integer>();
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_PROTO);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_LOW);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_HIGH);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_TOTS);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_SAFE);
|
||||
config.config.add(BulletConfigSyncingUtil.NUKE_PROTO_PUMPKIN);
|
||||
config.durability = 1000;
|
||||
|
||||
return config;
|
||||
@ -112,17 +125,99 @@ public class GunFatmanFactory {
|
||||
public static BulletConfiguration getNukeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_fatman_ammo;
|
||||
bullet.ammo = ModItems.ammo_nuke;
|
||||
|
||||
bullet.nuke = 0;
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
|
||||
BulletConfigFactory.nuclearExplosion(bullet, x, y, z, false, 3);
|
||||
}
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNukeLowConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = ModItems.ammo_nuke_low;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
|
||||
BulletConfigFactory.nuclearExplosion(bullet, x, y, z, false, 2);
|
||||
}
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNukeHighConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = ModItems.ammo_nuke_high;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
|
||||
BulletConfigFactory.nuclearExplosion(bullet, x, y, z, false, 4);
|
||||
}
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNukeTotsConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = ModItems.ammo_nuke_tots;
|
||||
bullet.bulletsMin = 8;
|
||||
bullet.bulletsMax = 8;
|
||||
bullet.spread = 0.1F;
|
||||
bullet.style = bullet.STYLE_GRENADE;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
|
||||
BulletConfigFactory.nuclearExplosion(bullet, x, y, z, false, 1);
|
||||
}
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNukeSafeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = ModItems.ammo_nuke_safe;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
|
||||
BulletConfigFactory.nuclearExplosion(bullet, x, y, z, false, 0);
|
||||
}
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNukePumpkinConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
bullet.ammo = ModItems.ammo_nuke_pumpkin;
|
||||
bullet.explosive = 10F;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveBlockHit(EntityBulletBase bullet, int x, int y, int z) {
|
||||
|
||||
if(!bullet.worldObj.isRemote) {
|
||||
if(bullet.worldObj.isRemote) {
|
||||
|
||||
double posX = bullet.posX;
|
||||
double posY = bullet.posY + 0.5;
|
||||
@ -134,28 +229,7 @@ public class GunFatmanFactory {
|
||||
posZ = z + 0.5;
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "muke");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY + 0.5, posZ), new TargetPoint(bullet.dimension, bullet.posX, bullet.posY, bullet.posZ, 250));
|
||||
bullet.worldObj.playSoundEffect(x, y, z, "hbm:weapon.mukeExplosion", 15.0F, 1.0F);
|
||||
|
||||
ExplosionLarge.spawnShrapnels(bullet.worldObj, posX, posY, posZ, 25);
|
||||
|
||||
ExplosionNT exp = new ExplosionNT(bullet.worldObj, null, posX, posY, posZ, 15F)
|
||||
.addAttrib(ExAttrib.FIRE)
|
||||
.addAttrib(ExAttrib.NOPARTICLE)
|
||||
.addAttrib(ExAttrib.NOSOUND)
|
||||
.addAttrib(ExAttrib.NODROP)
|
||||
.addAttrib(ExAttrib.NOHURT);
|
||||
exp.doExplosionA();
|
||||
exp.doExplosionB(false);
|
||||
|
||||
ExplosionNukeGeneric.dealDamage(bullet.worldObj, posX, posY, posZ, 45);
|
||||
|
||||
for(int i = -2; i <= 2; i++)
|
||||
for(int j = -2; j <= 2; j++)
|
||||
if(i + j < 4)
|
||||
RadiationSavedData.incrementRad(bullet.worldObj, (int)posX + i * 16, (int)posZ + j * 16, 50 / (Math.abs(i) + Math.abs(j) + 1), 1000);
|
||||
ExplosionLarge.spawnParticles(bullet.worldObj, posX, posY, posZ, 45);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -163,21 +237,11 @@ public class GunFatmanFactory {
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNukeProtoConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
|
||||
bullet.spread = 0.1F;
|
||||
bullet.ammo = ModItems.gun_fatman_ammo;
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getMirvConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
BulletConfiguration bullet = getNukeConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_mirv_ammo;
|
||||
bullet.ammo = ModItems.ammo_mirv;
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
@ -210,12 +274,122 @@ public class GunFatmanFactory {
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getMirvLowConfig() {
|
||||
|
||||
BulletConfiguration bullet = getNukeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_mirv_low;
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
bullet.bUpdate = new IBulletUpdateBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveUpdate(EntityBulletBase bullet) {
|
||||
|
||||
if(bullet.worldObj.isRemote)
|
||||
return;
|
||||
|
||||
if(bullet.ticksExisted == 15) {
|
||||
bullet.setDead();
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
EntityBulletBase nuke = new EntityBulletBase(bullet.worldObj, BulletConfigSyncingUtil.NUKE_LOW);
|
||||
nuke.setPosition(bullet.posX, bullet.posY, bullet.posZ);
|
||||
double mod = 0.1D;
|
||||
nuke.motionX = bullet.worldObj.rand.nextGaussian() * mod;
|
||||
nuke.motionY = -0.1D;
|
||||
nuke.motionZ = bullet.worldObj.rand.nextGaussian() * mod;
|
||||
bullet.worldObj.spawnEntityInWorld(nuke);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getMirvHighConfig() {
|
||||
|
||||
BulletConfiguration bullet = getNukeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_mirv_high;
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
bullet.bUpdate = new IBulletUpdateBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveUpdate(EntityBulletBase bullet) {
|
||||
|
||||
if(bullet.worldObj.isRemote)
|
||||
return;
|
||||
|
||||
if(bullet.ticksExisted == 15) {
|
||||
bullet.setDead();
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
EntityBulletBase nuke = new EntityBulletBase(bullet.worldObj, BulletConfigSyncingUtil.NUKE_HIGH);
|
||||
nuke.setPosition(bullet.posX, bullet.posY, bullet.posZ);
|
||||
double mod = 0.1D;
|
||||
nuke.motionX = bullet.worldObj.rand.nextGaussian() * mod;
|
||||
nuke.motionY = -0.1D;
|
||||
nuke.motionZ = bullet.worldObj.rand.nextGaussian() * mod;
|
||||
bullet.worldObj.spawnEntityInWorld(nuke);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getMirvSafeConfig() {
|
||||
|
||||
BulletConfiguration bullet = getNukeConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_mirv_safe;
|
||||
bullet.style = BulletConfiguration.STYLE_MIRV;
|
||||
bullet.velocity *= 3;
|
||||
|
||||
bullet.bUpdate = new IBulletUpdateBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveUpdate(EntityBulletBase bullet) {
|
||||
|
||||
if(bullet.worldObj.isRemote)
|
||||
return;
|
||||
|
||||
if(bullet.ticksExisted == 15) {
|
||||
bullet.setDead();
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
EntityBulletBase nuke = new EntityBulletBase(bullet.worldObj, BulletConfigSyncingUtil.NUKE_SAFE);
|
||||
nuke.setPosition(bullet.posX, bullet.posY, bullet.posZ);
|
||||
double mod = 0.1D;
|
||||
nuke.motionX = bullet.worldObj.rand.nextGaussian() * mod;
|
||||
nuke.motionY = -0.1D;
|
||||
nuke.motionZ = bullet.worldObj.rand.nextGaussian() * mod;
|
||||
bullet.worldObj.spawnEntityInWorld(nuke);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getBalefireConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardNukeConfig();
|
||||
|
||||
bullet.ammo = ModItems.gun_bf_ammo;
|
||||
bullet.nuke = 0;
|
||||
bullet.style = BulletConfiguration.STYLE_BF;
|
||||
|
||||
bullet.bImpact = new IBulletImpactBehavior() {
|
||||
@ -233,13 +407,6 @@ public class GunFatmanFactory {
|
||||
posZ = z + 0.5;
|
||||
}
|
||||
|
||||
/*EntityBalefire bf = new EntityBalefire(bullet.worldObj);
|
||||
bf.posX = x;
|
||||
bf.posY = y;
|
||||
bf.posZ = z;
|
||||
bf.destructionRange = (int) (BombConfig.fatmanRadius * 1.25);
|
||||
bullet.worldObj.spawnEntityInWorld(bf);*/
|
||||
|
||||
bullet.worldObj.playSoundEffect(x, y, z, "hbm:weapon.mukeExplosion", 15.0F, 1.0F);
|
||||
|
||||
ExplosionLarge.spawnShrapnels(bullet.worldObj, posX, posY, posZ, 25);
|
||||
|
||||
@ -357,8 +357,6 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.missile_endo, 1), new AStack[] {new ComparableStack(ModItems.warhead_thermo_endo, 1), new ComparableStack(ModItems.fuel_tank_large, 1), new ComparableStack(ModItems.thruster_large, 1), new OreDictStack("plateTitanium", 14), new OreDictStack("plateSteel", 20), new OreDictStack("plateAluminum", 12), new ComparableStack(ModItems.circuit_targeting_tier4, 1), },350);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_exo, 1), new AStack[] {new ComparableStack(ModItems.warhead_thermo_exo, 1), new ComparableStack(ModItems.fuel_tank_large, 1), new ComparableStack(ModItems.thruster_large, 1), new OreDictStack("plateTitanium", 14), new OreDictStack("plateSteel", 20), new OreDictStack("plateAluminum", 12), new ComparableStack(ModItems.circuit_targeting_tier4, 1), },350);
|
||||
makeRecipe(new ComparableStack(ModItems.gun_defabricator, 1), new AStack[] {new OreDictStack("ingotSteel", 2), new ComparableStack(ModItems.ingot_polymer, 8), new OreDictStack("plateIron", 5), new ComparableStack(ModItems.mechanism_special, 3), new ComparableStack(Items.diamond, 1), new ComparableStack(ModItems.plate_dalekanium, 3), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.gun_fatman_ammo, 1), new AStack[] {new OreDictStack("plateSteel", 3), new OreDictStack("plateIron", 1), new ComparableStack(ModItems.nugget_pu239, 3), },40);
|
||||
makeRecipe(new ComparableStack(ModItems.gun_mirv_ammo, 1), new AStack[] {new OreDictStack("plateSteel", 20), new OreDictStack("plateIron", 10), new ComparableStack(ModItems.nugget_pu239, 24), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.gun_osipr_ammo, 24), new AStack[] {new OreDictStack("plateSteel", 2), new ComparableStack(Items.redstone, 1), new ComparableStack(Items.glowstone_dust, 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.gun_osipr_ammo2, 1), new AStack[] {new ComparableStack(ModItems.plate_combine_steel, 4), new ComparableStack(Items.redstone, 7), new ComparableStack(ModItems.powder_power, 3), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.grenade_fire, 1), new AStack[] {new ComparableStack(ModItems.grenade_frag, 1), new ComparableStack(ModItems.powder_fire, 1), new OreDictStack("plateCopper", 2), },150);
|
||||
|
||||
@ -395,6 +395,7 @@ public class ModItems {
|
||||
public static Item assembly_actionexpress;
|
||||
public static Item assembly_calamity;
|
||||
public static Item assembly_lacunae;
|
||||
public static Item assembly_nuke;
|
||||
|
||||
public static Item folly_shell;
|
||||
public static Item folly_bullet;
|
||||
@ -1244,6 +1245,16 @@ public class ModItems {
|
||||
public static Item ammo_grenade_nuclear;
|
||||
public static Item ammo_grenade_tracer;
|
||||
public static Item ammo_grenade_kampf;
|
||||
public static Item ammo_nuke;
|
||||
public static Item ammo_nuke_low;
|
||||
public static Item ammo_nuke_high;
|
||||
public static Item ammo_nuke_tots;
|
||||
public static Item ammo_nuke_safe;
|
||||
public static Item ammo_nuke_pumpkin;
|
||||
public static Item ammo_mirv;
|
||||
public static Item ammo_mirv_low;
|
||||
public static Item ammo_mirv_high;
|
||||
public static Item ammo_mirv_safe;
|
||||
public static Item ammo_fuel;
|
||||
public static Item ammo_fuel_napalm;
|
||||
public static Item ammo_fuel_phosphorus;
|
||||
@ -2482,6 +2493,7 @@ public class ModItems {
|
||||
assembly_actionexpress = new Item().setUnlocalizedName("assembly_actionexpress").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_actionexpress");
|
||||
assembly_calamity = new Item().setUnlocalizedName("assembly_calamity").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_calamity");
|
||||
assembly_lacunae = new Item().setUnlocalizedName("assembly_lacunae").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_lacunae");
|
||||
assembly_nuke = new Item().setUnlocalizedName("assembly_nuke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nuke");
|
||||
folly_shell = new Item().setUnlocalizedName("folly_shell").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_shell");
|
||||
folly_bullet = new Item().setUnlocalizedName("folly_bullet").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet");
|
||||
folly_bullet_nuclear = new Item().setUnlocalizedName("folly_bullet_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet_nuclear");
|
||||
@ -3190,6 +3202,16 @@ public class ModItems {
|
||||
ammo_grenade_nuclear = new ItemAmmo().setUnlocalizedName("ammo_grenade_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_nuclear");
|
||||
ammo_grenade_tracer = new ItemAmmo().setUnlocalizedName("ammo_grenade_tracer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_tracer");
|
||||
ammo_grenade_kampf = new ItemAmmo().setUnlocalizedName("ammo_grenade_kampf").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_grenade_kampf");
|
||||
ammo_nuke = new ItemAmmo().setUnlocalizedName("ammo_nuke").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke");
|
||||
ammo_nuke_low = new ItemAmmo().setUnlocalizedName("ammo_nuke_low").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke_low");
|
||||
ammo_nuke_high = new ItemAmmo().setUnlocalizedName("ammo_nuke_high").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke_high");
|
||||
ammo_nuke_tots = new ItemAmmo().setUnlocalizedName("ammo_nuke_tots").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke_tots");
|
||||
ammo_nuke_safe = new ItemAmmo().setUnlocalizedName("ammo_nuke_safe").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke_safe");
|
||||
ammo_nuke_pumpkin = new ItemAmmo().setUnlocalizedName("ammo_nuke_pumpkin").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke_pumpkin");
|
||||
ammo_mirv = new ItemAmmo().setUnlocalizedName("ammo_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_mirv");
|
||||
ammo_mirv_low = new ItemAmmo().setUnlocalizedName("ammo_mirv_low").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_mirv_low");
|
||||
ammo_mirv_high = new ItemAmmo().setUnlocalizedName("ammo_mirv_high").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_mirv_high");
|
||||
ammo_mirv_safe = new ItemAmmo().setUnlocalizedName("ammo_mirv_safe").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_mirv_safe");
|
||||
ammo_fuel = new ItemAmmo().setUnlocalizedName("ammo_fuel").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel");
|
||||
ammo_fuel_napalm = new ItemAmmo().setUnlocalizedName("ammo_fuel_napalm").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_napalm");
|
||||
ammo_fuel_phosphorus = new ItemAmmo().setUnlocalizedName("ammo_fuel_phosphorus").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_phosphorus");
|
||||
@ -3241,10 +3263,10 @@ public class ModItems {
|
||||
gun_avenger = new ItemGunLacunae(Gun5mmFactory.get57Config()).setUnlocalizedName("gun_avenger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_avenger");
|
||||
gun_lacunae = new ItemGunLacunae(Gun5mmFactory.getLacunaeConfig()).setUnlocalizedName("gun_lacunae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae");
|
||||
gun_folly = new GunFolly().setUnlocalizedName("gun_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_folly");
|
||||
gun_fatman_ammo = new Item().setUnlocalizedName("gun_fatman_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman_ammo");
|
||||
gun_fatman_ammo = new Item().setUnlocalizedName("gun_fatman_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_fatman_ammo");
|
||||
gun_fatman = new ItemGunBase(GunFatmanFactory.getFatmanConfig()).setUnlocalizedName("gun_fatman").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
||||
gun_proto = new ItemGunBase(GunFatmanFactory.getProtoConfig()).setUnlocalizedName("gun_proto").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
||||
gun_mirv_ammo = new Item().setUnlocalizedName("gun_mirv_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mirv_ammo");
|
||||
gun_mirv_ammo = new Item().setUnlocalizedName("gun_mirv_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mirv_ammo");
|
||||
gun_mirv = new ItemGunBase(GunFatmanFactory.getMIRVConfig()).setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.weaponTab).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 ItemGunBase(GunFatmanFactory.getBELConfig()).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf");
|
||||
@ -4738,6 +4760,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(assembly_lacunae, assembly_lacunae.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_actionexpress, assembly_actionexpress.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_calamity, assembly_calamity.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_nuke, assembly_nuke.getUnlocalizedName());
|
||||
|
||||
//Folly Parts
|
||||
GameRegistry.registerItem(folly_shell, folly_shell.getUnlocalizedName());
|
||||
@ -5669,6 +5692,16 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_grenade_nuclear, ammo_grenade_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade_tracer, ammo_grenade_tracer.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_grenade_kampf, ammo_grenade_kampf.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_nuke, ammo_nuke.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_nuke_low, ammo_nuke_low.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_nuke_high, ammo_nuke_high.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_nuke_tots, ammo_nuke_tots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_nuke_safe, ammo_nuke_safe.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_nuke_pumpkin, ammo_nuke_pumpkin.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_mirv, ammo_mirv.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_mirv_low, ammo_mirv_low.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_mirv_high, ammo_mirv_high.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_mirv_safe, ammo_mirv_safe.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly, ammo_folly.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly_nuclear, ammo_folly_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly_du, ammo_folly_du.getUnlocalizedName());
|
||||
|
||||
@ -1,151 +0,0 @@
|
||||
package com.hbm.items.weapon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
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 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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap getItemAttributeModifiers() {
|
||||
Multimap multimap = super.getItemAttributeModifiers();
|
||||
multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(),
|
||||
new AttributeModifier(field_111210_e, "Weapon modifier", -0.3, 1));
|
||||
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
|
||||
new AttributeModifier(field_111210_e, "Weapon modifier", 4, 0));
|
||||
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.");
|
||||
}
|
||||
}
|
||||
@ -1,136 +0,0 @@
|
||||
package com.hbm.items.weapon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.hbm.entity.projectile.EntityMiniNuke;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
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.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
|
||||
import net.minecraftforge.event.entity.player.ArrowNockEvent;
|
||||
|
||||
public class GunProtoMirv extends Item {
|
||||
|
||||
public GunProtoMirv() {
|
||||
this.maxStackSize = 1;
|
||||
this.setMaxDamage(2500);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int integer) {
|
||||
int j = this.getMaxItemUseDuration(stack) - integer;
|
||||
|
||||
ArrowLooseEvent event = new ArrowLooseEvent(player, stack, j);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
if (event.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
j = event.charge;
|
||||
|
||||
boolean flag = player.capabilities.isCreativeMode
|
||||
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
|
||||
|
||||
boolean f1 = false;
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
if (flag || player.inventory.hasItem(ModItems.gun_fatman_ammo)) {
|
||||
|
||||
f1 = true;
|
||||
|
||||
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(world, player, 3.0F);
|
||||
|
||||
entityarrow.setIsCritical(true);
|
||||
entityarrow.gravity = 0.3;
|
||||
entityarrow.setDamage(1000);
|
||||
|
||||
entityarrow.motionX += world.rand.nextGaussian() * 0.4;
|
||||
entityarrow.motionY += world.rand.nextGaussian() * 0.4;
|
||||
entityarrow.motionZ += world.rand.nextGaussian() * 0.4;
|
||||
|
||||
stack.damageItem(1, player);
|
||||
|
||||
if (!flag) {
|
||||
player.inventory.consumeInventoryItem(ModItems.gun_fatman_ammo);
|
||||
}
|
||||
|
||||
if (!world.isRemote) {
|
||||
world.spawnEntityInWorld(entityarrow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(f1)
|
||||
world.playSoundAtEntity(player, "hbm:weapon.fatmanShoot", 1.0F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_) {
|
||||
return p_77654_1_;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
|
||||
return 72000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
|
||||
return EnumAction.bow;
|
||||
}
|
||||
|
||||
@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);
|
||||
|
||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
||||
|
||||
return p_77659_1_;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemEnchantability() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap getItemAttributeModifiers() {
|
||||
Multimap multimap = super.getItemAttributeModifiers();
|
||||
multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(),
|
||||
new AttributeModifier(field_111210_e, "Weapon modifier", -0.3, 1));
|
||||
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
|
||||
new AttributeModifier(field_111210_e, "Weapon modifier", 4, 0));
|
||||
return multimap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add("Excessive, who's being excessive!?");
|
||||
list.add("");
|
||||
list.add("Ammo: Mini Nukes");
|
||||
list.add("Damage: 1000");
|
||||
list.add("Shoots up to eight mini nukes at once!");
|
||||
}
|
||||
}
|
||||
@ -530,6 +530,42 @@ public class ItemAmmo extends Item {
|
||||
list.add(EnumChatFormatting.YELLOW + "with a powerful explosive charge");
|
||||
}
|
||||
|
||||
//NUKES
|
||||
if(this== ModItems.ammo_nuke_low) {
|
||||
list.add(EnumChatFormatting.RED + "- Decreased blast radius");
|
||||
}
|
||||
if(this== ModItems.ammo_nuke_high) {
|
||||
list.add(EnumChatFormatting.BLUE + "+ Increased blast radius");
|
||||
list.add(EnumChatFormatting.BLUE + "+ Fallout");
|
||||
}
|
||||
if(this== ModItems.ammo_nuke_tots) {
|
||||
list.add(EnumChatFormatting.BLUE + "+ Increased bomb count");
|
||||
list.add(EnumChatFormatting.YELLOW + "* Fun for the whole family!");
|
||||
list.add(EnumChatFormatting.RED + "- Highly decreased accuracy");
|
||||
list.add(EnumChatFormatting.RED + "- Decreased blast radius");
|
||||
list.add(EnumChatFormatting.RED + "- Not recommended for the Proto MIRV");
|
||||
}
|
||||
if(this== ModItems.ammo_nuke_safe) {
|
||||
list.add(EnumChatFormatting.RED + "- Decreased blast radius");
|
||||
list.add(EnumChatFormatting.RED + "- No block damage");
|
||||
}
|
||||
if(this== ModItems.ammo_nuke_pumpkin) {
|
||||
list.add(EnumChatFormatting.RED + "- Not even a nuke");
|
||||
}
|
||||
|
||||
//MIRV
|
||||
if(this== ModItems.ammo_mirv_low) {
|
||||
list.add(EnumChatFormatting.RED + "- Decreased blast radius");
|
||||
}
|
||||
if(this== ModItems.ammo_mirv_high) {
|
||||
list.add(EnumChatFormatting.BLUE + "+ Increased blast radius");
|
||||
list.add(EnumChatFormatting.BLUE + "+ Fallout");
|
||||
}
|
||||
if(this== ModItems.ammo_mirv_safe) {
|
||||
list.add(EnumChatFormatting.RED + "- Decreased blast radius");
|
||||
list.add(EnumChatFormatting.RED + "- No block damage");
|
||||
}
|
||||
|
||||
//FOLLY
|
||||
if(this == ModItems.ammo_folly) {
|
||||
list.add(EnumChatFormatting.BLUE + "+ Focused starmetal reaction blast");
|
||||
|
||||
@ -100,7 +100,7 @@ public class ItemClip extends Item {
|
||||
|
||||
if(this == ModItems.clip_fatman)
|
||||
{
|
||||
if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_fatman_ammo, 6)))
|
||||
if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_nuke, 6)))
|
||||
{
|
||||
//player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.gun_fatman_ammo, 6), false);
|
||||
}
|
||||
@ -326,9 +326,9 @@ public class ItemClip extends Item {
|
||||
if(player.inventory.hasItem(ModItems.gun_skystinger))
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_stinger_ammo, 2));
|
||||
if(player.inventory.hasItem(ModItems.gun_fatman))
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_fatman_ammo, 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_nuke, 2));
|
||||
if(player.inventory.hasItem(ModItems.gun_proto))
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_fatman_ammo, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ammo_nuke, 8));
|
||||
if(player.inventory.hasItem(ModItems.gun_mirv))
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gun_mirv_ammo, 1));
|
||||
if(player.inventory.hasItem(ModItems.gun_bf))
|
||||
|
||||
@ -78,18 +78,14 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.circuit_targeting_tier3, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 2, 3),
|
||||
new WeightedRandomChestContent(ModItems.circuit_targeting_tier4, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.gun_lever_action, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.ammo_20gauge, 0, 2, 6, 6),
|
||||
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_kit_1, 0, 1, 3, 6),
|
||||
new WeightedRandomChestContent(ModItems.gun_kit_2, 0, 1, 2, 3),
|
||||
new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.ammo_rocket, 0, 1, 4, 5),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.ammo_nuke_safe, 0, 1, 2, 1),
|
||||
new WeightedRandomChestContent(ModItems.ammo_nuke_low, 0, 1, 2, 1),
|
||||
new WeightedRandomChestContent(ModItems.ammo_nuke_pumpkin, 0, 1, 2, 1),
|
||||
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.grenade_smart, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.grenade_mirv, 0, 1, 1, 2),
|
||||
@ -173,7 +169,7 @@ public class HbmChestContents {
|
||||
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, 1),
|
||||
new WeightedRandomChestContent(ModItems.ammo_nuke_safe, 0, 1, 2, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 6),
|
||||
new WeightedRandomChestContent(ModItems.bottle_quantum, 0, 1, 1, 3),
|
||||
@ -256,7 +252,7 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ItemBattery.getFullBattery(ModItems.battery_advanced_cell_4), 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.powder_desh_mix, 0, 1, 5, 1),
|
||||
new WeightedRandomChestContent(Items.diamond, 0, 3, 6, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.ammo_nuke, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.ammo_container, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.grenade_smart, 0, 1, 6, 1),
|
||||
@ -274,7 +270,7 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.sat_chip, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(Items.diamond, 0, 5, 9, 1),
|
||||
new WeightedRandomChestContent(ModItems.warhead_nuclear, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 3, 1),
|
||||
new WeightedRandomChestContent(ModItems.ammo_nuke, 0, 1, 3, 1),
|
||||
new WeightedRandomChestContent(ModItems.ammo_container, 0, 1, 4, 1),
|
||||
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 2, 1),
|
||||
new WeightedRandomChestContent(ModItems.grenade_mirv, 0, 1, 1, 1),
|
||||
|
||||
@ -317,10 +317,6 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_vortex, new ItemRenderWeaponVortex());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_thompson, new ItemRenderWeaponThompson());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter, new ItemRenderWeaponBolter());
|
||||
//ammo
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman_ammo, new ItemRenderMiniNuke());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_mirv_ammo, new ItemRenderMIRV());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bf_ammo, new ItemRenderBaleflare());
|
||||
//multitool
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_silk, new ItemRenderMultitool());
|
||||
@ -1018,6 +1014,43 @@ public class ClientProxy extends ServerProxy {
|
||||
player.attackedAtYaw = 0F;
|
||||
}
|
||||
|
||||
if("tinytot".equals(type)) {
|
||||
|
||||
ParticleMukeWave wave = new ParticleMukeWave(man, world, x, y, z);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(wave);
|
||||
|
||||
for(double d = 0.0D; d <= 1.6D; d += 0.1) {
|
||||
ParticleMukeCloud cloud = new ParticleMukeCloud(man, world, x, y, z, rand.nextGaussian() * 0.05, d + rand.nextGaussian() * 0.02, rand.nextGaussian() * 0.05);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||
}
|
||||
for(int i = 0; i < 50; i++) {
|
||||
ParticleMukeCloud cloud = new ParticleMukeCloud(man, world, x, y + 0.5, z, rand.nextGaussian() * 0.5, rand.nextInt(5) == 0 ? 0.02 : 0, rand.nextGaussian() * 0.5);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||
}
|
||||
for(int i = 0; i < 15; i++) {
|
||||
double ix = rand.nextGaussian() * 0.2;
|
||||
double iz = rand.nextGaussian() * 0.2;
|
||||
|
||||
if(ix * ix + iz * iz > 0.75) {
|
||||
ix *= 0.5;
|
||||
iz *= 0.5;
|
||||
}
|
||||
|
||||
double iy = 1.6 + (rand.nextDouble() * 2 - 1) * (0.75 - (ix * ix + iz * iz)) * 0.5;
|
||||
|
||||
ParticleMukeCloud cloud = new ParticleMukeCloud(man, world, x, y, z, ix, iy + rand.nextGaussian() * 0.02, iz);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||
}
|
||||
if(player.getDisplayName().equals("Vic4Games")) {
|
||||
player.hurtTime = 100;
|
||||
player.maxHurtTime = 50;
|
||||
} else {
|
||||
player.hurtTime = 15;
|
||||
player.maxHurtTime = 15;
|
||||
}
|
||||
player.attackedAtYaw = 0F;
|
||||
}
|
||||
|
||||
if("justTilt".equals(type)) {
|
||||
|
||||
player.hurtTime = player.maxHurtTime = data.getInteger("time");
|
||||
|
||||
@ -42,7 +42,7 @@ public class ParticleMukeFlash extends EntityFX {
|
||||
|
||||
//Stem
|
||||
for(double d = 0.0D; d <= 1.8D; d += 0.1) {
|
||||
ParticleMukeCloud cloud = getCloud(theRenderEngine, worldObj, posX, posY, posZ + 0.5, rand.nextGaussian() * 0.05, d + rand.nextGaussian() * 0.02, rand.nextGaussian() * 0.05);
|
||||
ParticleMukeCloud cloud = getCloud(theRenderEngine, worldObj, posX, posY, posZ, rand.nextGaussian() * 0.05, d + rand.nextGaussian() * 0.02, rand.nextGaussian() * 0.05);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||
}
|
||||
|
||||
|
||||