From da17dfb2c6e344a3ff3da811c8a4e5e13fe34019 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Tue, 6 Jun 2017 14:30:27 +0200 Subject: [PATCH] Grenade enhancements, asphalt, more textures, desh --- assets/hbm/lang/de_DE.lang | 10 +- assets/hbm/lang/en_US.lang | 8 + assets/hbm/textures/blocks/asphalt.png | Bin 0 -> 575 bytes assets/hbm/textures/blocks/block_desh.png | Bin 0 -> 412 bytes assets/hbm/textures/items/asbestos_boots.png | Bin 0 -> 217 bytes assets/hbm/textures/items/asbestos_cloth.png | Bin 0 -> 343 bytes assets/hbm/textures/items/asbestos_helmet.png | Bin 0 -> 232 bytes assets/hbm/textures/items/asbestos_legs.png | Bin 0 -> 191 bytes assets/hbm/textures/items/asbestos_plate.png | Bin 0 -> 262 bytes assets/hbm/textures/items/polaroid_folded.png | Bin 0 -> 207 bytes .../hbm/textures/models/ModelDefabricator.png | Bin 0 -> 1479 bytes assets/hbm/textures/models/ModelHP.png | Bin 855 -> 1024 bytes assets/hbm/textures/models/ModelSpark.png | Bin 931 -> 1248 bytes com/hbm/blocks/ModBlocks.java | 8 +- .../entity/grenade/EntityGrenadeASchrab.java | 21 +- com/hbm/entity/grenade/EntityGrenadeBase.java | 51 + .../grenade/EntityGrenadeBlackHole.java | 23 +- .../entity/grenade/EntityGrenadeCluster.java | 21 +- .../entity/grenade/EntityGrenadeElectric.java | 23 +- com/hbm/entity/grenade/EntityGrenadeFire.java | 23 +- com/hbm/entity/grenade/EntityGrenadeFrag.java | 23 +- com/hbm/entity/grenade/EntityGrenadeGas.java | 37 +- .../entity/grenade/EntityGrenadeGeneric.java | 23 +- .../entity/grenade/EntityGrenadeLemon.java | 23 +- com/hbm/entity/grenade/EntityGrenadeMk2.java | 51 +- .../entity/grenade/EntityGrenadeNuclear.java | 18 +- com/hbm/entity/grenade/EntityGrenadeNuke.java | 23 +- .../entity/grenade/EntityGrenadePlasma.java | 23 +- .../entity/grenade/EntityGrenadePoison.java | 22 +- .../entity/grenade/EntityGrenadePulse.java | 27 +- .../grenade/EntityGrenadeSchrabidium.java | 23 +- .../entity/grenade/EntityGrenadeShrapnel.java | 24 +- .../entity/grenade/EntityGrenadeStrong.java | 23 +- com/hbm/entity/grenade/EntityGrenadeTau.java | 23 +- com/hbm/entity/grenade/EntityGrenadeZOMG.java | 23 +- .../entity/item/EntityMinecartModBase.java | 1380 +++++++++++++++++ com/hbm/entity/item/EntityMinecartTest.java | 4 +- com/hbm/explosion/ExplosionNukeGeneric.java | 5 +- com/hbm/items/ModItems.java | 56 +- com/hbm/items/special/ItemBattery.java | 14 +- com/hbm/items/special/ItemCustomLore.java | 2 +- com/hbm/lib/RefStrings.java | 2 +- com/hbm/main/ClientProxy.java | 5 +- com/hbm/main/CraftingManager.java | 53 +- com/hbm/main/MainRegistry.java | 57 + com/hbm/main/ModEventHandler.java | 33 + com/hbm/render/entity/RenderMinecartTest.java | 116 +- com/hbm/render/item/ItemRenderOverkill.java | 43 +- com/hbm/render/model/ModelDefabricator.java | 224 +++ com/hbm/world/DesertAtom002.java | 2 +- 50 files changed, 2082 insertions(+), 488 deletions(-) create mode 100644 assets/hbm/textures/blocks/asphalt.png create mode 100644 assets/hbm/textures/blocks/block_desh.png create mode 100644 assets/hbm/textures/items/asbestos_boots.png create mode 100644 assets/hbm/textures/items/asbestos_cloth.png create mode 100644 assets/hbm/textures/items/asbestos_helmet.png create mode 100644 assets/hbm/textures/items/asbestos_legs.png create mode 100644 assets/hbm/textures/items/asbestos_plate.png create mode 100644 assets/hbm/textures/items/polaroid_folded.png create mode 100755 assets/hbm/textures/models/ModelDefabricator.png mode change 100644 => 100755 assets/hbm/textures/models/ModelHP.png mode change 100644 => 100755 assets/hbm/textures/models/ModelSpark.png create mode 100644 com/hbm/entity/grenade/EntityGrenadeBase.java create mode 100644 com/hbm/entity/item/EntityMinecartModBase.java create mode 100755 com/hbm/render/model/ModelDefabricator.java diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 52bea2567..096e51f4f 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -3,6 +3,9 @@ itemGroup.tabParts=Nuclear Tech Mod Bauteile itemGroup.tabBlocks=Nuclear Tech Mod Blöcke itemGroup.tabNuke=Nuclear Tech Mod Bomben +achievement.getTitanium=Es ist ein Anfang +achievement.getTitanium.desc=Finde etwas Titanerz + item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core item.record.ss.desc=Valve - Sector Sweep item.record.vc.desc=Valve - Vortal Combat @@ -163,7 +166,7 @@ tile.oil_duct_solid.name=Verstärktes Ölrohr tile.machine_flare.name=Abfackelturm container.gasFlare=Abfackelturm tile.gas_duct.name=Gasleitung -tile.gas_duct_solid.name=Verstärkter Gasleitung +tile.gas_duct_solid.name=Verstärkte Gasleitung tile.rail_highspeed.name=Hochgeschwindigkeitsschienen tile.rail_booster.name=Hochgeschwindigkeits-Boosterschienen @@ -476,6 +479,7 @@ item.pellet_rtg.name=Plutonium 238 Pellet item.pellet_rtg_weak.name=Schwaches Uran RTG-Pellet item.rtg_unit.name=RTG Einheit item.hazmat_cloth.name=Strahlenschutzanzugsstoff +item.asbestos_cloth.name=Hitzeschutzanzugsstoff item.filter_coal.name=Aktivkohlefilter item.tritium_deuterium_cake.name=Tritium-Deuterium-Kuchen item.telepad.name=Teleplatte @@ -901,6 +905,10 @@ item.hazmat_paa_helmet.name=PaA-Kampfschutzanzug Helm item.hazmat_paa_plate.name=PaA-Kampfschutzanzug Brustplatte item.hazmat_paa_legs.name=PaA-Kampfschutzanzug Hose item.hazmat_paa_boots.name=PaA-Kampfschutzanzug Stiefel +item.asbestos_helmet.name=Hitzeschutzhelm +item.asbestos_plate.name=Hitzeschutzbrustplatte +item.asbestos_legs.name=Hitzeschutzhose +item.asbestos_boots.name=Hitzeschutzstiefel item.paa_plate.name=PaA-Brustschutzplatte item.paa_legs.name=PaA-Beinverstärkungsschienen diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index 7f97b9dc7..0b49ae06f 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -3,6 +3,9 @@ itemGroup.tabParts=Nuclear Tech Mod Parts itemGroup.tabBlocks=Nuclear Tech Mod Blocks itemGroup.tabNuke=Nuclear Tech Mod Nukes +achievement.getTitanium=It's A Start +achievement.getTitanium.desc=Collect titanium ore + item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core item.record.ss.desc=Valve - Sector Sweep item.record.vc.desc=Valve - Vortal Combat @@ -476,6 +479,7 @@ item.pellet_rtg.name=Plutonium 238 Fuel Pellet item.pellet_rtg_weak.name=Weak Uranium RTG Pellet item.rtg_unit.name=RTG Unit item.hazmat_cloth.name=Hazmat Cloth +item.asbestos_cloth.name=Fire Proximity Cloth item.filter_coal.name=Activated Carbon Filter item.tritium_deuterium_cake.name=Tritium-Deuterium-Cake item.telepad.name=Telepad @@ -901,6 +905,10 @@ item.hazmat_paa_helmet.name=PaA Battle Hazmat Suit Helmet item.hazmat_paa_plate.name=PaA Battle Hazmat Suit Chestplate item.hazmat_paa_legs.name=PaA Battle Hazmat Suit Leggings item.hazmat_paa_boots.name=PaA Battle Hazmat Suit Boots +item.asbestos_helmet.name=Fire Proximity Helmet +item.asbestos_plate.name=Fire Proximity Chestplate +item.asbestos_legs.name=Fire Proximity Leggings +item.asbestos_boots.name=Fire Proximity Boots item.paa_plate.name=PaA Chest Protection Plate item.paa_legs.name=PaA Leg Reinforcements diff --git a/assets/hbm/textures/blocks/asphalt.png b/assets/hbm/textures/blocks/asphalt.png new file mode 100644 index 0000000000000000000000000000000000000000..d0e1e6879bfa86d84a1d01969560246540d729dd GIT binary patch literal 575 zcmV-F0>J%=P)jR(3;Pb7tE%VvMAe=)L2;C+Ez*@3hts5n5|lfZjX3cR~oLDj@`nF#zP8F~-nZ z17M5+Kx+-}JvQfzs-mjg_syIWfKm$2^AJK{-*@Jmgb?VxnbsO} zPLAWiIfpR@W6U1|Yc1QhQA$BoInR?)%3B2d(YBWBx-iDPKy%KRudgrl-eZiR_s$pt zV+`JV#uzL|{=dI?S!=N?(voG7_TIA&w$_qTqP6zc?)y$k30d)0BZ3O3s-W zBgPm+gx}v^?)&~5wwgqQS}Q+4Kg1Y0j)P_Cn(Cb6x-Nj1g{)YmlowX5^;LDw`4+Ed zUc#N{`R^H>bExX;{c#*T&jUaR0p}dnTE-aES^-EYVN*(P^U~QlM@k9rJuybc81&vL zr7-7Y+cx%nr}vHxA#mR}#u#FZ^xjcbLEc?IG>+Xcp}g^N^avkOFx>K^RMf51)xnVtc5ks z!4sj(G8pHcKwkd#ncWk?R+Z$Id($rO^BmtQ=b2!38b|TO>K^rJ6xJgBX6yPPyQ&0G z8Y-1k2DnYrYLA8iwysxXs}{5Zj@vXz5rc4eqIC<}JRawi832~9leHO|Ch{C?+g41n zRVC-muIpm1F+%N>kc+ZQc+mM3%U*tNAYRv7!GP0lT=ca8h^-%#PedF{0a&QzUI znpCDU<+_0}v!G*kt`^_ARkhI!3<24DYhLxu=MwmMX~*N`P5xi^G8w;iDam$o(OBve zeo`9~GT1*4hmKLEegbp;V&UDxj|JVkzcKYn2xM~DdWJinQyX+q!kFvh@pk7Ze+08mv`v=64P z>m%|NMnstB`8fdqXsyw8-O*#yG`Hbi6)c5PYSUVSh``M7-XAby42THMxuAvHiYleH ptBIK(&5wYy(liaW?rQ!QeE@twg|w0ZbHe}t002ovPDHLkV1g{Bk(>Yk literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/asbestos_helmet.png b/assets/hbm/textures/items/asbestos_helmet.png new file mode 100644 index 0000000000000000000000000000000000000000..501c0e2636c0619d8614814490041d94dbe2dfaa GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vfa``Q#W#~ zy?pZ`y&`SxpWk_Ey?Dx|Wm9%-TD9mJS6ZG`cX(LniY#_TC4*w)yO);k>oPRk-d`d! z)%8ianX$k{8wZzy{b_sd9r(%epy=>pPI04}Lu+ChX8JPUF`Xsp#GzNR+wHq@Zur;d dyMNAo&FnbSdb5skX#miv44$rjF6*2Ung9w$Td@ED literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/asbestos_legs.png b/assets/hbm/textures/items/asbestos_legs.png new file mode 100644 index 0000000000000000000000000000000000000000..900d01ecd592d2f922b5b580dc740142a66714e8 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf@L2U2OO5qon^Q4&;Os?AIg_ZIXC6f z&zE=ZvN9+&&74@QcI?HgnH>xp-disf3AxIsQ|>6rI3=i!*R@4}X;l@IjhoVY+uPeV zu6uno>zHUlTE%a4@cR)%$eT;2K>=m)k|mKo>E1y85}Sb4q9e E0Ebji(f|Me literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/models/ModelDefabricator.png b/assets/hbm/textures/models/ModelDefabricator.png new file mode 100755 index 0000000000000000000000000000000000000000..5752d9cb0b2e4474540ddfa23efedec892cadd5d GIT binary patch literal 1479 zcmV;&1vvVNP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1u#iOK~#8N?U~I^ z>p%>JyFo|@2_YdNHf&h&0BqQ>Va5BuPwqY8oao?qlC-5QP5nuhCmwtLJd-BPrYL@J zcX!v_+}w1oudc4T|5Z`{;Pv&jgYYtC*S4L<$HxwGdwbgp%|F_X?c(~|>pTAb{=RPm z+RLsXX#e{9deB~W4PQ1ti`wPofcoTR3hJ{lx5me??a%_w3Eg{MUS2vEnnxh+w>E$# z44c|REVTFGcExKErz9?HOW*@vw7mq4otHh{Cp66?R4=WvC*8-zu{^a zRmbojV8WX8E|ZLlC>?E(xUkaE246Nmi`wPoA~YV14YATH&(*V;Hl74eK$ax8PbJDx z95z#wsXB%aCuC0OK0*tWEs}J!NfaYl63cD}+|T_bbUPhNf+X7jS$W$Hki|~bF?OVb;9D4FN9%>!Gj%s-+4JgeerTY{duw>vP>n>Wh4tjE{aSNHk( z+5caH*JWwh-{0T6x3{FKF^cz77J>})0lYm4V5TjR;KPH8PhYtjr`%&r>%zCy5Feto8FWpzHogd&jLO*}#duG#GXk}LW6_~?`V{QNv<*)>j-VRIj7+1c#*Ft-6bK`yL5 zdp!9#%}6Ltx3uh92b5uRA86Ux?0V3Nk|6oetS;7$k}lCkV0E!}Jn6m}SY50gB|HkN zi({b&G1oYe{wf4b_YsPVv2$@t$;RjX#eSoXHa5GMR==%&7`7F7HN*oSF9*;MgqJDt z^%7dIlCJ4KCQi&Jr%6psOz|;xE^aAm-}_M6?dsS2R@v=rb}_L(Xz$PUF6{#(4Z_PF zpBpsIBX-^Z>Hwm_yUpudGkn;cUI&Tx7`K#GJGzec=pXB&W;adXBZ;w)*7%mT?;vT} z9bgJ1TY^~EXipm=)-k*|HAu#k(5(p)D!~bNtqqXXF}yf6NXC@VtynABsdu4UQ53}? znftxL!vu>d{=o-jeV2wT{WiT%8~Cj1PrcCicoH9i=sp4;Y|zF&A6*a+LA|5W11!6H}?)T`oHo%n7Ed`U@X9FPKzuM8f6==f+Hh*38*Fq&;uZ}d2 z(APu>%>(<^4|sxO84Ksy>y>l}5)E-%v@G1L#enMS5kuD4yke|di%Tyi1`vhte?6Lv;#AZUbCTI(O zK90;r_W|7*^zS6irvr<_;_U6-X(gy-XV}1$?^GSb_eKe83Ei5&N6CgL;n7C-fj@T# zD2|IZfQ05^ZRl1H!AVzHiO=f1p3M}+0m1K;cBAh~x5aw5MLT};u%rDmsh6Q+z1yOl z!)$Vn<5&L@nvahjR4{oAR@%$ZvEFT&-LKsz+A~|M$M`th5$8I7C0_nC7nee9fD1== z4*g`%TwDru2e@#w0VFgRYeTns2u`}nN_Ae4 z#+89UUzFd;XQWM&KM25JgdJtVTk_6%+>tyDu$bj?kK7@7(w%gX!e+Ax*VoqpJj7qG z*I~6Dx5r0>V%zIA_eE_{CyzWY5@#T$`p`aDP`RQg@NeK0N^xd3kyH zn{feny-iatbOAi^>;roX;8|4*Kyl!lF$cmZGH1v^u1!-eu&WRT9^&%^fQR@t&Gdi( z6a+58x3b1Vsu1*Ac;@ALX4BONh*J z-GBcyo2FcNMd$2KuPGjUJ++x?w*coRGz{SN+Tb(H5Df^JZ05Sjo07*qoM6N<$f&c&j8+1ijbWLw$Wo!Uc bWn*Y=WiL*3Yh`jTP)%=SWo$@LNz&(!{zlO` delta 764 zcmV9jV==xPSPU_l&e@ z@&*NSm~|%WB_&5OMba8zuuF2Z+*#e(cbgQ>=kstnod(1y`SExh4u`|A-|ufZqUMN} z^O|}AV`vmHN7I=3-EQ|8Bib3Xyry2*TQ!sV7A@MD{sfrG?SFRr7i|FcJg=!2I)KQ$ zogqd8h}hHs%p78lrhzdtnIkmN@|t>qw+ds3Q*!$WK%A2En&kllXb7=}oNbjusu9f* zqqmsSr*g!xI&7;P^ztYNDZPVgqi21N2-8YELuBc4u%@h8Yf77?^bU5e`cxf@`mJCe zh^k@fazL}V*nb-Ld9Ep(eSH68I#^$|X&k4^gwvAg`+rQM1n= zuWJvH86{=?A~LO{tX)K=l$7;5h{%kRvULE_nUb>haJgItP;+H!e=bqC3TQ*x;Mo3L zqVA%IntytfEH$eZOO!{{%%fzfHV2@%UatelWr!)7W1VD_#Xn z{|)~?unypr2k_G70Y89q)d6ke%(AGLze4VZm(%XX1Xx8V#Ne( uHopM_zE+^$Sxe~v0000bmnY)DYrp8u$o@^mc# diff --git a/assets/hbm/textures/models/ModelSpark.png b/assets/hbm/textures/models/ModelSpark.png old mode 100644 new mode 100755 index 9d7ab9dbc0c9a08fdcf9ab79726504b87a7ab262..f5f98f47c3939300279a10bc2b6ed40d7b3a5acc GIT binary patch delta 1179 zcmV;M1Z4Z82jB^iReuCkNklIbb6&tR$_lx2m;egrtt@$qp*P6`u@Y+F6m56UzR zMEQ|sbw(L3AAdBzzrSCRMbMM59W5g22W6TDqWnm+I-?Ai51QZE*{P_Dz==UgUpw@g zutt&dvGE1KAS{A5ueTZ7{A^>?56UzRMEQ|sbw(L39~g*5(BHhCgl(&*`azkdfha%H ztj;LItpH!Ymlc2fsrcYmS@GrX8Tpz0b^iNLGX_5&=6`1bS6~pApQT)YY6J%QRsg*7 z!Q~fVAXwcF7zkFk1A;BQIgdbKpl=0O{1MTg+Vnr-rA*x_K_qO~zFuK?aQ>(L|NFM0-T420Ro#f#}6U&=Sd zyQ-Zo0DliWf=0+-;dY^Q{)f-aNiat+&iV@=c>C(Qe0}|_Y#X1SP0F)J4oKdFfjCqUJ#=xuszzq5F>66xxlwk@l$BUBQ8t$S6 zx({udMbvFXQqune3nTGuwT+|@#I{{Z)5}$G9CGi>8Ul8ri7(xL6 zntumqoS^x(R#kwd?Ev?AR~n7=sQ`p7KqcfL^%{f$9B#G% z(9oyp9fCGbq5o*{xk$VL7yo+*2qcIz;G3qix z4Vx!&e~@|&S{xo8mLUJLgrv@YxfzW{4SzzHVfusI0i%ds%?gJwTKi*03$Y zyl=ms1yIksD844p#x+v~0DD=0)N9bf8efz$?D~*ffZg5QJJhBkdbu*}8Zq7KeCLZY z_wNBTa&>i8-rnApH#av`o8}_gi&TFK;63l2CZM5t1(4J_7qkVixobn$*B}?pQ-9r~ zq!wNuIp_jtBO`Uf&m;46ZZ8VZ_8y>LbD+o-pu?Da92mUk-O-`~K;wbdk3+2^+P((0 zNzIKZ01quo+gBwI3e&CLc;|cC9Kd*g4z;duo_AN05%T;1`h_y~ossEe+G-%^XMbqtE41^vT{~T&9Dwt0 z=fUdNiY1%GXhc;cf9$j)vm}IJB0rXdE$}3JX%Dt?0BjR|jGR=!;C(=5ec%Sp7#xux zD+;s}_umxYDuEb585~g?2&>5KtYiZ{OREUqN7Zwa(oc-BIhjsRTJbz2Q3!Fs(@ zDO{(DDC$=M-Usk}w5Ug~X&lgW-8YQk_lSOq>-N1Da6R^yQ4T=cy+Bv7zim460j|dW zGTsO9e6(1P1MIK+HS2s^1=!vTxE}k<)J}oMdjU(aKYuFpSi(C&`@2E>j!;#~Ps`Zf z3pgJ8%Q)`?9^w_FS652ah<-lDuUL3_nbk|TTNX|xrSIg|FZ-02wFry6&5<_YK$ihd54+6>xpc!n?cDcLuG1IruJ2C)1k!1^zZn^EpZD>T>ozz;w=+ z@4%W+wtqk!qJJtxzg50RFb*HkfP6HHKA6cy zw3MN>VCx#*-v`<4F~>1dK$rXSzR>moOL%t-zkdo0l-vrYdx2v8DvE7X;Yg(D6`<<_ z4(6;^z{^0}2MDDIii)X1UJc4>s-mA&p|Ju?pB}sVbhvRG@PTgG+1cAb^#D~?z)$)N z^+Tx73l12V0-8QOcJApg&%F;AE9P;4P>N7VaXrV+u-uU~UI%Lm$Oe-CRRvD#^zIC0 z>r@Gj_yD04StYni;AdFAE9+-Yn=*PIkXd$T-Q_;PAxk{t={TYdtgKVt6|5-$CIm?S l26d0GLCD|Z@r)fp{sAuG(s8TxB@X}q002ovPDHLkV1oO9sB{1T diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index 82fde8c07..245f41d3b 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -198,6 +198,7 @@ public class ModBlocks { public static Block block_advanced_alloy; public static Block block_magnetized_tungsten; public static Block block_combine_steel; + public static Block block_desh; public static Block block_australium; public static Block block_weidanium; @@ -205,8 +206,9 @@ public class ModBlocks { public static Block block_unobtainium; public static Block block_daffergon; public static Block block_verticium; - + public static Block gravel_obsidian; + public static Block asphalt; public static Block reinforced_brick; public static Block reinforced_glass; @@ -566,6 +568,7 @@ public class ModBlocks { block_advanced_alloy = new BlockGeneric(Material.iron).setBlockName("block_advanced_alloy").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_advanced_alloy"); block_magnetized_tungsten = new BlockGeneric(Material.iron).setBlockName("block_magnetized_tungsten").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(35.0F).setBlockTextureName(RefStrings.MODID + ":block_magnetized_tungsten"); block_combine_steel = new BlockGeneric(Material.iron).setBlockName("block_combine_steel").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_combine_steel"); + block_desh = new BlockGeneric(Material.iron).setBlockName("block_desh").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_desh"); block_australium = new BlockGeneric(Material.iron).setBlockName("block_australium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_australium"); block_weidanium = new BlockGeneric(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_weidanium"); @@ -575,6 +578,7 @@ public class ModBlocks { block_verticium = new BlockGeneric(Material.iron).setBlockName("block_verticium").setCreativeTab(MainRegistry.tabBlock).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_verticium"); gravel_obsidian = new BlockFalling(Material.iron).setBlockName("gravel_obsidian").setCreativeTab(MainRegistry.tabBlock).setStepSound(Block.soundTypeGravel).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":gravel_obsidian"); + asphalt = new BlockGeneric(Material.rock).setBlockName("asphalt").setCreativeTab(MainRegistry.tabBlock).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":asphalt"); reinforced_brick = new BlockGeneric(Material.rock).setBlockName("reinforced_brick").setCreativeTab(MainRegistry.tabBlock).setLightOpacity(15).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_brick"); reinforced_glass = new ReinforcedBlock(Material.glass).setBlockName("reinforced_glass").setCreativeTab(MainRegistry.tabBlock).setLightOpacity(0).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_glass"); @@ -877,6 +881,7 @@ public class ModBlocks { GameRegistry.registerBlock(block_schrabidium, ItemSchrabidiumBlock.class, block_schrabidium.getUnlocalizedName()); GameRegistry.registerBlock(block_magnetized_tungsten, block_magnetized_tungsten.getUnlocalizedName()); GameRegistry.registerBlock(block_combine_steel, block_combine_steel.getUnlocalizedName()); + GameRegistry.registerBlock(block_desh, block_desh.getUnlocalizedName()); GameRegistry.registerBlock(block_australium, ItemOreBlock.class, block_australium.getUnlocalizedName()); GameRegistry.registerBlock(block_weidanium, ItemOreBlock.class, block_weidanium.getUnlocalizedName()); GameRegistry.registerBlock(block_reiium, ItemOreBlock.class, block_reiium.getUnlocalizedName()); @@ -888,6 +893,7 @@ public class ModBlocks { GameRegistry.registerBlock(gravel_obsidian, gravel_obsidian.getUnlocalizedName()); //Reinforced Blocks + GameRegistry.registerBlock(asphalt, asphalt.getUnlocalizedName()); GameRegistry.registerBlock(reinforced_brick, reinforced_brick.getUnlocalizedName()); GameRegistry.registerBlock(reinforced_glass, reinforced_glass.getUnlocalizedName()); GameRegistry.registerBlock(reinforced_light, reinforced_light.getUnlocalizedName()); diff --git a/com/hbm/entity/grenade/EntityGrenadeASchrab.java b/com/hbm/entity/grenade/EntityGrenadeASchrab.java index 173554ec5..13a300afc 100644 --- a/com/hbm/entity/grenade/EntityGrenadeASchrab.java +++ b/com/hbm/entity/grenade/EntityGrenadeASchrab.java @@ -14,7 +14,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeASchrab extends EntityThrowable +public class EntityGrenadeASchrab extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -28,25 +28,8 @@ public class EntityGrenadeASchrab extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeASchrab(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } + public void explode() { if (!this.worldObj.isRemote) { diff --git a/com/hbm/entity/grenade/EntityGrenadeBase.java b/com/hbm/entity/grenade/EntityGrenadeBase.java new file mode 100644 index 000000000..84ec9f648 --- /dev/null +++ b/com/hbm/entity/grenade/EntityGrenadeBase.java @@ -0,0 +1,51 @@ +package com.hbm.entity.grenade; + +import com.hbm.entity.effect.EntityCloudFleija; +import com.hbm.entity.logic.EntityNukeExplosionAdvanced; +import com.hbm.explosion.ExplosionChaos; +import com.hbm.main.MainRegistry; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityBlaze; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; + +public abstract class EntityGrenadeBase extends EntityThrowable +{ + private static final String __OBFID = "CL_00001722"; + + public EntityGrenadeBase(World p_i1773_1_) + { + super(p_i1773_1_); + } + + public EntityGrenadeBase(World p_i1774_1_, EntityLivingBase p_i1774_2_) + { + super(p_i1774_1_, p_i1774_2_); + } + + public EntityGrenadeBase(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) + { + super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); + } + + @Override + protected void onImpact(MovingObjectPosition p_70184_1_) + { + if (p_70184_1_.entityHit != null) + { + byte b0 = 0; + + p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); + } + + this.explode(); + } + + public abstract void explode(); + +} diff --git a/com/hbm/entity/grenade/EntityGrenadeBlackHole.java b/com/hbm/entity/grenade/EntityGrenadeBlackHole.java index 521ac734b..af8e4b8ad 100644 --- a/com/hbm/entity/grenade/EntityGrenadeBlackHole.java +++ b/com/hbm/entity/grenade/EntityGrenadeBlackHole.java @@ -10,7 +10,7 @@ import net.minecraft.world.World; import com.hbm.entity.effect.EntityBlackHole; import com.hbm.explosion.ExplosionChaos; -public class EntityGrenadeBlackHole extends EntityThrowable +public class EntityGrenadeBlackHole extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -24,26 +24,9 @@ public class EntityGrenadeBlackHole extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeBlackHole(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeCluster.java b/com/hbm/entity/grenade/EntityGrenadeCluster.java index c6a4fbbcf..8070b377e 100644 --- a/com/hbm/entity/grenade/EntityGrenadeCluster.java +++ b/com/hbm/entity/grenade/EntityGrenadeCluster.java @@ -9,7 +9,7 @@ import net.minecraft.world.World; import com.hbm.explosion.ExplosionChaos; -public class EntityGrenadeCluster extends EntityThrowable +public class EntityGrenadeCluster extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -23,25 +23,8 @@ public class EntityGrenadeCluster extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeCluster(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } + public void explode() { if (!this.worldObj.isRemote) { diff --git a/com/hbm/entity/grenade/EntityGrenadeElectric.java b/com/hbm/entity/grenade/EntityGrenadeElectric.java index 0e1407a58..39b634de8 100644 --- a/com/hbm/entity/grenade/EntityGrenadeElectric.java +++ b/com/hbm/entity/grenade/EntityGrenadeElectric.java @@ -8,7 +8,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeElectric extends EntityThrowable +public class EntityGrenadeElectric extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -22,26 +22,9 @@ public class EntityGrenadeElectric extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeElectric(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeFire.java b/com/hbm/entity/grenade/EntityGrenadeFire.java index 57f73d1eb..8ebddf519 100644 --- a/com/hbm/entity/grenade/EntityGrenadeFire.java +++ b/com/hbm/entity/grenade/EntityGrenadeFire.java @@ -10,7 +10,7 @@ import net.minecraft.world.World; import com.hbm.explosion.ExplosionChaos; -public class EntityGrenadeFire extends EntityThrowable +public class EntityGrenadeFire extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; public Entity shooter; @@ -25,26 +25,9 @@ public class EntityGrenadeFire extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeFire(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeFrag.java b/com/hbm/entity/grenade/EntityGrenadeFrag.java index ba78a38ba..df4bb9030 100644 --- a/com/hbm/entity/grenade/EntityGrenadeFrag.java +++ b/com/hbm/entity/grenade/EntityGrenadeFrag.java @@ -10,7 +10,7 @@ import net.minecraft.world.World; import com.hbm.explosion.ExplosionChaos; -public class EntityGrenadeFrag extends EntityThrowable +public class EntityGrenadeFrag extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; public Entity shooter; @@ -25,26 +25,9 @@ public class EntityGrenadeFrag extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeFrag(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { if(this.isBurning()) diff --git a/com/hbm/entity/grenade/EntityGrenadeGas.java b/com/hbm/entity/grenade/EntityGrenadeGas.java index 76d4e07a0..a0c2e7558 100644 --- a/com/hbm/entity/grenade/EntityGrenadeGas.java +++ b/com/hbm/entity/grenade/EntityGrenadeGas.java @@ -9,11 +9,15 @@ import net.minecraft.world.World; import java.util.Random; +import com.hbm.entity.particle.EntityGasFX; +import com.hbm.entity.particle.EntityOilSpillFX; import com.hbm.explosion.ExplosionChaos; +import com.hbm.explosion.ExplosionLarge; -public class EntityGrenadeGas extends EntityThrowable +public class EntityGrenadeGas extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; + Random rand = new Random(); public EntityGrenadeGas(World p_i1773_1_) { @@ -25,36 +29,21 @@ public class EntityGrenadeGas extends EntityThrowable 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 - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + 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++) { - for (int i = 0; i < 10; i++) { - for(int j = 0; j < 10; j++) - this.worldObj.spawnParticle("cloud", this.posX - 2.5D + (((double)i) / 2), this.posY + 0.5D, this.posZ - 2.5D + (((double)j) / 2), 0, rand.nextDouble() * 0.1D, 0); + ExplosionLarge.spawnParticles(worldObj, posX, posY, posZ, 15); + ExplosionLarge.spawnParticles(worldObj, posX, posY, posZ, 15); + ExplosionLarge.spawnParticles(worldObj, posX, posY, posZ, 15); + + //} } } diff --git a/com/hbm/entity/grenade/EntityGrenadeGeneric.java b/com/hbm/entity/grenade/EntityGrenadeGeneric.java index e035c041f..0f7321e74 100644 --- a/com/hbm/entity/grenade/EntityGrenadeGeneric.java +++ b/com/hbm/entity/grenade/EntityGrenadeGeneric.java @@ -7,7 +7,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeGeneric extends EntityThrowable +public class EntityGrenadeGeneric extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -21,26 +21,9 @@ public class EntityGrenadeGeneric extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeGeneric(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeLemon.java b/com/hbm/entity/grenade/EntityGrenadeLemon.java index 1d20039fc..0d6ac70f5 100644 --- a/com/hbm/entity/grenade/EntityGrenadeLemon.java +++ b/com/hbm/entity/grenade/EntityGrenadeLemon.java @@ -11,7 +11,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeLemon extends EntityThrowable +public class EntityGrenadeLemon extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -25,26 +25,9 @@ public class EntityGrenadeLemon extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeLemon(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeMk2.java b/com/hbm/entity/grenade/EntityGrenadeMk2.java index 6f19fa595..50329e333 100644 --- a/com/hbm/entity/grenade/EntityGrenadeMk2.java +++ b/com/hbm/entity/grenade/EntityGrenadeMk2.java @@ -11,44 +11,25 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeMk2 extends EntityThrowable { - - private static final String __OBFID = "CL_00001722"; +public class EntityGrenadeMk2 extends EntityGrenadeBase { - public EntityGrenadeMk2(World p_i1773_1_) - { - super(p_i1773_1_); - } + private static final String __OBFID = "CL_00001722"; - public EntityGrenadeMk2(World p_i1774_1_, EntityLivingBase p_i1774_2_) - { - super(p_i1774_1_, p_i1774_2_); - } + public EntityGrenadeMk2(World p_i1773_1_) { + super(p_i1773_1_); + } - public EntityGrenadeMk2(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_); - } + public EntityGrenadeMk2(World p_i1774_1_, EntityLivingBase p_i1774_2_) + { + super(p_i1774_1_, p_i1774_2_); + } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; + @Override + public void explode() { - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - - if (!this.worldObj.isRemote) - { - this.setDead(); - ExplosionLarge.explode(worldObj, posX, posY, posZ, 7.5F, true, false, false); - } - } + if (!this.worldObj.isRemote) { + this.setDead(); + ExplosionLarge.explode(worldObj, posX, posY, posZ, 7.5F, true, false, false); + } + } } diff --git a/com/hbm/entity/grenade/EntityGrenadeNuclear.java b/com/hbm/entity/grenade/EntityGrenadeNuclear.java index 9e8561c3f..4c32cc17e 100644 --- a/com/hbm/entity/grenade/EntityGrenadeNuclear.java +++ b/com/hbm/entity/grenade/EntityGrenadeNuclear.java @@ -15,7 +15,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeNuclear extends EntityThrowable +public class EntityGrenadeNuclear extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -29,21 +29,9 @@ public class EntityGrenadeNuclear extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeNuclear(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - int b0 = 1000; - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeNuke.java b/com/hbm/entity/grenade/EntityGrenadeNuke.java index 8baf42661..c342ce26e 100644 --- a/com/hbm/entity/grenade/EntityGrenadeNuke.java +++ b/com/hbm/entity/grenade/EntityGrenadeNuke.java @@ -7,7 +7,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeNuke extends EntityThrowable +public class EntityGrenadeNuke extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; public int count = 2; @@ -22,26 +22,9 @@ public class EntityGrenadeNuke extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeNuke(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { //this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadePlasma.java b/com/hbm/entity/grenade/EntityGrenadePlasma.java index 2024bf2a1..6dc1cb79c 100644 --- a/com/hbm/entity/grenade/EntityGrenadePlasma.java +++ b/com/hbm/entity/grenade/EntityGrenadePlasma.java @@ -12,7 +12,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadePlasma extends EntityThrowable +public class EntityGrenadePlasma extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -26,26 +26,9 @@ public class EntityGrenadePlasma extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadePlasma(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadePoison.java b/com/hbm/entity/grenade/EntityGrenadePoison.java index e75f3f2f5..292ef522d 100644 --- a/com/hbm/entity/grenade/EntityGrenadePoison.java +++ b/com/hbm/entity/grenade/EntityGrenadePoison.java @@ -9,7 +9,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadePoison extends EntityThrowable +public class EntityGrenadePoison extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -23,25 +23,9 @@ public class EntityGrenadePoison extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadePoison(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } + public void explode() { + if (!this.worldObj.isRemote) { diff --git a/com/hbm/entity/grenade/EntityGrenadePulse.java b/com/hbm/entity/grenade/EntityGrenadePulse.java index adae42585..76c77960a 100644 --- a/com/hbm/entity/grenade/EntityGrenadePulse.java +++ b/com/hbm/entity/grenade/EntityGrenadePulse.java @@ -11,7 +11,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadePulse extends EntityThrowable { +public class EntityGrenadePulse extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -19,30 +19,19 @@ public class EntityGrenadePulse extends EntityThrowable { super(p_i1773_1_); } - public EntityGrenadePulse(World p_i1774_1_, EntityLivingBase p_i1774_2_) { - super(p_i1774_1_, p_i1774_2_); - } - - public EntityGrenadePulse(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_); - } + public EntityGrenadePulse(World p_i1774_1_, EntityLivingBase p_i1774_2_) + { + super(p_i1774_1_, p_i1774_2_); + } @Override - protected void onImpact(MovingObjectPosition p_70184_1_) { - if (p_70184_1_.entityHit != null) { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); ExplosionChaos.pulse(this.worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, 7); this.worldObj.playSoundEffect((int)this.posX, (int)this.posY, (int)this.posZ, "random.explode", 4.0F, (1.0F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F); } - } + } } diff --git a/com/hbm/entity/grenade/EntityGrenadeSchrabidium.java b/com/hbm/entity/grenade/EntityGrenadeSchrabidium.java index 4aa858e50..02aa66109 100644 --- a/com/hbm/entity/grenade/EntityGrenadeSchrabidium.java +++ b/com/hbm/entity/grenade/EntityGrenadeSchrabidium.java @@ -9,7 +9,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeSchrabidium extends EntityThrowable +public class EntityGrenadeSchrabidium extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -23,26 +23,9 @@ public class EntityGrenadeSchrabidium extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeSchrabidium(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeShrapnel.java b/com/hbm/entity/grenade/EntityGrenadeShrapnel.java index 48d77882c..7d854d281 100644 --- a/com/hbm/entity/grenade/EntityGrenadeShrapnel.java +++ b/com/hbm/entity/grenade/EntityGrenadeShrapnel.java @@ -11,7 +11,7 @@ import net.minecraft.world.World; import com.hbm.explosion.ExplosionChaos; import com.hbm.explosion.ExplosionLarge; -public class EntityGrenadeShrapnel extends EntityThrowable +public class EntityGrenadeShrapnel extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; public Entity shooter; @@ -26,29 +26,13 @@ public class EntityGrenadeShrapnel extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeShrapnel(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); + this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 2.0F, true); for(int i = 0; i < 5; i++) { ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 5); } diff --git a/com/hbm/entity/grenade/EntityGrenadeStrong.java b/com/hbm/entity/grenade/EntityGrenadeStrong.java index 17c819f71..c5d63ecf7 100644 --- a/com/hbm/entity/grenade/EntityGrenadeStrong.java +++ b/com/hbm/entity/grenade/EntityGrenadeStrong.java @@ -9,7 +9,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeStrong extends EntityThrowable +public class EntityGrenadeStrong extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -23,26 +23,9 @@ public class EntityGrenadeStrong extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeStrong(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeTau.java b/com/hbm/entity/grenade/EntityGrenadeTau.java index 1c93adefa..0bf002ea3 100644 --- a/com/hbm/entity/grenade/EntityGrenadeTau.java +++ b/com/hbm/entity/grenade/EntityGrenadeTau.java @@ -11,7 +11,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeTau extends EntityThrowable +public class EntityGrenadeTau extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -25,26 +25,9 @@ public class EntityGrenadeTau extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeTau(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/grenade/EntityGrenadeZOMG.java b/com/hbm/entity/grenade/EntityGrenadeZOMG.java index da6caaf40..544a49ac2 100644 --- a/com/hbm/entity/grenade/EntityGrenadeZOMG.java +++ b/com/hbm/entity/grenade/EntityGrenadeZOMG.java @@ -11,7 +11,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public class EntityGrenadeZOMG extends EntityThrowable +public class EntityGrenadeZOMG extends EntityGrenadeBase { private static final String __OBFID = "CL_00001722"; @@ -25,26 +25,9 @@ public class EntityGrenadeZOMG extends EntityThrowable super(p_i1774_1_, p_i1774_2_); } - public EntityGrenadeZOMG(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_) - { - super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_); - } - @Override - protected void onImpact(MovingObjectPosition p_70184_1_) - { - if (p_70184_1_.entityHit != null) - { - byte b0 = 0; - - if (p_70184_1_.entityHit instanceof EntityBlaze) - { - b0 = 3; - } - - p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0); - } - + public void explode() { + if (!this.worldObj.isRemote) { this.setDead(); diff --git a/com/hbm/entity/item/EntityMinecartModBase.java b/com/hbm/entity/item/EntityMinecartModBase.java new file mode 100644 index 000000000..cb73500f8 --- /dev/null +++ b/com/hbm/entity/item/EntityMinecartModBase.java @@ -0,0 +1,1380 @@ +package com.hbm.entity.item; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.block.BlockRailBase; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EntityMinecartCommandBlock; +import net.minecraft.entity.ai.EntityMinecartMobSpawner; +import net.minecraft.entity.item.EntityMinecart; +import net.minecraft.entity.item.EntityMinecartChest; +import net.minecraft.entity.item.EntityMinecartEmpty; +import net.minecraft.entity.item.EntityMinecartFurnace; +import net.minecraft.entity.item.EntityMinecartHopper; +import net.minecraft.entity.item.EntityMinecartTNT; +import net.minecraft.entity.monster.EntityIronGolem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.IMinecartCollisionHandler; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.minecart.MinecartCollisionEvent; +import net.minecraftforge.event.entity.minecart.MinecartUpdateEvent; + + +//Bridged class, see parent for original +public abstract class EntityMinecartModBase extends EntityMinecart +{ + private boolean isInReverse; + private String entityName; + /** Minecart rotational logic matrix */ + private static final int[][][] matrix = new int[][][] {{{0, 0, -1}, {0, 0, 1}}, {{ -1, 0, 0}, {1, 0, 0}}, {{ -1, -1, 0}, {1, 0, 0}}, {{ -1, 0, 0}, {1, -1, 0}}, {{0, 0, -1}, {0, -1, 1}}, {{0, -1, -1}, {0, 0, 1}}, {{0, 0, 1}, {1, 0, 0}}, {{0, 0, 1}, { -1, 0, 0}}, {{0, 0, -1}, { -1, 0, 0}}, {{0, 0, -1}, {1, 0, 0}}}; + /** appears to be the progress of the turn */ + private int turnProgress; + private double minecartX; + private double minecartY; + private double minecartZ; + private double minecartYaw; + private double minecartPitch; + @SideOnly(Side.CLIENT) + private double velocityX; + @SideOnly(Side.CLIENT) + private double velocityY; + @SideOnly(Side.CLIENT) + private double velocityZ; + private static final String __OBFID = "CL_00001670"; + + /* Forge: Minecart Compatibility Layer Integration. */ + public static float defaultMaxSpeedAirLateral = 0.4f; + public static float defaultMaxSpeedAirVertical = -1f; + public static double defaultDragAir = 0.94999998807907104D; + protected boolean canUseRail = true; + protected boolean canBePushed = true; + private static IMinecartCollisionHandler collisionHandler = null; + + /* Instance versions of the above physics properties */ + private float currentSpeedRail = getMaxCartSpeedOnRail(); + protected float maxSpeedAirLateral = defaultMaxSpeedAirLateral; + protected float maxSpeedAirVertical = defaultMaxSpeedAirVertical; + protected double dragAir = defaultDragAir; + + public EntityMinecartModBase(World p_i1712_1_) + { + super(p_i1712_1_); + this.preventEntitySpawning = true; + this.setSize(0.98F, 0.7F); + this.yOffset = this.height / 2.0F; + } + + /** + * Creates a new minecart of the specified type in the specified location in the given world. par0World - world to + * create the minecart in, double par1,par3,par5 represent x,y,z respectively. int par7 specifies the type: 1 for + * MinecartChest, 2 for MinecartFurnace, 3 for MinecartTNT, 4 for MinecartMobSpawner, 5 for MinecartHopper and 0 for + * a standard empty minecart + */ + public static EntityMinecart createMinecart(World p_94090_0_, double p_94090_1_, double p_94090_3_, double p_94090_5_, int p_94090_7_) + { + switch (p_94090_7_) + { + case 1: + return new EntityMinecartChest(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_); + case 2: + return new EntityMinecartFurnace(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_); + case 3: + return new EntityMinecartTNT(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_); + case 4: + return new EntityMinecartMobSpawner(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_); + case 5: + return new EntityMinecartHopper(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_); + case 6: + return new EntityMinecartCommandBlock(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_); + default: + return new EntityMinecartEmpty(p_94090_0_, p_94090_1_, p_94090_3_, p_94090_5_); + } + } + + /** + * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to + * prevent them from trampling crops + */ + protected boolean canTriggerWalking() + { + return false; + } + + protected void entityInit() + { + this.dataWatcher.addObject(17, new Integer(0)); + this.dataWatcher.addObject(18, new Integer(1)); + this.dataWatcher.addObject(19, new Float(0.0F)); + this.dataWatcher.addObject(20, new Integer(0)); + this.dataWatcher.addObject(21, new Integer(6)); + this.dataWatcher.addObject(22, Byte.valueOf((byte)0)); + this.dataWatcher.addObject(23, new Integer(0)); + this.dataWatcher.addObject(24, new Integer(0)); + } + + /** + * Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be + * pushable on contact, like boats or minecarts. + */ + public AxisAlignedBB getCollisionBox(Entity p_70114_1_) + { + if (getCollisionHandler() != null) + { + return getCollisionHandler().getCollisionBox(this, p_70114_1_); + } + return p_70114_1_.canBePushed() ? p_70114_1_.boundingBox : null; + } + + /** + * returns the bounding box for this entity + */ + public AxisAlignedBB getBoundingBox() + { + if (getCollisionHandler() != null) + { + return getCollisionHandler().getBoundingBox(this); + } + return null; + } + + /** + * Returns true if this entity should push and be pushed by other entities when colliding. + */ + public boolean canBePushed() + { + return canBePushed; + } + + public EntityMinecartModBase(World p_i1713_1_, double p_i1713_2_, double p_i1713_4_, double p_i1713_6_) + { + this(p_i1713_1_); + this.setPosition(p_i1713_2_, p_i1713_4_, p_i1713_6_); + this.motionX = 0.0D; + this.motionY = 0.0D; + this.motionZ = 0.0D; + this.prevPosX = p_i1713_2_; + this.prevPosY = p_i1713_4_; + this.prevPosZ = p_i1713_6_; + } + + /** + * Returns the Y offset from the entity's position for any entity riding this one. + */ + public double getMountedYOffset() + { + return (double)this.height * 0.0D - 0.30000001192092896D; + } + + /** + * Called when the entity is attacked. + */ + public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) + { + if (!this.worldObj.isRemote && !this.isDead) + { + if (this.isEntityInvulnerable()) + { + return false; + } + else + { + this.setRollingDirection(-this.getRollingDirection()); + this.setRollingAmplitude(10); + this.setBeenAttacked(); + this.setDamage(this.getDamage() + p_70097_2_ * 10.0F); + boolean flag = p_70097_1_.getEntity() instanceof EntityPlayer && ((EntityPlayer)p_70097_1_.getEntity()).capabilities.isCreativeMode; + + if (flag || this.getDamage() > 40.0F) + { + if (this.riddenByEntity != null) + { + this.riddenByEntity.mountEntity(this); + } + + if (flag && !this.hasCustomInventoryName()) + { + this.setDead(); + } + else + { + this.killMinecart(p_70097_1_); + } + } + + return true; + } + } + else + { + return true; + } + } + + public void killMinecart(DamageSource p_94095_1_) + { + this.setDead(); + ItemStack itemstack = new ItemStack(Items.minecart, 1); + + if (this.entityName != null) + { + itemstack.setStackDisplayName(this.entityName); + } + + this.entityDropItem(itemstack, 0.0F); + } + + /** + * Setups the entity to do the hurt animation. Only used by packets in multiplayer. + */ + @SideOnly(Side.CLIENT) + public void performHurtAnimation() + { + this.setRollingDirection(-this.getRollingDirection()); + this.setRollingAmplitude(10); + this.setDamage(this.getDamage() + this.getDamage() * 10.0F); + } + + /** + * Returns true if other Entities should be prevented from moving through this Entity. + */ + public boolean canBeCollidedWith() + { + return !this.isDead; + } + + /** + * Will get destroyed next tick. + */ + public void setDead() + { + super.setDead(); + } + + /** + * Called to update the entity's position/logic. + */ + public void onUpdate() + { + if (this.getRollingAmplitude() > 0) + { + this.setRollingAmplitude(this.getRollingAmplitude() - 1); + } + + if (this.getDamage() > 0.0F) + { + this.setDamage(this.getDamage() - 1.0F); + } + + if (this.posY < -64.0D) + { + this.kill(); + } + + // + if(this.motionX < 0) + this.dataWatcher.updateObject(23, -1); + if(this.motionX > 0) + this.dataWatcher.updateObject(23, 1); + if(this.motionX == 0 && this.motionZ != 0) + this.dataWatcher.updateObject(23, 0); + if(this.motionZ < 0) + this.dataWatcher.updateObject(24, -1); + if(this.motionZ > 0) + this.dataWatcher.updateObject(24, 1); + if(this.motionZ == 0 && this.motionX != 0) + this.dataWatcher.updateObject(24, 0); + // + + int i; + + if (!this.worldObj.isRemote && this.worldObj instanceof WorldServer) + { + this.worldObj.theProfiler.startSection("portal"); + MinecraftServer minecraftserver = ((WorldServer)this.worldObj).func_73046_m(); + i = this.getMaxInPortalTime(); + + if (this.inPortal) + { + if (minecraftserver.getAllowNether()) + { + if (this.ridingEntity == null && this.portalCounter++ >= i) + { + this.portalCounter = i; + this.timeUntilPortal = this.getPortalCooldown(); + byte b0; + + if (this.worldObj.provider.dimensionId == -1) + { + b0 = 0; + } + else + { + b0 = -1; + } + + this.travelToDimension(b0); + } + + this.inPortal = false; + } + } + else + { + if (this.portalCounter > 0) + { + this.portalCounter -= 4; + } + + if (this.portalCounter < 0) + { + this.portalCounter = 0; + } + } + + if (this.timeUntilPortal > 0) + { + --this.timeUntilPortal; + } + + this.worldObj.theProfiler.endSection(); + } + + if (this.worldObj.isRemote) + { + if (this.turnProgress > 0) + { + double d6 = this.posX + (this.minecartX - this.posX) / (double)this.turnProgress; + double d7 = this.posY + (this.minecartY - this.posY) / (double)this.turnProgress; + double d1 = this.posZ + (this.minecartZ - this.posZ) / (double)this.turnProgress; + double d3 = MathHelper.wrapAngleTo180_double(this.minecartYaw - (double)this.rotationYaw); + this.rotationYaw = (float)((double)this.rotationYaw + d3 / (double)this.turnProgress); + this.rotationPitch = (float)((double)this.rotationPitch + (this.minecartPitch - (double)this.rotationPitch) / (double)this.turnProgress); + --this.turnProgress; + this.setPosition(d6, d7, d1); + this.setRotation(this.rotationYaw, this.rotationPitch); + } + else + { + this.setPosition(this.posX, this.posY, this.posZ); + this.setRotation(this.rotationYaw, this.rotationPitch); + } + } + else + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + this.motionY -= 0.03999999910593033D; + int l = MathHelper.floor_double(this.posX); + i = MathHelper.floor_double(this.posY); + int i1 = MathHelper.floor_double(this.posZ); + + if (BlockRailBase.func_150049_b_(this.worldObj, l, i - 1, i1)) + { + --i; + } + + double d0 = 0.4D; + double d2 = 0.0078125D; + Block block = this.worldObj.getBlock(l, i, i1); + + if (canUseRail() && BlockRailBase.func_150051_a(block)) + { + float railMaxSpeed = ((BlockRailBase)block).getRailMaxSpeed(worldObj, this, l, i, i1); + double maxSpeed = Math.min(railMaxSpeed, getCurrentCartSpeedCapOnRail()); + this.func_145821_a(l, i, i1, maxSpeed, getSlopeAdjustment(), block, ((BlockRailBase)block).getBasicRailMetadata(worldObj, this, l, i, i1)); + + if (block == Blocks.activator_rail) + { + this.onActivatorRailPass(l, i, i1, (worldObj.getBlockMetadata(l, i, i1) & 8) != 0); + } + } + else + { + this.func_94088_b(onGround ? d0 : getMaxSpeedAirLateral()); + } + + this.func_145775_I(); + this.rotationPitch = 0.0F; + double d8 = this.prevPosX - this.posX; + double d4 = this.prevPosZ - this.posZ; + + if (d8 * d8 + d4 * d4 > 0.001D) + { + this.rotationYaw = (float)(Math.atan2(d4, d8) * 180.0D / Math.PI); + + if (this.isInReverse) + { + this.rotationYaw += 180.0F; + } + } + + double d5 = (double)MathHelper.wrapAngleTo180_float(this.rotationYaw - this.prevRotationYaw); + + if (d5 < -170.0D || d5 >= 170.0D) + { + this.rotationYaw += 180.0F; + this.isInReverse = !this.isInReverse; + } + + this.setRotation(this.rotationYaw, this.rotationPitch); + + AxisAlignedBB box; + if (getCollisionHandler() != null) + { + box = getCollisionHandler().getMinecartCollisionBox(this); + } + else + { + box = boundingBox.expand(0.2D, 0.0D, 0.2D); + } + + List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, box); + + if (list != null && !list.isEmpty()) + { + for (int k = 0; k < list.size(); ++k) + { + Entity entity = (Entity)list.get(k); + + if (entity != this.riddenByEntity && entity.canBePushed() && entity instanceof EntityMinecart) + { + entity.applyEntityCollision(this); + } + } + } + + if (this.riddenByEntity != null && this.riddenByEntity.isDead) + { + if (this.riddenByEntity.ridingEntity == this) + { + this.riddenByEntity.ridingEntity = null; + } + + this.riddenByEntity = null; + } + + MinecraftForge.EVENT_BUS.post(new MinecartUpdateEvent(this, l, i, i1)); + } + } + + /** + * Called every tick the minecart is on an activator rail. Args: x, y, z, is the rail receiving power + */ + public void onActivatorRailPass(int p_96095_1_, int p_96095_2_, int p_96095_3_, boolean p_96095_4_) {} + + protected void func_94088_b(double p_94088_1_) + { + if (this.motionX < -p_94088_1_) + { + this.motionX = -p_94088_1_; + } + + if (this.motionX > p_94088_1_) + { + this.motionX = p_94088_1_; + } + + if (this.motionZ < -p_94088_1_) + { + this.motionZ = -p_94088_1_; + } + + if (this.motionZ > p_94088_1_) + { + this.motionZ = p_94088_1_; + } + + double moveY = motionY; + if(getMaxSpeedAirVertical() > 0 && motionY > getMaxSpeedAirVertical()) + { + moveY = getMaxSpeedAirVertical(); + if(Math.abs(motionX) < 0.3f && Math.abs(motionZ) < 0.3f) + { + moveY = 0.15f; + motionY = moveY; + } + } + + if (this.onGround) + { + this.motionX *= 0.5D; + this.motionY *= 0.5D; + this.motionZ *= 0.5D; + } + + this.moveEntity(this.motionX, moveY, this.motionZ); + + if (!this.onGround) + { + this.motionX *= getDragAir(); + this.motionY *= getDragAir(); + this.motionZ *= getDragAir(); + } + } + + protected void func_145821_a(int p_145821_1_, int p_145821_2_, int p_145821_3_, double p_145821_4_, double p_145821_6_, Block p_145821_8_, int p_145821_9_) + { + this.fallDistance = 0.0F; + Vec3 vec3 = this.func_70489_a(this.posX, this.posY, this.posZ); + this.posY = (double)p_145821_2_; + boolean flag = false; + boolean flag1 = false; + + if (p_145821_8_ == Blocks.golden_rail) + { + flag = (worldObj.getBlockMetadata(p_145821_1_, p_145821_2_, p_145821_3_) & 8) != 0; + flag1 = !flag; + } + + if (((BlockRailBase)p_145821_8_).isPowered()) + { + p_145821_9_ &= 7; + } + + if (p_145821_9_ >= 2 && p_145821_9_ <= 5) + { + this.posY = (double)(p_145821_2_ + 1); + } + + if (p_145821_9_ == 2) + { + this.motionX -= p_145821_6_; + } + + if (p_145821_9_ == 3) + { + this.motionX += p_145821_6_; + } + + if (p_145821_9_ == 4) + { + this.motionZ += p_145821_6_; + } + + if (p_145821_9_ == 5) + { + this.motionZ -= p_145821_6_; + } + + int[][] aint = matrix[p_145821_9_]; + double d2 = (double)(aint[1][0] - aint[0][0]); + double d3 = (double)(aint[1][2] - aint[0][2]); + double d4 = Math.sqrt(d2 * d2 + d3 * d3); + double d5 = this.motionX * d2 + this.motionZ * d3; + + if (d5 < 0.0D) + { + d2 = -d2; + d3 = -d3; + } + + double d6 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (d6 > 2.0D) + { + d6 = 2.0D; + } + + this.motionX = d6 * d2 / d4; + this.motionZ = d6 * d3 / d4; + double d7; + double d8; + double d9; + double d10; + + if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityLivingBase) + { + d7 = (double)((EntityLivingBase)this.riddenByEntity).moveForward; + + if (d7 > 0.0D) + { + d8 = -Math.sin((double)(this.riddenByEntity.rotationYaw * (float)Math.PI / 180.0F)); + d9 = Math.cos((double)(this.riddenByEntity.rotationYaw * (float)Math.PI / 180.0F)); + d10 = this.motionX * this.motionX + this.motionZ * this.motionZ; + + if (d10 < 0.01D) + { + this.motionX += d8 * 0.1D; + this.motionZ += d9 * 0.1D; + flag1 = false; + } + } + } + + if (flag1 && shouldDoRailFunctions()) + { + d7 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (d7 < 0.03D) + { + this.motionX *= 0.0D; + this.motionY *= 0.0D; + this.motionZ *= 0.0D; + } + else + { + this.motionX *= 0.5D; + this.motionY *= 0.0D; + this.motionZ *= 0.5D; + } + } + + d7 = 0.0D; + d8 = (double)p_145821_1_ + 0.5D + (double)aint[0][0] * 0.5D; + d9 = (double)p_145821_3_ + 0.5D + (double)aint[0][2] * 0.5D; + d10 = (double)p_145821_1_ + 0.5D + (double)aint[1][0] * 0.5D; + double d11 = (double)p_145821_3_ + 0.5D + (double)aint[1][2] * 0.5D; + d2 = d10 - d8; + d3 = d11 - d9; + double d12; + double d13; + + if (d2 == 0.0D) + { + this.posX = (double)p_145821_1_ + 0.5D; + d7 = this.posZ - (double)p_145821_3_; + } + else if (d3 == 0.0D) + { + this.posZ = (double)p_145821_3_ + 0.5D; + d7 = this.posX - (double)p_145821_1_; + } + else + { + d12 = this.posX - d8; + d13 = this.posZ - d9; + d7 = (d12 * d2 + d13 * d3) * 2.0D; + } + + this.posX = d8 + d2 * d7; + this.posZ = d9 + d3 * d7; + this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ); + + moveMinecartOnRail(p_145821_1_, p_145821_2_, p_145821_3_, p_145821_4_); + + if (aint[0][1] != 0 && MathHelper.floor_double(this.posX) - p_145821_1_ == aint[0][0] && MathHelper.floor_double(this.posZ) - p_145821_3_ == aint[0][2]) + { + this.setPosition(this.posX, this.posY + (double)aint[0][1], this.posZ); + } + else if (aint[1][1] != 0 && MathHelper.floor_double(this.posX) - p_145821_1_ == aint[1][0] && MathHelper.floor_double(this.posZ) - p_145821_3_ == aint[1][2]) + { + this.setPosition(this.posX, this.posY + (double)aint[1][1], this.posZ); + } + + this.applyDrag(); + Vec3 vec31 = this.func_70489_a(this.posX, this.posY, this.posZ); + + if (vec31 != null && vec3 != null) + { + double d14 = (vec3.yCoord - vec31.yCoord) * 0.05D; + d6 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (d6 > 0.0D) + { + this.motionX = this.motionX / d6 * (d6 + d14); + this.motionZ = this.motionZ / d6 * (d6 + d14); + } + + this.setPosition(this.posX, vec31.yCoord, this.posZ); + } + + int j1 = MathHelper.floor_double(this.posX); + int i1 = MathHelper.floor_double(this.posZ); + + if (j1 != p_145821_1_ || i1 != p_145821_3_) + { + d6 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); + this.motionX = d6 * (double)(j1 - p_145821_1_); + this.motionZ = d6 * (double)(i1 - p_145821_3_); + } + + if(shouldDoRailFunctions()) + { + ((BlockRailBase)p_145821_8_).onMinecartPass(worldObj, this, p_145821_1_, p_145821_2_, p_145821_3_); + } + + if (flag && shouldDoRailFunctions()) + { + double d15 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ); + + if (d15 > 0.01D) + { + double d16 = 0.06D; + this.motionX += this.motionX / d15 * d16; + this.motionZ += this.motionZ / d15 * d16; + } + else if (p_145821_9_ == 1) + { + if (this.worldObj.getBlock(p_145821_1_ - 1, p_145821_2_, p_145821_3_).isNormalCube()) + { + this.motionX = 0.02D; + } + else if (this.worldObj.getBlock(p_145821_1_ + 1, p_145821_2_, p_145821_3_).isNormalCube()) + { + this.motionX = -0.02D; + } + } + else if (p_145821_9_ == 0) + { + if (this.worldObj.getBlock(p_145821_1_, p_145821_2_, p_145821_3_ - 1).isNormalCube()) + { + this.motionZ = 0.02D; + } + else if (this.worldObj.getBlock(p_145821_1_, p_145821_2_, p_145821_3_ + 1).isNormalCube()) + { + this.motionZ = -0.02D; + } + } + } + } + + protected void applyDrag() + { + if (this.riddenByEntity != null) + { + this.motionX *= 0.996999979019165D; + this.motionY *= 0.0D; + this.motionZ *= 0.996999979019165D; + } + else + { + this.motionX *= 0.9599999785423279D; + this.motionY *= 0.0D; + this.motionZ *= 0.9599999785423279D; + } + } + + @SideOnly(Side.CLIENT) + public Vec3 func_70495_a(double p_70495_1_, double p_70495_3_, double p_70495_5_, double p_70495_7_) + { + + //!!!DANGER!!!// + //return null; + //!!!DANGER!!!// + + int i = MathHelper.floor_double(p_70495_1_); + int j = MathHelper.floor_double(p_70495_3_); + int k = MathHelper.floor_double(p_70495_5_); + + if (BlockRailBase.func_150049_b_(this.worldObj, i, j - 1, k)) + { + --j; + } + + Block block = this.worldObj.getBlock(i, j, k); + + if (!BlockRailBase.func_150051_a(block)) + { + return null; + } + else + { + int l = ((BlockRailBase)block).getBasicRailMetadata(worldObj, this, i, j, k); + + p_70495_3_ = (double)j; + + if (l >= 2 && l <= 5) + { + p_70495_3_ = (double)(j + 1); + } + + int[][] aint = matrix[l]; + double d4 = (double)(aint[1][0] - aint[0][0]); + double d5 = (double)(aint[1][2] - aint[0][2]); + double d6 = Math.sqrt(d4 * d4 + d5 * d5); + d4 /= d6; + d5 /= d6; + p_70495_1_ += d4 * p_70495_7_; + p_70495_5_ += d5 * p_70495_7_; + + if (aint[0][1] != 0 && MathHelper.floor_double(p_70495_1_) - i == aint[0][0] && MathHelper.floor_double(p_70495_5_) - k == aint[0][2]) + { + p_70495_3_ += (double)aint[0][1]; + } + else if (aint[1][1] != 0 && MathHelper.floor_double(p_70495_1_) - i == aint[1][0] && MathHelper.floor_double(p_70495_5_) - k == aint[1][2]) + { + p_70495_3_ += (double)aint[1][1]; + } + + return this.func_70489_a(p_70495_1_, p_70495_3_, p_70495_5_); + } + } + + public Vec3 func_70489_a(double p_70489_1_, double p_70489_3_, double p_70489_5_) + { + int i = MathHelper.floor_double(p_70489_1_); + int j = MathHelper.floor_double(p_70489_3_); + int k = MathHelper.floor_double(p_70489_5_); + + if (BlockRailBase.func_150049_b_(this.worldObj, i, j - 1, k)) + { + --j; + } + + Block block = this.worldObj.getBlock(i, j, k); + + if (BlockRailBase.func_150051_a(block)) + { + int l = ((BlockRailBase)block).getBasicRailMetadata(worldObj, this, i, j, k); + p_70489_3_ = (double)j; + + if (l >= 2 && l <= 5) + { + p_70489_3_ = (double)(j + 1); + } + + int[][] aint = matrix[l]; + double d3 = 0.0D; + double d4 = (double)i + 0.5D + (double)aint[0][0] * 0.5D; + double d5 = (double)j + 0.5D + (double)aint[0][1] * 0.5D; + double d6 = (double)k + 0.5D + (double)aint[0][2] * 0.5D; + double d7 = (double)i + 0.5D + (double)aint[1][0] * 0.5D; + double d8 = (double)j + 0.5D + (double)aint[1][1] * 0.5D; + double d9 = (double)k + 0.5D + (double)aint[1][2] * 0.5D; + double d10 = d7 - d4; + double d11 = (d8 - d5) * 2.0D; + double d12 = d9 - d6; + + if (d10 == 0.0D) + { + p_70489_1_ = (double)i + 0.5D; + d3 = p_70489_5_ - (double)k; + } + else if (d12 == 0.0D) + { + p_70489_5_ = (double)k + 0.5D; + d3 = p_70489_1_ - (double)i; + } + else + { + double d13 = p_70489_1_ - d4; + double d14 = p_70489_5_ - d6; + d3 = (d13 * d10 + d14 * d12) * 2.0D; + } + + p_70489_1_ = d4 + d10 * d3; + p_70489_3_ = d5 + d11 * d3; + p_70489_5_ = d6 + d12 * d3; + + if (d11 < 0.0D) + { + ++p_70489_3_; + } + + if (d11 > 0.0D) + { + p_70489_3_ += 0.5D; + } + + return Vec3.createVectorHelper(p_70489_1_, p_70489_3_, p_70489_5_); + } + else + { + return null; + } + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + protected void readEntityFromNBT(NBTTagCompound p_70037_1_) + { + if (p_70037_1_.getBoolean("CustomDisplayTile")) + { + this.func_145819_k(p_70037_1_.getInteger("DisplayTile")); + this.setDisplayTileData(p_70037_1_.getInteger("DisplayData")); + this.setDisplayTileOffset(p_70037_1_.getInteger("DisplayOffset")); + } + + if (p_70037_1_.hasKey("CustomName", 8) && p_70037_1_.getString("CustomName").length() > 0) + { + this.entityName = p_70037_1_.getString("CustomName"); + } + } + + /** + * (abstract) Protected helper method to write subclass entity data to NBT. + */ + protected void writeEntityToNBT(NBTTagCompound p_70014_1_) + { + if (this.hasDisplayTile()) + { + p_70014_1_.setBoolean("CustomDisplayTile", true); + p_70014_1_.setInteger("DisplayTile", this.func_145820_n().getMaterial() == Material.air ? 0 : Block.getIdFromBlock(this.func_145820_n())); + p_70014_1_.setInteger("DisplayData", this.getDisplayTileData()); + p_70014_1_.setInteger("DisplayOffset", this.getDisplayTileOffset()); + } + + if (this.entityName != null && this.entityName.length() > 0) + { + p_70014_1_.setString("CustomName", this.entityName); + } + } + + @SideOnly(Side.CLIENT) + public float getShadowSize() + { + return 0.0F; + } + + /** + * Applies a velocity to each of the entities pushing them away from each other. Args: entity + */ + public void applyEntityCollision(Entity p_70108_1_) + { + MinecraftForge.EVENT_BUS.post(new MinecartCollisionEvent(this, p_70108_1_)); + if (getCollisionHandler() != null) + { + getCollisionHandler().onEntityCollision(this, p_70108_1_); + return; + } + if (!this.worldObj.isRemote) + { + if (p_70108_1_ != this.riddenByEntity) + { + if (p_70108_1_ instanceof EntityLivingBase && !(p_70108_1_ instanceof EntityPlayer) && !(p_70108_1_ instanceof EntityIronGolem) && canBeRidden() && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && p_70108_1_.ridingEntity == null) + { + p_70108_1_.mountEntity(this); + } + + double d0 = p_70108_1_.posX - this.posX; + double d1 = p_70108_1_.posZ - this.posZ; + double d2 = d0 * d0 + d1 * d1; + + if (d2 >= 9.999999747378752E-5D) + { + d2 = (double)MathHelper.sqrt_double(d2); + d0 /= d2; + d1 /= d2; + double d3 = 1.0D / d2; + + if (d3 > 1.0D) + { + d3 = 1.0D; + } + + d0 *= d3; + d1 *= d3; + d0 *= 0.10000000149011612D; + d1 *= 0.10000000149011612D; + d0 *= (double)(1.0F - this.entityCollisionReduction); + d1 *= (double)(1.0F - this.entityCollisionReduction); + d0 *= 0.5D; + d1 *= 0.5D; + + if (p_70108_1_ instanceof EntityMinecart) + { + double d4 = p_70108_1_.posX - this.posX; + double d5 = p_70108_1_.posZ - this.posZ; + Vec3 vec3 = Vec3.createVectorHelper(d4, 0.0D, d5).normalize(); + Vec3 vec31 = Vec3.createVectorHelper((double)MathHelper.cos(this.rotationYaw * (float)Math.PI / 180.0F), 0.0D, (double)MathHelper.sin(this.rotationYaw * (float)Math.PI / 180.0F)).normalize(); + double d6 = Math.abs(vec3.dotProduct(vec31)); + + if (d6 < 0.800000011920929D) + { + return; + } + + double d7 = p_70108_1_.motionX + this.motionX; + double d8 = p_70108_1_.motionZ + this.motionZ; + + if (((EntityMinecart)p_70108_1_).isPoweredCart() && !isPoweredCart()) + { + this.motionX *= 0.20000000298023224D; + this.motionZ *= 0.20000000298023224D; + this.addVelocity(p_70108_1_.motionX - d0, 0.0D, p_70108_1_.motionZ - d1); + p_70108_1_.motionX *= 0.949999988079071D; + p_70108_1_.motionZ *= 0.949999988079071D; + } + else if (((EntityMinecart)p_70108_1_).isPoweredCart() && !isPoweredCart()) + { + p_70108_1_.motionX *= 0.20000000298023224D; + p_70108_1_.motionZ *= 0.20000000298023224D; + p_70108_1_.addVelocity(this.motionX + d0, 0.0D, this.motionZ + d1); + this.motionX *= 0.949999988079071D; + this.motionZ *= 0.949999988079071D; + } + else + { + d7 /= 2.0D; + d8 /= 2.0D; + this.motionX *= 0.20000000298023224D; + this.motionZ *= 0.20000000298023224D; + this.addVelocity(d7 - d0, 0.0D, d8 - d1); + p_70108_1_.motionX *= 0.20000000298023224D; + p_70108_1_.motionZ *= 0.20000000298023224D; + p_70108_1_.addVelocity(d7 + d0, 0.0D, d8 + d1); + } + } + else + { + this.addVelocity(-d0, 0.0D, -d1); + p_70108_1_.addVelocity(d0 / 4.0D, 0.0D, d1 / 4.0D); + } + } + } + } + } + + /** + * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, + * posY, posZ, yaw, pitch + */ + @SideOnly(Side.CLIENT) + public void setPositionAndRotation2(double p_70056_1_, double p_70056_3_, double p_70056_5_, float p_70056_7_, float p_70056_8_, int p_70056_9_) + { + this.minecartX = p_70056_1_; + this.minecartY = p_70056_3_; + this.minecartZ = p_70056_5_; + this.minecartYaw = (double)p_70056_7_; + this.minecartPitch = (double)p_70056_8_; + this.turnProgress = p_70056_9_ + 2; + this.motionX = this.velocityX; + this.motionY = this.velocityY; + this.motionZ = this.velocityZ; + } + + /** + * Sets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over + * 40. + */ + public void setDamage(float p_70492_1_) + { + this.dataWatcher.updateObject(19, Float.valueOf(p_70492_1_)); + } + + /** + * Sets the velocity to the args. Args: x, y, z + */ + @SideOnly(Side.CLIENT) + public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) + { + this.velocityX = this.motionX = p_70016_1_; + this.velocityY = this.motionY = p_70016_3_; + this.velocityZ = this.motionZ = p_70016_5_; + } + + /** + * Gets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over + * 40. + */ + public float getDamage() + { + return this.dataWatcher.getWatchableObjectFloat(19); + } + + /** + * Sets the rolling amplitude the cart rolls while being attacked. + */ + public void setRollingAmplitude(int p_70497_1_) + { + this.dataWatcher.updateObject(17, Integer.valueOf(p_70497_1_)); + } + + /** + * Gets the rolling amplitude the cart rolls while being attacked. + */ + public int getRollingAmplitude() + { + return this.dataWatcher.getWatchableObjectInt(17); + } + + /** + * Sets the rolling direction the cart rolls while being attacked. Can be 1 or -1. + */ + public void setRollingDirection(int p_70494_1_) + { + this.dataWatcher.updateObject(18, Integer.valueOf(p_70494_1_)); + } + + /** + * Gets the rolling direction the cart rolls while being attacked. Can be 1 or -1. + */ + public int getRollingDirection() + { + return this.dataWatcher.getWatchableObjectInt(18); + } + + public abstract int getMinecartType(); + + public Block func_145820_n() + { + if (!this.hasDisplayTile()) + { + return this.func_145817_o(); + } + else + { + int i = this.getDataWatcher().getWatchableObjectInt(20) & 65535; + return Block.getBlockById(i); + } + } + + public Block func_145817_o() + { + return Blocks.air; + } + + public int getDisplayTileData() + { + return !this.hasDisplayTile() ? this.getDefaultDisplayTileData() : this.getDataWatcher().getWatchableObjectInt(20) >> 16; + } + + public int getDefaultDisplayTileData() + { + return 0; + } + + public int getDisplayTileOffset() + { + return !this.hasDisplayTile() ? this.getDefaultDisplayTileOffset() : this.getDataWatcher().getWatchableObjectInt(21); + } + + public int getDefaultDisplayTileOffset() + { + return 6; + } + + public void func_145819_k(int p_145819_1_) + { + this.getDataWatcher().updateObject(20, Integer.valueOf(p_145819_1_ & 65535 | this.getDisplayTileData() << 16)); + this.setHasDisplayTile(true); + } + + public void setDisplayTileData(int p_94092_1_) + { + this.getDataWatcher().updateObject(20, Integer.valueOf(Block.getIdFromBlock(this.func_145820_n()) & 65535 | p_94092_1_ << 16)); + this.setHasDisplayTile(true); + } + + public void setDisplayTileOffset(int p_94086_1_) + { + this.getDataWatcher().updateObject(21, Integer.valueOf(p_94086_1_)); + this.setHasDisplayTile(true); + } + + public boolean hasDisplayTile() + { + return this.getDataWatcher().getWatchableObjectByte(22) == 1; + } + + public void setHasDisplayTile(boolean p_94096_1_) + { + this.getDataWatcher().updateObject(22, Byte.valueOf((byte)(p_94096_1_ ? 1 : 0))); + } + + /** + * Sets the minecart's name. + */ + public void setMinecartName(String p_96094_1_) + { + this.entityName = p_96094_1_; + } + + /** + * Gets the name of this command sender (usually username, but possibly "Rcon") + */ + public String getCommandSenderName() + { + return this.entityName != null ? this.entityName : super.getCommandSenderName(); + } + + /** + * Returns if the inventory is named + */ + public boolean hasCustomInventoryName() + { + return this.entityName != null; + } + + public String func_95999_t() + { + return this.entityName; + } + /* =================================== FORGE START ===========================================*/ + /** + * Moved to allow overrides. + * This code handles minecart movement and speed capping when on a rail. + */ + public void moveMinecartOnRail(int x, int y, int z, double par4){ + double d12 = this.motionX; + double d13 = this.motionZ; + + if (this.riddenByEntity != null) + { + d12 *= 0.75D; + d13 *= 0.75D; + } + + if (d12 < -par4) + { + d12 = -par4; + } + + if (d12 > par4) + { + d12 = par4; + } + + if (d13 < -par4) + { + d13 = -par4; + } + + if (d13 > par4) + { + d13 = par4; + } + + this.moveEntity(d12, 0.0D, d13); + } + + /** + * Gets the current global Minecart Collision handler if none + * is registered, returns null + * @return The collision handler or null + */ + public static IMinecartCollisionHandler getCollisionHandler() + { + return collisionHandler; + } + + /** + * Sets the global Minecart Collision handler, overwrites any + * that is currently set. + * @param handler The new handler + */ + public static void setCollisionHandler(IMinecartCollisionHandler handler) + { + collisionHandler = handler; + } + + /** + * This function returns an ItemStack that represents this cart. + * This should be an ItemStack that can be used by the player to place the cart, + * but is not necessary the item the cart drops when destroyed. + * @return An ItemStack that can be used to place the cart. + */ + public ItemStack getCartItem() { + + return new ItemStack(Items.minecart); + } + + /** + * Returns true if this cart can currently use rails. + * This function is mainly used to gracefully detach a minecart from a rail. + * @return True if the minecart can use rails. + */ + public boolean canUseRail() + { + return canUseRail; + } + + /** + * Set whether the minecart can use rails. + * This function is mainly used to gracefully detach a minecart from a rail. + * @param use Whether the minecart can currently use rails. + */ + public void setCanUseRail(boolean use) + { + canUseRail = use; + } + + /** + * Return false if this cart should not call onMinecartPass() and should ignore Powered Rails. + * @return True if this cart should call onMinecartPass(). + */ + public boolean shouldDoRailFunctions() + { + return true; + } + + /** + * Returns true if this cart is self propelled. + * @return True if powered. + */ + public boolean isPoweredCart() + { + return getMinecartType()== 2; + } + + /** + * Returns true if this cart can be ridden by an Entity. + * @return True if this cart can be ridden. + */ + public boolean canBeRidden() + { + return false; + } + + /** + * Getters/setters for physics variables + */ + + /** + * Returns the carts max speed when traveling on rails. Carts going faster + * than 1.1 cause issues with chunk loading. Carts cant traverse slopes or + * corners at greater than 0.5 - 0.6. This value is compared with the rails + * max speed and the carts current speed cap to determine the carts current + * max speed. A normal rail's max speed is 0.4. + * + * @return Carts max speed. + */ + public float getMaxCartSpeedOnRail() + { + return 1.2f; + } + + public float getMaxSpeedAirLateral() + { + return maxSpeedAirLateral; + } + + public void setMaxSpeedAirLateral(float value) + { + maxSpeedAirLateral = value; + } + + public float getMaxSpeedAirVertical() + { + return maxSpeedAirVertical; + } + + public void setMaxSpeedAirVertical(float value) + { + maxSpeedAirVertical = value; + } + + public double getDragAir() + { + return dragAir; + } + + public void setDragAir(double value) + { + dragAir = value; + } + + public double getSlopeAdjustment() + { + return 0.0078125D; + } + /* =================================== FORGE END ===========================================*/ +} diff --git a/com/hbm/entity/item/EntityMinecartTest.java b/com/hbm/entity/item/EntityMinecartTest.java index 57347b724..ebfaf7560 100644 --- a/com/hbm/entity/item/EntityMinecartTest.java +++ b/com/hbm/entity/item/EntityMinecartTest.java @@ -15,7 +15,7 @@ import net.minecraft.util.DamageSource; import net.minecraft.world.Explosion; import net.minecraft.world.World; -public class EntityMinecartTest extends EntityMinecart +public class EntityMinecartTest extends EntityMinecartModBase { private int minecartTNTFuse = -1; private static final String __OBFID = "CL_00001680"; @@ -66,6 +66,8 @@ public class EntityMinecartTest extends EntityMinecart this.explodeCart(d0); } } + + System.out.println(this.rotationYaw); } public void killMinecart(DamageSource p_94095_1_) diff --git a/com/hbm/explosion/ExplosionNukeGeneric.java b/com/hbm/explosion/ExplosionNukeGeneric.java index 925295a8b..60fc217e8 100644 --- a/com/hbm/explosion/ExplosionNukeGeneric.java +++ b/com/hbm/explosion/ExplosionNukeGeneric.java @@ -30,10 +30,12 @@ import com.hbm.entity.missile.EntityMIRV; import com.hbm.entity.projectile.EntityMiniMIRV; import com.hbm.entity.projectile.EntityMiniNuke; import com.hbm.interfaces.IConsumer; +import com.hbm.interfaces.IDummy; import com.hbm.interfaces.ISource; import com.hbm.items.ModItems; import com.hbm.lib.Library; import com.hbm.lib.ModDamageSource; +import com.hbm.tileentity.TileEntityDummy; public class ExplosionNukeGeneric { @@ -585,7 +587,8 @@ public class ExplosionNukeGeneric { if (!world.isRemote) { if (world.getTileEntity(x, y, z) != null && (world.getTileEntity(x, y, z) instanceof ISource - || world.getTileEntity(x, y, z) instanceof IConsumer)) { + || world.getTileEntity(x, y, z) instanceof IConsumer + || world.getTileEntity(x, y, z) instanceof TileEntityDummy)) { world.setBlock(x, y, z, ModBlocks.block_electrical_scrap); } diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index ce8d81ebe..91e05114e 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -198,6 +198,7 @@ public class ModItems { public static Item nugget_beryllium; public static Item plate_gold; public static Item hazmat_cloth; + public static Item asbestos_cloth; public static Item filter_coal; public static Item plate_advanced_alloy; public static Item plate_combine_steel; @@ -643,12 +644,14 @@ public class ModItems { public static Item gun_emp_ammo; public static Item gun_jack; public static Item gun_jack_ammo; - //public static Item gun_spark; - //public static Item gun_spark_ammo; - //public static Item gun_hp; - //public static Item gun_hp_ammo; + public static Item gun_spark; + public static Item gun_spark_ammo; + public static Item gun_hp; + public static Item gun_hp_ammo; public static Item gun_euthanasia; public static Item gun_euthanasia_ammo; + public static Item gun_defabricator; + public static Item gun_defabricator_ammo; public static Item gun_waluigi; public static Item grenade_generic; @@ -1118,6 +1121,7 @@ public class ModItems { nugget_schrabidium = new ItemCustomLore().setUnlocalizedName("nugget_schrabidium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_schrabidium"); nugget_beryllium = new Item().setUnlocalizedName("nugget_beryllium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":nugget_beryllium"); hazmat_cloth = new Item().setUnlocalizedName("hazmat_cloth").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":hazmat_cloth"); + asbestos_cloth = new Item().setUnlocalizedName("asbestos_cloth").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":asbestos_cloth"); filter_coal = new Item().setUnlocalizedName("filter_coal").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":filter_coal"); ingot_hes = new ItemRadioactive().setUnlocalizedName("ingot_hes").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_hes"); ingot_les = new ItemRadioactive().setUnlocalizedName("ingot_les").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":ingot_les"); @@ -1150,23 +1154,23 @@ public class ModItems { powder_steel = new Item().setUnlocalizedName("powder_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_steel"); powder_lithium = new Item().setUnlocalizedName("powder_lithium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_lithium"); powder_power = new ItemCustomLore().setUnlocalizedName("powder_power").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_energy"); - powder_iodine = new ItemCustomLore().setUnlocalizedName("powder_iodine").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_iodine"); - powder_thorium = new ItemCustomLore().setUnlocalizedName("powder_thorium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_thorium"); - powder_neodymium = new ItemCustomLore().setUnlocalizedName("powder_neodymium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_neodymium"); - powder_astatine = new ItemCustomLore().setUnlocalizedName("powder_astatine").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_astatine"); - powder_caesium = new ItemCustomLore().setUnlocalizedName("powder_caesium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_caesium"); + powder_iodine = new ItemCustomLore().setUnlocalizedName("powder_iodine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_iodine"); + powder_thorium = new ItemCustomLore().setUnlocalizedName("powder_thorium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_thorium"); + powder_neodymium = new ItemCustomLore().setUnlocalizedName("powder_neodymium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_neodymium"); + powder_astatine = new ItemCustomLore().setUnlocalizedName("powder_astatine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_astatine"); + powder_caesium = new ItemCustomLore().setUnlocalizedName("powder_caesium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_caesium"); powder_australium = new ItemCustomLore().setUnlocalizedName("powder_australium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_australium"); powder_weidanium = new ItemCustomLore().setUnlocalizedName("powder_weidanium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_weidanium"); powder_reiium = new ItemCustomLore().setUnlocalizedName("powder_reiium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_reiium"); powder_unobtainium = new ItemCustomLore().setUnlocalizedName("powder_unobtainium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_unobtainium"); powder_daffergon = new ItemCustomLore().setUnlocalizedName("powder_daffergon").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_daffergon"); powder_verticium = new ItemCustomLore().setUnlocalizedName("powder_verticium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_verticium"); - powder_strontium = new ItemCustomLore().setUnlocalizedName("powder_strontium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_strontium"); - powder_cobalt = new ItemCustomLore().setUnlocalizedName("powder_cobalt").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_cobalt"); - powder_bromine = new ItemCustomLore().setUnlocalizedName("powder_bromine").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_bromine"); - powder_niobium = new ItemCustomLore().setUnlocalizedName("powder_niobium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_niobium"); - powder_tennessine = new ItemCustomLore().setUnlocalizedName("powder_tennessine").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_tennessine"); - powder_cerium = new ItemCustomLore().setUnlocalizedName("powder_cerium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_cerium"); + powder_strontium = new ItemCustomLore().setUnlocalizedName("powder_strontium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_strontium"); + powder_cobalt = new ItemCustomLore().setUnlocalizedName("powder_cobalt").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_cobalt"); + powder_bromine = new ItemCustomLore().setUnlocalizedName("powder_bromine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_bromine"); + powder_niobium = new ItemCustomLore().setUnlocalizedName("powder_niobium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_niobium"); + powder_tennessine = new ItemCustomLore().setUnlocalizedName("powder_tennessine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_tennessine"); + powder_cerium = new ItemCustomLore().setUnlocalizedName("powder_cerium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_cerium"); powder_dura_steel = new ItemCustomLore().setUnlocalizedName("powder_dura_steel").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_dura_steel"); powder_polymer = new ItemCustomLore().setUnlocalizedName("powder_polymer").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_polymer"); powder_lanthanium = new ItemCustomLore().setUnlocalizedName("powder_lanthanium").setCreativeTab(MainRegistry.tabParts).setTextureName(RefStrings.MODID + ":powder_lanthanium"); @@ -1532,12 +1536,14 @@ public class ModItems { gun_emp = new GunEMPRay().setUnlocalizedName("gun_emp").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_emp"); gun_jack_ammo = new Item().setUnlocalizedName("gun_jack_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_jack_ammo"); gun_jack = new GunJack().setUnlocalizedName("gun_jack").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_jack"); - //gun_spark_ammo = new Item().setUnlocalizedName("gun_spark_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_spark_ammo"); - //gun_spark = new GunJack().setUnlocalizedName("gun_spark").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_spark"); - //gun_hp_ammo = new Item().setUnlocalizedName("gun_hp_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_hp_ammo"); - //gun_hp = new GunJack().setUnlocalizedName("gun_hp").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_hp"); + gun_spark_ammo = new Item().setUnlocalizedName("gun_spark_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_spark_ammo"); + gun_spark = new GunJack().setUnlocalizedName("gun_spark").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_spark"); + gun_hp_ammo = new Item().setUnlocalizedName("gun_hp_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_hp_ammo"); + gun_hp = new GunJack().setUnlocalizedName("gun_hp").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_hp"); gun_euthanasia_ammo = new Item().setUnlocalizedName("gun_euthanasia_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_euthanasia_ammo"); gun_euthanasia = new GunEuthanasia().setUnlocalizedName("gun_euthanasia").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_euthanasia"); + gun_defabricator_ammo = new Item().setUnlocalizedName("gun_defabricator_ammo").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_defabricator_ammo"); + gun_defabricator = new GunJack().setUnlocalizedName("gun_defabricator").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_defabricator"); gun_super_shotgun = new ItemCustomLore().setUnlocalizedName("gun_super_shotgun").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_super_shotgun"); gun_moist_nugget = new ItemNugget(3, false).setUnlocalizedName("gun_moist_nugget").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":gun_moist_nugget"); @@ -2075,6 +2081,7 @@ public class ModItems { //Other Plates GameRegistry.registerItem(hazmat_cloth, hazmat_cloth.getUnlocalizedName()); + GameRegistry.registerItem(asbestos_cloth, asbestos_cloth.getUnlocalizedName()); GameRegistry.registerItem(filter_coal, filter_coal.getUnlocalizedName()); //Wires @@ -2466,10 +2473,10 @@ public class ModItems { GameRegistry.registerItem(gun_emp, gun_emp.getUnlocalizedName()); GameRegistry.registerItem(gun_revolver_inverted, gun_revolver_inverted.getUnlocalizedName()); GameRegistry.registerItem(gun_jack, gun_jack.getUnlocalizedName()); - //TODO: Fix dat shit - //GameRegistry.registerItem(gun_spark, gun_spark.getUnlocalizedName()); - //GameRegistry.registerItem(gun_hp, gun_hp.getUnlocalizedName()); + GameRegistry.registerItem(gun_spark, gun_spark.getUnlocalizedName()); + GameRegistry.registerItem(gun_hp, gun_hp.getUnlocalizedName()); GameRegistry.registerItem(gun_euthanasia, gun_euthanasia.getUnlocalizedName()); + GameRegistry.registerItem(gun_defabricator, gun_defabricator.getUnlocalizedName()); GameRegistry.registerItem(gun_super_shotgun, gun_super_shotgun.getUnlocalizedName()); GameRegistry.registerItem(gun_moist_nugget, gun_moist_nugget.getUnlocalizedName()); @@ -2496,8 +2503,9 @@ public class ModItems { GameRegistry.registerItem(gun_mp_ammo, gun_mp_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_emp_ammo, gun_emp_ammo.getUnlocalizedName()); GameRegistry.registerItem(gun_jack_ammo, gun_jack_ammo.getUnlocalizedName()); - //GameRegistry.registerItem(gun_spark_ammo, gun_spark_ammo.getUnlocalizedName()); - //GameRegistry.registerItem(gun_hp_ammo, gun_hp_ammo.getUnlocalizedName()); + GameRegistry.registerItem(gun_spark_ammo, gun_spark_ammo.getUnlocalizedName()); + GameRegistry.registerItem(gun_hp_ammo, gun_hp_ammo.getUnlocalizedName()); + GameRegistry.registerItem(gun_defabricator, gun_defabricator.getUnlocalizedName()); GameRegistry.registerItem(gun_euthanasia_ammo, gun_euthanasia_ammo.getUnlocalizedName()); //-C-l-i-p-s- Magazines diff --git a/com/hbm/items/special/ItemBattery.java b/com/hbm/items/special/ItemBattery.java index 01a88ad12..454afc2fc 100644 --- a/com/hbm/items/special/ItemBattery.java +++ b/com/hbm/items/special/ItemBattery.java @@ -27,7 +27,7 @@ public class ItemBattery extends Item { if(itemstack.getItem() != ModItems.fusion_core && itemstack.getItem() != ModItems.factory_core_titanium && itemstack.getItem() != ModItems.factory_core_advanced && itemstack.getItem() != ModItems.energy_core) { - list.add("Energy stored: " + (charge * 100) + " HE"); + list.add("Energy stored: " + (charge * 100) + "/" + (maxCharge * 100) + " HE"); } else { long charge1 = (charge * 100) / this.maxCharge; list.add("Charge: " + charge1 + "%"); @@ -100,5 +100,17 @@ public class ItemBattery extends Item { public long getMaxCharge() { return maxCharge; } + + public static ItemStack getEmptyBattery(Item item) { + + if(item instanceof ItemBattery) { + ItemStack stack = new ItemStack(item); + stack.stackTagCompound = new NBTTagCompound(); + stack.stackTagCompound.setLong("charge", 0); + return stack.copy(); + } + + return null; + } } diff --git a/com/hbm/items/special/ItemCustomLore.java b/com/hbm/items/special/ItemCustomLore.java index 0b2ac4cc4..fee04fc36 100644 --- a/com/hbm/items/special/ItemCustomLore.java +++ b/com/hbm/items/special/ItemCustomLore.java @@ -432,7 +432,7 @@ public class ItemCustomLore extends ItemRadioactive { return EnumRarity.rare; } - if(this == ModItems.gun_revolver_cursed_ammo || this == ModItems.plate_paa || this == ModItems.gun_mp_ammo || this == ModItems.powder_power || this == ModItems.ingot_australium || this == ModItems.ingot_weidanium || this == ModItems.ingot_reiium || this == ModItems.ingot_unobtainium || this == ModItems.ingot_daffergon || this == ModItems.ingot_verticium || this == ModItems.nugget_australium || this == ModItems.nugget_weidanium || this == ModItems.nugget_reiium || this == ModItems.nugget_unobtainium || this == ModItems.nugget_daffergon || this == ModItems.nugget_verticium) + if(this == ModItems.gun_revolver_cursed_ammo || this == ModItems.plate_paa || this == ModItems.gun_mp_ammo || this == ModItems.powder_power || this == ModItems.ingot_australium || this == ModItems.ingot_weidanium || this == ModItems.ingot_reiium || this == ModItems.ingot_unobtainium || this == ModItems.ingot_daffergon || this == ModItems.ingot_verticium || this == ModItems.nugget_australium || this == ModItems.nugget_weidanium || this == ModItems.nugget_reiium || this == ModItems.nugget_unobtainium || this == ModItems.nugget_daffergon || this == ModItems.nugget_verticium || this == ModItems.powder_australium || this == ModItems.powder_weidanium || this == ModItems.powder_reiium || this == ModItems.powder_unobtainium || this == ModItems.powder_daffergon || this == ModItems.powder_verticium) { return EnumRarity.uncommon; } diff --git a/com/hbm/lib/RefStrings.java b/com/hbm/lib/RefStrings.java index bee83fc28..09fd54735 100644 --- a/com/hbm/lib/RefStrings.java +++ b/com/hbm/lib/RefStrings.java @@ -3,7 +3,7 @@ package com.hbm.lib; public class RefStrings { public static final String MODID = "hbm"; public static final String NAME = "Hbm's Nuclear Tech Mod"; - public static final String VERSION = "1.0.25 BETA (Astatine-Lyra-X01)"; + public static final String VERSION = "1.0.25 BETA (Tennessine-Luna-X02)"; //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 439fe056c..71558b4d1 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -350,9 +350,10 @@ public class ClientProxy extends ServerProxy MinecraftForgeClient.registerItemRenderer(ModItems.gun_cryolator, new ItemRenderCryolator()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_uboinik, new ItemRenderUboinik()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_jack, new ItemRenderOverkill()); - //MinecraftForgeClient.registerItemRenderer(ModItems.gun_spark, new ItemRenderOverkill()); - //MinecraftForgeClient.registerItemRenderer(ModItems.gun_hp, new ItemRenderOverkill()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_spark, new ItemRenderOverkill()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_hp, new ItemRenderOverkill()); MinecraftForgeClient.registerItemRenderer(ModItems.gun_euthanasia, new ItemRenderOverkill()); + MinecraftForgeClient.registerItemRenderer(ModItems.gun_defabricator, new ItemRenderOverkill()); MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool()); MinecraftForgeClient.registerItemRenderer(ModItems.multitool_silk, new ItemRenderMultitool()); diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index 7aef17c16..8a8f39529 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -2,6 +2,7 @@ package com.hbm.main; import com.hbm.blocks.ModBlocks; import com.hbm.items.ModItems; +import com.hbm.items.special.ItemBattery; import net.minecraft.enchantment.Enchantment; import net.minecraft.init.Blocks; @@ -481,13 +482,13 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_furnace), 1), new Object[] { "HMH", "MFM", "HMH", 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 'M', ModItems.motor, 'F', Item.getItemFromBlock(Blocks.furnace) }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_conductor), 1), new Object[] { "SWS", "FFF", "SWS", 'S', "ingotTitanium", 'W', Item.getItemFromBlock(ModBlocks.red_wire_coated), 'F', ModItems.fuse })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_core), 1), new Object[] { "HPH", "PCP", "HPH", 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 'C', ModItems.circuit_aluminium, 'P', Item.getItemFromBlock(Blocks.piston) }); - GameRegistry.addRecipe(new ItemStack(ModItems.factory_core_titanium, 1, ModItems.factory_core_titanium.getMaxDamage()), new Object[] { "BRB", "RHR", "BRB", 'B', ModItems.battery_generic, 'R', Item.getItemFromBlock(Blocks.redstone_block), 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull) }); + GameRegistry.addRecipe(ItemBattery.getEmptyBattery(ModItems.factory_core_titanium), new Object[] { "BRB", "RHR", "BRB", 'B', ItemBattery.getEmptyBattery(ModItems.battery_generic), 'R', Item.getItemFromBlock(Blocks.redstone_block), 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull) }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 1), new Object[] { "PIP", "I I", "PIP", 'P', ModItems.plate_advanced_alloy, 'I', ModItems.ingot_advanced_alloy }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_advanced_furnace), 1), new Object[] { "HMH", "MFM", "HMH", 'H', Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 'M', ModItems.motor, 'F', Item.getItemFromBlock(Blocks.furnace) }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_advanced_conductor), 1), new Object[] { "SWS", "FFF", "SWS", 'S', ModItems.ingot_advanced_alloy, 'W', Item.getItemFromBlock(ModBlocks.red_wire_coated), 'F', ModItems.fuse }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_advanced_core), 1), new Object[] { "HPH", "PCP", "HPH", 'H', Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 'C', ModItems.circuit_red_copper, 'P', Item.getItemFromBlock(Blocks.piston) }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.factory_core_advanced), new Object[] { "BLB", "SHS", "BLB", 'B', ModItems.battery_advanced, 'S', "blockSulfur", 'L', "blockLead", 'H', Item.getItemFromBlock(ModBlocks.factory_advanced_hull) })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.factory_core_advanced), new Object[] { "BSB", "LHL", "BSB", 'B', ModItems.battery_advanced, 'S', "blockSulfur", 'L', "blockLead", 'H', Item.getItemFromBlock(ModBlocks.factory_advanced_hull) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.factory_core_advanced), new Object[] { "BLB", "SHS", "BLB", 'B', ItemBattery.getEmptyBattery(ModItems.battery_advanced), 'S', "blockSulfur", 'L', "blockLead", 'H', Item.getItemFromBlock(ModBlocks.factory_advanced_hull) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.factory_core_advanced), new Object[] { "BSB", "LHL", "BSB", 'B', ItemBattery.getEmptyBattery(ModItems.battery_advanced), 'S', "blockSulfur", 'L', "blockLead", 'H', Item.getItemFromBlock(ModBlocks.factory_advanced_hull) })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuse, 1), new Object[] { " S ", "GAG", " S ", 'S', "plateSteel", 'G', Item.getItemFromBlock(Blocks.glass_pane), 'A', ModItems.wire_aluminium })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.redcoil_capacitor, 1), new Object[] { "PFP", "CBC", "CBC", 'P', "plateGold", 'B', Item.getItemFromBlock(Blocks.redstone_block), 'C', ModItems.coil_advanced_alloy, 'F', ModItems.fuse })); @@ -762,30 +763,30 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.fleija_propellant, 1), new Object[] { "PPP", "TST", "PPP", 'P', ModItems.plate_schrabidium, 'S', ModItems.ingot_schrabidium, 'T', Item.getItemFromBlock(Blocks.tnt) }); GameRegistry.addRecipe(new ItemStack(ModItems.fleija_core, 1), new Object[] { "NUU", "BHW", "NUU", 'N', ModItems.nugget_neptunium, 'B', ModItems.nugget_beryllium, 'U', ModItems.nugget_u235, 'H', ModItems.coil_copper, 'W', ModItems.wire_red_copper }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_generic, 1), new Object[] { " A ", "PRP", "PRP", 'A', ModItems.wire_aluminium, 'P', "plateAluminum", 'R', Items.redstone })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced, 1), new Object[] { " A ", "PSP", "PLP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "sulfur", 'L', "dustLead" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced, 1), new Object[] { " A ", "PLP", "PSP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "sulfur", 'L', "dustLead" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced, 1), new Object[] { " A ", "PSP", "PLP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "dustSulfur", 'L', "dustLead" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced, 1), new Object[] { " A ", "PLP", "PSP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "dustSulfur", 'L', "dustLead" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_lithium, 1), new Object[] { "A A", "PSP", "PLP", 'A', ModItems.wire_gold, 'P', "plateTitanium", 'S', "dustLithium", 'L', ModItems.powder_cobalt })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_lithium, 1), new Object[] { "A A", "PLP", "PSP", 'A', ModItems.wire_gold, 'P', "plateTitanium", 'S', "dustLithium", 'L', ModItems.powder_cobalt })); - GameRegistry.addRecipe(new ItemStack(ModItems.battery_schrabidium, 1), new Object[] { " A ", "PNP", "PSP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium }); - GameRegistry.addRecipe(new ItemStack(ModItems.battery_schrabidium, 1), new Object[] { " A ", "PSP", "PNP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.energy_core, 1), new Object[] { "PCW", "TRD", "PCW", 'P', ModItems.plate_advanced_alloy, 'C', ModItems.coil_advanced_alloy, 'W', ModItems.wire_advanced_alloy, 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', "ingotTungsten" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.energy_core, 1), new Object[] { "PCW", "TDR", "PCW", 'P', ModItems.plate_advanced_alloy, 'C', ModItems.coil_advanced_alloy, 'W', ModItems.wire_advanced_alloy, 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', "ingotTungsten" })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_generic), new Object[] { " A ", "PRP", "PRP", 'A', ModItems.wire_aluminium, 'P', "plateAluminum", 'R', Items.redstone })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PSP", "PLP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "sulfur", 'L', "dustLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PLP", "PSP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "sulfur", 'L', "dustLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PSP", "PLP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "dustSulfur", 'L', "dustLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_advanced), new Object[] { " A ", "PLP", "PSP", 'A', ModItems.wire_red_copper, 'P', "plateCopper", 'S', "dustSulfur", 'L', "dustLead" })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_lithium), new Object[] { "A A", "PSP", "PLP", 'A', ModItems.wire_gold, 'P', "plateTitanium", 'S', "dustLithium", 'L', ModItems.powder_cobalt })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_lithium), new Object[] { "A A", "PLP", "PSP", 'A', ModItems.wire_gold, 'P', "plateTitanium", 'S', "dustLithium", 'L', ModItems.powder_cobalt })); + GameRegistry.addRecipe(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium), new Object[] { " A ", "PNP", "PSP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium }); + GameRegistry.addRecipe(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium), new Object[] { " A ", "PSP", "PNP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium }); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.energy_core), new Object[] { "PCW", "TRD", "PCW", 'P', ModItems.plate_advanced_alloy, 'C', ModItems.coil_advanced_alloy, 'W', ModItems.wire_advanced_alloy, 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', "ingotTungsten" })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.energy_core), new Object[] { "PCW", "TDR", "PCW", 'P', ModItems.plate_advanced_alloy, 'C', ModItems.coil_advanced_alloy, 'W', ModItems.wire_advanced_alloy, 'R', ModItems.cell_tritium, 'D', ModItems.cell_deuterium, 'T', "ingotTungsten" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_red_cell, 1), new Object[] { "WBW", "PBP", "WBW", 'W', ModItems.wire_aluminium, 'P', "plateAluminum", 'B', ModItems.battery_generic })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced_cell, 1), new Object[] { "WBW", "PBP", "WBW", 'W', ModItems.wire_red_copper, 'P', "plateCopper", 'B', ModItems.battery_advanced })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_lithium_cell, 1), new Object[] { "WBW", "PBP", "WBW", 'W', ModItems.wire_gold, 'P', "plateTitanium", 'B', ModItems.battery_lithium })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_schrabidium_cell, 1), new Object[] { "WBW", "PBP", "WBW", 'W', ModItems.wire_schrabidium, 'P', "plateSchrabidium", 'B', ModItems.battery_schrabidium })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_red_cell_6, 1), new Object[] { "BBB", "WPW", "BBB", 'W', ModItems.wire_aluminium, 'P', "plateAluminum", 'B', ModItems.battery_red_cell })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced_cell_4, 1), new Object[] { "BWB", "WPW", "BWB", 'W', ModItems.wire_red_copper, 'P', "plateCopper", 'B', ModItems.battery_advanced_cell })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_lithium_cell_3, 1), new Object[] { "WPW", "BBB", "WPW", 'W', ModItems.wire_gold, 'P', "plateTitanium", 'B', ModItems.battery_lithium_cell })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_schrabidium_cell_2, 1), new Object[] { "WPW", "BWB", "WPW", 'W', ModItems.wire_schrabidium, 'P', "plateSchrabidium", 'B', ModItems.battery_schrabidium_cell })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_red_cell_24, 1), new Object[] { "BWB", "WPW", "BWB", 'W', ModItems.wire_aluminium, 'P', "plateAluminum", 'B', ModItems.battery_red_cell_6 })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_advanced_cell_12, 1), new Object[] { "WPW", "BBB", "WPW", 'W', ModItems.wire_red_copper, 'P', "plateCopper", 'B', ModItems.battery_advanced_cell_4 })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_lithium_cell_6, 1), new Object[] { "WPW", "BWB", "WPW", 'W', ModItems.wire_gold, 'P', "plateTitanium", 'B', ModItems.battery_lithium_cell_3 })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.battery_schrabidium_cell_4, 1), new Object[] { "WPW", "BWB", "WPW", 'W', ModItems.wire_schrabidium, 'P', "plateSchrabidium", 'B', ModItems.battery_schrabidium_cell_2 })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_red_cell), new Object[] { "WBW", "PBP", "WBW", 'W', ModItems.wire_aluminium, 'P', "plateAluminum", 'B', ItemBattery.getEmptyBattery(ModItems.battery_generic) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell), new Object[] { "WBW", "PBP", "WBW", 'W', ModItems.wire_red_copper, 'P', "plateCopper", 'B', ItemBattery.getEmptyBattery(ModItems.battery_advanced) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell), new Object[] { "WBW", "PBP", "WBW", 'W', ModItems.wire_gold, 'P', "plateTitanium", 'B', ItemBattery.getEmptyBattery(ModItems.battery_lithium) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell), new Object[] { "WBW", "PBP", "WBW", 'W', ModItems.wire_schrabidium, 'P', "plateSchrabidium", 'B', ItemBattery.getEmptyBattery(ModItems.battery_schrabidium) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_red_cell_6), new Object[] { "BBB", "WPW", "BBB", 'W', ModItems.wire_aluminium, 'P', "plateAluminum", 'B', ItemBattery.getEmptyBattery(ModItems.battery_red_cell) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell_4), new Object[] { "BWB", "WPW", "BWB", 'W', ModItems.wire_red_copper, 'P', "plateCopper", 'B', ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell_3), new Object[] { "WPW", "BBB", "WPW", 'W', ModItems.wire_gold, 'P', "plateTitanium", 'B', ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell_2), new Object[] { "WPW", "BWB", "WPW", 'W', ModItems.wire_schrabidium, 'P', "plateSchrabidium", 'B', ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_red_cell_24), new Object[] { "BWB", "WPW", "BWB", 'W', ModItems.wire_aluminium, 'P', "plateAluminum", 'B', ItemBattery.getEmptyBattery(ModItems.battery_red_cell_6) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell_12), new Object[] { "WPW", "BBB", "WPW", 'W', ModItems.wire_red_copper, 'P', "plateCopper", 'B', ItemBattery.getEmptyBattery(ModItems.battery_advanced_cell_4) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell_6), new Object[] { "WPW", "BWB", "WPW", 'W', ModItems.wire_gold, 'P', "plateTitanium", 'B', ItemBattery.getEmptyBattery(ModItems.battery_lithium_cell_3) })); + GameRegistry.addRecipe(new ShapedOreRecipe(ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell_4), new Object[] { "WPW", "BWB", "WPW", 'W', ModItems.wire_schrabidium, 'P', "plateSchrabidium", 'B', ItemBattery.getEmptyBattery(ModItems.battery_schrabidium_cell_2) })); GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_schrabidium }); GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_schrabidium }); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 466867a71..93420c8ce 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -8,6 +8,8 @@ import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; +import net.minecraft.stats.Achievement; +import net.minecraftforge.common.AchievementPage; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; @@ -147,6 +149,7 @@ import com.hbm.tileentity.TileEntityMachineElectricFurnace; import com.hbm.tileentity.TileEntityMachineGasFlare; import com.hbm.tileentity.TileEntityMachineGenerator; import com.hbm.tileentity.TileEntityMachinePuF6Tank; +import com.hbm.tileentity.TileEntityMachineRTG; import com.hbm.tileentity.TileEntityMachineReactor; import com.hbm.tileentity.TileEntityMachineRefinery; import com.hbm.tileentity.TileEntityMachineSchrabidiumTransmutator; @@ -240,6 +243,47 @@ public class MainRegistry public static CreativeTabs tabBlock = new BlockTab(CreativeTabs.getNextID(), "tabBlocks"); public static CreativeTabs tabNuke = new NukeTab(CreativeTabs.getNextID(), "tabNuke"); + //Achievements + public static Achievement achievementGetTitanium; + public static Achievement achievementGetCopper; + public static Achievement achievementCraftAlloyFurnace; + public static Achievement achievementCraftElectricFurnace; + public static Achievement achievementCraftDerrick; + public static Achievement achievementCraftRefinery; + public static Achievement achievementCraftFactoryTitanium; + public static Achievement achievementCraftFactoryAdvanced; + public static Achievement achievementCraftGeneratorCoal; + public static Achievement achievementCraftGeneratorDiesel; + public static Achievement achievementCraftGeneratorIndustrial; + public static Achievement achievementGetLead; + public static Achievement achievementCraftBreedingReactor; + public static Achievement achievementCraftAtomicFurnace; + public static Achievement achievementCraftCentrifuge; + public static Achievement achievementCraftMissile; + public static Achievement achievementCraftMIRV; + public static Achievement achievementCraftNuclearReactor; + public static Achievement achievementCraftRTGFurnace; + public static Achievement achievementCraftRTG; + public static Achievement achievementCraftReactor; + public static Achievement achievementCraftTransmutator; + public static Achievement achievementCraftWatz; + public static Achievement achievementCraftCMB; + public static Achievement achievementCraftTeleporter; + public static Achievement achievementCraftFWatz; + public static Achievement achievementCraftDeuterium; + public static Achievement achievementCraftFusion; + public static Achievement achievementCraftCyclotron; + public static Achievement achievementCraftNuke; + public static Achievement achievementCraftFLEIJA; + public static Achievement achievementCraftHammer; + public static Achievement achievementCraftOutlaw; + public static Achievement achievementGetReiium; + public static Achievement achievementGetWeidanium; + public static Achievement achievementGetAustalium; + public static Achievement achievementGetVerticium; + public static Achievement achievementGetUnobtainium; + public static Achievement achievementGetDaffergon; + public static boolean enableDebugMode = true; public static boolean enableMycelium = false; public static boolean enablePlutoniumOre = false; @@ -398,6 +442,7 @@ public class MainRegistry GameRegistry.registerTileEntity(TileEntityOilDuctSolid.class, "tileentity_oil_duct_solid"); GameRegistry.registerTileEntity(TileEntityGasDuct.class, "tileentity_gas_duct"); GameRegistry.registerTileEntity(TileEntityGasDuctSolid.class, "tileentity_gas_duct_solid"); + GameRegistry.registerTileEntity(TileEntityMachineRTG.class, "tileentity_machine_rtg"); EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true); EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true); @@ -484,6 +529,17 @@ public class MainRegistry @EventHandler public static void load(FMLInitializationEvent event) { + achievementGetTitanium = new Achievement("achievement.getTitanium", "getTitanium", 0, -6, ModItems.ingot_titanium, (Achievement)null).initIndependentStat() .registerStat(); + achievementCraftAlloyFurnace = new Achievement("achievement.craftAlloyFurnace", "craftAlloyFurnace", -2, -4, Item.getItemFromBlock(ModBlocks.machine_difurnace_off), (Achievement)null).initIndependentStat() .registerStat(); + achievementCraftBreedingReactor = new Achievement("achievement.craftBreedingReactor", "craftBreedingReactor", 2, -4, Item.getItemFromBlock(ModBlocks.machine_reactor), (Achievement)null).initIndependentStat() .registerStat(); + achievementCraftCentrifuge = new Achievement("achievement.craftCentrifuge", "craftCentrifuge", 2, -2, Item.getItemFromBlock(ModBlocks.machine_centrifuge), achievementCraftBreedingReactor).initIndependentStat() .registerStat(); + AchievementPage.registerAchievementPage(new AchievementPage("NTM Achievements", new Achievement[]{ + achievementGetTitanium, + achievementCraftAlloyFurnace, + achievementCraftBreedingReactor, + achievementCraftCentrifuge + })); + OreDictionary.registerOre("ingotUranium", ModItems.ingot_uranium); OreDictionary.registerOre("ingotUranium235", ModItems.ingot_u235); OreDictionary.registerOre("ingotUranium238", ModItems.ingot_u238); @@ -511,6 +567,7 @@ public class MainRegistry OreDictionary.registerOre("ingotAdvancedAlloy", ModItems.ingot_advanced_alloy); OreDictionary.registerOre("ingotTungsten", ModItems.ingot_tungsten); OreDictionary.registerOre("ingotAluminum", ModItems.ingot_aluminium); + OreDictionary.registerOre("ingotBeryllium", ModItems.ingot_beryllium); OreDictionary.registerOre("ingotNeptunium", ModItems.ingot_neptunium); OreDictionary.registerOre("ingotLead", ModItems.ingot_lead); OreDictionary.registerOre("ingotLithium", ModItems.lithium); diff --git a/com/hbm/main/ModEventHandler.java b/com/hbm/main/ModEventHandler.java index 82069bb56..3c694ffd3 100644 --- a/com/hbm/main/ModEventHandler.java +++ b/com/hbm/main/ModEventHandler.java @@ -1,10 +1,13 @@ package com.hbm.main; +import com.hbm.blocks.ModBlocks; +import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent; import net.minecraft.client.Minecraft; +import net.minecraft.item.Item; import net.minecraft.util.ChatComponentText; public class ModEventHandler @@ -20,4 +23,34 @@ public class ModEventHandler showMessage = !showMessage; } + + @SubscribeEvent + public void itemSmelted(PlayerEvent.ItemSmeltedEvent e) { + if(e.smelting.getItem().equals(ModItems.ingot_titanium)) { + e.player.addStat(MainRegistry.achievementGetTitanium, 1); + } + } + + @SubscribeEvent + public void itemCrafted(PlayerEvent.ItemCraftedEvent e) { + + Item item = e.crafting.getItem(); + + if(item.equals(Item.getItemFromBlock(ModBlocks.machine_difurnace_off))) { + e.player.addStat(MainRegistry.achievementCraftAlloyFurnace, 1); + } + if(item.equals(Item.getItemFromBlock(ModBlocks.machine_reactor))) { + e.player.addStat(MainRegistry.achievementCraftBreedingReactor, 1); + } + if(item.equals(Item.getItemFromBlock(ModBlocks.machine_centrifuge))) { + e.player.addStat(MainRegistry.achievementCraftCentrifuge, 1); + } + } + + @SubscribeEvent + public void itemCollected(PlayerEvent.ItemPickupEvent e) { + if(e.pickedUp.getEntityItem().equals(ModItems.nothing)) { + //e.player.addStat(MainRegistry.achievementGetAmblygonite, 1); + } + } } diff --git a/com/hbm/render/entity/RenderMinecartTest.java b/com/hbm/render/entity/RenderMinecartTest.java index 9837f6087..b8a17bf8f 100644 --- a/com/hbm/render/entity/RenderMinecartTest.java +++ b/com/hbm/render/entity/RenderMinecartTest.java @@ -4,17 +4,122 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.client.renderer.entity.RenderMinecart; +import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.item.EntityMinecart; import net.minecraft.entity.item.EntityMinecartTNT; import net.minecraft.init.Blocks; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Vec3; +import net.minecraftforge.client.model.AdvancedModelLoader; +import net.minecraftforge.client.model.IModelCustom; + import org.lwjgl.opengl.GL11; import com.hbm.blocks.ModBlocks; import com.hbm.entity.item.EntityMinecartTest; +import com.hbm.lib.RefStrings; public class RenderMinecartTest extends RenderMinecart { + + private static final ResourceLocation objTesterModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/LilBoy1.obj"); + private IModelCustom boyModel; + private ResourceLocation boyTexture; private static final String __OBFID = "CL_00001029"; + + public RenderMinecartTest() { + boyModel = AdvancedModelLoader.loadModel(objTesterModelRL); + boyTexture = new ResourceLocation(RefStrings.MODID, "textures/models/LilBoy2.png"); + } + public void doRender(EntityMinecart p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) + { + GL11.glPushMatrix(); + this.bindEntityTexture(p_76986_1_); + long i = (long)p_76986_1_.getEntityId() * 493286711L; + i = i * i * 4392167121L + i * 98761L; + float f2 = (((float)(i >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; + float f3 = (((float)(i >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; + float f4 = (((float)(i >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; + GL11.glTranslatef(f2, f3, f4); + double d3 = p_76986_1_.lastTickPosX + (p_76986_1_.posX - p_76986_1_.lastTickPosX) * (double)p_76986_9_; + double d4 = p_76986_1_.lastTickPosY + (p_76986_1_.posY - p_76986_1_.lastTickPosY) * (double)p_76986_9_; + double d5 = p_76986_1_.lastTickPosZ + (p_76986_1_.posZ - p_76986_1_.lastTickPosZ) * (double)p_76986_9_; + double d6 = 0.30000001192092896D; + Vec3 vec3 = p_76986_1_.func_70489_a(d3, d4, d5); + float f5 = p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_; + + if (vec3 != null) + { + Vec3 vec31 = p_76986_1_.func_70495_a(d3, d4, d5, d6); + Vec3 vec32 = p_76986_1_.func_70495_a(d3, d4, d5, -d6); + + if (vec31 == null) + { + vec31 = vec3; + } + + if (vec32 == null) + { + vec32 = vec3; + } + + p_76986_2_ += vec3.xCoord - d3; + p_76986_4_ += (vec31.yCoord + vec32.yCoord) / 2.0D - d4; + p_76986_6_ += vec3.zCoord - d5; + Vec3 vec33 = vec32.addVector(-vec31.xCoord, -vec31.yCoord, -vec31.zCoord); + + if (vec33.lengthVector() != 0.0D) + { + vec33 = vec33.normalize(); + p_76986_8_ = (float)(Math.atan2(vec33.zCoord, vec33.xCoord) * 180.0D / Math.PI); + f5 = (float)(Math.atan(vec33.yCoord) * 73.0D); + } + } + + GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); + GL11.glRotatef(180.0F - p_76986_8_, 0.0F, 1.0F, 0.0F); + + // + if(p_76986_1_.getDataWatcher().getWatchableObjectInt(23) < 0 || p_76986_1_.getDataWatcher().getWatchableObjectInt(24) < 0) + GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); + // + + GL11.glRotatef(-f5, 0.0F, 0.0F, 1.0F); + float f7 = (float)p_76986_1_.getRollingAmplitude() - p_76986_9_; + float f8 = p_76986_1_.getDamage() - p_76986_9_; + + if (f8 < 0.0F) + { + f8 = 0.0F; + } + + if (f7 > 0.0F) + { + GL11.glRotatef(MathHelper.sin(f7) * f7 * f8 / 10.0F * (float)p_76986_1_.getRollingDirection(), 1.0F, 0.0F, 0.0F); + } + + int k = p_76986_1_.getDisplayTileOffset(); + Block block = p_76986_1_.func_145820_n(); + int j = p_76986_1_.getDisplayTileData(); + + if (block.getRenderType() != -1) + { + GL11.glPushMatrix(); + this.bindTexture(TextureMap.locationBlocksTexture); + float f6 = 0.75F; + GL11.glScalef(f6, f6, f6); + GL11.glTranslatef(0.0F, (float)k / 16.0F, 0.0F); + this.func_147910_a(p_76986_1_, p_76986_9_, block, j); + GL11.glPopMatrix(); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.bindEntityTexture(p_76986_1_); + } + + GL11.glScalef(-1.0F, -1.0F, 1.0F); + this.modelMinecart.render(p_76986_1_, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); + GL11.glPopMatrix(); + } protected void func_147910_a(EntityMinecartTest p_147910_1_, float p_147910_2_, Block p_147910_3_, int p_147910_4_) { @@ -40,7 +145,12 @@ public class RenderMinecartTest extends RenderMinecart GL11.glScalef(f2, f2, f2); } - super.func_147910_a(p_147910_1_, p_147910_2_, p_147910_3_, p_147910_4_); + GL11.glPushMatrix(); + //this.field_94145_f.renderBlockAsItem(ModBlocks.crate, 0, 1.0F); + bindTexture(boyTexture); + boyModel.renderAll(); + GL11.glPopMatrix(); + //super.func_147910_a(p_147910_1_, p_147910_2_, p_147910_3_, p_147910_4_); if (j > -1 && j / 5 % 2 == 0) { @@ -50,7 +160,9 @@ public class RenderMinecartTest extends RenderMinecart GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA); GL11.glColor4f(1.0F, 1.0F, 1.0F, (1.0F - ((float)j - p_147910_2_ + 1.0F) / 100.0F) * 0.8F); GL11.glPushMatrix(); - this.field_94145_f.renderBlockAsItem(ModBlocks.crate, 0, 1.0F); + //this.field_94145_f.renderBlockAsItem(ModBlocks.crate, 0, 1.0F); + bindTexture(boyTexture); + boyModel.renderAll(); GL11.glPopMatrix(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_BLEND); diff --git a/com/hbm/render/item/ItemRenderOverkill.java b/com/hbm/render/item/ItemRenderOverkill.java index 1ad3b6fad..340bd9ccd 100644 --- a/com/hbm/render/item/ItemRenderOverkill.java +++ b/com/hbm/render/item/ItemRenderOverkill.java @@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11; import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; +import com.hbm.render.model.ModelDefabricator; import com.hbm.render.model.ModelEuthanasia; import com.hbm.render.model.ModelHP; import com.hbm.render.model.ModelJack; @@ -24,12 +25,14 @@ public class ItemRenderOverkill implements IItemRenderer { protected ModelSpark sparkPlug; protected ModelHP hppLaserjet; protected ModelEuthanasia euthanasia; + protected ModelDefabricator defab; public ItemRenderOverkill() { powerJack = new ModelJack(); sparkPlug = new ModelSpark(); hppLaserjet = new ModelHP(); euthanasia = new ModelEuthanasia(); + defab = new ModelDefabricator(); } @Override @@ -57,12 +60,14 @@ public class ItemRenderOverkill implements IItemRenderer { if(item.getItem() == ModItems.gun_jack) Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelJack.png")); - //if(item.getItem() == ModItems.gun_spark) - // Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelSpark.png")); - //if(item.getItem() == ModItems.gun_hp) - // Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelHP.png")); + if(item.getItem() == ModItems.gun_spark) + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelSpark.png")); + if(item.getItem() == ModItems.gun_hp) + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelHP.png")); if(item.getItem() == ModItems.gun_euthanasia) Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEuthanasia.png")); + if(item.getItem() == ModItems.gun_defabricator) + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelDefabricator.png")); GL11.glRotatef(-135.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(-0.5F, 0.0F, -0.2F); @@ -73,12 +78,14 @@ public class ItemRenderOverkill implements IItemRenderer { if(item.getItem() == ModItems.gun_jack) powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); - //if(item.getItem() == ModItems.gun_spark) - // sparkPlug.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); - //if(item.getItem() == ModItems.gun_hp) - // hppLaserjet.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + if(item.getItem() == ModItems.gun_spark) + sparkPlug.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + if(item.getItem() == ModItems.gun_hp) + hppLaserjet.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); if(item.getItem() == ModItems.gun_euthanasia) euthanasia.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + if(item.getItem() == ModItems.gun_defabricator) + defab.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; case EQUIPPED: @@ -87,12 +94,14 @@ public class ItemRenderOverkill implements IItemRenderer { GL11.glEnable(GL11.GL_CULL_FACE); if(item.getItem() == ModItems.gun_jack) Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelJack.png")); - //if(item.getItem() == ModItems.gun_spark) - // Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelSpark.png")); - //if(item.getItem() == ModItems.gun_hp) - // Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelHP.png")); + if(item.getItem() == ModItems.gun_spark) + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelSpark.png")); + if(item.getItem() == ModItems.gun_hp) + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelHP.png")); if(item.getItem() == ModItems.gun_euthanasia) Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelEuthanasia.png")); + if(item.getItem() == ModItems.gun_defabricator) + Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID +":textures/models/ModelDefabricator.png")); GL11.glRotatef(-200.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(75.0F, 0.0F, 1.0F, 0.0F); @@ -105,12 +114,14 @@ public class ItemRenderOverkill implements IItemRenderer { if(item.getItem() == ModItems.gun_jack) powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); - //if(item.getItem() == ModItems.gun_spark) - // sparkPlug.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); - //if(item.getItem() == ModItems.gun_hp) - // hppLaserjet.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + if(item.getItem() == ModItems.gun_spark) + sparkPlug.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + if(item.getItem() == ModItems.gun_hp) + hppLaserjet.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); if(item.getItem() == ModItems.gun_euthanasia) euthanasia.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); + if(item.getItem() == ModItems.gun_defabricator) + defab.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); default: break; } diff --git a/com/hbm/render/model/ModelDefabricator.java b/com/hbm/render/model/ModelDefabricator.java new file mode 100755 index 000000000..7a4d0b432 --- /dev/null +++ b/com/hbm/render/model/ModelDefabricator.java @@ -0,0 +1,224 @@ +//This File was created with the Minecraft-SMP Modelling Toolbox 2.3.0.0 +// Copyright (C) 2017 Minecraft-SMP.de +// This file is for Flan's Flying Mod Version 4.0.x+ + +// Model: Defabricator +// Model Creator: +// Created on:05.06.2017 - 11:21:40 +// Last changed on: 05.06.2017 - 11:21:40 + +package com.hbm.render.model; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; + +public class ModelDefabricator extends ModelBase +{ + int textureX = 128; + int textureY = 64; + ModelRenderer[] modeldefabricatorModel; + + public ModelDefabricator() + { + textureWidth = 128; + textureHeight = 64; + modeldefabricatorModel = new ModelRenderer[40]; + modeldefabricatorModel[0] = new ModelRenderer(this, 1, 1); // Box 0 + modeldefabricatorModel[1] = new ModelRenderer(this, 25, 1); // Box 1 + modeldefabricatorModel[2] = new ModelRenderer(this, 41, 1); // Box 2 + modeldefabricatorModel[3] = new ModelRenderer(this, 57, 1); // Box 3 + modeldefabricatorModel[4] = new ModelRenderer(this, 89, 1); // Box 4 + modeldefabricatorModel[5] = new ModelRenderer(this, 105, 1); // Box 5 + modeldefabricatorModel[6] = new ModelRenderer(this, 1, 9); // Box 6 + modeldefabricatorModel[7] = new ModelRenderer(this, 25, 9); // Box 7 + modeldefabricatorModel[8] = new ModelRenderer(this, 49, 1); // Box 8 + modeldefabricatorModel[9] = new ModelRenderer(this, 57, 9); // Box 9 + modeldefabricatorModel[10] = new ModelRenderer(this, 33, 9); // Box 10 + modeldefabricatorModel[11] = new ModelRenderer(this, 89, 9); // Box 11 + modeldefabricatorModel[12] = new ModelRenderer(this, 113, 9); // Box 12 + modeldefabricatorModel[13] = new ModelRenderer(this, 17, 1); // Box 13 + modeldefabricatorModel[14] = new ModelRenderer(this, 1, 17); // Box 14 + modeldefabricatorModel[15] = new ModelRenderer(this, 17, 17); // Box 15 + modeldefabricatorModel[16] = new ModelRenderer(this, 41, 17); // Box 16 + modeldefabricatorModel[17] = new ModelRenderer(this, 73, 17); // Box 17 + modeldefabricatorModel[18] = new ModelRenderer(this, 97, 17); // Box 18 + modeldefabricatorModel[19] = new ModelRenderer(this, 113, 17); // Box 19 + modeldefabricatorModel[20] = new ModelRenderer(this, 1, 25); // Box 20 + modeldefabricatorModel[21] = new ModelRenderer(this, 9, 25); // Box 21 + modeldefabricatorModel[22] = new ModelRenderer(this, 17, 25); // Box 22 + modeldefabricatorModel[23] = new ModelRenderer(this, 33, 25); // Box 23 + modeldefabricatorModel[24] = new ModelRenderer(this, 49, 25); // Box 24 + modeldefabricatorModel[25] = new ModelRenderer(this, 65, 25); // Box 25 + modeldefabricatorModel[26] = new ModelRenderer(this, 81, 25); // Box 26 + modeldefabricatorModel[27] = new ModelRenderer(this, 97, 1); // Box 27 + modeldefabricatorModel[28] = new ModelRenderer(this, 1, 33); // Box 28 + modeldefabricatorModel[29] = new ModelRenderer(this, 105, 17); // Box 29 + modeldefabricatorModel[30] = new ModelRenderer(this, 89, 25); // Box 30 + modeldefabricatorModel[31] = new ModelRenderer(this, 49, 33); // Box 31 + modeldefabricatorModel[32] = new ModelRenderer(this, 1, 41); // Box 32 + modeldefabricatorModel[33] = new ModelRenderer(this, 89, 25); // Box 33 + modeldefabricatorModel[34] = new ModelRenderer(this, 89, 33); // Box 34 + modeldefabricatorModel[35] = new ModelRenderer(this, 41, 41); // Box 35 + modeldefabricatorModel[36] = new ModelRenderer(this, 105, 25); // Box 36 + modeldefabricatorModel[37] = new ModelRenderer(this, 113, 25); // Box 39 + modeldefabricatorModel[38] = new ModelRenderer(this, 121, 25); // Box 40 + modeldefabricatorModel[39] = new ModelRenderer(this, 57, 41); // Box 41 + + modeldefabricatorModel[0].addBox(0F, 0F, 0F, 5, 2, 3); // Box 0 + modeldefabricatorModel[0].setRotationPoint(0F, 0.5F, -1.5F); + + modeldefabricatorModel[1].addBox(0F, 0F, 0F, 5, 3, 2); // Box 1 + modeldefabricatorModel[1].setRotationPoint(0F, 0F, -1F); + + modeldefabricatorModel[2].addBox(0F, 0F, 0F, 2, 7, 3); // Box 2 + modeldefabricatorModel[2].setRotationPoint(-2F, -2F, -1.5F); + + modeldefabricatorModel[3].addBox(0F, 0F, 0F, 11, 1, 3); // Box 3 + modeldefabricatorModel[3].setRotationPoint(0F, -2F, -1.5F); + + modeldefabricatorModel[4].addBox(0F, 0F, 0F, 1, 3, 3); // Box 4 + modeldefabricatorModel[4].setRotationPoint(10F, -1F, -1.5F); + + modeldefabricatorModel[5].addBox(0F, 0F, 0F, 6, 1, 2); // Box 5 + modeldefabricatorModel[5].setRotationPoint(0F, 4F, -1F); + + modeldefabricatorModel[6].addBox(0F, -1F, 0F, 6, 1, 2); // Box 6 + modeldefabricatorModel[6].setRotationPoint(6F, 5F, -1F); + modeldefabricatorModel[6].rotateAngleZ = -0.61086524F; + + modeldefabricatorModel[7].addBox(0F, 0F, 0F, 1, 2, 2); // Box 7 + modeldefabricatorModel[7].setRotationPoint(5F, 0.5F, -1F); + + modeldefabricatorModel[8].addBox(0F, 0F, 0F, 4, 1, 1); // Box 8 + modeldefabricatorModel[8].setRotationPoint(6F, 1F, -0.5F); + + modeldefabricatorModel[9].addBox(0F, 0F, 0F, 12, 1, 2); // Box 9 + modeldefabricatorModel[9].setRotationPoint(11F, 0F, -1F); + + modeldefabricatorModel[10].addBox(0F, 0F, 0F, 1, 6, 2); // Box 10 + modeldefabricatorModel[10].setRotationPoint(22F, -6F, -1F); + + modeldefabricatorModel[11].addBox(0F, 0F, 0F, 8, 2, 2); // Box 11 + modeldefabricatorModel[11].setRotationPoint(14F, -2.5F, -1F); + + modeldefabricatorModel[12].addBox(0F, 0F, 0F, 3, 1, 1); // Box 12 + modeldefabricatorModel[12].setRotationPoint(11F, -2F, -0.5F); + + modeldefabricatorModel[13].addBox(0F, 0F, 0F, 1, 1, 1); // Box 13 + modeldefabricatorModel[13].setRotationPoint(1F, 3.5F, -0.5F); + + modeldefabricatorModel[14].addBox(0F, 0F, 0F, 5, 1, 2); // Box 14 + modeldefabricatorModel[14].setRotationPoint(13.5F, -4.5F, -1F); + + modeldefabricatorModel[15].addBox(0F, 0F, 0F, 4, 1, 2); // Box 15 + modeldefabricatorModel[15].setRotationPoint(18F, -5F, -1F); + + modeldefabricatorModel[16].addBox(0F, 0F, 0F, 10, 1, 2); // Box 16 + modeldefabricatorModel[16].setRotationPoint(4F, -5F, -1F); + + modeldefabricatorModel[17].addBox(-6F, 0F, 0F, 6, 1, 2); // Box 17 + modeldefabricatorModel[17].setRotationPoint(4F, -5F, -1F); + modeldefabricatorModel[17].rotateAngleZ = -0.52359878F; + + modeldefabricatorModel[18].addBox(0F, 0F, 0F, 1, 3, 3); // Box 18 + modeldefabricatorModel[18].setRotationPoint(22F, -9F, -1.5F); + + modeldefabricatorModel[19].addBox(0F, 0F, 0F, 5, 2, 2); // Box 19 + modeldefabricatorModel[19].setRotationPoint(17F, -8.5F, -1F); + + modeldefabricatorModel[20].addBox(-4F, -3F, 0F, 1, 3, 2); // Box 20 + modeldefabricatorModel[20].setRotationPoint(4F, -5F, -1F); + modeldefabricatorModel[20].rotateAngleZ = -0.52359878F; + + modeldefabricatorModel[21].addBox(-4F, -4F, 0F, 1, 1, 2); // Box 21 + modeldefabricatorModel[21].setRotationPoint(4F, -5F, -1F); + modeldefabricatorModel[21].rotateAngleZ = -0.52359878F; + + modeldefabricatorModel[22].addBox(0F, 0F, 0F, 4, 3, 2); // Box 22 + modeldefabricatorModel[22].setRotationPoint(-6F, 0F, -1F); + + modeldefabricatorModel[23].addBox(0F, 0F, 0F, 4, 2, 3); // Box 23 + modeldefabricatorModel[23].setRotationPoint(-6F, 0.5F, -1.5F); + + modeldefabricatorModel[24].addBox(0F, 0F, 0F, 5, 2, 2); // Box 24 + modeldefabricatorModel[24].setRotationPoint(-11F, 0.5F, -1F); + + modeldefabricatorModel[25].addBox(0F, 0F, 0F, 2, 3, 2); // Box 25 + modeldefabricatorModel[25].setRotationPoint(-10.5F, 0F, -1F); + + modeldefabricatorModel[26].addBox(0F, 0F, 0F, 2, 2, 3); // Box 26 + modeldefabricatorModel[26].setRotationPoint(-10.5F, 0.5F, -1.5F); + + modeldefabricatorModel[27].addBox(0F, -2.5F, -0.5F, 1, 1, 1); // Box 27 + modeldefabricatorModel[27].setRotationPoint(-3F, 1.5F, 0F); + + modeldefabricatorModel[28].addBox(0F, -3F, -0.5F, 20, 1, 1); // Box 28 + modeldefabricatorModel[28].setRotationPoint(-23F, 1.5F, 0F); + + modeldefabricatorModel[29].addBox(0F, -2.5F, -0.5F, 1, 1, 1); // Box 29 + modeldefabricatorModel[29].setRotationPoint(-3F, 1.5F, 0F); + modeldefabricatorModel[29].rotateAngleX = 2.0943951F; + + modeldefabricatorModel[30].addBox(0F, -2.5F, -0.5F, 1, 1, 1); // Box 30 + modeldefabricatorModel[30].setRotationPoint(-3F, 1.5F, 0F); + modeldefabricatorModel[30].rotateAngleX = -2.0943951F; + + modeldefabricatorModel[31].addBox(0F, -3F, -0.5F, 20, 1, 1); // Box 31 + modeldefabricatorModel[31].setRotationPoint(-23F, 1.5F, 0F); + modeldefabricatorModel[31].rotateAngleX = -2.0943951F; + + modeldefabricatorModel[32].addBox(0F, -3F, -0.5F, 20, 1, 1); // Box 32 + modeldefabricatorModel[32].setRotationPoint(-23F, 1.5F, 0F); + modeldefabricatorModel[32].rotateAngleX = 2.0943951F; + + modeldefabricatorModel[33].addBox(0F, -2F, -3F, 2, 1, 6); // Box 33 + modeldefabricatorModel[33].setRotationPoint(-22F, 1.5F, 0F); + modeldefabricatorModel[33].rotateAngleX = 1.04719755F; + + modeldefabricatorModel[34].addBox(0F, -2F, -3F, 2, 1, 6); // Box 34 + modeldefabricatorModel[34].setRotationPoint(-22F, 1.5F, 0F); + modeldefabricatorModel[34].rotateAngleX = -3.14159265F; + + modeldefabricatorModel[35].addBox(0F, -2F, -3F, 2, 1, 6); // Box 35 + modeldefabricatorModel[35].setRotationPoint(-22F, 1.5F, 0F); + modeldefabricatorModel[35].rotateAngleX = -1.04719755F; + + modeldefabricatorModel[36].addBox(0.5F, -2.5F, -0.5F, 1, 1, 1); // Box 36 + modeldefabricatorModel[36].setRotationPoint(-24F, 1.5F, 0F); + + modeldefabricatorModel[37].addBox(0.5F, -2.5F, -0.5F, 1, 1, 1); // Box 39 + modeldefabricatorModel[37].setRotationPoint(-24F, 1.5F, 0F); + modeldefabricatorModel[37].rotateAngleX = 2.0943951F; + + modeldefabricatorModel[38].addBox(0.5F, -2.5F, -0.5F, 1, 1, 1); // Box 40 + modeldefabricatorModel[38].setRotationPoint(-24F, 1.5F, 0F); + modeldefabricatorModel[38].rotateAngleX = -2.0943951F; + + modeldefabricatorModel[39].addBox(0F, 0F, 0F, 13, 0, 1); // Box 41 + modeldefabricatorModel[39].setRotationPoint(5F, -5F, -0.5F); + modeldefabricatorModel[39].rotateAngleZ = -0.17453293F; + + for(int i = 0; i < 40; i++) + { + modeldefabricatorModel[i].setTextureSize(textureX, textureY); + modeldefabricatorModel[i].mirror = true; + } + } + + @Override + public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) + { + super.render(entity, f, f1, f2, f3, f4, f5); + setRotationAngles(f, f1, f2, f3, f4, f5, entity); + for(int i = 0; i < 40; i++) + { + modeldefabricatorModel[i].render(f5); + } + } + + public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) + { + super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); + } +} \ No newline at end of file diff --git a/com/hbm/world/DesertAtom002.java b/com/hbm/world/DesertAtom002.java index 4232e5ebf..d2635aa01 100644 --- a/com/hbm/world/DesertAtom002.java +++ b/com/hbm/world/DesertAtom002.java @@ -32,7 +32,7 @@ public class DesertAtom002 Block Block14 = ModBlocks.machine_generator; Block Block15 = ModBlocks.block_titanium; Block Block16 = ModBlocks.machine_reactor; - Block Block17 = ModBlocks.ore_schrabidium; + Block Block17 = ModBlocks.ore_nether_plutonium; Block Block18 = ModBlocks.waste_planks; Block Block19 = ModBlocks.machine_centrifuge; Block Block20 = ModBlocks.machine_uf6_tank;