From b41fca36ffc410f845f4bc67be25784690d31417 Mon Sep 17 00:00:00 2001 From: Bob Date: Sat, 9 Jan 2021 17:31:22 +0100 Subject: [PATCH] more mini nukes, mirvs and all that jazz --- src/main/java/assets/hbm/lang/de_DE.lang | 15 +- src/main/java/assets/hbm/lang/en_US.lang | 15 +- .../hbm/textures/items/ammo_balefire.png | Bin 0 -> 211 bytes .../hbm/textures/items/ammo_balefire_high.png | Bin 0 -> 228 bytes .../assets/hbm/textures/items/ammo_mirv.png | Bin 0 -> 311 bytes .../hbm/textures/items/ammo_mirv_high.png | Bin 0 -> 321 bytes .../hbm/textures/items/ammo_mirv_low.png | Bin 0 -> 326 bytes .../hbm/textures/items/ammo_mirv_safe.png | Bin 0 -> 323 bytes .../assets/hbm/textures/items/ammo_nuke.png | Bin 0 -> 346 bytes .../hbm/textures/items/ammo_nuke_high.png | Bin 0 -> 360 bytes .../hbm/textures/items/ammo_nuke_low.png | Bin 0 -> 362 bytes .../hbm/textures/items/ammo_nuke_pumpkin.png | Bin 0 -> 347 bytes .../hbm/textures/items/ammo_nuke_safe.png | Bin 0 -> 364 bytes .../hbm/textures/items/ammo_nuke_tots.png | Bin 0 -> 311 bytes .../hbm/textures/items/assembly_nuke.png | Bin 0 -> 359 bytes .../hbm/textures/items/ingot_steel_dusted.png | Bin 0 -> 677 bytes .../textures/items/ingot_steel_dusted_hot.png | Bin 0 -> 289 bytes .../java/com/hbm/blocks/generic/BlockOre.java | 2 +- .../com/hbm/crafting/ConsumableRecipes.java | 2 +- .../java/com/hbm/crafting/WeaponRecipes.java | 23 +- .../entity/logic/EntityNukeExplosionMK4.java | 16 +- .../entity/missile/EntityMissileMicro.java | 2 +- .../hbm/entity/mob/EntityNuclearCreeper.java | 2 +- .../java/com/hbm/explosion/ExplosionNT.java | 10 + .../hbm/handler/BulletConfigSyncingUtil.java | 38 ++- .../com/hbm/handler/BulletConfiguration.java | 6 + .../handler/guncfg/BulletConfigFactory.java | 92 +++++- .../hbm/handler/guncfg/GunFatmanFactory.java | 263 ++++++++++++++---- .../com/hbm/inventory/AssemblerRecipes.java | 2 - src/main/java/com/hbm/items/ModItems.java | 37 ++- .../java/com/hbm/items/weapon/GunFatman.java | 151 ---------- .../com/hbm/items/weapon/GunProtoMirv.java | 136 --------- .../java/com/hbm/items/weapon/ItemAmmo.java | 36 +++ .../java/com/hbm/items/weapon/ItemClip.java | 6 +- .../java/com/hbm/lib/HbmChestContents.java | 16 +- src/main/java/com/hbm/main/ClientProxy.java | 41 ++- .../com/hbm/particle/ParticleMukeFlash.java | 2 +- 37 files changed, 535 insertions(+), 378 deletions(-) create mode 100644 src/main/java/assets/hbm/textures/items/ammo_balefire.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_balefire_high.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_mirv.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_mirv_high.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_mirv_low.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_mirv_safe.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_nuke.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_nuke_high.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_nuke_low.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_nuke_pumpkin.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_nuke_safe.png create mode 100644 src/main/java/assets/hbm/textures/items/ammo_nuke_tots.png create mode 100644 src/main/java/assets/hbm/textures/items/assembly_nuke.png create mode 100644 src/main/java/assets/hbm/textures/items/ingot_steel_dusted.png create mode 100644 src/main/java/assets/hbm/textures/items/ingot_steel_dusted_hot.png delete mode 100644 src/main/java/com/hbm/items/weapon/GunFatman.java delete mode 100644 src/main/java/com/hbm/items/weapon/GunProtoMirv.java diff --git a/src/main/java/assets/hbm/lang/de_DE.lang b/src/main/java/assets/hbm/lang/de_DE.lang index 3381e7725..3ddcfd757 100644 --- a/src/main/java/assets/hbm/lang/de_DE.lang +++ b/src/main/java/assets/hbm/lang/de_DE.lang @@ -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 diff --git a/src/main/java/assets/hbm/lang/en_US.lang b/src/main/java/assets/hbm/lang/en_US.lang index fa8d33187..a3fd40584 100644 --- a/src/main/java/assets/hbm/lang/en_US.lang +++ b/src/main/java/assets/hbm/lang/en_US.lang @@ -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 diff --git a/src/main/java/assets/hbm/textures/items/ammo_balefire.png b/src/main/java/assets/hbm/textures/items/ammo_balefire.png new file mode 100644 index 0000000000000000000000000000000000000000..729506f483514eb29a674c691dd201c640aefbb9 GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf^FZtEAKtw6uW?(qs1^NYVxF&Q*Lz`U3TAF^X&h_ zZ}m(EdX}A9&XQ2Oc8gusZv!5t15we8R>rfUf)XRe7`APBTYIH!ZE5K_#s_eCsXxL^9U;;o^Zpp%1UsDJ#v*eC23y7sQlO_L7-UB%$(>gTe~ HDWM4f1CCF) literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/ammo_balefire_high.png b/src/main/java/assets/hbm/textures/items/ammo_balefire_high.png new file mode 100644 index 0000000000000000000000000000000000000000..527fcdf3c3c86c637132b0271e82dfdf3620dd7d GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf&AHN^7!Z3saN5&#`+t7s amAiY;Wu0fb@&lkV89ZJ6T-G@yGywo8iCTpK literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/ammo_mirv.png b/src/main/java/assets/hbm/textures/items/ammo_mirv.png new file mode 100644 index 0000000000000000000000000000000000000000..1caf3b6c9f4e53123423d3e4b81cd21c344b3634 GIT binary patch literal 311 zcmV-70m%M|P)X)N|uUAky`M(e8cQ~-^}bTTpLbXG7Q5*TRx8C*7~!=U1!$uarV?H zd|SPqqep69hLU>6*HuU@WH=r%9FJJVOHMD(Xx?hlG(~HT)|x!e?~ga7R(Z9?oi57~!13A$S(a@z z!p?V~;OiBd*BXBo;12?tqQ)Nt08YO=#u#G=!w>*t4Axq;pANb%`VRf|kq(bf^2uP> TH_MRT00000NkvXXu0mjffJugh literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/ammo_mirv_low.png b/src/main/java/assets/hbm/textures/items/ammo_mirv_low.png new file mode 100644 index 0000000000000000000000000000000000000000..8feece87e69ea697186ec27ab05cd5be4ada7e85 GIT binary patch literal 326 zcmV-M0lEH(P)n zU%MBt1=U-{WIkmRuNjU<496oj@tV_%Gn$v0G)<9GBBdnH^Sk4Hu2o)bv5m{J1aQ2y zLY8HJTA}wH2>5t~=DEh71^9!2rl|1;0f392Rxw&@!Y~9tYmG5R{Lch-imsyXKGNaw Y4ln#+aew=!XaE2J07*qoM6N<$f);;>p8x;= literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/ammo_mirv_safe.png b/src/main/java/assets/hbm/textures/items/ammo_mirv_safe.png new file mode 100644 index 0000000000000000000000000000000000000000..a90ebb3befb18069f91592967f81b76c86af1af7 GIT binary patch literal 323 zcmV-J0lfZ+P)S6otQu1rsPOvuIW=IAqb%C#XyJE<}77mp)T*=?mxs z1UDfFQ6&2E zoytSvp*`!kxw#w^zHFbr<%}@`z-h#8at^?Jy|CQGxA%7_r2tS$p_IaLoZ1>3gR^$^ z>?5Q2ESRqs?86!Ab)$6r9x6(uNw6FDQ5rMDSV`p_hdPLHr--vA@u7@ajoe z=%tsX;9c-1T8iv0$;%QCYh$AIeD&TBCS)WXWDU>h}?n zPp>Z?pL}paNi5M#(^NGk`P3z$*k}z)7C;h3Fj_~`>^55r`0z7=XPgH{AsG%M`)_Ln;%}N6?7@XAA(uNwcPat>@MDSV`p_hdPL3|G%L3->f=qq^j zBrNpO%Tn+z_!2Eec9-PK5)W%*vg*N~lLI+?napH{1o$i1E7+gtSXaz$+r4iYbTQ5* zL7HX0U|;bci0fw&GF051)K^esc5P8z*9kIodRJSz(+_Y~+izQZQryL_r0uRFGz~T4TV6 z?-g{@KsQYwIzKwbXYkDcpf@WDri=jq5RoJN3Pj{qT~@9_T~=)Z-=r(>O^qg`FYP?w zLoD+JbFVNf3T8Ax>9)${$!Q=onu7m8L^!)h?XN%5Kfo)R)|I*G5cd)Q000030LzbTm;v>0gA~{vP+whXHUgn>)}T%gS+kpEykbsBI1nvaF2LgeZyt=p7w9K%6GT zX%gIQv}W}1sOlSYyV1ZGpI%>FfAFEjX~LLln)Px;r{68>zS(Gv6${jZ2uAB*n#F8R zGirTCFhzkWiokSva>{q*!vJc-JXhLU07S$IegqM5YrR~#23`pm2#xzxWQlGAfi-65Ik^l=;YugIQc(1_IHT0 zOS>L)zPbs5Lw`jnUO1C4*EodaEFR81SfWK~)u0RRyNe;aLl`3j=`8 zG|!pT+KNP8cw4>JCL%uyQ33!8QKAr~P0)nw8k$h4G>$*)!wqUcBXmGq|%Ve twsL-Q5g4V?!G9nk+}&K6Uw@>3P+y*>izEK4jvD{~002ovPDHLkV1f^@Bf++rvblG3<8{E1O zq0mh?L&3e^PqY+iOY$;|i*aJ2Zi=qF5R%8uy?K{B_zPT>l>YuJlU<=|@uRBF0KH*9 zFq=z|cxAO%I-^mRmDBD%ahd?os4tDOtc=ryD2f0W934A@I8BJt zBzW0q&E)<;HEVIV)xsyAUSC{&@WI7t!j!6;?RrCR*e{#D*l3Lv3p9fWM(d!P)nZ9I z>U>5pMS&@bKy-O>%1`jk02<>wSK3+tM8pw(1QBs-yWY46+x4dEz&H6S@J+1|25(i} zjylXIGv$6^oaf3KL7OVd&DnV%v_^t?5D_k}2W2n^HFg=Ke}H!pZJI89rFc&O0000< KMNUMnLSTZ-dz*Iv literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/ammo_nuke_tots.png b/src/main/java/assets/hbm/textures/items/ammo_nuke_tots.png new file mode 100644 index 0000000000000000000000000000000000000000..5ba9c2c7462d79a117d8053682d995e41baf26e5 GIT binary patch literal 311 zcmV-70m%M|P)k^!5QRTi3=J6&s4!$;V`R^kF~2!uw(N{-jLb; z+ipg(m@ql8f)w~F7NJ80rJo4^BI0s7-Q{#P03XkoMTG13jlS);kHUQv+Mk})W=)bV z9Z^t3O-?)Qj|ZEiOIOpk9hcMDcvpxi{&*d4g1jtjOz}_yZ-S8G&n(T$!ZuZHW-dG` z9<$WB&{VaVDy}1r!{7l$#B1{MDXa1d*nMqXP8&r3Ldep$#xD_ljP|xvZW{mq002ov JPDHLkV1mC5fNlT) literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/assembly_nuke.png b/src/main/java/assets/hbm/textures/items/assembly_nuke.png new file mode 100644 index 0000000000000000000000000000000000000000..3243576ba0105458024c50259a8ff68560cfe096 GIT binary patch literal 359 zcmV-t0hs=YP)}B_M`5MQuXZ(3QGadsS@%jSURmT$mz!;NRmbI+ew}l6` zLB^OI4u`1g8hM^$GMQktT4A@_S>^sES_|t)rfG`v`Fw9x(yuR&KYrRb{^o>zNZLsE ziI_1am&+xJqHvO&&1N_p4j7F_;GE-hI?3JRtSNzEWtUylkGbX$NT+$0Q^~WJRT!W(-z6iW`ih-aJ$`F7VXm=03Zec zmGpYOc9K-_E_t{CV@zHy7bnU88qaFYg~mc%+b0ZY0!xyAQq$6LTfc!x{$WH!30;h0 zVEFbW(>e1*mNBZF_9fgKpktl=-A0%~!tM%moXUP}NJC5i$$+^&GP-f=Y1mxCB&hRM z*O7+?vr(Tb=%}D6uuO}X(x#72EmXp;oxAXe<(oOwtv+AjrQ0QKLjq10NTz-eRF|+i zyE2EuH#j@_ZUdJOQ{^T)gkr>vP|NKF6gi7uE03Qd8~w$o&Od z(3ymM%TC{*qVuhCA=R3?z+3rUaHgPH!gc4H7V_PIF5iEhpbL46g}(6~eG|5zyEsCM zAlnm3*Eh}a4pd#1@V!D^%5}Orzn*E9Fx3jaWg^vOyDgt@zz>Pv?cAB6Q^l}x00000 LNkvXXu0mjfXu?0n literal 0 HcmV?d00001 diff --git a/src/main/java/assets/hbm/textures/items/ingot_steel_dusted_hot.png b/src/main/java/assets/hbm/textures/items/ingot_steel_dusted_hot.png new file mode 100644 index 0000000000000000000000000000000000000000..21a29bf1aef42ba38237092f9bc30dc9f71d45ab GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf attrib) { + atttributes.addAll(attrib); + return this; + } + + public void explode() { + doExplosionA(); + doExplosionB(false); + } + public void doExplosionA() { float f = this.explosionSize; diff --git a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java index 2c55339b6..c7203f0d9 100644 --- a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java +++ b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java @@ -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()); diff --git a/src/main/java/com/hbm/handler/BulletConfiguration.java b/src/main/java/com/hbm/handler/BulletConfiguration.java index 32311913c..2a58375bc 100644 --- a/src/main/java/com/hbm/handler/BulletConfiguration.java +++ b/src/main/java/com/hbm/handler/BulletConfiguration.java @@ -145,4 +145,10 @@ public class BulletConfiguration { this.vPFX = "greendust"; return this; } + + public BulletConfiguration accuracyMod(float mod) { + + this.spread *= mod; + return this; + } } diff --git a/src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java b/src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java index c4e8ce91b..a1a472658 100644 --- a/src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/BulletConfigFactory.java @@ -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 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() { diff --git a/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java b/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java index 1d8c953ff..fd9f5759f 100644 --- a/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/GunFatmanFactory.java @@ -49,6 +49,11 @@ public class GunFatmanFactory { config.config = new ArrayList(); 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(); - 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(); - 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); diff --git a/src/main/java/com/hbm/inventory/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/AssemblerRecipes.java index 78624c68f..674279f1d 100644 --- a/src/main/java/com/hbm/inventory/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/AssemblerRecipes.java @@ -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); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index c1765d35d..ab9190415 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -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()); diff --git a/src/main/java/com/hbm/items/weapon/GunFatman.java b/src/main/java/com/hbm/items/weapon/GunFatman.java deleted file mode 100644 index 34cdb0683..000000000 --- a/src/main/java/com/hbm/items/weapon/GunFatman.java +++ /dev/null @@ -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."); - } -} diff --git a/src/main/java/com/hbm/items/weapon/GunProtoMirv.java b/src/main/java/com/hbm/items/weapon/GunProtoMirv.java deleted file mode 100644 index b851f7ad4..000000000 --- a/src/main/java/com/hbm/items/weapon/GunProtoMirv.java +++ /dev/null @@ -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!"); - } -} diff --git a/src/main/java/com/hbm/items/weapon/ItemAmmo.java b/src/main/java/com/hbm/items/weapon/ItemAmmo.java index e85e2f497..3778d9f5d 100644 --- a/src/main/java/com/hbm/items/weapon/ItemAmmo.java +++ b/src/main/java/com/hbm/items/weapon/ItemAmmo.java @@ -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"); diff --git a/src/main/java/com/hbm/items/weapon/ItemClip.java b/src/main/java/com/hbm/items/weapon/ItemClip.java index 9d259c54a..3361f5434 100644 --- a/src/main/java/com/hbm/items/weapon/ItemClip.java +++ b/src/main/java/com/hbm/items/weapon/ItemClip.java @@ -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)) diff --git a/src/main/java/com/hbm/lib/HbmChestContents.java b/src/main/java/com/hbm/lib/HbmChestContents.java index cfb7c1d36..8cebad56c 100644 --- a/src/main/java/com/hbm/lib/HbmChestContents.java +++ b/src/main/java/com/hbm/lib/HbmChestContents.java @@ -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), diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index 8a20ce6cf..46e809628 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -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"); diff --git a/src/main/java/com/hbm/particle/ParticleMukeFlash.java b/src/main/java/com/hbm/particle/ParticleMukeFlash.java index 6d118232f..9510c5e47 100644 --- a/src/main/java/com/hbm/particle/ParticleMukeFlash.java +++ b/src/main/java/com/hbm/particle/ParticleMukeFlash.java @@ -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); }