From 06baf70c30427974d61fd6e8ebbfd0058431a3c2 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Sun, 19 Aug 2018 15:58:40 +0200 Subject: [PATCH] vault door fix, chlorine gas, clouds and cloud grenades --- assets/hbm/lang/de_DE.lang | 10 +- assets/hbm/lang/en_US.lang | 10 +- assets/hbm/textures/blocks/vent_blank.png | Bin 0 -> 286 bytes assets/hbm/textures/blocks/vent_chlorine.png | Bin 0 -> 318 bytes assets/hbm/textures/blocks/vent_cloud.png | Bin 0 -> 317 bytes .../hbm/textures/blocks/vent_pink_cloud.png | Bin 0 -> 323 bytes assets/hbm/textures/items/chlorine1.png | Bin 0 -> 138 bytes assets/hbm/textures/items/chlorine2.png | Bin 0 -> 129 bytes assets/hbm/textures/items/chlorine3.png | Bin 0 -> 113 bytes assets/hbm/textures/items/chlorine4.png | Bin 0 -> 117 bytes assets/hbm/textures/items/chlorine5.png | Bin 0 -> 114 bytes assets/hbm/textures/items/chlorine6.png | Bin 0 -> 98 bytes assets/hbm/textures/items/chlorine7.png | Bin 0 -> 93 bytes assets/hbm/textures/items/chlorine8.png | Bin 0 -> 93 bytes assets/hbm/textures/items/cloud1.png | Bin 0 -> 229 bytes assets/hbm/textures/items/cloud2.png | Bin 0 -> 193 bytes assets/hbm/textures/items/cloud3.png | Bin 0 -> 166 bytes assets/hbm/textures/items/cloud4.png | Bin 0 -> 150 bytes assets/hbm/textures/items/cloud5.png | Bin 0 -> 138 bytes assets/hbm/textures/items/cloud6.png | Bin 0 -> 116 bytes assets/hbm/textures/items/cloud7.png | Bin 0 -> 98 bytes assets/hbm/textures/items/cloud8.png | Bin 0 -> 93 bytes assets/hbm/textures/items/grenade_cloud.png | Bin 0 -> 344 bytes .../hbm/textures/items/grenade_pink_cloud.png | Bin 0 -> 370 bytes assets/hbm/textures/items/jackt.png | Bin 0 -> 283 bytes assets/hbm/textures/items/jackt2.png | Bin 0 -> 284 bytes com/hbm/blocks/ModBlocks.java | 11 ++ com/hbm/blocks/bomb/BombMulti.java | 6 +- com/hbm/blocks/generic/BlockVent.java | 42 ++++++ .../entity/grenade/EntityGrenadeCloud.java | 36 +++++ com/hbm/entity/grenade/EntityGrenadeGas.java | 77 +++++----- com/hbm/entity/grenade/EntityGrenadePC.java | 34 +++++ com/hbm/entity/particle/EntityChlorineFX.java | 98 ++++++++++++ com/hbm/entity/particle/EntityCloudFX.java | 91 +++++++++++ com/hbm/entity/particle/EntityDSmokeFX.java | 116 +++++++------- .../entity/particle/EntityPinkCloudFX.java | 98 ++++++++++++ com/hbm/explosion/ExplosionChaos.java | 141 +++++++++++++++++- com/hbm/items/ModItems.java | 78 ++++++++++ com/hbm/items/special/ItemStarterKit.java | 2 + com/hbm/items/weapon/ItemGrenade.java | 12 +- com/hbm/lib/Library.java | 9 +- com/hbm/lib/ModDamageSource.java | 2 + com/hbm/lib/RefStrings.java | 2 +- com/hbm/main/ClientProxy.java | 5 + com/hbm/main/CraftingManager.java | 9 ++ com/hbm/main/MainRegistry.java | 24 +++ com/hbm/packet/TEVaultPacket.java | 3 +- com/hbm/render/entity/MultiCloudRenderer.java | 7 + com/hbm/render/entity/RenderFlare.java | 4 +- com/hbm/tileentity/deco/TileEntityVent.java | 57 +++++++ .../machine/TileEntityVaultDoor.java | 6 +- 51 files changed, 870 insertions(+), 120 deletions(-) create mode 100644 assets/hbm/textures/blocks/vent_blank.png create mode 100644 assets/hbm/textures/blocks/vent_chlorine.png create mode 100644 assets/hbm/textures/blocks/vent_cloud.png create mode 100644 assets/hbm/textures/blocks/vent_pink_cloud.png create mode 100644 assets/hbm/textures/items/chlorine1.png create mode 100644 assets/hbm/textures/items/chlorine2.png create mode 100644 assets/hbm/textures/items/chlorine3.png create mode 100644 assets/hbm/textures/items/chlorine4.png create mode 100644 assets/hbm/textures/items/chlorine5.png create mode 100644 assets/hbm/textures/items/chlorine6.png create mode 100644 assets/hbm/textures/items/chlorine7.png create mode 100644 assets/hbm/textures/items/chlorine8.png create mode 100644 assets/hbm/textures/items/cloud1.png create mode 100644 assets/hbm/textures/items/cloud2.png create mode 100644 assets/hbm/textures/items/cloud3.png create mode 100644 assets/hbm/textures/items/cloud4.png create mode 100644 assets/hbm/textures/items/cloud5.png create mode 100644 assets/hbm/textures/items/cloud6.png create mode 100644 assets/hbm/textures/items/cloud7.png create mode 100644 assets/hbm/textures/items/cloud8.png create mode 100644 assets/hbm/textures/items/grenade_cloud.png create mode 100644 assets/hbm/textures/items/grenade_pink_cloud.png create mode 100644 assets/hbm/textures/items/jackt.png create mode 100644 assets/hbm/textures/items/jackt2.png create mode 100644 com/hbm/blocks/generic/BlockVent.java create mode 100644 com/hbm/entity/grenade/EntityGrenadeCloud.java create mode 100644 com/hbm/entity/grenade/EntityGrenadePC.java create mode 100644 com/hbm/entity/particle/EntityChlorineFX.java create mode 100644 com/hbm/entity/particle/EntityCloudFX.java create mode 100644 com/hbm/entity/particle/EntityPinkCloudFX.java create mode 100644 com/hbm/tileentity/deco/TileEntityVent.java diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 91b7dc5d1d..54ff205bef 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -162,6 +162,8 @@ death.attack.broadcast=%1$s wurde das Gehirn geschmolzen. death.attack.ams=%1$s wurde in tödlichen Teilchen gebadet, die von der Menschheit erst benannt werden müssen. death.attack.amsCore=%1$s wurde vom Feuer einer Singularität verdampft. death.attack.bang=%1$s wurde in mundgerechte Stücke zerfetzt. +death.attack.pc=%1$s wurde zu einer Pfütze in der pinken Wolke. +death.attack.cloud=%1$s schmolz wie ein Eis in der Sonne. item.redstone_sword.name=Redstoneschwert item.big_sword.name=Großes Schwert @@ -1016,7 +1018,7 @@ item.grenade_frag.name=Splittergranate item.grenade_fire.name=Brandsplittergranate item.grenade_shrapnel.name=Schrapnellgranate item.grenade_cluster.name=Cluster-Bombe -item.grenade_flare.name=Blendgranate +item.grenade_flare.name=Signalfeuer item.grenade_electric.name=Blitzbombe item.grenade_poison.name=Giftgranate item.grenade_gas.name=Gasgranate @@ -1032,6 +1034,8 @@ item.grenade_nuke.name=Mark VI Bohrgranate item.grenade_nuclear.name=Nuka-Granate item.grenade_zomg.name=Negativenergie-Paarvernichtungsgranate item.grenade_black_hole.name=Schwarzes-Loch-Granate +item.grenade_cloud.name=Gefäß voll Wolke +item.grenade_pink_cloud.name=Gefäß voll pinker Wolke item.ullapool_caber.name=Ullapool'sche Stiel item.rod_uranium_fuel.name=Urankernbrennstoffzelle @@ -1485,6 +1489,10 @@ tile.machine_converter_he_rf.name=HE zu RF Konverter tile.machine_converter_rf_he.name=RF zu HE Konverter tile.machine_transformer.name=Transformator +tile.vent_chlorine.name=Chlorgas-Auslass +tile.vent_cloud.name=Wolken-Auslass +tile.vent_pink_cloud.name=Pinker Wolken-Auslass + item.schrabidium_hammer.name=Schrabidiumhammer item.shimmer_sledge.name=Shimmer Sledge item.shimmer_axe.name=Shimmer Axe diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index eb91f868c4..4c0c357eea 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -162,6 +162,8 @@ death.attack.broadcast=%1$s got their brain melted. death.attack.ams=%1$s was bathed in deadly particles that have yet to be named by human science. death.attack.amsCore=%1$s was vaporized in the fire of a singularity. death.attack.bang=%1$s was blasted into bite-sized pieces. +death.attack.pc=%1$s was reduced to a puddle in the pink cloud. +death.attack.cloud=%1$s melted like a popsicle in the sun. item.redstone_sword.name=Redstone Sword item.big_sword.name=Great Sword @@ -1016,7 +1018,7 @@ item.grenade_frag.name=Frag Grenade item.grenade_fire.name=Flame Frag Grenade item.grenade_shrapnel.name=Shrapnel Grenade item.grenade_cluster.name=Cluster Bomb -item.grenade_flare.name=Flare Grenade +item.grenade_flare.name=Signal Flare item.grenade_electric.name=Lightning Bomb item.grenade_poison.name=Poison Grenade item.grenade_gas.name=Gas Grenade @@ -1032,6 +1034,8 @@ item.grenade_nuke.name=Mark VI Drill Grenade item.grenade_nuclear.name=Nuka Grenade item.grenade_zomg.name=Negative Energy Pair Annihilation Grenade item.grenade_black_hole.name=Black Hole Grenade +item.grenade_cloud.name=Jar of Cloud +item.grenade_pink_cloud.name=Jar of Pink Cloud item.ullapool_caber.name=Ullapool Caber item.rod_uranium_fuel.name=Uranium Fuel Rod @@ -1485,6 +1489,10 @@ tile.machine_converter_he_rf.name=HE to RF Converter tile.machine_converter_rf_he.name=RF to HE Converter tile.machine_transformer.name=Transformer +tile.vent_chlorine.name=Chlorine Vent +tile.vent_cloud.name=Cloud Vent +tile.vent_pink_cloud.name=Pink Cloud Vent + item.schrabidium_hammer.name=Schrabidium Hammer item.shimmer_sledge.name=Shimmer Sledge item.shimmer_axe.name=Shimmer Axe diff --git a/assets/hbm/textures/blocks/vent_blank.png b/assets/hbm/textures/blocks/vent_blank.png new file mode 100644 index 0000000000000000000000000000000000000000..50cdda093a833914e116beebf364da39f3d3eaf0 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vfi$*#IEP0VrT8js5NwV(X2e*c@5rl53Z zrC;bqozuF^?`>s_n`cfeKDKM!idCZedVzx>zePLo&!~_6m;fg&hkrrDohTbnN-4{q^pGKej3oZ4Z?z z^F@+v)NiQo|Ndx-!qP9od#~*0{MKuudcsn^@8czrUF)o4A38T>&eB`|N!;=FwtD%? iZV%?{F6~{_#s1jC>+bgD&PRbBWbkzLb6Mw<&;$Spe{ov? literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/blocks/vent_chlorine.png b/assets/hbm/textures/blocks/vent_chlorine.png new file mode 100644 index 0000000000000000000000000000000000000000..8740ae2b8fbb42d6c34d3582308f2f0269f83394 GIT binary patch literal 318 zcmV-E0m1%>P)Nkl-0;NNd<<-M+ z=MF(mj7jWR%SnUp|2RuUUDv&tfrzlCI#os2b*mb9@8Osk%#5aK(DyxxqF7Wz2w>)m zKviL8D9dtDgSKsH8_z|64Sogre#%X@-| z4K>9VnAv^7_wjv_nnfal&4wQfK0Z&QgmTc2%K}PUZbkwAG+029oeK7 QfB*mh07*qoM6N<$g5_6=DF6Tf literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/blocks/vent_cloud.png b/assets/hbm/textures/blocks/vent_cloud.png new file mode 100644 index 0000000000000000000000000000000000000000..c422f50db179535cd92c843dee5e90981eeb95af GIT binary patch literal 317 zcmV-D0mA-?P))ig0He%D91Y@!TG#FaJ{aS=U!|QT&ilJxbomrg6Ku0@mmBxRW&I_ zin%A7zcAeI2xb_bMt2}WFatmGUJ|rzyL*&Z1bLo+yi5~8nx==gQC0B=1fe>}euq2R P00000NkvXXu0mjfj;?;q literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/blocks/vent_pink_cloud.png b/assets/hbm/textures/blocks/vent_pink_cloud.png new file mode 100644 index 0000000000000000000000000000000000000000..41fccfe09c31ddb87e8bf8ba41ffcbab24d793e9 GIT binary patch literal 323 zcmV-J0lfZ+P)y(s0=u33y5)6IoyhZ622pRpeIz&j$ z;9NJZN$q%&G)U*;NJ{cNZ_NxugeB3bDw?KQG{Acg$IM`6lx2ywZIL9&tQbN7Gj{~4 z3Nu5Rrn3grbq!So5&aSn5r_yyQ9wlCy$1k@2mthT2mwTd*f$_BGwco<2)ZT!@bC~w zAAephFtf)5`|WY08i_;%YhM3P@OgM0D90Q?N3fbAcsq`i@4c8L*qt^5#gPZk5=1W| zP2hbKkKhC#P)jy}()lB@DpsK3br#vFavh3++>Is~4i@s4+aRtBM VNc(x;HnRW#002ovPDHLkV1mDNf_eY| literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/chlorine1.png b/assets/hbm/textures/items/chlorine1.png new file mode 100644 index 0000000000000000000000000000000000000000..b0e8aefd7c3eabbb071d6e2470ee6a8e5c4e39b2 GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfUIEF|} zO-^uNx}N9v<9q|#j0>y@T!tctSuUtbCN@RAV(odcYs(dGiH%a-e#sGyrw>}xHimdKI;Vst0LjfIX8-^I literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/chlorine3.png b/assets/hbm/textures/items/chlorine3.png new file mode 100644 index 0000000000000000000000000000000000000000..391ca5e5bbb788de7786d5f7f12b2351a0e307cc GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfFyA0yhK0Jw2sG{~w-I1L|S$boFyt I=akR{0BU_6OaK4? literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/chlorine4.png b/assets/hbm/textures/items/chlorine4.png new file mode 100644 index 0000000000000000000000000000000000000000..7b3f7de98f970727c91f8a6e72d0f319c3c076d4 GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#Vf literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/chlorine6.png b/assets/hbm/textures/items/chlorine6.png new file mode 100644 index 0000000000000000000000000000000000000000..8715167facc18722872a6ce2f0b2aa7ba6fb879b GIT binary patch literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#Vf@GkCiCxvXyU#)%YNP^-pPvv@{ev2lZwbcYSVl^dtqaR_A^$O4}wms?q``dT|RR_hUd?N zZ5iDcr$+`e$TXO6u_&A`W)OPY{d$+H@x^^I$4wb6{H2TLZeLTzU~^u%=e|}iQ=r$x zRLR?Qo@~3PC)w+8A4m+DdVG~OL)-k<^ZvHXG_42f=B+WirS|@G-;uzopr07>FiSO5S3 literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/cloud2.png b/assets/hbm/textures/items/cloud2.png new file mode 100644 index 0000000000000000000000000000000000000000..66766336217031f88054310bf226b5e32694aabc GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfbP0l+XkKg|0!q literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/cloud4.png b/assets/hbm/textures/items/cloud4.png new file mode 100644 index 0000000000000000000000000000000000000000..3c3001a46ec230321b5c82875b430fc45978af81 GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#Vf_RelF{r5}E+pVK7es literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/cloud5.png b/assets/hbm/textures/items/cloud5.png new file mode 100644 index 0000000000000000000000000000000000000000..149cc038ae2a843759b9041461f6e0b9ce4099c7 GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfHAdWap2HRR%SPt`+pZ(AC;=!u!TlH*g iY;E3sr)Esr!py+h#qXE(Ggbm<7=x#)pUXO@geCx6oh{7( literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/cloud6.png b/assets/hbm/textures/items/cloud6.png new file mode 100644 index 0000000000000000000000000000000000000000..c7aad3ea439334b470d77cc3affb339052d8a91f GIT binary patch literal 116 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#Vf~@Nm=QQ}rd5ZIi`zopr07oPuSpWb4 literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/cloud7.png b/assets/hbm/textures/items/cloud7.png new file mode 100644 index 0000000000000000000000000000000000000000..d088f1d9d2ef26eefa60d25a71c9c49adaec4544 GIT binary patch literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfHsU!-0wzJYD@<);T3K0RZ`b8OHzs literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/cloud8.png b/assets/hbm/textures/items/cloud8.png new file mode 100644 index 0000000000000000000000000000000000000000..4e3b784eb7fe98a1f306a3b8562acde53c7a1550 GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfbP0l+XkKS|%3H literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/grenade_cloud.png b/assets/hbm/textures/items/grenade_cloud.png new file mode 100644 index 0000000000000000000000000000000000000000..576ae469c968ad886b97e2ef48225d5f1f255ed0 GIT binary patch literal 344 zcmV-e0jK_nP)<=)JiE|5^`sOS!+DNt4IgcOfEjKD*{(euIcKLiS2T zB>1Jc(^UL4o-+AfE2WglXFLo(EM4AW@7T-uL zB*JLYegZZOBqEY74N+n!tv2b?V=y)E(^gE*_T1;5bI-ZC@UL;Ox2pY2O6_{QRv(fy zky>JMVHrtnMOs3VvK`2#9hvCU&!dvS7~|}9M#xHHs|dS8e15%hYtHH9q={V56l8f& zkxOawMe_5y;M5r>sjR1SY`8hahk|2vu{ynC_|8 zt0X_>NJeHsqEadmCDvI0AlW^Gt(Ni6d>U&YLFCwyb9!(ft7c?>agl$@Zhd>p=B&eUeCV7teYlbBl)yIvg3s4MwazE zU*9Wq-`}1;IaT;d>D-cUF>@4t${aR$Q7FS8u!o6ZOKx}Nyk_f@Lf>okkJYbYH8{4y f(9Qe#|3mB(4x~Snxb*uF(02@;u6{1-oD!M%}v0*>-3b!`1A^1Jqr z5_5h0a$5!8%SYee-o{&G?ws7i(GIlWNTE)}WfSeQH}f~?2yYDXdR94)U3?8sO+&{7 zmCgxkwkj-ouqd=?*PGUiwNrN*D=US#KKI_o7J4zUu2*_u{;@MN;+0=*5`XhZZu@c3 zGd&tf0)YmM40p6y)7U=5NdKt6<1O&0v(dWWFfH+!Z`1i}&BjazOni59%9KS!y>`vs e`{wKZ(0mi$=s%lJHmwJGkHOQ`&t;ucLK6Vf*Kl6| literal 0 HcmV?d00001 diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index 13462ff3b5..b39afd0b8b 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -489,6 +489,10 @@ public static void mainRegistry() public static Block crystal_pulsar; public static Block taint; + public static Block vent_chlorine; + public static Block vent_cloud; + public static Block vent_pink_cloud; + public static Block mud_block; public static Fluid mud_fluid; public static final Material fluidmud = (new MaterialLiquid(MapColor.adobeColor)); @@ -898,6 +902,10 @@ private static void initializeBlock() { crystal_pulsar = new CrystalPulsar(Material.iron).setBlockName("crystal_pulsar").setHardness(15.0F).setResistance(Float.POSITIVE_INFINITY).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":crystal_pulsar"); taint = new BlockTaint(Material.iron).setBlockName("taint").setHardness(15.0F).setResistance(10.0F).setCreativeTab(null); + vent_chlorine = new BlockVent(Material.iron).setBlockName("vent_chlorine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vent_chlorine"); + vent_cloud = new BlockVent(Material.iron).setBlockName("vent_cloud").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vent_cloud"); + vent_pink_cloud = new BlockVent(Material.iron).setBlockName("vent_pink_cloud").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vent_pink_cloud"); + statue_elb = new DecoBlockAlt(Material.iron).setBlockName("#null").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY); statue_elb_g = new DecoBlockAlt(Material.iron).setBlockName("#void").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY); statue_elb_w = new DecoBlockAlt(Material.iron).setBlockName("#ngtv").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY); @@ -1361,6 +1369,9 @@ private static void registerBlock() { //Other Technical Blocks GameRegistry.registerBlock(oil_pipe, oil_pipe.getUnlocalizedName()); GameRegistry.registerBlock(drill_pipe, drill_pipe.getUnlocalizedName()); + GameRegistry.registerBlock(vent_chlorine, vent_chlorine.getUnlocalizedName()); + GameRegistry.registerBlock(vent_cloud, vent_cloud.getUnlocalizedName()); + GameRegistry.registerBlock(vent_pink_cloud, vent_pink_cloud.getUnlocalizedName()); //??? GameRegistry.registerBlock(crystal_virus, crystal_virus.getUnlocalizedName()); diff --git a/com/hbm/blocks/bomb/BombMulti.java b/com/hbm/blocks/bomb/BombMulti.java index e1550f94fc..568d2647b4 100644 --- a/com/hbm/blocks/bomb/BombMulti.java +++ b/com/hbm/blocks/bomb/BombMulti.java @@ -209,7 +209,7 @@ public boolean igniteTestBomb(World world, int x, int y, int z) this.poisonRadius += 15; break; case 6: - this.gasCloud += 15; + this.gasCloud += 50; } switch(entity.return5type()) { @@ -229,7 +229,7 @@ public boolean igniteTestBomb(World world, int x, int y, int z) this.poisonRadius += 15; break; case 6: - this.gasCloud += 15; + this.gasCloud += 50; } entity.clearSlots(); @@ -255,7 +255,7 @@ public boolean igniteTestBomb(World world, int x, int y, int z) if(this.gasCloud > 0) { - ExplosionChaos.poison(world, x, y, z, this.gasCloud); + ExplosionChaos.spawnChlorine(world, x, y, z, this.gasCloud, this.gasCloud / 50, 0); } this.clusterCount = 0; diff --git a/com/hbm/blocks/generic/BlockVent.java b/com/hbm/blocks/generic/BlockVent.java new file mode 100644 index 0000000000..fd6aa584a5 --- /dev/null +++ b/com/hbm/blocks/generic/BlockVent.java @@ -0,0 +1,42 @@ +package com.hbm.blocks.generic; + +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.deco.TileEntityVent; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class BlockVent extends BlockContainer { + + @SideOnly(Side.CLIENT) + private IIcon iconTop; + + public BlockVent(Material p_i45386_1_) { + super(p_i45386_1_); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityVent(); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + super.registerBlockIcons(iconRegister); + this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":vent_blank"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int metadata) { + return side == 1 ? this.iconTop : (side == 0 ? this.iconTop : this.blockIcon); + } + +} diff --git a/com/hbm/entity/grenade/EntityGrenadeCloud.java b/com/hbm/entity/grenade/EntityGrenadeCloud.java new file mode 100644 index 0000000000..4886e84ab6 --- /dev/null +++ b/com/hbm/entity/grenade/EntityGrenadeCloud.java @@ -0,0 +1,36 @@ +package com.hbm.entity.grenade; + +import java.util.Random; + +import com.hbm.explosion.ExplosionChaos; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class EntityGrenadeCloud extends EntityGrenadeBase { + + public EntityGrenadeCloud(World p_i1773_1_) { + super(p_i1773_1_); + } + + public EntityGrenadeCloud(World p_i1774_1_, EntityLivingBase p_i1774_2_) { + super(p_i1774_1_, p_i1774_2_); + } + + public EntityGrenadeCloud(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) { + super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); + } + + @Override + public void explode() { + + if (!this.worldObj.isRemote) { + this.setDead(); + + this.worldObj.playAuxSFX(2002, (int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ), 0); + ExplosionChaos.spawnChlorine(worldObj, posX, posY, posZ, 250, 1.5, 1); + } + } +} diff --git a/com/hbm/entity/grenade/EntityGrenadeGas.java b/com/hbm/entity/grenade/EntityGrenadeGas.java index 6813343bcb..910369bb50 100644 --- a/com/hbm/entity/grenade/EntityGrenadeGas.java +++ b/com/hbm/entity/grenade/EntityGrenadeGas.java @@ -8,43 +8,44 @@ import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionLarge; -public class EntityGrenadeGas extends EntityGrenadeBase -{ - private static final String __OBFID = "CL_00001722"; - Random rand = new Random(); - - public EntityGrenadeGas(World p_i1773_1_) - { - super(p_i1773_1_); - } - - public EntityGrenadeGas(World p_i1774_1_, EntityLivingBase p_i1774_2_) - { - super(p_i1774_1_, p_i1774_2_); - } - - public EntityGrenadeGas(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - - @Override - public void explode() { - - if (!this.worldObj.isRemote) - { - this.setDead(); - this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true); - ExplosionChaos.poison(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 5); - //for(int i = 0; 0 < 15; i++) { - - ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 50); - ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 50); - ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 50); - ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 50); - - //} - } - } +public class EntityGrenadeGas extends EntityGrenadeBase { + private static final String __OBFID = "CL_00001722"; + Random rand = new Random(); + + public EntityGrenadeGas(World p_i1773_1_) { + super(p_i1773_1_); + } + + public EntityGrenadeGas(World p_i1774_1_, EntityLivingBase p_i1774_2_) { + super(p_i1774_1_, p_i1774_2_); + } + + public EntityGrenadeGas(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) { + super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); + } + + @Override + public void explode() { + + if (!this.worldObj.isRemote) { + this.setDead(); + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true); + // ExplosionChaos.poison(this.worldObj, (int)this.posX, + // (int)this.posY, (int)this.posZ, 5); + // for(int i = 0; 0 < 15; i++) { + + /* + * ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, + * 50); ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, + * posZ, 50); ExplosionLarge.spawnParticlesRadial(worldObj, posX, + * posY, posZ, 50); ExplosionLarge.spawnParticlesRadial(worldObj, + * posX, posY, posZ, 50); + */ + + ExplosionChaos.spawnChlorine(worldObj, posX, posY, posZ, 50, 1.25, 0); + + // } + } + } } diff --git a/com/hbm/entity/grenade/EntityGrenadePC.java b/com/hbm/entity/grenade/EntityGrenadePC.java new file mode 100644 index 0000000000..5d318f09e4 --- /dev/null +++ b/com/hbm/entity/grenade/EntityGrenadePC.java @@ -0,0 +1,34 @@ +package com.hbm.entity.grenade; + +import com.hbm.explosion.ExplosionChaos; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class EntityGrenadePC extends EntityGrenadeBase { + + public EntityGrenadePC(World p_i1773_1_) { + super(p_i1773_1_); + } + + public EntityGrenadePC(World p_i1774_1_, EntityLivingBase p_i1774_2_) { + super(p_i1774_1_, p_i1774_2_); + } + + public EntityGrenadePC(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) { + super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); + } + + @Override + public void explode() { + + if (!this.worldObj.isRemote) { + this.setDead(); + + this.worldObj.playAuxSFX(2002, (int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ), 0); + ExplosionChaos.spawnChlorine(worldObj, posX, posY, posZ, 500, 2, 2); + } + } +} diff --git a/com/hbm/entity/particle/EntityChlorineFX.java b/com/hbm/entity/particle/EntityChlorineFX.java new file mode 100644 index 0000000000..e2157a5ad7 --- /dev/null +++ b/com/hbm/entity/particle/EntityChlorineFX.java @@ -0,0 +1,98 @@ +package com.hbm.entity.particle; + +import com.hbm.explosion.ExplosionChaos; + +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class EntityChlorineFX extends EntityModFX { + + public EntityChlorineFX(World world) { + super(world, 0, 0, 0); + } + + public EntityChlorineFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, + double p_i1225_8_, double p_i1225_10_, double p_i1225_12_) { + this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F); + } + + public EntityChlorineFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, + double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) { + super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D); + this.motionX *= 0.10000000149011612D; + this.motionY *= 0.10000000149011612D; + this.motionZ *= 0.10000000149011612D; + this.motionX += p_i1226_8_; + this.motionY += p_i1226_10_; + this.motionZ += p_i1226_12_; + this.particleRed = this.particleGreen = this.particleBlue = (float) (Math.random() * 0.30000001192092896D); + this.particleScale *= 0.75F; + this.particleScale *= p_i1226_14_; + this.smokeParticleScale = this.particleScale; + // this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D)); + // this.particleMaxAge = (int)((float)this.particleMaxAge * + // p_i1226_14_); + this.noClip = false; + } + + /** + * Called to update the entity's position/logic. + */ + + @Override + public void onUpdate() { + + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + + if (maxAge < 700) { + maxAge = rand.nextInt(101) + 700; + } + + if (rand.nextInt(50) == 0) + ExplosionChaos.poison(worldObj, (int) posX, (int) posY, (int) posZ, 2); + + this.particleAge++; + + if (this.particleAge >= maxAge) { + this.setDead(); + } + + this.motionX *= 0.7599999785423279D; + this.motionY *= 0.7599999785423279D; + this.motionZ *= 0.7599999785423279D; + + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + + if(worldObj.isRaining() && worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))) { + this.motionY -= 0.01; + } + + double subdivisions = 4; + + for(int i = 0; i < subdivisions; i++) { + + this.posX += this.motionX/subdivisions; + this.posY += this.motionY/subdivisions; + this.posZ += this.motionZ/subdivisions; + + if (worldObj.getBlock((int) posX, (int) posY, (int) posZ).isNormalCube()) { + + if(rand.nextInt(5) != 0) + this.setDead(); + + this.posX -= this.motionX/subdivisions; + this.posY -= this.motionY/subdivisions; + this.posZ -= this.motionZ/subdivisions; + + this.motionX = 0; + this.motionY = 0; + this.motionZ = 0; + } + } + } +} diff --git a/com/hbm/entity/particle/EntityCloudFX.java b/com/hbm/entity/particle/EntityCloudFX.java new file mode 100644 index 0000000000..8cb91be07d --- /dev/null +++ b/com/hbm/entity/particle/EntityCloudFX.java @@ -0,0 +1,91 @@ +package com.hbm.entity.particle; + +import com.hbm.explosion.ExplosionChaos; + +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class EntityCloudFX extends EntityModFX { + + public EntityCloudFX(World world) { + super(world, 0, 0, 0); + } + + public EntityCloudFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_) + { + this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F); + } + + public EntityCloudFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) + { + super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D); + this.motionX *= 0.10000000149011612D; + this.motionY *= 0.10000000149011612D; + this.motionZ *= 0.10000000149011612D; + this.motionX += p_i1226_8_; + this.motionY += p_i1226_10_; + this.motionZ += p_i1226_12_; + this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D); + this.particleScale *= 0.75F; + this.particleScale *= p_i1226_14_; + this.smokeParticleScale = this.particleScale; + this.noClip = false; + } + + @Override + public void onUpdate() { + + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + + if (maxAge < 900) { + maxAge = rand.nextInt(301) + 900; + } + + if (!worldObj.isRemote && rand.nextInt(50) == 0) + ExplosionChaos.c(worldObj, (int) posX, (int) posY, (int) posZ, 2); + + this.particleAge++; + + if (this.particleAge >= maxAge) { + this.setDead(); + } + + this.motionX *= 0.7599999785423279D; + this.motionY *= 0.7599999785423279D; + this.motionZ *= 0.7599999785423279D; + + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + + if(worldObj.isRaining() && worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))) { + this.motionY -= 0.01; + } + + double subdivisions = 4; + + for(int i = 0; i < subdivisions; i++) { + + this.posX += this.motionX/subdivisions; + this.posY += this.motionY/subdivisions; + this.posZ += this.motionZ/subdivisions; + + if (worldObj.getBlock((int) posX, (int) posY, (int) posZ).isNormalCube()) { + + if(rand.nextInt(5) != 0) + this.setDead(); + + this.posX -= this.motionX/subdivisions; + this.posY -= this.motionY/subdivisions; + this.posZ -= this.motionZ/subdivisions; + + this.motionX = 0; + this.motionY = 0; + this.motionZ = 0; + } + } + } +} diff --git a/com/hbm/entity/particle/EntityDSmokeFX.java b/com/hbm/entity/particle/EntityDSmokeFX.java index a85245e6c5..47b61d63d1 100644 --- a/com/hbm/entity/particle/EntityDSmokeFX.java +++ b/com/hbm/entity/particle/EntityDSmokeFX.java @@ -2,72 +2,68 @@ import net.minecraft.world.World; -public class EntityDSmokeFX extends EntityModFX -{ - private static final String __OBFID = "CL_00000924"; +public class EntityDSmokeFX extends EntityModFX { + private static final String __OBFID = "CL_00000924"; - public EntityDSmokeFX(World world) { - super(world, 0, 0, 0); - } + public EntityDSmokeFX(World world) { + super(world, 0, 0, 0); + } - public EntityDSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_) - { - this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F); - } + public EntityDSmokeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, + double p_i1225_10_, double p_i1225_12_) { + this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F); + } - public EntityDSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) - { - super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D); - this.motionX *= 0.10000000149011612D; - this.motionY *= 0.10000000149011612D; - this.motionZ *= 0.10000000149011612D; - this.motionX += p_i1226_8_; - this.motionY += p_i1226_10_; - this.motionZ += p_i1226_12_; - this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D); - this.particleScale *= 0.75F; - this.particleScale *= p_i1226_14_; - this.smokeParticleScale = this.particleScale; - //this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D)); - //this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1226_14_); - this.noClip = false; - } + public EntityDSmokeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, + double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) { + super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D); + this.motionX *= 0.10000000149011612D; + this.motionY *= 0.10000000149011612D; + this.motionZ *= 0.10000000149011612D; + this.motionX += p_i1226_8_; + this.motionY += p_i1226_10_; + this.motionZ += p_i1226_12_; + this.particleRed = this.particleGreen = this.particleBlue = (float) (Math.random() * 0.30000001192092896D); + this.particleScale *= 0.75F; + this.particleScale *= p_i1226_14_; + this.smokeParticleScale = this.particleScale; + // this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D)); + // this.particleMaxAge = (int)((float)this.particleMaxAge * + // p_i1226_14_); + this.noClip = false; + } - /** - * Called to update the entity's position/logic. - */ - - @Override - public void onUpdate() - { - this.prevPosX = this.posX; - this.prevPosY = this.posY; - this.prevPosZ = this.posZ; - - if(maxAge < 100) - { - maxAge = rand.nextInt(21) + 65; - } + /** + * Called to update the entity's position/logic. + */ - this.particleAge++; - - if (this.particleAge >= maxAge) - { - this.setDead(); - } + @Override + public void onUpdate() { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; - this.motionX *= 0.7599999785423279D; - this.motionY *= 0.7599999785423279D; - this.motionZ *= 0.7599999785423279D; + if (maxAge < 100) { + maxAge = rand.nextInt(21) + 65; + } - if (this.onGround) - { - this.motionX *= 0.699999988079071D; - this.motionZ *= 0.699999988079071D; - } + this.particleAge++; - this.posX += this.motionX; - this.posY += this.motionY; - this.posZ += this.motionZ; - } + if (this.particleAge >= maxAge) { + this.setDead(); + } + + this.motionX *= 0.7599999785423279D; + this.motionY *= 0.7599999785423279D; + this.motionZ *= 0.7599999785423279D; + + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + } } diff --git a/com/hbm/entity/particle/EntityPinkCloudFX.java b/com/hbm/entity/particle/EntityPinkCloudFX.java new file mode 100644 index 0000000000..56b416e65d --- /dev/null +++ b/com/hbm/entity/particle/EntityPinkCloudFX.java @@ -0,0 +1,98 @@ +package com.hbm.entity.particle; + +import com.hbm.blocks.ModBlocks; +import com.hbm.explosion.ExplosionChaos; + +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class EntityPinkCloudFX extends EntityModFX { + + public EntityPinkCloudFX(World world) { + super(world, 0, 0, 0); + } + + public EntityPinkCloudFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_) + { + this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F); + } + + public EntityPinkCloudFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) + { + super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D); + this.motionX *= 0.10000000149011612D; + this.motionY *= 0.10000000149011612D; + this.motionZ *= 0.10000000149011612D; + this.motionX += p_i1226_8_; + this.motionY += p_i1226_10_; + this.motionZ += p_i1226_12_; + this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D); + this.particleScale *= 0.75F; + this.particleScale *= p_i1226_14_; + this.smokeParticleScale = this.particleScale; + this.noClip = false; + } + + @Override + public void onUpdate() { + + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + + if (maxAge < 900) { + maxAge = rand.nextInt(301) + 900; + } + + if (!worldObj.isRemote && rand.nextInt(50) == 0) + ExplosionChaos.pc(worldObj, (int) posX, (int) posY, (int) posZ, 2); + + this.particleAge++; + + if (this.particleAge >= maxAge) { + this.setDead(); + } + + this.motionX *= 0.7599999785423279D; + this.motionY *= 0.7599999785423279D; + this.motionZ *= 0.7599999785423279D; + + if (this.onGround) { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + + if(worldObj.isRaining() && worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ))) { + this.motionY -= 0.01; + } + + double subdivisions = 4; + + for(int i = 0; i < subdivisions; i++) { + + this.posX += this.motionX/subdivisions; + this.posY += this.motionY/subdivisions; + this.posZ += this.motionZ/subdivisions; + + if(worldObj.getBlock((int) posX, (int) posY, (int) posZ) == ModBlocks.radiorec) { + this.setDead(); + int meta = worldObj.getBlockMetadata((int) posX, (int) posY, (int) posZ); + worldObj.setBlock((int) posX, (int) posY, (int) posZ, ModBlocks.broadcaster_pc, meta, 2); + } + + if (worldObj.getBlock((int) posX, (int) posY, (int) posZ).isNormalCube()) { + + if(rand.nextInt(5) != 0) + this.setDead(); + + this.posX -= this.motionX/subdivisions; + this.posY -= this.motionY/subdivisions; + this.posZ -= this.motionZ/subdivisions; + + this.motionX = 0; + this.motionY = 0; + this.motionZ = 0; + } + } + } +} diff --git a/com/hbm/explosion/ExplosionChaos.java b/com/hbm/explosion/ExplosionChaos.java index b48eeb64b4..d64c45adce 100644 --- a/com/hbm/explosion/ExplosionChaos.java +++ b/com/hbm/explosion/ExplosionChaos.java @@ -10,6 +10,11 @@ import com.hbm.entity.missile.EntityMIRV; import com.hbm.entity.missile.EntityMissileAntiBallistic; import com.hbm.entity.missile.EntityMissileBase; +import com.hbm.entity.particle.EntityChlorineFX; +import com.hbm.entity.particle.EntityCloudFX; +import com.hbm.entity.particle.EntityDSmokeFX; +import com.hbm.entity.particle.EntityModFX; +import com.hbm.entity.particle.EntityPinkCloudFX; import com.hbm.entity.projectile.EntityBullet; import com.hbm.entity.projectile.EntityMiniNuke; import com.hbm.entity.projectile.EntityRainbow; @@ -20,6 +25,7 @@ import com.hbm.interfaces.IConsumer; import com.hbm.interfaces.ISource; import com.hbm.lib.Library; +import com.hbm.lib.ModDamageSource; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -348,6 +354,27 @@ public static void burn(World world, int x, int y, int z, int bound) { } + public static void spawnChlorine(World world, double x, double y, double z, int count, double speed, int type) { + + for(int i = 0; i < count; i++) { + + EntityModFX fx = null; + + if(type == 0) { + fx = new EntityChlorineFX(world, x, y, z, 0.0, 0.0, 0.0); + } else if(type == 1) { + fx = new EntityCloudFX(world, x, y, z, 0.0, 0.0, 0.0); + } else { + fx = new EntityPinkCloudFX(world, x, y, z, 0.0, 0.0, 0.0); + } + + fx.motionY = rand.nextGaussian() * speed; + fx.motionX = rand.nextGaussian() * speed; + fx.motionZ = rand.nextGaussian() * speed; + world.spawnEntityInWorld(fx); + } + } + public static void destruction(World world, int x, int y, int z) { if (world.getBlock(x, y, z) == Blocks.bedrock || world.getBlock(x, y, z) == ModBlocks.reinforced_brick @@ -596,19 +623,121 @@ public static void poison(World world, int x, int y, int z, int bombStartStrengt double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); if (d9 < wat) { if (entity instanceof EntityPlayer && Library.checkForGasMask((EntityPlayer) entity)) { - // Library.damageSuit(((EntityPlayer)entity), 3); + Library.damageSuit((EntityPlayer)entity, 3, rand.nextInt(2)); } else if (entity instanceof EntityLivingBase) { ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(Potion.blindness.getId(), 15 * 20, 0)); + .addPotionEffect(new PotionEffect(Potion.blindness.getId(), 5 * 20, 0)); ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(Potion.poison.getId(), 2 * 60 * 20, 2)); + .addPotionEffect(new PotionEffect(Potion.poison.getId(), 20 * 20, 2)); ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(Potion.wither.getId(), 30 * 20, 5)); + .addPotionEffect(new PotionEffect(Potion.wither.getId(), 1 * 20, 1)); ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 2 * 60 * 20, 2)); + .addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30 * 20, 1)); ((EntityLivingBase) entity) - .addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 2 * 60 * 20, 2)); + .addPotionEffect(new PotionEffect(Potion.digSlowdown.getId(), 30 * 20, 2)); + } + } + } + } + + bombStartStrength = (int) f; + } + + public static void pc(World world, int x, int y, int z, int bombStartStrength) { + float f = bombStartStrength; + HashSet hashset = new HashSet(); + int i; + int j; + int k; + double d5; + double d6; + double d7; + double wat = bombStartStrength * 2; + boolean isOccupied = false; + + bombStartStrength *= 2.0F; + i = MathHelper.floor_double(x - wat - 1.0D); + j = MathHelper.floor_double(x + wat + 1.0D); + k = MathHelper.floor_double(y - wat - 1.0D); + int i2 = MathHelper.floor_double(y + wat + 1.0D); + int l = MathHelper.floor_double(z - wat - 1.0D); + int j2 = MathHelper.floor_double(z + wat + 1.0D); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); + Vec3 vec3 = Vec3.createVectorHelper(x, y, z); + + for (int i1 = 0; i1 < list.size(); ++i1) { + Entity entity = (Entity) list.get(i1); + double d4 = entity.getDistance(x, y, z) / bombStartStrength; + + if (d4 <= 1.0D) { + d5 = entity.posX - x; + d6 = entity.posY + entity.getEyeHeight() - y; + d7 = entity.posZ - z; + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + if (d9 < wat) { + + if (entity instanceof EntityPlayer) { + + Library.damageSuit((EntityPlayer)entity, 0, 25); + Library.damageSuit((EntityPlayer)entity, 1, 25); + Library.damageSuit((EntityPlayer)entity, 2, 25); + Library.damageSuit((EntityPlayer)entity, 3, 25); + + } + + entity.attackEntityFrom(ModDamageSource.pc, 5); + } + } + } + + bombStartStrength = (int) f; + } + + public static void c(World world, int x, int y, int z, int bombStartStrength) { + float f = bombStartStrength; + HashSet hashset = new HashSet(); + int i; + int j; + int k; + double d5; + double d6; + double d7; + double wat = bombStartStrength * 2; + boolean isOccupied = false; + + bombStartStrength *= 2.0F; + i = MathHelper.floor_double(x - wat - 1.0D); + j = MathHelper.floor_double(x + wat + 1.0D); + k = MathHelper.floor_double(y - wat - 1.0D); + int i2 = MathHelper.floor_double(y + wat + 1.0D); + int l = MathHelper.floor_double(z - wat - 1.0D); + int j2 = MathHelper.floor_double(z + wat + 1.0D); + List list = world.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(i, k, l, j, i2, j2)); + Vec3 vec3 = Vec3.createVectorHelper(x, y, z); + + for (int i1 = 0; i1 < list.size(); ++i1) { + Entity entity = (Entity) list.get(i1); + double d4 = entity.getDistance(x, y, z) / bombStartStrength; + + if (d4 <= 1.0D) { + d5 = entity.posX - x; + d6 = entity.posY + entity.getEyeHeight() - y; + d7 = entity.posZ - z; + double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7); + if (d9 < wat) { + + if (entity instanceof EntityPlayer) { + + Library.damageSuit((EntityPlayer)entity, 0, 5); + Library.damageSuit((EntityPlayer)entity, 1, 5); + Library.damageSuit((EntityPlayer)entity, 2, 5); + Library.damageSuit((EntityPlayer)entity, 3, 5); + + } + + if (entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer) entity)) { } else { + entity.attackEntityFrom(ModDamageSource.cloud, 3); } } } diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index a876685159..7f781b67aa 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -814,6 +814,8 @@ public static void mainRegistry() public static Item grenade_nuclear; public static Item grenade_zomg; public static Item grenade_black_hole; + public static Item grenade_cloud; + public static Item grenade_pink_cloud; public static Item ullapool_caber; public static Item weaponized_starblaster_cell; @@ -1222,6 +1224,30 @@ public static void mainRegistry() public static Item gas6; public static Item gas7; public static Item gas8; + public static Item chlorine1; + public static Item chlorine2; + public static Item chlorine3; + public static Item chlorine4; + public static Item chlorine5; + public static Item chlorine6; + public static Item chlorine7; + public static Item chlorine8; + public static Item pc1; + public static Item pc2; + public static Item pc3; + public static Item pc4; + public static Item pc5; + public static Item pc6; + public static Item pc7; + public static Item pc8; + public static Item cloud1; + public static Item cloud2; + public static Item cloud3; + public static Item cloud4; + public static Item cloud5; + public static Item cloud6; + public static Item cloud7; + public static Item cloud8; public static Item gasflame1; public static Item gasflame2; public static Item gasflame3; @@ -2004,6 +2030,8 @@ public static void initializeItem() grenade_nuclear = new ItemGrenade().setUnlocalizedName("grenade_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_nuclear"); grenade_zomg = new ItemGrenade().setUnlocalizedName("grenade_zomg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_zomg"); grenade_black_hole = new ItemGrenade().setUnlocalizedName("grenade_black_hole").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_black_hole"); + grenade_cloud = new ItemGrenade().setUnlocalizedName("grenade_cloud").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":grenade_cloud"); + grenade_pink_cloud = new ItemGrenade().setUnlocalizedName("grenade_pink_cloud").setCreativeTab(null).setTextureName(RefStrings.MODID + ":grenade_pink_cloud"); ullapool_caber = new WeaponSpecial(MainRegistry.enumToolMaterialSteel).setUnlocalizedName("ullapool_caber").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ullapool_caber"); weaponized_starblaster_cell = new WeaponizedCell().setUnlocalizedName("weaponized_starblaster_cell").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92_ammo_weaponized"); @@ -2433,6 +2461,30 @@ public static void initializeItem() gas6 = new Item().setUnlocalizedName("gas6").setTextureName(RefStrings.MODID + ":gas6"); gas7 = new Item().setUnlocalizedName("gas7").setTextureName(RefStrings.MODID + ":gas7"); gas8 = new Item().setUnlocalizedName("gas8").setTextureName(RefStrings.MODID + ":gas8"); + chlorine1 = new Item().setUnlocalizedName("chlorine1").setTextureName(RefStrings.MODID + ":chlorine1"); + chlorine2 = new Item().setUnlocalizedName("chlorine2").setTextureName(RefStrings.MODID + ":chlorine2"); + chlorine3 = new Item().setUnlocalizedName("chlorine3").setTextureName(RefStrings.MODID + ":chlorine3"); + chlorine4 = new Item().setUnlocalizedName("chlorine4").setTextureName(RefStrings.MODID + ":chlorine4"); + chlorine5 = new Item().setUnlocalizedName("chlorine5").setTextureName(RefStrings.MODID + ":chlorine5"); + chlorine6 = new Item().setUnlocalizedName("chlorine6").setTextureName(RefStrings.MODID + ":chlorine6"); + chlorine7 = new Item().setUnlocalizedName("chlorine7").setTextureName(RefStrings.MODID + ":chlorine7"); + chlorine8 = new Item().setUnlocalizedName("chlorine8").setTextureName(RefStrings.MODID + ":chlorine8"); + pc1 = new Item().setUnlocalizedName("pc1").setTextureName(RefStrings.MODID + ":pc1"); + pc2 = new Item().setUnlocalizedName("pc2").setTextureName(RefStrings.MODID + ":pc2"); + pc3 = new Item().setUnlocalizedName("pc3").setTextureName(RefStrings.MODID + ":pc3"); + pc4 = new Item().setUnlocalizedName("pc4").setTextureName(RefStrings.MODID + ":pc4"); + pc5 = new Item().setUnlocalizedName("pc5").setTextureName(RefStrings.MODID + ":pc5"); + pc6 = new Item().setUnlocalizedName("pc6").setTextureName(RefStrings.MODID + ":pc6"); + pc7 = new Item().setUnlocalizedName("pc7").setTextureName(RefStrings.MODID + ":pc7"); + pc8 = new Item().setUnlocalizedName("pc8").setTextureName(RefStrings.MODID + ":pc8"); + cloud1 = new Item().setUnlocalizedName("cloud1").setTextureName(RefStrings.MODID + ":cloud1"); + cloud2 = new Item().setUnlocalizedName("cloud2").setTextureName(RefStrings.MODID + ":cloud2"); + cloud3 = new Item().setUnlocalizedName("cloud3").setTextureName(RefStrings.MODID + ":cloud3"); + cloud4 = new Item().setUnlocalizedName("cloud4").setTextureName(RefStrings.MODID + ":cloud4"); + cloud5 = new Item().setUnlocalizedName("cloud5").setTextureName(RefStrings.MODID + ":cloud5"); + cloud6 = new Item().setUnlocalizedName("cloud6").setTextureName(RefStrings.MODID + ":cloud6"); + cloud7 = new Item().setUnlocalizedName("cloud7").setTextureName(RefStrings.MODID + ":cloud7"); + cloud8 = new Item().setUnlocalizedName("cloud8").setTextureName(RefStrings.MODID + ":cloud8"); gasflame1 = new Item().setUnlocalizedName("gasflame1").setTextureName(RefStrings.MODID + ":gasflame1"); gasflame2 = new Item().setUnlocalizedName("gasflame2").setTextureName(RefStrings.MODID + ":gasflame2"); gasflame3 = new Item().setUnlocalizedName("gasflame3").setTextureName(RefStrings.MODID + ":gasflame3"); @@ -3401,6 +3453,8 @@ private static void registerItem() { GameRegistry.registerItem(grenade_electric, grenade_electric.getUnlocalizedName()); GameRegistry.registerItem(grenade_poison, grenade_poison.getUnlocalizedName()); GameRegistry.registerItem(grenade_gas, grenade_gas.getUnlocalizedName()); + GameRegistry.registerItem(grenade_cloud, grenade_cloud.getUnlocalizedName()); + GameRegistry.registerItem(grenade_pink_cloud, grenade_pink_cloud.getUnlocalizedName()); GameRegistry.registerItem(grenade_pulse, grenade_pulse.getUnlocalizedName()); GameRegistry.registerItem(grenade_plasma, grenade_plasma.getUnlocalizedName()); GameRegistry.registerItem(grenade_tau, grenade_tau.getUnlocalizedName()); @@ -3748,6 +3802,30 @@ private static void registerItem() { GameRegistry.registerItem(gas6, gas6.getUnlocalizedName()); GameRegistry.registerItem(gas7, gas7.getUnlocalizedName()); GameRegistry.registerItem(gas8, gas8.getUnlocalizedName()); + GameRegistry.registerItem(chlorine1, chlorine1.getUnlocalizedName()); + GameRegistry.registerItem(chlorine2, chlorine2.getUnlocalizedName()); + GameRegistry.registerItem(chlorine3, chlorine3.getUnlocalizedName()); + GameRegistry.registerItem(chlorine4, chlorine4.getUnlocalizedName()); + GameRegistry.registerItem(chlorine5, chlorine5.getUnlocalizedName()); + GameRegistry.registerItem(chlorine6, chlorine6.getUnlocalizedName()); + GameRegistry.registerItem(chlorine7, chlorine7.getUnlocalizedName()); + GameRegistry.registerItem(chlorine8, chlorine8.getUnlocalizedName()); + GameRegistry.registerItem(pc1, pc1.getUnlocalizedName()); + GameRegistry.registerItem(pc2, pc2.getUnlocalizedName()); + GameRegistry.registerItem(pc3, pc3.getUnlocalizedName()); + GameRegistry.registerItem(pc4, pc4.getUnlocalizedName()); + GameRegistry.registerItem(pc5, pc5.getUnlocalizedName()); + GameRegistry.registerItem(pc6, pc6.getUnlocalizedName()); + GameRegistry.registerItem(pc7, pc7.getUnlocalizedName()); + GameRegistry.registerItem(pc8, pc8.getUnlocalizedName()); + GameRegistry.registerItem(cloud1, cloud1.getUnlocalizedName()); + GameRegistry.registerItem(cloud2, cloud2.getUnlocalizedName()); + GameRegistry.registerItem(cloud3, cloud3.getUnlocalizedName()); + GameRegistry.registerItem(cloud4, cloud4.getUnlocalizedName()); + GameRegistry.registerItem(cloud5, cloud5.getUnlocalizedName()); + GameRegistry.registerItem(cloud6, cloud6.getUnlocalizedName()); + GameRegistry.registerItem(cloud7, cloud7.getUnlocalizedName()); + GameRegistry.registerItem(cloud8, cloud8.getUnlocalizedName()); GameRegistry.registerItem(gasflame1, gasflame1.getUnlocalizedName()); GameRegistry.registerItem(gasflame2, gasflame2.getUnlocalizedName()); GameRegistry.registerItem(gasflame3, gasflame3.getUnlocalizedName()); diff --git a/com/hbm/items/special/ItemStarterKit.java b/com/hbm/items/special/ItemStarterKit.java index 71c72542b5..6187450be2 100644 --- a/com/hbm/items/special/ItemStarterKit.java +++ b/com/hbm/items/special/ItemStarterKit.java @@ -242,6 +242,8 @@ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer pla player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_electric, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_poison, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_gas, 16)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_cloud, 16)); + player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_pink_cloud, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_pulse, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_plasma, 16)); player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_tau, 16)); diff --git a/com/hbm/items/weapon/ItemGrenade.java b/com/hbm/items/weapon/ItemGrenade.java index 2461ca0457..f1b20183fd 100644 --- a/com/hbm/items/weapon/ItemGrenade.java +++ b/com/hbm/items/weapon/ItemGrenade.java @@ -2,6 +2,7 @@ import com.hbm.entity.grenade.EntityGrenadeASchrab; import com.hbm.entity.grenade.EntityGrenadeBlackHole; +import com.hbm.entity.grenade.EntityGrenadeCloud; import com.hbm.entity.grenade.EntityGrenadeCluster; import com.hbm.entity.grenade.EntityGrenadeElectric; import com.hbm.entity.grenade.EntityGrenadeFire; @@ -14,6 +15,7 @@ import com.hbm.entity.grenade.EntityGrenadeMk2; import com.hbm.entity.grenade.EntityGrenadeNuclear; import com.hbm.entity.grenade.EntityGrenadeNuke; +import com.hbm.entity.grenade.EntityGrenadePC; import com.hbm.entity.grenade.EntityGrenadePlasma; import com.hbm.entity.grenade.EntityGrenadePoison; import com.hbm.entity.grenade.EntityGrenadePulse; @@ -115,6 +117,12 @@ public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, Entity if (this == ModItems.grenade_gascan) { p_77659_2_.spawnEntityInWorld(new EntityGrenadeGascan(p_77659_2_, p_77659_3_)); } + if (this == ModItems.grenade_cloud) { + p_77659_2_.spawnEntityInWorld(new EntityGrenadeCloud(p_77659_2_, p_77659_3_)); + } + if (this == ModItems.grenade_pink_cloud) { + p_77659_2_.spawnEntityInWorld(new EntityGrenadePC(p_77659_2_, p_77659_3_)); + } } return p_77659_1_; @@ -123,11 +131,11 @@ public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, Entity @Override public EnumRarity getRarity(ItemStack p_77613_1_) { - if (this == ModItems.grenade_schrabidium || this == ModItems.grenade_aschrab) { + if (this == ModItems.grenade_schrabidium || this == ModItems.grenade_aschrab || this == ModItems.grenade_cloud) { return EnumRarity.rare; } - if (this == ModItems.grenade_plasma || this == ModItems.grenade_zomg || this == ModItems.grenade_black_hole) { + if (this == ModItems.grenade_plasma || this == ModItems.grenade_zomg || this == ModItems.grenade_black_hole || this == ModItems.grenade_pink_cloud) { return EnumRarity.epic; } diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index 05a2a9781c..763d6173ae 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -206,12 +206,15 @@ public static boolean checkArmorNull(EntityPlayer player, int slot) return false; } - public static void damageSuit(EntityPlayer player, int slot) { + public static void damageSuit(EntityPlayer player, int slot, int amount) { + + if(player.inventory.armorInventory[slot] == null) + return; int j = player.inventory.armorInventory[slot].getItemDamage(); - player.inventory.armorInventory[slot].setItemDamage(j += 1); + player.inventory.armorInventory[slot].setItemDamage(j += amount); - if(player.inventory.armorInventory[slot].getItemDamage() == player.inventory.armorInventory[slot].getMaxDamage()) + if(player.inventory.armorInventory[slot].getItemDamage() >= player.inventory.armorInventory[slot].getMaxDamage()) { player.inventory.armorInventory[slot] = null; } diff --git a/com/hbm/lib/ModDamageSource.java b/com/hbm/lib/ModDamageSource.java index 0f85a72ad9..4cead54bf1 100644 --- a/com/hbm/lib/ModDamageSource.java +++ b/com/hbm/lib/ModDamageSource.java @@ -37,6 +37,8 @@ public class ModDamageSource extends DamageSource { public static DamageSource amsCore = (new DamageSource("amsCore")).setDamageIsAbsolute().setDamageBypassesArmor(); public static DamageSource broadcast = (new DamageSource("broadcast")).setDamageIsAbsolute().setDamageBypassesArmor(); public static DamageSource bang = (new DamageSource("bang")).setDamageIsAbsolute().setDamageBypassesArmor(); + public static DamageSource pc = (new DamageSource("pc")).setDamageIsAbsolute().setDamageBypassesArmor(); + public static DamageSource cloud = (new DamageSource("cloud")).setDamageIsAbsolute().setDamageBypassesArmor(); public ModDamageSource(String p_i1566_1_) { super(p_i1566_1_); diff --git a/com/hbm/lib/RefStrings.java b/com/hbm/lib/RefStrings.java index 74770bb9a6..f141d51f72 100644 --- a/com/hbm/lib/RefStrings.java +++ b/com/hbm/lib/RefStrings.java @@ -3,7 +3,7 @@ public class RefStrings { public static final String MODID = "hbm"; public static final String NAME = "Hbm's Nuclear Tech Mod"; - public static final String VERSION = "1.0.27 BETA (2863)"; + public static final String VERSION = "1.0.27 BETA (2870)"; //HBM's Beta Naming Convention: //V T (X-Y-Z) //V -> next release version diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 4ef3d094d8..9554043b7c 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -135,6 +135,8 @@ public void registerRenderInfo() RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeShrapnel.class, new RenderSnowball(ModItems.grenade_shrapnel)); RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeBlackHole.class, new RenderSnowball(ModItems.grenade_black_hole)); RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeGascan.class, new RenderSnowball(ModItems.grenade_gascan)); + RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeCloud.class, new RenderSnowball(ModItems.grenade_cloud)); + RenderingRegistry.registerEntityRenderingHandler(EntityGrenadePC.class, new RenderSnowball(ModItems.grenade_pink_cloud)); RenderingRegistry.registerEntityRenderingHandler(EntitySchrab.class, new RenderFlare()); @@ -330,6 +332,9 @@ public void registerRenderInfo() RenderingRegistry.registerEntityRenderingHandler(EntitySmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.smoke1, ModItems.smoke2, ModItems.smoke3, ModItems.smoke4, ModItems.smoke5, ModItems.smoke6, ModItems.smoke7, ModItems.smoke8 })); RenderingRegistry.registerEntityRenderingHandler(EntityBSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.b_smoke1, ModItems.b_smoke2, ModItems.b_smoke3, ModItems.b_smoke4, ModItems.b_smoke5, ModItems.b_smoke6, ModItems.b_smoke7, ModItems.b_smoke8 })); RenderingRegistry.registerEntityRenderingHandler(EntityDSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.d_smoke1, ModItems.d_smoke2, ModItems.d_smoke3, ModItems.d_smoke4, ModItems.d_smoke5, ModItems.d_smoke6, ModItems.d_smoke7, ModItems.d_smoke8 })); + RenderingRegistry.registerEntityRenderingHandler(EntityChlorineFX.class, new MultiCloudRenderer(new Item[] { ModItems.chlorine1, ModItems.chlorine2, ModItems.chlorine3, ModItems.chlorine4, ModItems.chlorine5, ModItems.chlorine6, ModItems.chlorine7, ModItems.chlorine8 })); + RenderingRegistry.registerEntityRenderingHandler(EntityPinkCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.pc1, ModItems.pc2, ModItems.pc3, ModItems.pc4, ModItems.pc5, ModItems.pc6, ModItems.pc7, ModItems.pc8 })); + RenderingRegistry.registerEntityRenderingHandler(EntityCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.cloud1, ModItems.cloud2, ModItems.cloud3, ModItems.cloud4, ModItems.cloud5, ModItems.cloud6, ModItems.cloud7, ModItems.cloud8 })); RenderingRegistry.registerEntityRenderingHandler(EntitySSmokeFX.class, new SSmokeRenderer(ModItems.nuclear_waste)); RenderingRegistry.registerEntityRenderingHandler(EntityOilSpillFX.class, new SpillRenderer(ModItems.nuclear_waste)); RenderingRegistry.registerEntityRenderingHandler(EntityGasFX.class, new GasRenderer(ModItems.nuclear_waste)); diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index 4ddfd8b291..73b4266bcc 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -705,6 +705,7 @@ public static void AddCraftingRec() GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "IIM", "WPH", 'S', "plateSteel", 'I', "ingotSteel", 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'M', ModItems.mechanism_launcher_2 })); //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_fatman_ammo, 2), new Object[] { " S ", "SPS", "ITI", 'S', "plateSteel", 'P', ModItems.ingot_pu239, 'T', Item.getItemFromBlock(Blocks.tnt), 'I', "plateIron" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_mirv, 1), new Object[] { "LLL", "WFW", "SSS", 'S', "plateSteel", 'L', "plateLead", 'W', ModItems.wire_gold, 'F', ModItems.gun_fatman })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_proto, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_polymer, 'L', "plateDesh", 'W', ModItems.wire_tungsten, 'F', ModItems.gun_fatman })); //GameRegistry.addRecipe(new ItemStack(ModItems.gun_mirv_ammo, 1), new Object[] { "NNN", "NSN", "NNN", 'S', ModItems.hull_small_steel, 'N', ModItems.gun_fatman_ammo }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gun_bf, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_paa, 'L', "plateDenseLead", 'W', ModItems.wire_advanced_alloy, 'F', ModItems.gun_mirv })); GameRegistry.addRecipe(new ItemStack(ModItems.gun_bf_ammo, 1), new Object[] { "AEA", "SHS", "AEA", 'H', ModItems.hull_small_steel, 'A', ModItems.cell_antimatter, 'S', ModItems.cell_anti_schrabidium, 'E', ModItems.powder_power }); @@ -1228,6 +1229,14 @@ public static void AddCraftingRec() GameRegistry.addShapelessRecipe(new ItemStack(ModItems.bottle_sparkle), new Object[] { ModItems.bottle_quantum, Items.carrot, Items.gold_nugget }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_nuke), new Object[] { "CGC", "CGC", "PAP", 'C', ModBlocks.det_charge, 'G', ModItems.grenade_mk2, 'P', "plateAdvanced", 'A', Blocks.anvil })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.radiobox), new Object[] { "-C-", "8OI", "EUE", '-', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier4, '8', ModItems.coil_gold, 'O', ModItems.pellet_rtg, 'I', ModItems.fuse, 'E', "plateSteel", 'U', ModItems.rtg_unit })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.radiorec), new Object[] { " W", "PCP", "PIP", 'W', ModItems.wire_copper, 'P', "plateSteel", 'C', ModItems.circuit_red_copper, 'I', "ingotPolymer" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jackt), new Object[] { "S S", "LIL", "LIL", 'S', "plateSteel", 'L', Items.leather, 'I', ModItems.plate_polymer })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jackt2), new Object[] { "S S", "LIL", "III", 'S', "plateSteel", 'L', Items.leather, 'I', ModItems.plate_polymer })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.grenade_cloud), new Object[] { "SPS", "CAC", "SPS", 'S', "dustSulfur", 'P', ModItems.powder_poison, 'C', "dustCopper", 'A', new ItemStack(ModItems.fluid_tank_full, 1, FluidType.ACID.getID()) })); + GameRegistry.addRecipe(new ItemStack(ModItems.grenade_pink_cloud), new Object[] { " S ", "ECE", " E ", 'S', ModItems.powder_spark_mix, 'E', ModItems.powder_magic, 'C', ModItems.grenade_cloud }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_chlorine), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.pellet_gas, 'D', Blocks.dispenser })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.grenade_cloud, 'D', Blocks.dispenser })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.vent_pink_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', "plateIron", 'G', Blocks.iron_bars, 'C', ModItems.grenade_pink_cloud, 'D', Blocks.dispenser })); GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.assembly_template, 1, OreDictionary.WILDCARD_VALUE) }); GameRegistry.addShapelessRecipe(new ItemStack(Items.paper, 1), new Object[] { new ItemStack(ModItems.chemistry_template, 1, OreDictionary.WILDCARD_VALUE) }); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 6d976d7118..f28c007aab 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -66,6 +66,7 @@ import com.hbm.entity.effect.EntityVortex; import com.hbm.entity.grenade.EntityGrenadeASchrab; import com.hbm.entity.grenade.EntityGrenadeBlackHole; +import com.hbm.entity.grenade.EntityGrenadeCloud; import com.hbm.entity.grenade.EntityGrenadeCluster; import com.hbm.entity.grenade.EntityGrenadeElectric; import com.hbm.entity.grenade.EntityGrenadeFire; @@ -78,6 +79,7 @@ import com.hbm.entity.grenade.EntityGrenadeMk2; import com.hbm.entity.grenade.EntityGrenadeNuclear; import com.hbm.entity.grenade.EntityGrenadeNuke; +import com.hbm.entity.grenade.EntityGrenadePC; import com.hbm.entity.grenade.EntityGrenadePlasma; import com.hbm.entity.grenade.EntityGrenadePoison; import com.hbm.entity.grenade.EntityGrenadePulse; @@ -127,10 +129,13 @@ import com.hbm.entity.mob.EntityHunterChopper; import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.entity.particle.EntityBSmokeFX; +import com.hbm.entity.particle.EntityChlorineFX; +import com.hbm.entity.particle.EntityCloudFX; import com.hbm.entity.particle.EntityDSmokeFX; import com.hbm.entity.particle.EntityGasFX; import com.hbm.entity.particle.EntityGasFlameFX; import com.hbm.entity.particle.EntityOilSpillFX; +import com.hbm.entity.particle.EntityPinkCloudFX; import com.hbm.entity.particle.EntitySSmokeFX; import com.hbm.entity.particle.EntitySmokeFX; import com.hbm.entity.particle.EntityTSmokeFX; @@ -765,6 +770,11 @@ public void PreLoad(FMLPreInitializationEvent PreEvent) EntityRegistry.registerModEntity(EntityMissileBHole.class, "entity_missile_blackhole", 100, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityMissileSchrabidium.class, "entity_missile_schrabidium", 101, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityMissileEMP.class, "entity_missile_emp", 102, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityChlorineFX.class, "entity_d_smoke_fx", 103, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityPinkCloudFX.class, "entity_pink_cloud_fx", 104, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityCloudFX.class, "entity_cloud_fx", 105, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityGrenadePC.class, "entity_grenade_pink_cloud", 106, this, 250, 1, true); + EntityRegistry.registerModEntity(EntityGrenadeCloud.class, "entity_grenade_cloud", 107, this, 250, 1, true); EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00); EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72); @@ -936,6 +946,20 @@ protected IProjectile getProjectileEntity(World p_82499_1_, IPosition p_82499_2_ { return new EntityGrenadeGascan(p_82499_1_, p_82499_2_.getX(), p_82499_2_.getY(), p_82499_2_.getZ()); } + }); + BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.grenade_cloud, new BehaviorProjectileDispense() { + + protected IProjectile getProjectileEntity(World p_82499_1_, IPosition p_82499_2_) + { + return new EntityGrenadeCloud(p_82499_1_, p_82499_2_.getX(), p_82499_2_.getY(), p_82499_2_.getZ()); + } + }); + BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.grenade_pink_cloud, new BehaviorProjectileDispense() { + + protected IProjectile getProjectileEntity(World p_82499_1_, IPosition p_82499_2_) + { + return new EntityGrenadePC(p_82499_1_, p_82499_2_.getX(), p_82499_2_.getY(), p_82499_2_.getZ()); + } }); } diff --git a/com/hbm/packet/TEVaultPacket.java b/com/hbm/packet/TEVaultPacket.java index 9ebcf67b97..95b1692a1a 100644 --- a/com/hbm/packet/TEVaultPacket.java +++ b/com/hbm/packet/TEVaultPacket.java @@ -71,7 +71,8 @@ public IMessage onMessage(TEVaultPacket m, MessageContext ctx) { TileEntityVaultDoor vault = (TileEntityVaultDoor) te; vault.isOpening = m.isOpening; vault.state = m.state; - vault.sysTime = m.sysTime; + if(m.sysTime == 1) + vault.sysTime = System.currentTimeMillis(); vault.type = m.type; } } catch (Exception x) { diff --git a/com/hbm/render/entity/MultiCloudRenderer.java b/com/hbm/render/entity/MultiCloudRenderer.java index b95e95e605..a89ce92880 100644 --- a/com/hbm/render/entity/MultiCloudRenderer.java +++ b/com/hbm/render/entity/MultiCloudRenderer.java @@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL12; import com.hbm.entity.particle.EntityBSmokeFX; +import com.hbm.entity.particle.EntityChlorineFX; import com.hbm.entity.particle.EntityModFX; import com.hbm.items.ModItems; import net.minecraft.client.renderer.Tessellator; @@ -87,6 +88,12 @@ public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, do GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glScalef(7.5F, 7.5F, 7.5F); + //// + Random randy = new Random(p_76986_1_.hashCode()); + double d = randy.nextInt(10) * 0.05; + GL11.glColor3d(1 - d, 1 - d, 1 - d); + //// + Random rand = new Random(100); for(int i = 0; i < 5; i++) { diff --git a/com/hbm/render/entity/RenderFlare.java b/com/hbm/render/entity/RenderFlare.java index 2837030619..0626d2e4ac 100644 --- a/com/hbm/render/entity/RenderFlare.java +++ b/com/hbm/render/entity/RenderFlare.java @@ -14,7 +14,7 @@ public class RenderFlare extends Render { @Override public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { - + Tessellator tessellator = Tessellator.instance; RenderHelper.disableStandardItemLighting(); float f1 = (p_76986_1_.ticksExisted + 2.0F) / 200.0F; @@ -41,6 +41,7 @@ public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, do GL11.glDepthMask(false); GL11.glPushMatrix(); //GL11.glTranslatef(0.0F, -1.0F, -2.0F); + GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); //for (int i = 0; (float)i < (f1 + f1 * f1) / 2.0F * 60.0F; ++i) @@ -64,6 +65,7 @@ public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, do tessellator.addVertex(0.866D * f4, f3, -0.5F * f4); tessellator.addVertex(0.0D, f3, 1.0F * f4); tessellator.addVertex(-0.866D * f4, f3, -0.5F * f4); + GL11.glScalef(0.99F, 0.99F, 0.99F); tessellator.draw(); } diff --git a/com/hbm/tileentity/deco/TileEntityVent.java b/com/hbm/tileentity/deco/TileEntityVent.java new file mode 100644 index 0000000000..13caf2be69 --- /dev/null +++ b/com/hbm/tileentity/deco/TileEntityVent.java @@ -0,0 +1,57 @@ +package com.hbm.tileentity.deco; + +import java.util.Random; + +import com.hbm.blocks.ModBlocks; +import com.hbm.entity.particle.EntityChlorineFX; +import com.hbm.entity.particle.EntityCloudFX; +import com.hbm.entity.particle.EntityPinkCloudFX; + +import net.minecraft.block.Block; +import net.minecraft.tileentity.TileEntity; + +public class TileEntityVent extends TileEntity { + + Random rand = new Random(); + + public void updateEntity() { + + if(!worldObj.isRemote) { + Block b = worldObj.getBlock(xCoord, yCoord, zCoord); + + if(b == ModBlocks.vent_chlorine) { + //if(rand.nextInt(1) == 0) { + double x = rand.nextGaussian() * 1.5; + double y = rand.nextGaussian() * 1.5; + double z = rand.nextGaussian() * 1.5; + + if(!worldObj.getBlock(xCoord + (int)x, yCoord + (int)y, zCoord + (int)z).isNormalCube()) { + worldObj.spawnEntityInWorld(new EntityChlorineFX(worldObj, xCoord + (int)x, yCoord + (int)y, zCoord + (int)z, x/2, y/2, z/2)); + } + //} + } + if(b == ModBlocks.vent_cloud) { + //if(rand.nextInt(50) == 0) { + double x = rand.nextGaussian() * 1.75; + double y = rand.nextGaussian() * 1.75; + double z = rand.nextGaussian() * 1.75; + + if(!worldObj.getBlock(xCoord + (int)x, yCoord + (int)y, zCoord + (int)z).isNormalCube()) { + worldObj.spawnEntityInWorld(new EntityCloudFX(worldObj, xCoord + (int)x, yCoord + (int)y, zCoord + (int)z, x/2, y/2, z/2)); + } + //} + } + if(b == ModBlocks.vent_pink_cloud) { + //if(rand.nextInt(65) == 0) { + double x = rand.nextGaussian() * 2; + double y = rand.nextGaussian() * 2; + double z = rand.nextGaussian() * 2; + + if(!worldObj.getBlock(xCoord + (int)x, yCoord + (int)y, zCoord + (int)z).isNormalCube()) { + worldObj.spawnEntityInWorld(new EntityPinkCloudFX(worldObj, xCoord + (int)x, yCoord + (int)y, zCoord + (int)z, x/2, y/2, z/2)); + } + //} + } + } + } +} diff --git a/com/hbm/tileentity/machine/TileEntityVaultDoor.java b/com/hbm/tileentity/machine/TileEntityVaultDoor.java index 66cba74139..1566e2343d 100644 --- a/com/hbm/tileentity/machine/TileEntityVaultDoor.java +++ b/com/hbm/tileentity/machine/TileEntityVaultDoor.java @@ -97,13 +97,13 @@ public void updateEntity() { } } - PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, sysTime, type)); + PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 0, type)); } } public void open() { if(state == 0) { - sysTime = System.currentTimeMillis(); + PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type)); isOpening = true; state = 1; @@ -118,7 +118,7 @@ public void finishOpen() { public void close() { if(state == 2) { - sysTime = System.currentTimeMillis(); + PacketDispatcher.wrapper.sendToAll(new TEVaultPacket(xCoord, yCoord, zCoord, isOpening, state, 1, type)); isOpening = false; state = 1;