From 0f45390bf58b92d5affe1c639f0c93e1c66074b8 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Mon, 29 May 2017 19:52:38 +0200 Subject: [PATCH] Gas duct, flare functionallity, asbestos suit (BETA 25X01) --- assets/hbm/lang/de_DE.lang | 5 + assets/hbm/lang/en_US.lang | 5 + assets/hbm/textures/armor/asbestos_1.png | Bin 0 -> 684 bytes assets/hbm/textures/armor/asbestos_2.png | Bin 0 -> 370 bytes assets/hbm/textures/blocks/gas_duct.png | Bin 0 -> 230 bytes assets/hbm/textures/blocks/gas_duct_icon.png | Bin 0 -> 178 bytes assets/hbm/textures/blocks/gas_duct_solid.png | Bin 0 -> 335 bytes assets/hbm/textures/blocks/oil_duct_alt.png | Bin 0 -> 212 bytes .../hbm/textures/blocks/oil_duct_icon_alt.png | Bin 0 -> 189 bytes .../textures/blocks/oil_duct_solid_alt.png | Bin 0 -> 326 bytes assets/hbm/textures/gui/gui_gasFlare.png | Bin 2060 -> 2055 bytes assets/hbm/textures/gui/gui_well_large.png | Bin 5732 -> 5728 bytes .../items/{book.png => book_secret.png} | Bin assets/hbm/textures/items/gas_empty.png | Bin 204 -> 196 bytes assets/hbm/textures/items/gas_full.png | Bin 211 -> 201 bytes assets/hbm/textures/items/gasflame1.png | Bin 0 -> 136 bytes assets/hbm/textures/items/gasflame2.png | Bin 0 -> 129 bytes assets/hbm/textures/items/gasflame3.png | Bin 0 -> 112 bytes assets/hbm/textures/items/gasflame4.png | Bin 0 -> 117 bytes assets/hbm/textures/items/gasflame5.png | Bin 0 -> 114 bytes assets/hbm/textures/items/gasflame6.png | Bin 0 -> 98 bytes assets/hbm/textures/items/gasflame7.png | Bin 0 -> 93 bytes assets/hbm/textures/items/gasflame8.png | Bin 0 -> 94 bytes com/hbm/blocks/ModBlocks.java | 12 +- com/hbm/blocks/machine/BlockCable.java | 5 + com/hbm/blocks/machine/BlockGasDuct.java | 80 +++++++++ com/hbm/blocks/machine/BlockOilDuct.java | 4 + com/hbm/blocks/machine/GasDuctSolid.java | 26 +++ .../UnionOfTileEntitiesAndBooleansForGas.java | 17 ++ com/hbm/entity/particle/EntityGasFlameFX.java | 86 ++++++++++ com/hbm/explosion/ExplosionThermo.java | 8 +- com/hbm/interfaces/IGasAcceptor.java | 11 ++ .../interfaces/{IDuct.java => IGasDuct.java} | 2 +- com/hbm/interfaces/IGasSource.java | 17 ++ com/hbm/interfaces/IOilDuct.java | 5 + com/hbm/items/ModItems.java | 42 ++++- com/hbm/items/gear/ArmorAsbestos.java | 81 +++++++++ com/hbm/items/gear/ModArmor.java | 6 + com/hbm/lib/Library.java | 155 +++++++++++++++++- com/hbm/lib/RefStrings.java | 10 +- com/hbm/lib/SPCLStrings.java | 14 -- com/hbm/main/ClientProxy.java | 6 + com/hbm/main/CraftingManager.java | 11 +- com/hbm/main/MainRegistry.java | 6 + com/hbm/main/NEIConfig.java | 1 + com/hbm/render/entity/GasFlameRenderer.java | 125 ++++++++++++++ com/hbm/render/tileentity/RenderGasDuct.java | 155 ++++++++++++++++++ com/hbm/render/tileentity/RenderOilDuct.java | 2 +- com/hbm/tileentity/TileEntityGasDuct.java | 58 +++++++ .../tileentity/TileEntityGasDuctSolid.java | 17 ++ .../tileentity/TileEntityMachineGasFlare.java | 52 +++++- .../tileentity/TileEntityMachineOilWell.java | 43 ++++- com/hbm/tileentity/TileEntityOilDuct.java | 16 +- .../tileentity/TileEntityOilDuctSolid.java | 4 +- 54 files changed, 1044 insertions(+), 43 deletions(-) create mode 100644 assets/hbm/textures/armor/asbestos_1.png create mode 100644 assets/hbm/textures/armor/asbestos_2.png create mode 100644 assets/hbm/textures/blocks/gas_duct.png create mode 100644 assets/hbm/textures/blocks/gas_duct_icon.png create mode 100644 assets/hbm/textures/blocks/gas_duct_solid.png create mode 100644 assets/hbm/textures/blocks/oil_duct_alt.png create mode 100644 assets/hbm/textures/blocks/oil_duct_icon_alt.png create mode 100644 assets/hbm/textures/blocks/oil_duct_solid_alt.png rename assets/hbm/textures/items/{book.png => book_secret.png} (100%) create mode 100644 assets/hbm/textures/items/gasflame1.png create mode 100644 assets/hbm/textures/items/gasflame2.png create mode 100644 assets/hbm/textures/items/gasflame3.png create mode 100644 assets/hbm/textures/items/gasflame4.png create mode 100644 assets/hbm/textures/items/gasflame5.png create mode 100644 assets/hbm/textures/items/gasflame6.png create mode 100644 assets/hbm/textures/items/gasflame7.png create mode 100644 assets/hbm/textures/items/gasflame8.png create mode 100644 com/hbm/blocks/machine/BlockGasDuct.java create mode 100644 com/hbm/blocks/machine/GasDuctSolid.java create mode 100644 com/hbm/calc/UnionOfTileEntitiesAndBooleansForGas.java create mode 100644 com/hbm/entity/particle/EntityGasFlameFX.java create mode 100644 com/hbm/interfaces/IGasAcceptor.java rename com/hbm/interfaces/{IDuct.java => IGasDuct.java} (53%) create mode 100644 com/hbm/interfaces/IGasSource.java create mode 100644 com/hbm/interfaces/IOilDuct.java create mode 100644 com/hbm/items/gear/ArmorAsbestos.java delete mode 100644 com/hbm/lib/SPCLStrings.java create mode 100644 com/hbm/render/entity/GasFlameRenderer.java create mode 100644 com/hbm/render/tileentity/RenderGasDuct.java create mode 100644 com/hbm/tileentity/TileEntityGasDuct.java create mode 100644 com/hbm/tileentity/TileEntityGasDuctSolid.java diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 6fe6bfbed..097900ea3 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -162,6 +162,8 @@ tile.oil_duct.name=Ölrohr 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.rail_highspeed.name=Hochgeschwindigkeitsschienen tile.rail_booster.name=Hochgeschwindigkeits-Boosterschienen @@ -503,6 +505,8 @@ item.canister_fuel.name=Treibstoffkanister item.canister_kerosene.name=Kerosinkanister item.canister_napalm.name=Napalm B item.canister_NITAN.name=NITAN© 100 Oktan Supertreibstoff +item.gas_empty.name=Leerer Gastank +item.gas_full.name=Gastank item.rod_empty.name=Leerer Brennstab item.rod_uranium.name=Uranbrennstab @@ -1103,6 +1107,7 @@ item.reer_graar.name=The Reer Graar item.letter.name=Eilbrief item.polaroid.name=Das Polaroid +item.book_secret.name=3-596-50802-9 item.crystal_horn.name=Kristallhorn item.crystal_charred.name=Verkohlter Kristall diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index b95c216a2..75b1d9396 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -162,6 +162,8 @@ tile.oil_duct.name=Oil Pipe tile.oil_duct_solid.name=Coated Oil Pipe tile.machine_flare.name=Gas Flare container.gasFlare=Gas Flare +tile.gas_duct.name=Gas Pipe +tile.gas_duct_solid.name=Coated Gas Pipe tile.rail_highspeed.name=High Speed Rail tile.rail_booster.name=High Speed Booster Rail @@ -503,6 +505,8 @@ item.canister_fuel.name=Fuel Canister item.canister_kerosene.name=Kerosene Canister item.canister_napalm.name=Napalm B item.canister_NITAN.name=NITAN© 100 Octane Super Fuel +item.gas_empty.name=Empty Gas Tank +item.gas_full.name=Gas Tank item.rod_empty.name=Emty Rod item.rod_uranium.name=Uranium Rod @@ -1103,6 +1107,7 @@ item.reer_graar.name=The Reer Graar item.letter.name=Express Mail item.polaroid.name=The Polaroid +item.book_secret.name=3-596-50802-9 item.crystal_horn.name=Crystal Horn item.crystal_charred.name=Charred Crystal diff --git a/assets/hbm/textures/armor/asbestos_1.png b/assets/hbm/textures/armor/asbestos_1.png new file mode 100644 index 0000000000000000000000000000000000000000..210d33513ed74542eedb97fb6b996f8df28c9cdc GIT binary patch literal 684 zcmV;d0#p5oP);xENptZhh*IL6EGd-vL&&&%KKt$6&>msED5wZSfhn;}$&i^gI z1$_4{kd+1czE7q>&i~BpY@XkWt?L8<{LSMb+&sUge@mt<;1@E$d?~Nx&&91s0YE8L zW#vp0Af*hdx#j)!h|f>p?FWFLzwmKA&iq_|&Yz;|x|_dMlv1}ElORHA&i+$G^e+v* z;x1<9=lVzdIfPb9Es>pN0l$`a`S|(``6h7%psyN%%$Mw+z^By?5;OX6$UF{<4OS|v}Z{3G#xC0S~7ES`YW2c?vEzS4M$f5%vA#}KtuJoE!Y z_XD}{u5H_@Ye3t!I2;bs2TN@`NPot))=9xDiC;?tg#EBTkR^7g%^gr_{F)jdd{wSt zr$p_Mczc?(eM{{Wvn#RKARe(}ZKd&Uq2yn(=GrNQUt8CYhSwd~d$lHh2qD0Gk8k6lO*LJ!M5>fW0nHkIsV@&qCl;+p=1a5K2$?wpu QbN~PV07*qoM6N<$g1sZEe*gdg literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/blocks/gas_duct.png b/assets/hbm/textures/blocks/gas_duct.png new file mode 100644 index 0000000000000000000000000000000000000000..61c88729bdd752f7cab17f23ec537e141dac51db GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK^5=TGIEF;D zzP)72#bhYZ_OLvaGjf`4G0(wMmz;0h;t0EUO1NTLL+^(68%ixLx!0V&v9D=9`~85x zvRVBzLoUzObm0)(^(}hCH^oCQ%MMh>2Rg_q*~Ie)d71bguB?w`I+K5H=aC$SGQ~p% zJYQ=4y*ewUZ%ZBD7}2mR`(RXeao?QJMNARr6MHnJ9~ABR|EDpRAv<>?gAy2gDwk*e WY2_kvJU|iXPzFy|KbLh*2~7Zn1y<1j literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/blocks/gas_duct_icon.png b/assets/hbm/textures/blocks/gas_duct_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..53b818e5a0e9fca42f1484b6bde37068d81d9108 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vfnuj)}d1;$U``A?1-`9oV1H-CcRt}-=4jd2HWoO^Mdr!0M{1g2- YCO7rcreFVdQ&MBb@02U)aD*ylh literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/blocks/gas_duct_solid.png b/assets/hbm/textures/blocks/gas_duct_solid.png new file mode 100644 index 0000000000000000000000000000000000000000..37c1b23971acfcb90adbdd0eb036d4452c4a3c3d GIT binary patch literal 335 zcmV-V0kHmwP)TrR428cLp^yl%;0_$1U2vBkg(I-#7QIZ>E-P^eq#~4` z4c$zT34yn9$}D5kfdfk9cwc=N#U9%Ccmh=c}-zf;cRt6iw66wk=v~j4>#s zva2rSexp3CHN!BRhA3lV&g1WkEp?`YO4k_ezDBwG+~bi6vIxL4_erG9`DFY)#JeYZ hhrNYVW{Rut{0~z8mC&%s!B_wQ002ovPDHLkV1g6|lK=n! literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/blocks/oil_duct_alt.png b/assets/hbm/textures/blocks/oil_duct_alt.png new file mode 100644 index 0000000000000000000000000000000000000000..ebbb4dbcda54909389f6723001e06437899de69e GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzmSQK*5Dp-y;YjHK^1D4<977^n z-=5pZdssoF<>CGf0*e-HUH(CCUf0T?)aH~pVudzaWIpfy>Czu=9vrfQGjp7q=fH|$&#p4({8S7ll{CEkO-t}W7QW_SW?k7338 zjn_8u9p4w7{ao}$!}Us`=m%ypzu(Q79p>Ny2LIl1ds!Ozn72H;0dy9Fr>mdKI;Vst E0G%vP`~Uy| literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/blocks/oil_duct_icon_alt.png b/assets/hbm/textures/blocks/oil_duct_icon_alt.png new file mode 100644 index 0000000000000000000000000000000000000000..ac329f5a5a1a02d706c7616e83de55454ad6d011 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfG6Io=>!{MWcwS+?~G(0&F_S3j3^P6rOe=x46n_zR`!dLnw&8 z=sZ1ZydEJ71>kYN6Jta~0I=5Loa5(qI|?(*d~vN9Bf~HtB3NrlDbe@+X`I6YisBg% z5mHJl%fdL0)OC%BP&RuL&{)@%ZQC%$9HU&}_9*uLN?^^D@yn zN7r?4CI&c}=z;1NcAeDEH7jDdK&NNSgsCVjSG;TjQ0tEzYvNT-^A8iht?V~c|NWi+ Y0E?ez26T&izyJUM07*qoM6N<$g8!n4Z~y=R literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/gui/gui_gasFlare.png b/assets/hbm/textures/gui/gui_gasFlare.png index 1733380a01f424d6281cbae8d5c0374036a30d67..9d5e9d2e6a8507dbbbaaea5eecfe77dadfeffef5 100644 GIT binary patch delta 1669 zcmYLHdsLEn8vXzUa!jqH$P`g?ohDPxPGd05Ao6*WiQCqfg#{2PthUiB%g|oS$ zera|L+0riRYPH_-f?(!R){~c9wY-snp&%fWifHI!&7OV#`JMOt-sinM&y#Dxw#YvW zw)^{dg=E}QPI@Iw^k9(h<-b9CDe|hzrLcF=MK;@|KrkXnT&^QEv>n;pRMT72^iU@l(=gUZMKg5)3mx?%*&90TAbT-}^xYnkXkv1*p|Ltt z&^Eu0S@7Rij=$*_4Q3LYbe8y*KU)CO;tF`lF6v$>s5*{~+Ky*fs&|Mp z2WYGV9Sr%C%8}g+LB&UM8J8 zUh=KbK8iEv6unm5NE zc{L*rOb3?KIX1`trnLYNp$x~(>FN9NZl%8C*5|eM?*%R9c806$0OYf!6ads}wMw~M z9*YjAQV)%7oNci+R++PKgTvQ>lL@tqx8_&tvaE(aliv*uce)rAySipOJ+X@IMr38QIp?_$l#_ULhPT@={Gnq-yv=0?f=oWEmBhdKnKC9-A%w z)%&$R9mH|r_f|CGx$oQ90G2G>m&LjJ=sCu{_GK+)hd{O+W6Sa?LlhaZn%@c_fX zd2=Rbx{3{*#sP!F-l{3u3;DFP&>8Och2>ewn!A4jVk=8t!uhSaiyi}?cksTP|5p=& z)0X>0MNdtUPd@jD8W8r!R*A+~npW)X`&rQ6hdaUKdoK-Y+_UDh3$puwSm1vK#?H(B zFUQ%v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_AkJ3H2PaJ*swuwDf>9piNBl?qLl?k&hZ4xd$QR;3g`*-FK?H zd??|s*-TYC%+C_}Vk~4G2V2g3@t~nIE2RQmHqP@`D35)LwG|+#O7T_j{8s-vre6MH zS+PVgCXs5{!h`Oi5S98(dhFM&LuU4r35?1kxQR0m5BFHAdFrxy z{smg|-#JEa6*~O+R#D^6#ir|j3b^>UfG3=gfWcQXXO9p%S+;)%GE}ORvr@i&G}vhi zH!fakxU2*Y)SK+aC1nLS`R`bJ05UIoy|3dB!AY!3AS5n6c9s-1x?2f|{3simmUm)R zf7HPM9`d)m=P$!W?F;>9;AkThCp$5bmKI@IhyI(G)msB3ml!vYg&l**D7Ywr z+ibl5y6M_5pWT4=%4b{z)jLy}dUnp)IDp!@Q1729gg2!r#S1NJ4W$oBX2Snt$^WXp zy`KR5vxK^Qv`|+S1&AtbSYYQ_Qy-6$EaanNj>2n$R^VWHbHmf+m-t>`DEH%gH+=>L zo@=Kf{`~>|Rn7l!%0D*+uuW*amX1Emc@*xG*`LrDkLzgot$Tx7DsSzp&iQ{e+5e{T z2l9i@c>~nd_}9Bh$gA={kY}a;yXmf3!prunw_I)1YAUXOsy`^4N_|U^+*_CtY4acX z?cacKwRQPzG&A4Q{pu^I0QO>jE7*TUfwSzmK~c0mQ7I<>$8dFEs4o{6?>&%TLfQT{ z7l$t6w*dXeR`}X8huCGA$Eb?8(MCww|KFS0u`L6K;%EEIYj)wG-^Re)#LBqX$R*;R DRo+_? diff --git a/assets/hbm/textures/items/book.png b/assets/hbm/textures/items/book_secret.png similarity index 100% rename from assets/hbm/textures/items/book.png rename to assets/hbm/textures/items/book_secret.png diff --git a/assets/hbm/textures/items/gas_empty.png b/assets/hbm/textures/items/gas_empty.png index 2b97c224a9bd36fa67accc7e11a69338b5f8823e..ddf92003184aa22afb90920bd803f4c179063017 100644 GIT binary patch delta 152 zcmV;J0B8Tq0mK22G=FMbpw{JY+#nE|gsa58@K85HGb9s)^P1 z--P7-M-br85D^m*OEa4WNGV-!Yppo{2qH2fiUxMPunQ96C%n)l%*au5`++HZHy87Um#*eL@~iB4O?sBPLP?ox&4?J2CX&pk~9Th z7z&(oYl7$XmlKS(4+Vvk(w<-`L5VMI?+Tb%dGBi-V}#x#i5bki@-`RwDm{D5=ei33 O0000e)n<-^iIb1O};zF)-MQ8N|%7_gTXL1fH&b JF6*2UngH^`5UKzG diff --git a/assets/hbm/textures/items/gasflame1.png b/assets/hbm/textures/items/gasflame1.png new file mode 100644 index 0000000000000000000000000000000000000000..9a18426b1a8f311ea045b69b0c462c9a4b8077af GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfUIEF|} zO-^uN`hULVZ@L4s&kH7lR*9}erWccX3>@7ihxWYKCE*)pm}Dw8_t*xe>CJ_|So9ef YT5lR3DSvOU0B8n-r>mdKI;Vst0MK(KsQ>@~ literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/gasflame3.png b/assets/hbm/textures/items/gasflame3.png new file mode 100644 index 0000000000000000000000000000000000000000..ad68225f29d76657378128a91f4629da0f48d2b6 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfvuxFg4@)b7S{OWC{an^L HB{Ts5fmj~( literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/gasflame4.png b/assets/hbm/textures/items/gasflame4.png new file mode 100644 index 0000000000000000000000000000000000000000..ae577e78925fe5e418ba00b81a743b17824fa9cd GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#Vfyl6%?P@cil)z4*}Q$iB}aIP2E literal 0 HcmV?d00001 diff --git a/assets/hbm/textures/items/gasflame8.png b/assets/hbm/textures/items/gasflame8.png new file mode 100644 index 0000000000000000000000000000000000000000..143ea1d1dc84c1b9a7a3d2456edb87fba07b7261 GIT binary patch literal 94 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#VfFVdQ&MBb@08&sED*ylh literal 0 HcmV?d00001 diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index 6d4e700da..82fde8c07 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -48,6 +48,7 @@ import com.hbm.blocks.generic.YellowBarrel; import com.hbm.blocks.machine.BlockCable; import com.hbm.blocks.machine.BlockConverterHeRf; import com.hbm.blocks.machine.BlockConverterRfHe; +import com.hbm.blocks.machine.BlockGasDuct; import com.hbm.blocks.machine.BlockHatch; import com.hbm.blocks.machine.BlockOilDuct; import com.hbm.blocks.machine.OilDuctSolid; @@ -65,6 +66,7 @@ import com.hbm.blocks.machine.FactoryCoreTitanium; import com.hbm.blocks.machine.FactoryHatch; import com.hbm.blocks.machine.FusionCore; import com.hbm.blocks.machine.FusionHatch; +import com.hbm.blocks.machine.GasDuctSolid; import com.hbm.blocks.machine.MachineBattery; import com.hbm.blocks.machine.MachineCMBFactory; import com.hbm.blocks.machine.MachineCentrifuge; @@ -341,6 +343,8 @@ public class ModBlocks { public static Block red_cable; public static Block oil_duct_solid; public static Block oil_duct; + public static Block gas_duct_solid; + public static Block gas_duct; public static Block bomb_multi_large; public static final int guiID_bomb_multi_large = 18; @@ -685,8 +689,10 @@ public class ModBlocks { red_wire_coated = new WireCoated(Material.iron).setBlockName("red_wire_coated").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_wire_coated"); red_cable = new BlockCable(Material.iron).setBlockName("red_cable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":red_cable_icon"); - oil_duct_solid = new OilDuctSolid(Material.iron).setBlockName("oil_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":oil_duct_solid"); - oil_duct = new BlockOilDuct(Material.iron).setBlockName("oil_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":oil_duct_icon"); + oil_duct_solid = new OilDuctSolid(Material.iron).setBlockName("oil_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":oil_duct_solid_alt"); + oil_duct = new BlockOilDuct(Material.iron).setBlockName("oil_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":oil_duct_icon_alt"); + gas_duct_solid = new GasDuctSolid(Material.iron).setBlockName("gas_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":gas_duct_solid"); + gas_duct = new BlockGasDuct(Material.iron).setBlockName("gas_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":gas_duct_icon"); factory_titanium_hull = new BlockGeneric(Material.iron).setBlockName("factory_titanium_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_titanium_hull"); factory_titanium_furnace = new FactoryHatch(Material.iron).setBlockName("factory_titanium_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.tabBlock).setBlockTextureName(RefStrings.MODID + ":factory_titanium_furnace"); @@ -984,6 +990,8 @@ public class ModBlocks { GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName()); GameRegistry.registerBlock(oil_duct, oil_duct.getUnlocalizedName()); GameRegistry.registerBlock(oil_duct_solid, oil_duct_solid.getUnlocalizedName()); + GameRegistry.registerBlock(gas_duct, gas_duct.getUnlocalizedName()); + GameRegistry.registerBlock(gas_duct_solid, gas_duct_solid.getUnlocalizedName()); GameRegistry.registerBlock(machine_battery, machine_battery.getUnlocalizedName()); GameRegistry.registerBlock(machine_converter_he_rf, machine_converter_he_rf.getUnlocalizedName()); GameRegistry.registerBlock(machine_converter_rf_he, machine_converter_rf_he.getUnlocalizedName()); diff --git a/com/hbm/blocks/machine/BlockCable.java b/com/hbm/blocks/machine/BlockCable.java index ff1f16aa7..4d8ce1977 100644 --- a/com/hbm/blocks/machine/BlockCable.java +++ b/com/hbm/blocks/machine/BlockCable.java @@ -1,6 +1,7 @@ package com.hbm.blocks.machine; import com.hbm.tileentity.TileEntityCable; +import com.hbm.tileentity.TileEntityOilDuct; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -19,6 +20,7 @@ public class BlockCable extends BlockContainer { } public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + if(world.getTileEntity(x, y, z) instanceof TileEntityCable) { TileEntityCable cable = (TileEntityCable)world.getTileEntity(x, y, z); if(cable != null) @@ -33,10 +35,12 @@ public class BlockCable extends BlockContainer { this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); } + } return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); } public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { + if(world.getTileEntity(x, y, z) instanceof TileEntityCable) { TileEntityCable cable = (TileEntityCable)world.getTileEntity(x, y, z); if(cable != null) @@ -51,6 +55,7 @@ public class BlockCable extends BlockContainer { this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); } + } } @Override diff --git a/com/hbm/blocks/machine/BlockGasDuct.java b/com/hbm/blocks/machine/BlockGasDuct.java new file mode 100644 index 000000000..86a2e962b --- /dev/null +++ b/com/hbm/blocks/machine/BlockGasDuct.java @@ -0,0 +1,80 @@ +package com.hbm.blocks.machine; + +import com.hbm.tileentity.TileEntityGasDuct; +import com.hbm.tileentity.TileEntityOilDuct; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class BlockGasDuct extends BlockContainer { + + public BlockGasDuct(Material p_i45386_1_) { + super(p_i45386_1_); + float p = 1F/16F; + this.setBlockBounds(11 * p / 2, 11 * p / 2, 11 * p / 2, 1 - 11 * p / 2, 1 - 11 * p / 2, 1 - 11 * p / 2); + this.useNeighborBrightness = true; + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + if(world.getTileEntity(x, y, z) instanceof TileEntityGasDuct) { + TileEntityGasDuct cable = (TileEntityGasDuct)world.getTileEntity(x, y, z); + + if(cable != null) + { + float p = 1F/16F; + float minX = 11 * p / 2 - (cable.connections[5] != null ? (11 * p / 2) : 0); + float minY = 11 * p / 2 - (cable.connections[1] != null ? (11 * p / 2) : 0); + float minZ = 11 * p / 2 - (cable.connections[2] != null ? (11 * p / 2) : 0); + float maxX = 1 - 11 * p / 2 + (cable.connections[3] != null ? (11 * p / 2) : 0); + float maxY = 1 - 11 * p / 2 + (cable.connections[0] != null ? (11 * p / 2) : 0); + float maxZ = 1 - 11 * p / 2 + (cable.connections[4] != null ? (11 * p / 2) : 0); + + this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); + } + } + return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); + } + + public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { + if(world.getTileEntity(x, y, z) instanceof TileEntityGasDuct) { + TileEntityGasDuct cable = (TileEntityGasDuct)world.getTileEntity(x, y, z); + + if(cable != null) + { + float p = 1F/16F; + float minX = 11 * p / 2 - (cable.connections[5] != null ? (11 * p / 2) : 0); + float minY = 11 * p / 2 - (cable.connections[1] != null ? (11 * p / 2) : 0); + float minZ = 11 * p / 2 - (cable.connections[2] != null ? (11 * p / 2) : 0); + float maxX = 1 - 11 * p / 2 + (cable.connections[3] != null ? (11 * p / 2) : 0); + float maxY = 1 - 11 * p / 2 + (cable.connections[0] != null ? (11 * p / 2) : 0); + float maxZ = 1 - 11 * p / 2 + (cable.connections[4] != null ? (11 * p / 2) : 0); + + this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); + } + } + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityGasDuct(); + } + + @Override + public int getRenderType(){ + return -1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } +} diff --git a/com/hbm/blocks/machine/BlockOilDuct.java b/com/hbm/blocks/machine/BlockOilDuct.java index e71d2b3eb..10e78dc90 100644 --- a/com/hbm/blocks/machine/BlockOilDuct.java +++ b/com/hbm/blocks/machine/BlockOilDuct.java @@ -19,6 +19,7 @@ public class BlockOilDuct extends BlockContainer { } public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + if(world.getTileEntity(x, y, z) instanceof TileEntityOilDuct) { TileEntityOilDuct cable = (TileEntityOilDuct)world.getTileEntity(x, y, z); if(cable != null) @@ -33,10 +34,12 @@ public class BlockOilDuct extends BlockContainer { this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); } + } return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); } public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { + if(world.getTileEntity(x, y, z) instanceof TileEntityOilDuct) { TileEntityOilDuct cable = (TileEntityOilDuct)world.getTileEntity(x, y, z); if(cable != null) @@ -51,6 +54,7 @@ public class BlockOilDuct extends BlockContainer { this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ); } + } } @Override diff --git a/com/hbm/blocks/machine/GasDuctSolid.java b/com/hbm/blocks/machine/GasDuctSolid.java new file mode 100644 index 000000000..cd87ecc85 --- /dev/null +++ b/com/hbm/blocks/machine/GasDuctSolid.java @@ -0,0 +1,26 @@ +package com.hbm.blocks.machine; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil; +import com.hbm.tileentity.TileEntityGasDuctSolid; +import com.hbm.tileentity.TileEntityOilDuctSolid; +import com.hbm.tileentity.TileEntityWireCoated; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class GasDuctSolid extends BlockContainer { + + public GasDuctSolid(Material p_i45386_1_) { + super(p_i45386_1_); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntityGasDuctSolid(); + } +} diff --git a/com/hbm/calc/UnionOfTileEntitiesAndBooleansForGas.java b/com/hbm/calc/UnionOfTileEntitiesAndBooleansForGas.java new file mode 100644 index 000000000..51a757afa --- /dev/null +++ b/com/hbm/calc/UnionOfTileEntitiesAndBooleansForGas.java @@ -0,0 +1,17 @@ +package com.hbm.calc; + +import com.hbm.interfaces.IGasSource; +import com.hbm.interfaces.IOilSource; + +public class UnionOfTileEntitiesAndBooleansForGas { + + public UnionOfTileEntitiesAndBooleansForGas(IGasSource tileentity, boolean bool) + { + source = tileentity; + ticked = bool; + } + + public IGasSource source; + public boolean ticked = false; + +} diff --git a/com/hbm/entity/particle/EntityGasFlameFX.java b/com/hbm/entity/particle/EntityGasFlameFX.java new file mode 100644 index 000000000..40d552e0c --- /dev/null +++ b/com/hbm/entity/particle/EntityGasFlameFX.java @@ -0,0 +1,86 @@ +package com.hbm.entity.particle; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.world.World; + +public class EntityGasFlameFX extends EntityModFX +{ + float smokeParticleScale; + public int particleAge; + public int maxAge; + private static final String __OBFID = "CL_00000924"; + + public EntityGasFlameFX(World world) { + super(world, 0, 0, 0); + } + + public EntityGasFlameFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_) + { + this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F); + } + + public EntityGasFlameFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_) + { + super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D); + this.motionX *= 0.10000000149011612D; + this.motionY *= 0.10000000149011612D; + this.motionZ *= 0.10000000149011612D; + this.motionX += p_i1226_8_; + this.motionY += p_i1226_10_; + this.motionZ += p_i1226_12_; + this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D); + this.particleScale *= 0.75F; + this.particleScale *= p_i1226_14_; + this.smokeParticleScale = this.particleScale; + //this.particleMaxAge = (int)(8.0D / (Math.random() * 0.8D + 0.2D)); + //this.particleMaxAge = (int)((float)this.particleMaxAge * p_i1226_14_); + this.noClip = false; + } + + /** + * Called to update the entity's position/logic. + */ + + @Override + public void onUpdate() + { + this.prevPosX = this.posX; + this.prevPosY = this.posY; + this.prevPosZ = this.posZ; + + if(maxAge < 30) + { + maxAge = rand.nextInt(13) + 30; + } + + this.particleAge++; + + if (this.particleAge >= maxAge) + { + this.setDead(); + } + + this.motionX *= 0.7599999785423279D; + //this.motionY *= 0.7599999785423279D; + this.motionY += 0.0075D; + this.motionZ *= 0.7599999785423279D; + + if (this.onGround) + { + this.motionX *= 0.699999988079071D; + this.motionZ *= 0.699999988079071D; + } + + this.posX += this.motionX; + this.posY += this.motionY; + this.posZ += this.motionZ; + } + + @Override + @SideOnly(Side.CLIENT) + public int getBrightnessForRender(float p_70070_1_) + { + return 15728880; + } +} diff --git a/com/hbm/explosion/ExplosionThermo.java b/com/hbm/explosion/ExplosionThermo.java index 191d1b3ea..4ec2e799e 100644 --- a/com/hbm/explosion/ExplosionThermo.java +++ b/com/hbm/explosion/ExplosionThermo.java @@ -4,11 +4,13 @@ import java.util.HashSet; import java.util.List; import com.hbm.blocks.ModBlocks; +import com.hbm.lib.Library; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.passive.EntityOcelot; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; @@ -499,8 +501,10 @@ public class ExplosionThermo { if (d9 < wat && !(entity instanceof EntityOcelot) && entity instanceof EntityLivingBase) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 2 * 60 * 20, 4)); - entity.setFire(10); + if(!(entity instanceof EntityPlayer && Library.checkForAsbestos((EntityPlayer) entity))) { + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.getId(), 15 * 20, 4)); + entity.setFire(10); + } } } } diff --git a/com/hbm/interfaces/IGasAcceptor.java b/com/hbm/interfaces/IGasAcceptor.java new file mode 100644 index 000000000..4cf182acd --- /dev/null +++ b/com/hbm/interfaces/IGasAcceptor.java @@ -0,0 +1,11 @@ +package com.hbm.interfaces; + +public interface IGasAcceptor { + + void setGasFill(int i); + + int getGasFill(); + + int getMaxGasFill(); + +} diff --git a/com/hbm/interfaces/IDuct.java b/com/hbm/interfaces/IGasDuct.java similarity index 53% rename from com/hbm/interfaces/IDuct.java rename to com/hbm/interfaces/IGasDuct.java index bd4196947..13a0452b9 100644 --- a/com/hbm/interfaces/IDuct.java +++ b/com/hbm/interfaces/IGasDuct.java @@ -1,5 +1,5 @@ package com.hbm.interfaces; -public interface IDuct { +public interface IGasDuct { } diff --git a/com/hbm/interfaces/IGasSource.java b/com/hbm/interfaces/IGasSource.java new file mode 100644 index 000000000..87e3a5e2d --- /dev/null +++ b/com/hbm/interfaces/IGasSource.java @@ -0,0 +1,17 @@ +package com.hbm.interfaces; + +import java.util.List; + +public interface IGasSource { + + void fillGasInit(); + + void fillGas(int x, int y, int z, boolean newTact); + + boolean getTact(); + int getGasFill(); + void setGasFill(int i); + List getGasList(); + void clearGasList(); + +} diff --git a/com/hbm/interfaces/IOilDuct.java b/com/hbm/interfaces/IOilDuct.java new file mode 100644 index 000000000..9db089044 --- /dev/null +++ b/com/hbm/interfaces/IOilDuct.java @@ -0,0 +1,5 @@ +package com.hbm.interfaces; + +public interface IOilDuct { + +} diff --git a/com/hbm/items/ModItems.java b/com/hbm/items/ModItems.java index 189358d80..39b77ce56 100644 --- a/com/hbm/items/ModItems.java +++ b/com/hbm/items/ModItems.java @@ -19,6 +19,7 @@ import com.hbm.items.food.ItemPill; import com.hbm.items.food.ItemSchnitzelVegan; import com.hbm.items.food.ItemTemFlakes; import com.hbm.items.food.ItemWaffle; +import com.hbm.items.gear.ArmorAsbestos; import com.hbm.items.gear.ArmorAustralium; import com.hbm.items.gear.ArmorEuphemium; import com.hbm.items.gear.ArmorHazmat; @@ -775,6 +776,10 @@ public class ModItems { public static Item paa_plate; public static Item paa_legs; public static Item paa_boots; + public static Item asbestos_helmet; + public static Item asbestos_plate; + public static Item asbestos_legs; + public static Item asbestos_boots; public static Item australium_iii; public static Item australium_iv; @@ -918,6 +923,7 @@ public class ModItems { public static Item polaroid; public static Item letter; + public static Item book_secret; public static Item smoke1; public static Item smoke2; @@ -959,6 +965,14 @@ public class ModItems { public static Item gas6; public static Item gas7; public static Item gas8; + public static Item gasflame1; + public static Item gasflame2; + public static Item gasflame3; + public static Item gasflame4; + public static Item gasflame5; + public static Item gasflame6; + public static Item gasflame7; + public static Item gasflame8; public static Item energy_ball; public static Item discharge; public static Item empblast; @@ -1686,6 +1700,10 @@ public class ModItems { paa_plate = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 1).setUnlocalizedName("paa_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_plate"); paa_legs = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 2).setUnlocalizedName("paa_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_legs"); paa_boots = new ModArmor(MainRegistry.enumArmorMaterialPaa, 7, 3).setUnlocalizedName("paa_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":paa_boots"); + asbestos_helmet = new ArmorAsbestos(MainRegistry.enumArmorMaterialSteel, 7, 0).setUnlocalizedName("asbestos_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":asbestos_helmet"); + asbestos_plate = new ArmorAsbestos(MainRegistry.enumArmorMaterialSteel, 7, 1).setUnlocalizedName("asbestos_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":asbestos_plate"); + asbestos_legs = new ArmorAsbestos(MainRegistry.enumArmorMaterialSteel, 7, 2).setUnlocalizedName("asbestos_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":asbestos_legs"); + asbestos_boots = new ArmorAsbestos(MainRegistry.enumArmorMaterialSteel, 7, 3).setUnlocalizedName("asbestos_boots").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":asbestos_boots"); schrabidium_sword = new SwordSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_sword").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_sword"); schrabidium_pickaxe = new PickaxeSchrabidium(MainRegistry.enumToolMaterialSchrabidium).setUnlocalizedName("schrabidium_pickaxe").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":schrabidium_pickaxe"); @@ -1779,6 +1797,7 @@ public class ModItems { polaroid = new ItemPolaroid().setUnlocalizedName("polaroid").setMaxStackSize(1).setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":polaroid_" + MainRegistry.polaroidID); letter = new ItemStarterKit().setUnlocalizedName("letter").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":letter"); + book_secret = new ItemCustomLore().setUnlocalizedName("book_secret").setCreativeTab(MainRegistry.polaroidID == 11 ? MainRegistry.tabNuke : null).setTextureName(RefStrings.MODID + ":book_secret"); smoke1 = new Item().setUnlocalizedName("smoke1").setTextureName(RefStrings.MODID + ":smoke1"); smoke2 = new Item().setUnlocalizedName("smoke2").setTextureName(RefStrings.MODID + ":smoke2"); @@ -1820,6 +1839,14 @@ public class ModItems { gas6 = new Item().setUnlocalizedName("gas6").setTextureName(RefStrings.MODID + ":gas6"); gas7 = new Item().setUnlocalizedName("gas7").setTextureName(RefStrings.MODID + ":gas7"); gas8 = new Item().setUnlocalizedName("gas8").setTextureName(RefStrings.MODID + ":gas8"); + gasflame1 = new Item().setUnlocalizedName("gasflame1").setTextureName(RefStrings.MODID + ":gasflame1"); + gasflame2 = new Item().setUnlocalizedName("gasflame2").setTextureName(RefStrings.MODID + ":gasflame2"); + gasflame3 = new Item().setUnlocalizedName("gasflame3").setTextureName(RefStrings.MODID + ":gasflame3"); + gasflame4 = new Item().setUnlocalizedName("gasflame4").setTextureName(RefStrings.MODID + ":gasflame4"); + gasflame5 = new Item().setUnlocalizedName("gasflame5").setTextureName(RefStrings.MODID + ":gasflame5"); + gasflame6 = new Item().setUnlocalizedName("gasflame6").setTextureName(RefStrings.MODID + ":gasflame6"); + gasflame7 = new Item().setUnlocalizedName("gasflame7").setTextureName(RefStrings.MODID + ":gasflame7"); + gasflame8 = new Item().setUnlocalizedName("gasflame8").setTextureName(RefStrings.MODID + ":gasflame8"); energy_ball = new Item().setUnlocalizedName("energy_ball").setTextureName(RefStrings.MODID + ":energy_ball"); discharge = new Item().setUnlocalizedName("discharge").setTextureName(RefStrings.MODID + ":discharge"); empblast = new Item().setUnlocalizedName("empblast").setTextureName(RefStrings.MODID + ":empblast"); @@ -2184,9 +2211,9 @@ public class ModItems { //Canisters GameRegistry.registerItem(canister_empty, canister_empty.getUnlocalizedName()); + GameRegistry.registerItem(canister_oil, canister_oil.getUnlocalizedName()); GameRegistry.registerItem(canister_smear, canister_smear.getUnlocalizedName()); GameRegistry.registerItem(canister_canola, canister_canola.getUnlocalizedName()); - GameRegistry.registerItem(canister_oil, canister_oil.getUnlocalizedName()); GameRegistry.registerItem(canister_fuel, canister_fuel.getUnlocalizedName()); GameRegistry.registerItem(canister_kerosene, canister_kerosene.getUnlocalizedName()); GameRegistry.registerItem(canister_napalm, canister_napalm.getUnlocalizedName()); @@ -2668,6 +2695,10 @@ public class ModItems { GameRegistry.registerItem(paa_plate, paa_plate.getUnlocalizedName()); GameRegistry.registerItem(paa_legs, paa_legs.getUnlocalizedName()); GameRegistry.registerItem(paa_boots, paa_boots.getUnlocalizedName()); + GameRegistry.registerItem(asbestos_helmet, asbestos_helmet.getUnlocalizedName()); + GameRegistry.registerItem(asbestos_plate, asbestos_plate.getUnlocalizedName()); + GameRegistry.registerItem(asbestos_legs, asbestos_legs.getUnlocalizedName()); + GameRegistry.registerItem(asbestos_boots, asbestos_boots.getUnlocalizedName()); GameRegistry.registerItem(schrabidium_helmet, schrabidium_helmet.getUnlocalizedName()); GameRegistry.registerItem(schrabidium_plate, schrabidium_plate.getUnlocalizedName()); GameRegistry.registerItem(schrabidium_legs, schrabidium_legs.getUnlocalizedName()); @@ -2697,6 +2728,7 @@ public class ModItems { GameRegistry.registerItem(remote, remote.getUnlocalizedName()); GameRegistry.registerItem(euphemium_stopper, euphemium_stopper.getUnlocalizedName()); GameRegistry.registerItem(polaroid, polaroid.getUnlocalizedName()); + GameRegistry.registerItem(book_secret, book_secret.getUnlocalizedName()); //Kits GameRegistry.registerItem(nuke_starter_kit, nuke_starter_kit.getUnlocalizedName()); @@ -2768,6 +2800,14 @@ public class ModItems { GameRegistry.registerItem(gas6, gas6.getUnlocalizedName()); GameRegistry.registerItem(gas7, gas7.getUnlocalizedName()); GameRegistry.registerItem(gas8, gas8.getUnlocalizedName()); + GameRegistry.registerItem(gasflame1, gasflame1.getUnlocalizedName()); + GameRegistry.registerItem(gasflame2, gasflame2.getUnlocalizedName()); + GameRegistry.registerItem(gasflame3, gasflame3.getUnlocalizedName()); + GameRegistry.registerItem(gasflame4, gasflame4.getUnlocalizedName()); + GameRegistry.registerItem(gasflame5, gasflame5.getUnlocalizedName()); + GameRegistry.registerItem(gasflame6, gasflame6.getUnlocalizedName()); + GameRegistry.registerItem(gasflame7, gasflame7.getUnlocalizedName()); + GameRegistry.registerItem(gasflame8, gasflame8.getUnlocalizedName()); GameRegistry.registerItem(energy_ball, energy_ball.getUnlocalizedName()); GameRegistry.registerItem(discharge, discharge.getUnlocalizedName()); GameRegistry.registerItem(empblast, empblast.getUnlocalizedName()); diff --git a/com/hbm/items/gear/ArmorAsbestos.java b/com/hbm/items/gear/ArmorAsbestos.java new file mode 100644 index 000000000..d8fea6e4c --- /dev/null +++ b/com/hbm/items/gear/ArmorAsbestos.java @@ -0,0 +1,81 @@ +package com.hbm.items.gear; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; +import net.minecraftforge.common.ISpecialArmor; +import net.minecraftforge.common.ISpecialArmor.ArmorProperties; + +import com.hbm.items.ModItems; +import com.hbm.lib.RefStrings; + +public class ArmorAsbestos extends ItemArmor implements ISpecialArmor { + private String [] armourTypes = new String [] {"asbestos_helmet", "asbestos_plate", "asbestos_legs", "asbestos_boots"}; + + public ArmorAsbestos(ArmorMaterial armorMaterial, int renderIndex, int armorType) { + super(armorMaterial, renderIndex, armorType); + } + + @Override + public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) { + if(stack.getItem().equals(ModItems.asbestos_helmet) || stack.getItem().equals(ModItems.asbestos_plate) || stack.getItem().equals(ModItems.asbestos_boots)) { + return (RefStrings.MODID + ":textures/armor/asbestos_1.png"); + } + if(stack.getItem().equals(ModItems.asbestos_legs)) { + return (RefStrings.MODID + ":textures/armor/asbestos_2.png"); + } + + else return null; + } + + @Override + public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot) { + if(source.isFireDamage()) + { + return new ArmorProperties(1, 1, MathHelper.floor_double(999999999)); + } + return new ArmorProperties(0, 0, 0); + } + + @Override + public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { + if(slot == 0) + { + return 3; + } + if(slot == 1) + { + return 8; + } + if(slot == 2) + { + return 6; + } + if(slot == 3) + { + return 3; + } + return 0; + } + + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + stack.damageItem(damage * 1, entity); + + } + + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack armor) { + + player.extinguish(); + } + +} diff --git a/com/hbm/items/gear/ModArmor.java b/com/hbm/items/gear/ModArmor.java index 00112747b..43cc300ff 100644 --- a/com/hbm/items/gear/ModArmor.java +++ b/com/hbm/items/gear/ModArmor.java @@ -45,6 +45,12 @@ public class ModArmor extends ItemArmor { if(stack.getItem().equals(ModItems.paa_legs)) { return (RefStrings.MODID + ":textures/armor/paa_2.png"); } + if(stack.getItem().equals(ModItems.asbestos_helmet) || stack.getItem().equals(ModItems.asbestos_plate) || stack.getItem().equals(ModItems.asbestos_boots)) { + return (RefStrings.MODID + ":textures/armor/asbestos_1.png"); + } + if(stack.getItem().equals(ModItems.asbestos_legs)) { + return (RefStrings.MODID + ":textures/armor/asbestos_2.png"); + } else return null; } diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index 02a0b82f3..7aaace2cb 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -6,18 +6,24 @@ import java.util.UUID; import com.hbm.blocks.ModBlocks; import com.hbm.calc.UnionOfTileEntitiesAndBooleans; +import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas; import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil; import com.hbm.entity.mob.EntityHunterChopper; import com.hbm.entity.projectile.EntityChopperMine; import com.hbm.interfaces.IConductor; import com.hbm.interfaces.IConsumer; -import com.hbm.interfaces.IDuct; +import com.hbm.interfaces.IGasAcceptor; +import com.hbm.interfaces.IGasDuct; +import com.hbm.interfaces.IGasSource; +import com.hbm.interfaces.IOilDuct; import com.hbm.interfaces.IOilAcceptor; import com.hbm.interfaces.IOilSource; import com.hbm.interfaces.ISource; import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; import com.hbm.tileentity.TileEntityCable; +import com.hbm.tileentity.TileEntityGasDuct; +import com.hbm.tileentity.TileEntityGasDuctSolid; import com.hbm.tileentity.TileEntityLaunchPad; import com.hbm.tileentity.TileEntityMachineBattery; import com.hbm.tileentity.TileEntityMachineDeuterium; @@ -220,6 +226,16 @@ public class Library { return false; } + public static boolean checkForAsbestos(EntityPlayer player) { + + if(checkArmor(player, ModItems.asbestos_helmet, ModItems.asbestos_plate, ModItems.asbestos_legs, ModItems.asbestos_boots)) + { + return true; + } + + return false; + } + public static boolean checkForGasMask(EntityPlayer player) { if(checkArmorPiece(player, ModItems.hazmat_helmet, 3)) @@ -264,17 +280,18 @@ public class Library { world.getBlock(x, y, z) == ModBlocks.fwatz_hatch || world.getBlock(x, y, z) == ModBlocks.dummy_port_igenerator || world.getBlock(x, y, z) == ModBlocks.dummy_port_cyclotron || - world.getBlock(x, y, z) == ModBlocks.dummy_port_well) + world.getBlock(x, y, z) == ModBlocks.dummy_port_well || + world.getBlock(x, y, z) == ModBlocks.dummy_port_flare) { return true; } return false; } - public static boolean checkDuctConnectables(World world, int x, int y, int z) + public static boolean checkOilConnectables(World world, int x, int y, int z) { TileEntity tileentity = world.getTileEntity(x, y, z); - if((tileentity != null && tileentity instanceof IDuct) || + if((tileentity != null && tileentity instanceof IOilDuct) || world.getBlock(x, y, z) == ModBlocks.dummy_port_well || world.getBlock(x, y, z) == ModBlocks.machine_refinery) { @@ -283,6 +300,18 @@ public class Library { return false; } + public static boolean checkGasConnectables(World world, int x, int y, int z) + { + TileEntity tileentity = world.getTileEntity(x, y, z); + if((tileentity != null && tileentity instanceof IGasDuct) || + world.getBlock(x, y, z) == ModBlocks.dummy_port_well || + world.getBlock(x, y, z) == ModBlocks.dummy_port_flare) + { + return true; + } + return false; + } + public static boolean checkUnionList(List list, ISource that) { for(UnionOfTileEntitiesAndBooleans union : list) @@ -309,6 +338,19 @@ public class Library { return false; } + public static boolean checkGasUnionListForGas(List list, IGasSource that) { + + for(UnionOfTileEntitiesAndBooleansForGas union : list) + { + if(union.source == that) + { + return true; + } + } + + return false; + } + ////// ////// ////// ////// ////// //// ////// ////// ////// // // // // // // // // // // // //// ////// ///// // //// //// //// // // // // @@ -687,7 +729,7 @@ public class Library { Block block = worldObj.getBlock(x, y, z); TileEntity tileentity = worldObj.getTileEntity(x, y, z); - if(tileentity instanceof IDuct) + if(tileentity instanceof IOilDuct) { if(tileentity instanceof TileEntityOilDuct) { @@ -768,4 +810,107 @@ public class Library { that.clearList(); } } + + public static void transmitGas(int x, int y, int z, boolean newTact, IGasSource that, World worldObj) { + Block block = worldObj.getBlock(x, y, z); + TileEntity tileentity = worldObj.getTileEntity(x, y, z); + + if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x + 1, y, z) == ModBlocks.machine_flare) + { + tileentity = worldObj.getTileEntity(x + 1, y, z); + } + if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x - 1, y, z) == ModBlocks.machine_flare) + { + tileentity = worldObj.getTileEntity(x - 1, y, z); + } + if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x, y, z + 1) == ModBlocks.machine_flare) + { + tileentity = worldObj.getTileEntity(x, y, z + 1); + } + if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x, y, z - 1) == ModBlocks.machine_flare) + { + tileentity = worldObj.getTileEntity(x, y, z - 1); + } + + if(tileentity instanceof IGasDuct) + { + if(tileentity instanceof TileEntityGasDuct) + { + if(Library.checkGasUnionListForGas(((TileEntityGasDuct)tileentity).uoteab, that)) + { + for(int i = 0; i < ((TileEntityGasDuct)tileentity).uoteab.size(); i++) + { + if(((TileEntityGasDuct)tileentity).uoteab.get(i).source == that) + { + if(((TileEntityGasDuct)tileentity).uoteab.get(i).ticked != newTact) + { + ((TileEntityGasDuct)tileentity).uoteab.get(i).ticked = newTact; + that.fillGas(x, y + 1, z, that.getTact()); + that.fillGas(x, y - 1, z, that.getTact()); + that.fillGas(x - 1, y, z, that.getTact()); + that.fillGas(x + 1, y, z, that.getTact()); + that.fillGas(x, y, z - 1, that.getTact()); + that.fillGas(x, y, z + 1, that.getTact()); + } + } + } + } else { + ((TileEntityGasDuct)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForGas(that, newTact)); + } + } + if(tileentity instanceof TileEntityGasDuctSolid) + { + if(Library.checkGasUnionListForGas(((TileEntityGasDuctSolid)tileentity).uoteab, that)) + { + for(int i = 0; i < ((TileEntityGasDuctSolid)tileentity).uoteab.size(); i++) + { + if(((TileEntityGasDuctSolid)tileentity).uoteab.get(i).source == that) + { + if(((TileEntityGasDuctSolid)tileentity).uoteab.get(i).ticked != newTact) + { + ((TileEntityGasDuctSolid)tileentity).uoteab.get(i).ticked = newTact; + that.fillGas(x, y + 1, z, that.getTact()); + that.fillGas(x, y - 1, z, that.getTact()); + that.fillGas(x - 1, y, z, that.getTact()); + that.fillGas(x + 1, y, z, that.getTact()); + that.fillGas(x, y, z - 1, that.getTact()); + that.fillGas(x, y, z + 1, that.getTact()); + } + } + } + } else { + ((TileEntityGasDuctSolid)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForGas(that, newTact)); + } + } + } + + if(tileentity instanceof IGasAcceptor && newTact) + { + that.getGasList().add((IGasAcceptor)tileentity); + } + + if(!newTact) + { + int size = that.getGasList().size(); + if(size > 0) + { + int part = that.getGasFill() / size; + for(IGasAcceptor consume : that.getGasList()) + { + if(consume.getGasFill() < consume.getMaxGasFill()) + { + if(consume.getMaxGasFill() - consume.getGasFill() >= part) + { + that.setGasFill(that.getGasFill()-part); + consume.setGasFill(consume.getGasFill() + part); + } else { + that.setGasFill(that.getGasFill() - (consume.getMaxGasFill() - consume.getGasFill())); + consume.setGasFill(consume.getMaxGasFill()); + } + } + } + } + that.clearGasList(); + } + } } diff --git a/com/hbm/lib/RefStrings.java b/com/hbm/lib/RefStrings.java index eb845f99a..bee83fc28 100644 --- a/com/hbm/lib/RefStrings.java +++ b/com/hbm/lib/RefStrings.java @@ -3,7 +3,15 @@ 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.24"; + public static final String VERSION = "1.0.25 BETA (Astatine-Lyra-X01)"; + //HBM's Beta Naming Convention: + //V T (X-Y-Z) + //V -> next release version + //T -> build type + //X -> halogene (or noble gas if we're out of halogenes) + //Y -> some word that sounds cool + //Z -> build number + //Example: 1.0.25 BETA (Astatine-Lyra-X01) public static final String CLIENTSIDE = "com.hbm.main.ClientProxy"; public static final String SERVERSIDE = "com.hbm.main.ServerProxy"; } diff --git a/com/hbm/lib/SPCLStrings.java b/com/hbm/lib/SPCLStrings.java deleted file mode 100644 index 594c55a2f..000000000 --- a/com/hbm/lib/SPCLStrings.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.hbm.lib; - -public class SPCLStrings { - - //Cheeky easter egg - String stringStanley = "54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52 20 54 48 45 20 45 4e 44 20 49 53 20 4e 45 56 45 52"; - //Replace e998, universal task - String stringQuestion = "41 4d 20 4e 4f 54 20 4f 46 20 55 4e 44 45 52 53 54 41 4e 44 49 4e 47 20 48 4f 57 20 4d 41 4e 45 20 49 53 20 4f 46 20 57 41 56 49 4e 47"; - //Hash value for error reports - String stringError = "T1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVMT1VUT0ZGVUVM"; - //Hilarious name - String stringCumberbatch = "Bunsenburner Toodlesnoot"; - -} diff --git a/com/hbm/main/ClientProxy.java b/com/hbm/main/ClientProxy.java index 7625bc7f1..9c996b356 100644 --- a/com/hbm/main/ClientProxy.java +++ b/com/hbm/main/ClientProxy.java @@ -58,6 +58,7 @@ import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.entity.particle.EntityBSmokeFX; import com.hbm.entity.particle.EntityDSmokeFX; import com.hbm.entity.particle.EntityGasFX; +import com.hbm.entity.particle.EntityGasFlameFX; import com.hbm.entity.particle.EntityOilSpillFX; import com.hbm.entity.particle.EntitySSmokeFX; import com.hbm.entity.particle.EntitySmokeFX; @@ -84,6 +85,7 @@ import com.hbm.items.ModItems; import com.hbm.render.entity.BSmokeRenderer; import com.hbm.render.entity.DSmokeRenderer; import com.hbm.render.entity.ElectricityRenderer; +import com.hbm.render.entity.GasFlameRenderer; import com.hbm.render.entity.GasRenderer; import com.hbm.render.entity.ModEffectRenderer; import com.hbm.render.entity.RenderBaleflare; @@ -164,6 +166,7 @@ import com.hbm.render.tileentity.RenderCyclotron; import com.hbm.render.tileentity.RenderDecoBlock; import com.hbm.render.tileentity.RenderDecoBlockAlt; import com.hbm.render.tileentity.RenderDerrick; +import com.hbm.render.tileentity.RenderGasDuct; import com.hbm.render.tileentity.RenderGasFlare; import com.hbm.render.tileentity.RenderIGenerator; import com.hbm.render.tileentity.RenderLaunchPadTier1; @@ -202,6 +205,7 @@ import com.hbm.tileentity.TileEntityDecoPoleSatelliteReceiver; import com.hbm.tileentity.TileEntityDecoPoleTop; import com.hbm.tileentity.TileEntityDecoSteelPoles; import com.hbm.tileentity.TileEntityDecoTapeRecorder; +import com.hbm.tileentity.TileEntityGasDuct; import com.hbm.tileentity.TileEntityMachineIGenerator; import com.hbm.tileentity.TileEntityMachineOilWell; import com.hbm.tileentity.TileEntityLaunchPad; @@ -383,6 +387,7 @@ public class ClientProxy extends ServerProxy ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCable.class, new RenderCable()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOilDuct.class, new RenderOilDuct()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGasDuct.class, new RenderGasDuct()); RenderingRegistry.registerEntityRenderingHandler(EntityMissileGeneric.class, new RenderMissileGeneric()); RenderingRegistry.registerEntityRenderingHandler(EntityMissileAntiBallistic.class, new RenderMissileGeneric()); @@ -433,6 +438,7 @@ public class ClientProxy extends ServerProxy RenderingRegistry.registerEntityRenderingHandler(EntitySSmokeFX.class, new SSmokeRenderer(ModItems.nuclear_waste)); RenderingRegistry.registerEntityRenderingHandler(EntityOilSpillFX.class, new SpillRenderer(ModItems.nuclear_waste)); RenderingRegistry.registerEntityRenderingHandler(EntityGasFX.class, new GasRenderer(ModItems.nuclear_waste)); + RenderingRegistry.registerEntityRenderingHandler(EntityGasFlameFX.class, new GasFlameRenderer(ModItems.nuclear_waste)); RenderingRegistry.registerEntityRenderingHandler(EntityCombineBall.class, new RenderSnowball(ModItems.energy_ball)); RenderingRegistry.registerEntityRenderingHandler(EntityDischarge.class, new ElectricityRenderer(ModItems.discharge)); RenderingRegistry.registerEntityRenderingHandler(EntityEMPBlast.class, new RenderEMPBlast()); diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index ec6a0ec75..5787d50b5 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -74,9 +74,10 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_sas3, 1), new Object[] { ModItems.cell_empty, ModItems.powder_schrabidium, "dustSulfur", "dustSulfur" })); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.cell_sas3, 1), new Object[] { ModItems.cell_empty, ModItems.powder_schrabidium, "sulfur", "sulfur" })); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.canister_empty, 2), new Object[] { "S ", "AA", "AA", 'S', ModItems.plate_steel, 'A', "plateAluminum" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.canister_empty, 2), new Object[] { "S ", "AA", "AA", 'S', "plateSteel", 'A', "plateAluminum" })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_barrel), 1), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.canister_fuel, 'T', ModItems.tank_steel }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.yellow_barrel), 1), new Object[] { "DDD", "DTD", "DDD", 'D', ModItems.nuclear_waste, 'T', ModItems.tank_steel }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_empty, 2), new Object[] { "S ", "AA", "AA", 'A', "plateSteel", 'S', "plateCopper" })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_aluminium), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_aluminium }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_copper), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_copper }); @@ -401,7 +402,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.warhead_mirv, 1), new Object[] { "MMM", "MWM", "MMM", 'M', ModItems.warhead_mirvlet, 'W', ModItems.warhead_generic_large }); GameRegistry.addRecipe(new ItemStack(ModItems.warhead_thermo_endo, 1), new Object[] { " T ", "TBT", "TBT", 'T', ModItems.plate_titanium, 'B', Item.getItemFromBlock(ModBlocks.therm_endo) }); GameRegistry.addRecipe(new ItemStack(ModItems.warhead_thermo_exo, 1), new Object[] { " T ", "TBT", "TBT", 'T', ModItems.plate_titanium, 'B', Item.getItemFromBlock(ModBlocks.therm_exo) }); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuel_tank_small, 1), new Object[] { "PTP", "PTP", "PTP", 'P', "plateTitanium", 'T', Item.getItemFromBlock(ModBlocks.red_barrel) })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuel_tank_small, 1), new Object[] { "PTP", "PTP", "PTP", 'P', "plateTitanium", 'T', ModItems.canister_kerosene })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuel_tank_medium, 1), new Object[] { "PTP", "PTP", "PTP", 'P', "plateTitanium", 'T', ModItems.fuel_tank_small })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.fuel_tank_large, 1), new Object[] { "PTP", "PTP", "PTP", 'P', "plateTitanium", 'T', ModItems.fuel_tank_medium })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.thruster_small, 1), new Object[] { "AS ", "AH ", " L ", 'A', ModItems.wire_aluminium, 'S', "plateSteel", 'H', ModItems.hull_small_steel, 'L', ModItems.hull_small_steel })); @@ -455,6 +456,10 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_industrial_generator), 1), new Object[] { "PPP", "FGG", "WSS", 'P', ModItems.board_copper, 'F', ModItems.generator_front, 'G', ModItems.generator_steel, 'W', ModBlocks.red_wire_coated, 'S', ModItems.pedestal_steel }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_wire_coated), 16), new Object[] { "WRW", "RIR", "WRW", 'W', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_cable), 16), new Object[] { "WRW", "RIR", "WRW", 'W', "plateSteel", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.oil_duct_solid), 16), new Object[] { "SPS", "P P", "SPS", 'S', "ingotSteel", 'P', "plateIron" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.oil_duct), 16), new Object[] { "SIS", " ", "SIS", 'S', "plateSteel", 'I', "plateIron" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.gas_duct_solid), 16), new Object[] { "SPS", "P P", "SPS", 'S', "ingotSteel", 'P', "plateCopper" })); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.gas_duct), 16), new Object[] { "SIS", " ", "SIS", 'S', "plateSteel", 'I', "plateCopper" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_deuterium), 1), new Object[] { "TIT", "RFR", "CCC", 'T', ModItems.tank_steel, 'I', "ingotTitanium", 'R', ModItems.wire_red_copper, 'F', Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 'C', ModItems.coil_tungsten })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TST", "RIR", "TLT", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TLT", "RIR", "TST", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" })); @@ -469,6 +474,8 @@ public class CraftingManager { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 1), new Object[] { "UPU", "UWU", "UPU", 'P', "plateSteel", 'U', ModItems.rtg_unit, 'W', ModBlocks.red_wire_coated })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_cyclotron), 1), new Object[] { "PTP", "PCP", "WBW", 'P', ModItems.board_copper, 'T', ModItems.cyclotron_tower, 'C', ModBlocks.fusion_core, 'W', ModBlocks.red_wire_coated, 'B', ModBlocks.machine_battery }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_well), 1), new Object[] { "TPM", "GPG", "GDG", 'T', ModItems.tank_steel, 'P', ModItems.pipes_steel, 'M', ModItems.motor, 'G', ModBlocks.steel_scaffold, 'D', ModItems.drill_titanium }); + GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_flare), 1), new Object[] { "UHU", "GPG", "GTG", 'U', ModItems.thermo_element, 'H', ModItems.hull_small_steel, 'G', ModBlocks.steel_scaffold, 'P', ModItems.pipes_steel, 'T', ModItems.tank_steel }); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_refinery), 1), new Object[] { "PTP", "CTC", "WFW", 'P', "plateTitanium", 'T', ModItems.tank_steel, 'C', ModItems.coil_tungsten, 'W', ModBlocks.red_wire_coated, 'F', ModBlocks.machine_electric_furnace_off })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 1), new Object[] { "PIP", "I I", "PIP", 'P', "plateTitanium", 'I', "ingotTitanium" })); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_furnace), 1), new Object[] { "HMH", "MFM", "HMH", 'H', Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 'M', ModItems.motor, 'F', Item.getItemFromBlock(Blocks.furnace) }); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index bf044a5d2..38a997d87 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -82,6 +82,7 @@ import com.hbm.entity.mob.EntityNuclearCreeper; import com.hbm.entity.particle.EntityBSmokeFX; import com.hbm.entity.particle.EntityDSmokeFX; import com.hbm.entity.particle.EntityGasFX; +import com.hbm.entity.particle.EntityGasFlameFX; import com.hbm.entity.particle.EntityOilSpillFX; import com.hbm.entity.particle.EntitySSmokeFX; import com.hbm.entity.particle.EntitySmokeFX; @@ -128,6 +129,8 @@ import com.hbm.tileentity.TileEntityDiFurnace; import com.hbm.tileentity.TileEntityDummy; import com.hbm.tileentity.TileEntityFWatzCore; import com.hbm.tileentity.TileEntityFusionMultiblock; +import com.hbm.tileentity.TileEntityGasDuct; +import com.hbm.tileentity.TileEntityGasDuctSolid; import com.hbm.tileentity.TileEntityHatch; import com.hbm.tileentity.TileEntityMachineIGenerator; import com.hbm.tileentity.TileEntityMachineOilWell; @@ -392,6 +395,8 @@ public class MainRegistry GameRegistry.registerTileEntity(TileEntityMachineRefinery.class, "tileentity_refinery"); GameRegistry.registerTileEntity(TileEntityOilDuct.class, "tileentity_oil_duct"); GameRegistry.registerTileEntity(TileEntityOilDuctSolid.class, "tileentity_oil_duct_solid"); + GameRegistry.registerTileEntity(TileEntityGasDuct.class, "tileentity_gas_duct"); + GameRegistry.registerTileEntity(TileEntityGasDuctSolid.class, "tileentity_gas_duct_solid"); EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true); EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true); @@ -468,6 +473,7 @@ public class MainRegistry EntityRegistry.registerModEntity(EntityOilSpillFX.class, "entity_spill_fx", 72, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityOilSpill.class, "entity_oil_spill", 73, this, 1000, 1, true); EntityRegistry.registerModEntity(EntityGasFX.class, "entity_spill_fx", 74, this, 1000, 1, true); + EntityRegistry.registerModEntity(EntityGasFlameFX.class, "entity_gasflame_fx", 75, this, 1000, 1, true); EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00); EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72); diff --git a/com/hbm/main/NEIConfig.java b/com/hbm/main/NEIConfig.java index f956fa9a9..18879cf2d 100644 --- a/com/hbm/main/NEIConfig.java +++ b/com/hbm/main/NEIConfig.java @@ -58,6 +58,7 @@ public class NEIConfig implements IConfigureNEI { API.hideItem(new ItemStack(ModItems.watch)); API.hideItem(new ItemStack(ModItems.rod_quad_euphemium)); API.hideItem(new ItemStack(ModItems.rod_euphemium)); + API.hideItem(new ItemStack(ModItems.book_secret)); } @Override diff --git a/com/hbm/render/entity/GasFlameRenderer.java b/com/hbm/render/entity/GasFlameRenderer.java new file mode 100644 index 000000000..ed4a75a2f --- /dev/null +++ b/com/hbm/render/entity/GasFlameRenderer.java @@ -0,0 +1,125 @@ +package com.hbm.render.entity; + +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + +import com.hbm.entity.particle.EntityGasFX; +import com.hbm.entity.particle.EntityGasFlameFX; +import com.hbm.entity.particle.EntityOilSpillFX; +import com.hbm.items.ModItems; + +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; + +public class GasFlameRenderer extends Render { + private Item field_94151_a; + private int field_94150_f; + private static final String __OBFID = "CL_00001008"; + + public GasFlameRenderer(Item p_i1259_1_, int p_i1259_2_) { + this.field_94151_a = p_i1259_1_; + this.field_94150_f = p_i1259_2_; + } + + public GasFlameRenderer(Item p_i1260_1_) { + this(p_i1260_1_, 0); + } + + /** + * Actually renders the given argument. This is a synthetic bridge method, + * always casting down its argument and then handing it off to a worker + * function which does the actual work. In all probabilty, the class Render + * is generic (Render= fx.maxAge / 8 * 7) { + field_94151_a = ModItems.gasflame8; + } + + if (fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6) { + field_94151_a = ModItems.gasflame7; + } + + if (fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5) { + field_94151_a = ModItems.gasflame6; + } + + if (fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4) { + field_94151_a = ModItems.gasflame5; + } + + if (fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3) { + field_94151_a = ModItems.gasflame4; + } + + if (fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2) { + field_94151_a = ModItems.gasflame3; + } + + if (fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1) { + field_94151_a = ModItems.gasflame2; + } + + if (fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0) { + field_94151_a = ModItems.gasflame1; + } + + IIcon iicon = field_94151_a.getIconFromDamage(0); + + if (iicon != null) { + GL11.glPushMatrix(); + GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); + GL11.glScalef(0.5F, 0.5F, 0.5F); + GL11.glScalef(7.5F, 7.5F, 7.5F); + // + GL11.glScalef(0.35F, 0.35F, 0.35F); + // + this.bindEntityTexture(p_76986_1_); + Tessellator tessellator = Tessellator.instance; + + this.func_77026_a(tessellator, iicon); + GL11.glDisable(GL12.GL_RESCALE_NORMAL); + GL11.glPopMatrix(); + } + } + } + + /** + * Returns the location of an entity's texture. Doesn't seem to be called + * unless you call Render.bindEntityTexture. + */ + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { + return TextureMap.locationItemsTexture; + } + + private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) { + float f = p_77026_2_.getMinU(); + float f1 = p_77026_2_.getMaxU(); + float f2 = p_77026_2_.getMinV(); + float f3 = p_77026_2_.getMaxV(); + float f4 = 1.0F; + float f5 = 0.5F; + float f6 = 0.25F; + GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); + p_77026_1_.startDrawingQuads(); + p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); + p_77026_1_.addVertexWithUV((double) (0.0F - f5), (double) (0.0F - f6), 0.0D, (double) f, (double) f3); + p_77026_1_.addVertexWithUV((double) (f4 - f5), (double) (0.0F - f6), 0.0D, (double) f1, (double) f3); + p_77026_1_.addVertexWithUV((double) (f4 - f5), (double) (f4 - f6), 0.0D, (double) f1, (double) f2); + p_77026_1_.addVertexWithUV((double) (0.0F - f5), (double) (f4 - f6), 0.0D, (double) f, (double) f2); + p_77026_1_.draw(); + } +} diff --git a/com/hbm/render/tileentity/RenderGasDuct.java b/com/hbm/render/tileentity/RenderGasDuct.java new file mode 100644 index 000000000..f05f0e643 --- /dev/null +++ b/com/hbm/render/tileentity/RenderGasDuct.java @@ -0,0 +1,155 @@ +package com.hbm.render.tileentity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.TileEntityCable; +import com.hbm.tileentity.TileEntityGasDuct; +import com.hbm.tileentity.TileEntityOilDuct; + +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.util.ForgeDirection; + +public class RenderGasDuct extends TileEntitySpecialRenderer { + + public ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/blocks/gas_duct.png"); + float pixel = 1F/16F; + float textureP = 1F / 32F; + + @Override + public void renderTileEntityAt(TileEntity tileentity, double offsetX, double offsetY, double offsetZ, float f) { + GL11.glTranslated(offsetX, offsetY, offsetZ); + GL11.glDisable(GL11.GL_LIGHTING); + this.bindTexture(texture); + drawCore(tileentity); + TileEntityGasDuct cable = (TileEntityGasDuct) tileentity; + for(int i = 0; i < cable.connections.length; i++) + { + if(cable.connections[i] != null) + { + drawConnection(cable.connections[i]); + } + } + GL11.glTranslated(-offsetX, -offsetY, -offsetZ); + GL11.glEnable(GL11.GL_LIGHTING); + + } + + public void drawCore(TileEntity tileentity) { + Tessellator tesseract = Tessellator.instance; + tesseract.startDrawingQuads(); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 0 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP); + + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 0 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP); + + tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 5 * textureP); + + tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 5 * textureP); + + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP); + + tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 11 * pixel / 2, 0 * textureP, 0 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 11 * pixel / 2, 1 - 11 * pixel / 2, 0 * textureP, 5 * textureP); + tesseract.draw(); + } + + public void drawConnection(ForgeDirection direction) + { + Tessellator tesseract = Tessellator.instance; + tesseract.startDrawingQuads(); + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + if(direction.equals(ForgeDirection.UP)) + { + + } + if(direction.equals(ForgeDirection.DOWN)) + { + GL11.glRotatef(180, 1, 0, 0); + } + if(direction.equals(ForgeDirection.NORTH)) + { + GL11.glRotatef(270, 1, 0, 0); + } + if(direction.equals(ForgeDirection.SOUTH)) + { + GL11.glRotatef(90, 1, 0, 0); + } + if(direction.equals(ForgeDirection.EAST)) + { + GL11.glRotatef(270, 0, 0, 1); + } + if(direction.equals(ForgeDirection.WEST)) + { + GL11.glRotatef(90, 0, 0, 1); + } + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 5 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 0 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP); + + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 5 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 0 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP); + + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 5 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 0 * textureP); + tesseract.addVertexWithUV(1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 0 * textureP); + + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 1 - 11 * pixel / 2, 5 * textureP, 5 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1, 1 - 11 * pixel / 2, 10 * textureP, 5 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1, 11 * pixel / 2, 10 * textureP, 0 * textureP); + tesseract.addVertexWithUV(11 * pixel / 2, 1 - 11 * pixel / 2, 11 * pixel / 2, 5 * textureP, 0 * textureP); + tesseract.draw(); + + GL11.glTranslatef(0.5F, 0.5F, 0.5F); + if(direction.equals(ForgeDirection.UP)) + { + + } + if(direction.equals(ForgeDirection.DOWN)) + { + GL11.glRotatef(-180, 1, 0, 0); + } + if(direction.equals(ForgeDirection.NORTH)) + { + GL11.glRotatef(-270, 1, 0, 0); + } + if(direction.equals(ForgeDirection.SOUTH)) + { + GL11.glRotatef(-90, 1, 0, 0); + } + if(direction.equals(ForgeDirection.EAST)) + { + GL11.glRotatef(-270, 0, 0, 1); + } + if(direction.equals(ForgeDirection.WEST)) + { + GL11.glRotatef(-90, 0, 0, 1); + } + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + } +} diff --git a/com/hbm/render/tileentity/RenderOilDuct.java b/com/hbm/render/tileentity/RenderOilDuct.java index 34404b839..bd94b5ccf 100644 --- a/com/hbm/render/tileentity/RenderOilDuct.java +++ b/com/hbm/render/tileentity/RenderOilDuct.java @@ -14,7 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection; public class RenderOilDuct extends TileEntitySpecialRenderer { - public ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/blocks/oil_duct.png"); + public ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/blocks/oil_duct_alt.png"); float pixel = 1F/16F; float textureP = 1F / 32F; diff --git a/com/hbm/tileentity/TileEntityGasDuct.java b/com/hbm/tileentity/TileEntityGasDuct.java new file mode 100644 index 000000000..a78220d75 --- /dev/null +++ b/com/hbm/tileentity/TileEntityGasDuct.java @@ -0,0 +1,58 @@ +package com.hbm.tileentity; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas; +import com.hbm.interfaces.IConductor; +import com.hbm.interfaces.IGasDuct; +import com.hbm.interfaces.IOilDuct; +import com.hbm.interfaces.IOilAcceptor; +import com.hbm.lib.Library; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileEntityGasDuct extends TileEntity implements IGasDuct { + + public ForgeDirection[] connections = new ForgeDirection[6]; + + public List uoteab = new ArrayList(); + + public TileEntityGasDuct() { + + } + + public void updateEntity() { + this.updateConnections(); + } + + public void updateConnections() { + if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP; + else connections[0] = null; + + if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN; + else connections[1] = null; + + if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH; + else connections[2] = null; + + if(Library.checkGasConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST; + else connections[3] = null; + + if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH; + else connections[4] = null; + + if(Library.checkGasConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST; + else connections[5] = null; + } + + @Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() + { + return 65536.0D; + } +} diff --git a/com/hbm/tileentity/TileEntityGasDuctSolid.java b/com/hbm/tileentity/TileEntityGasDuctSolid.java new file mode 100644 index 000000000..0f078f8be --- /dev/null +++ b/com/hbm/tileentity/TileEntityGasDuctSolid.java @@ -0,0 +1,17 @@ +package com.hbm.tileentity; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas; +import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil; +import com.hbm.interfaces.IGasDuct; +import com.hbm.interfaces.IOilDuct; + +import net.minecraft.tileentity.TileEntity; + +public class TileEntityGasDuctSolid extends TileEntity implements IGasDuct { + + public List uoteab = new ArrayList(); + +} diff --git a/com/hbm/tileentity/TileEntityMachineGasFlare.java b/com/hbm/tileentity/TileEntityMachineGasFlare.java index 34ab88963..b9446b377 100644 --- a/com/hbm/tileentity/TileEntityMachineGasFlare.java +++ b/com/hbm/tileentity/TileEntityMachineGasFlare.java @@ -5,8 +5,12 @@ import java.util.List; import java.util.Random; import com.hbm.blocks.ModBlocks; +import com.hbm.entity.particle.EntityGasFX; +import com.hbm.entity.particle.EntityGasFlameFX; import com.hbm.explosion.ExplosionLarge; +import com.hbm.explosion.ExplosionThermo; import com.hbm.interfaces.IConsumer; +import com.hbm.interfaces.IGasAcceptor; import com.hbm.interfaces.IOilAcceptor; import com.hbm.interfaces.IOilSource; import com.hbm.interfaces.ISource; @@ -27,14 +31,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.oredict.OreDictionary; -public class TileEntityMachineGasFlare extends TileEntity implements ISidedInventory, ISource { +public class TileEntityMachineGasFlare extends TileEntity implements ISidedInventory, ISource, IGasAcceptor { private ItemStack slots[]; public int gas; public int power; public static final int maxPower = 100000; - public static final int maxGas = 640; + public static final int maxGas = 64 * 50; public int age = 0; public List list = new ArrayList(); @@ -223,6 +227,35 @@ public class TileEntityMachineGasFlare extends TileEntity implements ISidedInven ffgeuaInit(); if(!worldObj.isRemote) { + + if(slots[1] != null && slots[1].getItem() == ModItems.gas_full && gas + 50 <= maxGas) { + if(slots[2] == null) { + gas += 50; + slots[1].stackSize--; + if(slots[1].stackSize <= 0) + slots[1] = null; + slots[2] = new ItemStack(ModItems.gas_empty); + }else if(slots[2] != null && slots[2].getItem() == ModItems.gas_empty && slots[2].stackSize < slots[2].getMaxStackSize()) { + gas += 50; + slots[1].stackSize--; + if(slots[1].stackSize <= 0) + slots[1] = null; + slots[2].stackSize++; + } + } + + if(gas >= 0) { + gas--; + power += 5; + + worldObj.spawnEntityInWorld(new EntityGasFlameFX(worldObj, this.xCoord + 0.5F, this.yCoord + 11F, this.zCoord + 0.5F, 0.0, 0.0, 0.0)); + ExplosionThermo.setEntitiesOnFire(worldObj, this.xCoord, this.yCoord + 11, zCoord, 5); + + if(age % 5 == 0) + this.worldObj.playSoundEffect(this.xCoord, this.yCoord + 11, this.zCoord, "hbm:weapon.flamethrowerShoot", 1.5F, 1F); + } + + power = Library.chargeItemsFromTE(slots, 0, power, maxPower); } } @@ -281,4 +314,19 @@ public class TileEntityMachineGasFlare extends TileEntity implements ISidedInven public List getList() { return this.list; } + + @Override + public void setGasFill(int i) { + this.gas = i; + } + + @Override + public int getGasFill() { + return this.gas; + } + + @Override + public int getMaxGasFill() { + return this.maxGas; + } } diff --git a/com/hbm/tileentity/TileEntityMachineOilWell.java b/com/hbm/tileentity/TileEntityMachineOilWell.java index 221cae17b..2e398ad36 100644 --- a/com/hbm/tileentity/TileEntityMachineOilWell.java +++ b/com/hbm/tileentity/TileEntityMachineOilWell.java @@ -11,6 +11,8 @@ import com.hbm.entity.particle.EntityOilSpillFX; import com.hbm.explosion.ExplosionLarge; import com.hbm.handler.ShredderRecipeHandler; import com.hbm.interfaces.IConsumer; +import com.hbm.interfaces.IGasAcceptor; +import com.hbm.interfaces.IGasSource; import com.hbm.interfaces.IOilAcceptor; import com.hbm.interfaces.IOilSource; import com.hbm.inventory.MachineRecipes; @@ -33,7 +35,7 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.oredict.OreDictionary; -public class TileEntityMachineOilWell extends TileEntity implements ISidedInventory, IConsumer, IOilSource { +public class TileEntityMachineOilWell extends TileEntity implements ISidedInventory, IConsumer, IOilSource, IGasSource { private ItemStack slots[]; @@ -48,6 +50,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent public int age = 0; public int age2 = 0; public List aclist = new ArrayList(); + public List gaslist = new ArrayList(); private static final int[] slots_top = new int[] {1}; private static final int[] slots_bottom = new int[] {2, 0}; @@ -243,8 +246,10 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent age -= timer; if(age2 >= 20) age2 -= 20; - if(age2 == 9 || age2 == 19) + if(age2 == 9 || age2 == 19) { fillInit(); + fillGasInit(); + } if(!worldObj.isRemote) { @@ -307,6 +312,7 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent if(b == Blocks.air || b == Blocks.grass || b == Blocks.dirt || b == Blocks.stone || b == Blocks.sand || b == Blocks.sandstone || + b == Blocks.clay || b == Blocks.hardened_clay || b == Blocks.stained_hardened_clay || b == Blocks.gravel || isOre(b, worldObj.getBlockMetadata(xCoord, i, zCoord)) || b.isReplaceable(worldObj, xCoord, i, zCoord)) { worldObj.setBlock(xCoord, i, zCoord, ModBlocks.oil_pipe); @@ -485,6 +491,19 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent Library.transmitOil(x, y, z, newTact, this, worldObj); } + @Override + public void fillGasInit() { + fillGas(this.xCoord + 2, this.yCoord, this.zCoord, getTact()); + fillGas(this.xCoord - 2, this.yCoord, this.zCoord, getTact()); + fillGas(this.xCoord, this.yCoord, this.zCoord + 2, getTact()); + fillGas(this.xCoord, this.yCoord, this.zCoord - 2, getTact()); + } + + @Override + public void fillGas(int x, int y, int z, boolean newTact) { + Library.transmitGas(x, y, z, newTact, this, worldObj); + } + @Override public boolean getTact() { if (age2 >= 0 && age2 < 10) { @@ -514,4 +533,24 @@ public class TileEntityMachineOilWell extends TileEntity implements ISidedInvent this.aclist.clear(); } + @Override + public int getGasFill() { + return this.gas; + } + + @Override + public void setGasFill(int i) { + this.gas = i; + } + + @Override + public List getGasList() { + return this.gaslist; + } + + @Override + public void clearGasList() { + this.gaslist.clear(); + } + } diff --git a/com/hbm/tileentity/TileEntityOilDuct.java b/com/hbm/tileentity/TileEntityOilDuct.java index db5193fec..7e2b82e93 100644 --- a/com/hbm/tileentity/TileEntityOilDuct.java +++ b/com/hbm/tileentity/TileEntityOilDuct.java @@ -6,7 +6,7 @@ import java.util.List; import com.hbm.calc.UnionOfTileEntitiesAndBooleans; import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil; import com.hbm.interfaces.IConductor; -import com.hbm.interfaces.IDuct; +import com.hbm.interfaces.IOilDuct; import com.hbm.interfaces.IOilAcceptor; import com.hbm.lib.Library; @@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -public class TileEntityOilDuct extends TileEntity implements IDuct { +public class TileEntityOilDuct extends TileEntity implements IOilDuct { public ForgeDirection[] connections = new ForgeDirection[6]; @@ -30,22 +30,22 @@ public class TileEntityOilDuct extends TileEntity implements IDuct { } public void updateConnections() { - if(Library.checkDuctConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP; + if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP; else connections[0] = null; - if(Library.checkDuctConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN; + if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN; else connections[1] = null; - if(Library.checkDuctConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH; + if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH; else connections[2] = null; - if(Library.checkDuctConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST; + if(Library.checkOilConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST; else connections[3] = null; - if(Library.checkDuctConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH; + if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH; else connections[4] = null; - if(Library.checkDuctConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST; + if(Library.checkOilConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST; else connections[5] = null; } diff --git a/com/hbm/tileentity/TileEntityOilDuctSolid.java b/com/hbm/tileentity/TileEntityOilDuctSolid.java index 456723f88..17fd647a0 100644 --- a/com/hbm/tileentity/TileEntityOilDuctSolid.java +++ b/com/hbm/tileentity/TileEntityOilDuctSolid.java @@ -4,11 +4,11 @@ import java.util.ArrayList; import java.util.List; import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil; -import com.hbm.interfaces.IDuct; +import com.hbm.interfaces.IOilDuct; import net.minecraft.tileentity.TileEntity; -public class TileEntityOilDuctSolid extends TileEntity implements IDuct { +public class TileEntityOilDuctSolid extends TileEntity implements IOilDuct { public List uoteab = new ArrayList();