From 0d258b259475906a452aa1585e4a7355c8b4ee8a Mon Sep 17 00:00:00 2001 From: tmpillbox Date: Wed, 13 Nov 2013 22:42:53 -0600 Subject: [PATCH] RedstoneMachine? Never heard of it. Psst. Check TinkersMechworks; you won't be disappointed. --- resources/assets/tinker/lang/de_DE.lang | 3 - resources/assets/tinker/lang/en_US.lang | 3 - resources/assets/tinker/lang/it_IT.lang | 3 - resources/assets/tinker/lang/pl_PL.lang | 2 - resources/assets/tinker/lang/ru_RU.lang | 2 - resources/assets/tinker/lang/zh_CN.lang | 3 - .../blocks/machines/drawbridge_bottom.png | Bin 420 -> 0 bytes .../machines/drawbridge_bottom_face.png | Bin 528 -> 0 bytes .../blocks/machines/drawbridge_side.png | Bin 492 -> 0 bytes .../blocks/machines/drawbridge_side_face.png | Bin 566 -> 0 bytes .../blocks/machines/drawbridge_top.png | Bin 417 -> 0 bytes .../blocks/machines/drawbridge_top_face.png | Bin 551 -> 0 bytes .../blocks/machines/firestarter_bottom.png | Bin 450 -> 0 bytes .../blocks/machines/firestarter_side.png | Bin 598 -> 0 bytes .../blocks/machines/firestarter_top.png | Bin 715 -> 0 bytes .../assets/tinker/textures/gui/drawbridge.png | Bin 3682 -> 0 bytes .../textures/gui/drawbridgeAdvanced.png | Bin 2619 -> 0 bytes .../assets/tinker/textures/gui/slotButton.png | Bin 11665 -> 0 bytes .../textures/items/logic/lengthwire.png | Bin 374 -> 0 bytes .../tinker/textures/items/logic/spoolwire.png | Bin 357 -> 0 bytes src/tconstruct/blocks/FurnaceSlab.java | 2 - src/tconstruct/blocks/RedstoneMachine.java | 420 ------------ .../blocks/logic/AdvancedDrawbridgeLogic.java | 641 ------------------ .../blocks/logic/DrawbridgeLogic.java | 537 --------------- .../blocks/logic/FirestarterLogic.java | 197 ------ src/tconstruct/client/TProxyClient.java | 12 +- .../client/block/MachineRender.java | 102 --- .../client/gui/AdvDrawbridgeButton.java | 160 ----- .../client/gui/AdvDrawbridgeGui.java | 170 ----- .../client/gui/DrawbridgeButton.java | 49 -- src/tconstruct/client/gui/DrawbridgeGui.java | 114 ---- src/tconstruct/common/TContent.java | 24 - src/tconstruct/common/TProxyCommon.java | 4 +- .../AdvancedDrawbridgeContainer.java | 171 ----- .../inventory/DrawbridgeContainer.java | 80 --- src/tconstruct/inventory/DrawbridgeSlot.java | 47 -- .../items/blocks/RedstoneMachineItem.java | 75 -- src/tconstruct/util/config/PHConstruct.java | 18 +- .../util/network/TPacketHandler.java | 17 - .../util/player/FakePlayerLogic.java | 22 - 40 files changed, 13 insertions(+), 2865 deletions(-) delete mode 100644 resources/assets/tinker/textures/blocks/machines/drawbridge_bottom.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/drawbridge_bottom_face.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/drawbridge_side.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/drawbridge_side_face.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/drawbridge_top.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/drawbridge_top_face.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/firestarter_bottom.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/firestarter_side.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/firestarter_top.png delete mode 100644 resources/assets/tinker/textures/gui/drawbridge.png delete mode 100644 resources/assets/tinker/textures/gui/drawbridgeAdvanced.png delete mode 100644 resources/assets/tinker/textures/gui/slotButton.png delete mode 100644 resources/assets/tinker/textures/items/logic/lengthwire.png delete mode 100644 resources/assets/tinker/textures/items/logic/spoolwire.png delete mode 100644 src/tconstruct/blocks/RedstoneMachine.java delete mode 100644 src/tconstruct/blocks/logic/AdvancedDrawbridgeLogic.java delete mode 100644 src/tconstruct/blocks/logic/DrawbridgeLogic.java delete mode 100644 src/tconstruct/blocks/logic/FirestarterLogic.java delete mode 100644 src/tconstruct/client/block/MachineRender.java delete mode 100644 src/tconstruct/client/gui/AdvDrawbridgeButton.java delete mode 100644 src/tconstruct/client/gui/AdvDrawbridgeGui.java delete mode 100644 src/tconstruct/client/gui/DrawbridgeButton.java delete mode 100644 src/tconstruct/client/gui/DrawbridgeGui.java delete mode 100644 src/tconstruct/inventory/AdvancedDrawbridgeContainer.java delete mode 100644 src/tconstruct/inventory/DrawbridgeContainer.java delete mode 100644 src/tconstruct/inventory/DrawbridgeSlot.java delete mode 100644 src/tconstruct/items/blocks/RedstoneMachineItem.java delete mode 100644 src/tconstruct/util/player/FakePlayerLogic.java diff --git a/resources/assets/tinker/lang/de_DE.lang b/resources/assets/tinker/lang/de_DE.lang index 5cadd110..84198eb8 100644 --- a/resources/assets/tinker/lang/de_DE.lang +++ b/resources/assets/tinker/lang/de_DE.lang @@ -274,9 +274,6 @@ LavaTank.Tank.name=Versengter Tank LavaTank.Gague.name=Versengtes Glas LavaTank.Window.name=Versengtes Fenster -block.drawbridge.name=Zugbrücke -block.firestarter.name=Entzünder -block.advdrawbridge.name=Fortgeschrittene Zugbrücke tile.landmine.name=Landmine tile.trap.punji.name=Punji-Stab diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang index d806af6d..1d2e4dd6 100644 --- a/resources/assets/tinker/lang/en_US.lang +++ b/resources/assets/tinker/lang/en_US.lang @@ -274,9 +274,6 @@ LavaTank.Tank.name=Seared Tank LavaTank.Gague.name=Seared Glass LavaTank.Window.name=Seared Window -block.drawbridge.name=Drawbridge -block.firestarter.name=Igniter -block.advdrawbridge.name=Advanced Drawbridge tile.landmine.name=Landmine tile.trap.punji.name=Punji Stick diff --git a/resources/assets/tinker/lang/it_IT.lang b/resources/assets/tinker/lang/it_IT.lang index 2a52f19d..969dec07 100644 --- a/resources/assets/tinker/lang/it_IT.lang +++ b/resources/assets/tinker/lang/it_IT.lang @@ -274,9 +274,6 @@ LavaTank.Tank.name=Serbatoio della Fonderia/entry> LavaTank.Gague.name=Vetro di Mattoni Bruciati LavaTank.Window.name=Finestra di Mattoni Bruciati -block.drawbridge.name=Ponte Mobile -block.firestarter.name=Accendino -block.advdrawbridge.name=Ponte Mobile Avanzato tile.landmine.name=Mina tile.trap.punji.name=Bastone Punji diff --git a/resources/assets/tinker/lang/pl_PL.lang b/resources/assets/tinker/lang/pl_PL.lang index 54221840..0b42950a 100644 --- a/resources/assets/tinker/lang/pl_PL.lang +++ b/resources/assets/tinker/lang/pl_PL.lang @@ -157,8 +157,6 @@ LavaTank.Tank.name=Hartowany zbiornik LavaTank.Gague.name=Hartowane szkło LavaTank.Window.name=Hartowane okno -block.drawbridge.name=Most zwodzony -block.firestarter.name=Zapalnikr tile.landmine.name=Mina lądowa tile.trap.punji.name=Kolce punji tile.trap.barricade.oak.name=Dębowa barykada diff --git a/resources/assets/tinker/lang/ru_RU.lang b/resources/assets/tinker/lang/ru_RU.lang index 9503b4dd..fd080f7f 100644 --- a/resources/assets/tinker/lang/ru_RU.lang +++ b/resources/assets/tinker/lang/ru_RU.lang @@ -175,8 +175,6 @@ LavaTank.Tank.name=Обожжённый резервуар LavaTank.Gague.name=Обожжённое стекло LavaTank.Window.name=Обожжённое окно -block.drawbridge.name=Разводной мост -block.firestarter.name=Воспламенитель tile.landmine.name=Фугас tile.trap.punji.name=Колышек tile.trap.barricade.oak.name=Баррикада из дуба diff --git a/resources/assets/tinker/lang/zh_CN.lang b/resources/assets/tinker/lang/zh_CN.lang index 5e6e3373..40e468f8 100644 --- a/resources/assets/tinker/lang/zh_CN.lang +++ b/resources/assets/tinker/lang/zh_CN.lang @@ -281,9 +281,6 @@ LavaTank.Tank.name=冶炼槽 LavaTank.Gague.name=冶炼炉玻璃 LavaTank.Window.name=冶炼炉视窗 -block.drawbridge.name=造桥器 -block.firestarter.name=点火器 -block.advdrawbridge.name=高级造桥器 tile.landmine.name=地雷 tile.trap.punji.name=铁蒺藜 diff --git a/resources/assets/tinker/textures/blocks/machines/drawbridge_bottom.png b/resources/assets/tinker/textures/blocks/machines/drawbridge_bottom.png deleted file mode 100644 index e77f9531a25c40c6b49d45ce70094d90802503cd..0000000000000000000000000000000000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$+%R=Z;+16xe+?DtD*71j*QI*2@6>3at(68FMC2Me%~!*X;lc z)IjI7kX@(~wcpOiC@>%CBinCIirRiX!eKxFL7l9V0EE_7PuQm;R(^k4N-KU#z*2z# z&;_?9dx_J(9q#%lb_qC1jUAP%XM1dtXO6hYF88?j3%XXC#2I(9FaQ7m07*qoM6N<$ Ef~Ot_t^fc4 diff --git a/resources/assets/tinker/textures/blocks/machines/drawbridge_top.png b/resources/assets/tinker/textures/blocks/machines/drawbridge_top.png deleted file mode 100644 index 7f89b409940b457fe0ac5a56dbb77541e94b5b63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 417 zcmV;S0bc%zP)zNJOGZD{IY#tH~vDOUbR1lv+z@ z7m|zRM?7!O+t(?p&pCT~-{*P0-yQXFmvB>c?CR~n`%Mf$2t0YaY*#RSmD1#3vXSIc zAp)J92!5ARpZ7_CI)&$_vJ48-q5mL*KxQnUCp)&DfI)O0ro%O@J0sTCu(c8Qo0ah6 z_T{I{CVR;se4Dl(P#{w~K=Ob#AJ^Tm5}06J>TLjsy_`qQ1o?kr6<}THt|unI?;ty%a-~mK3X44^@OaX!5aNn_ z!^$1R1R?0a(`l47Y{jYDP3Ahi^Icvu0Z-+kRXT7d*WxDFrF`6^%EbuO^H~dyW@Db2 z4v#nx!y6|MD22_*TM8j4!fVMupn}~jHGw~h5sHVSFoAU*I`UlQ%`mphTodA{NR<(Xg>1OJqC47&9IbN=X=o z88ebRI_~%Uy1#jp#pm90&pqdR&OKN8y6mJ(J}=to^Sqhf0~Q8$D$*bK){=sRpW8v5 z<-P))6?dTy&P%=d^n2^3@9Q20g%m6lnPk=m3e)UVq<^tHPwP;?9iWxWWbojvW*@4j z`oV0QntTF`)GFBDjvW*~aq0=tfSux@Mw)9^>Ep`HJ4Dh15STb^WIGnJQ#5EJ|9UC& z7Ie~!-%9fxW(s@jSOfwwU$vNlm?{PYfyiM4MGore$ydvXs;ZLFXk`22teHt1yI5eR z)ueR*0Z+fy!Sj9{y&hUP0f~yDFtFu4@U0fpbc>0eb}Q05z$H5PPay2AVIVN($W00? zbeY*14OqE@SMd~x7z_pm$+07wn1!8@0{2_xq(BAjz!?uYXsXF1f~}1Fg%`gzn{j6@ z?}&xX0*~7jG~qHb2*w^2KLg}1B#y*425ejv$)mQMWCvIxdsVEcRnukwWS~612OTUh zV$I?A-))wWa<@^+hwx4%U&vtC5(w?DmFU$`5IGkfvk(v}I7pB%)R4_c0ocP9?JVO^ pP!~u;bR_MY^&%YvOZvXBt;WzvSn`}Ta&CbDYBBq zggWMXU+2wvqp|qRJ$K&ueDAsMsjtT{N%kkbv^(LY?Qsunj=E`U%uPEXkKTj)!w7xe z2Q?qJounZBJSR0LGc^`YX9FhKA5Zx;-%l}3J{uy1A9`P-v$?>(AOvzc>eExf(-UBn z^JJ}V;=#<1~q^aOawGVY2~kK)G3{OLFVA|!yIr9Lr%d{I)AK!haG0sMC5xHxTn z$T&^1++URAZFW*9_+Gq1z>%07*qoM6N<$g3jy84gdfE diff --git a/resources/assets/tinker/textures/blocks/machines/firestarter_side.png b/resources/assets/tinker/textures/blocks/machines/firestarter_side.png deleted file mode 100644 index 3b04eaa03136e26ec9b1c534f737449f09c2d6ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 598 zcmV-c0;&CpP)mm2fozE2LnAvIrqCKO_W2 z^r`wTy%R(dK_C)Y61@@93s>j556{_2>cj7OJNNawpXX@#a2SQ%aZDHnh8x3}PNz{w zG~!P72yS$CU}nXBFc3gK7LoZ{b2Bs!{oCs?w6hl7em{CQt;4C{28=|)D5jDa2yMn# zd>i^gA><-KMwtYmqv6U#5#@$HEr zaP35$f0^B934YBF*-Q`Wm^z{3>cARY?(t$G>%pZiHwuR>e$OAr&(}Qy8)+P{bk+_z zVVH#%J1TMEPzA;^7U$Cy5|$hADk?nL>y@roj(P2%>P7*BqirsMA`$RSDqKA3!FadZ z7Ldi+1U@`Sij2X0%W9kV_Zut$L+XvH>-QJ!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t{PE=0_>hFNK5Lr`triqtjrdnl2-%#DK zmQ)$WJxR7bpzI~}1XG%IVQ>;tiP;-4{o3yP>Q_l%TDr8Deaf9*39-knvM3v`sH?T0Je`d+u7bBe4szn0xFZTS)Q!(}LM^4m>|C5hKQ zLUWzcj0^5-#qM3@Zxv0cXZiP->sOU!ruGJ8%ayHA{r(9ONs9SVsx~#D6bBBi&D1`9 z(*FtHS~V=mflTr{`s;|aPza4Nv*&1&)$ z6Y(?#c{<8VxGcfVmf0~+%+m_a*pxUo{VwDYxJk zm^b3Lq306x)C{?QG|Yfj$b*hP5^HYLTJ+9<_HH9>nHUpVb+){(#Br~D&mwo$hy-?> zzw*JR?Sax?2~nE*>LD70IF!1LllU%zYz5`7* z5L?5cAP28>6r8vtfLq53z$vLH$}&-k3!C!Wb7L<-KN*DG-~6Od*cv0kAh(PlEJ7aq dFNgY}E$&mnBgkYqyvcSRQ{!_dat-Z+{{scdkbeLG diff --git a/resources/assets/tinker/textures/gui/drawbridgeAdvanced.png b/resources/assets/tinker/textures/gui/drawbridgeAdvanced.png deleted file mode 100644 index d146b1a9c41abec5160ab32e769018a12f25b318..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2619 zcmbuBdpK148pnUL3{Asm)G*8@Gu=?5i*~mmGYwJgl!{P^kg3CrgeaOzZbd~&)L>lN zD7VS2Q!XQIlFB7fnQTUdqU6ywnA=`-PR~B)*?*kpIcq)Z`K{+&YyH;m`@Y}zv(^R2 zUG^9>0Sy4aY~N^?D z0^Cf~hl6v1w>xZ|(}TvSQS{~}3lG7!HEp-u;uO~Xxn~Va+(el3RZ@TUB*>e<7`|pj zhVq(ZH1k!H#V_d|M)!Lwye zWGEz6!h7ow2w*hW8KP1>lJ!5ombqM68U6du7Wq|Gj^^az@$tFfyp`)fo?i0NQ2apA zg7pwsgyA(@u}zvXQS)A<#FC+U3P~7zBrxz2Df$m20&I?_!42l3e|@XN87jLv%Qfty~?pJ_jU90*@D+*W;Q5@D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QDG|*Sfj@WOHK}-on#v?zMTQhX#XZV zF4j5b1~=2_=Q^hDVDaU$4jtMb__pZF8zwqJs7wlEzM}b!f7d7TTI*-NWw-30E}%b> zCSnG)F{5c{KWHIxQGCBZWN~kKf3M4E<<{zvFbcE<>7u-2>T=tU+&yqd&>sx5u~W$D zyq5Xp*DRS#w#x$$f>5q%o{ke!4pnA~opwO0Wn?MN!r zNS1BB(T4!RZ2OJ0I?5Xb&I@V#nAXby(fhmVBjMLiA0UCh&H>@I9$I-=8 zcHsy$-ktYm4{+ij+=tHiQQf89f!(<8@IwOPccaffGRwo65DjcpCjze4N3=h+eKhuS zyKd_HA+$dlpx{f1JzoWE!zgTAwrTU@$Mz<83nK&${&cr!JQ0G|2@MNeDNC132c(#% z{r2KXtd&}(7AfkJ0WUs2ekv;k%S99+p5f2lca@K~w6^+DHE%JLd-_U?`-Y!I)7C9F zy@Vq6nAN@LFIlK__!PhG4*8Y=2#Dh(NfB0jjGC+3R|~9<;df8`?b2s{kG?11hnl|+ z`RfA{6O$H{&#g&CZz=g{<2+}NpV;By;>jCNd@Mv%Vis^Ufbe*HoUz7$r?pmGc32W{ z;C-#?jUodlAmal&p7@aAqd9ed{jUV!G$KKLLNWP+|Z8 diff --git a/resources/assets/tinker/textures/gui/slotButton.png b/resources/assets/tinker/textures/gui/slotButton.png deleted file mode 100644 index 4cdd631f16f3ff66e8357f97e4f11489f9292820..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11665 zcmeHt=UY=x@Gl62&^v@8Rf_a3CG@5s?Ta*l0MewF2m}crHGotpK{}|QfK=(dcOs&6 z2|Y*)MG2jo-+k_@`xo37_c?oZ_srSn?C$K$XXorpf{BqH6*(I@0RaKklgHZs5fBjK ztAqqV0KTvd`0R==051&mv;N9j~`CH@9GnWzwOGaCNmX&zd~-ItANUXCLDfGhJA_ zn?>Im&Nv6!{SQTEynf(LV*JI1!gIU1rs~Qp7uE<%MxBn8Hq~Zxb8~CEIr$W)4q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My}2hkF%b^!CO9#LK}CVo0em6g&4O&WD@1t1@>mPvMO z*!6dv5#LQ+2^xggc%pJi`cBq9>FIzw`+LV~1C&^8$A z88{8_lQ?pGV^n=9@_~-2mHAu{xIi8d{4K$V>as8+a@)QB1RWy%U4e4;+t*))PW%Pz zAY(vuIlV-_{Gi@Ev2@vCqC zpp9eKTjyeTj<1(18IeQN9!i$qQzsu813YYOn)+>DNz<~vahzY$YOikCg*Q1Wd)}-$ z7oRH9rQy97xy>1oZPgUzsFV+1;rQMk2oilAf8lHIdxsx#mC!nI1a?$CaAv-?p#CjG zAbyhf1c{QJ!2ZC*`%F$U)H6Yg=`2Hdnq7^>qvSw@R?ASt?5MhTULoaA-1JV>QaZ-i z7_hjqhwrhB47zCyxLh{^?6$oGjn`8Gz86r&n1#DaOTwjTjd=8p03K{MO*rehUqc7Z z#j^#JvddVDOcz;BbeQz_?U-K1}az3qN z)wf7O&*?^D9v!0>`)@2l)EY4uhM&4?=26%kf!0rAmaxj6V( zgkJkI?9JGGW}3n_&Lw<}e=IDg7oQAcD*Jap=FtX4g@SHY%RECf$%;sex*J+8Y_CH* zE=+&Dli{1-?WDWu){>9@a=gej{QGsPtNaIk{q%<1v)d1xe*d=XkT=hQ^4fDh#Vii$ zX_rPuf6XmW+9=Y&^D((V>C3Sn9$n>nOzJE4-?6ckyuB)aabOqo6JA~a*ReM=`(^+= O%;4$j=d#Wzp$Pyn?uz38 diff --git a/resources/assets/tinker/textures/items/logic/spoolwire.png b/resources/assets/tinker/textures/items/logic/spoolwire.png deleted file mode 100644 index 5b86b6cfa3a635bb2f954c6d5af0ad4f1859e590..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0figD*u3fvT=}x;Tbd`0wpM$j4|X&{qA?<&I6ujtLVw-tMYqVHe7O?51QEHlc#^ zyh62;lU0dz^75-^uN|HLr~TZS@8xbSSwZ3s$AV^rXr*5dW!W&jV3t`Oci`=Z65l>b zUz=7C@BWZctMitW(u|tOEq@e4uGHyNr}N$H+s|y_Q>OTDndFhvOkKC9iayFYpm<$o z(fzF}<7EprI0~njok-Lbf7JH)1lNV-XJ&8R(_V3vlXZ^jUw_#^WxgF|1w7k*%?}su y-(#?DeOWVK-_+CMAAFV`Dw|=^v$Wo$Lwwqk@F>66J?%jMF?hQAxvX 0 || activeRedstone(world, coord.x, y + coord.y, z + coord.z)) - { - active = true; - break; - } - } - logic.setActive(active); - } - - public int getIndirectPowerLevelTo (World world, int x, int y, int z, int side) - { - if (world.isBlockNormalCube(x, y, z)) - { - return world.getBlockPowerInput(x, y, z); - } - else - { - int i1 = world.getBlockId(x, y, z); - return i1 == 0 ? 0 : Block.blocksList[i1].isProvidingWeakPower(world, x, y, z, side); - } - } - - boolean activeRedstone (World world, int x, int y, int z) - { - Block wire = Block.blocksList[world.getBlockId(x, y, z)]; - if (wire != null && wire.blockID == Block.redstoneWire.blockID) - return world.getBlockMetadata(x, y, z) > 0; - - return false; - } - - /* Keep inventory */ - @Override - public boolean removeBlockByPlayer (World world, EntityPlayer player, int x, int y, int z) - { - player.addExhaustion(0.025F); - int meta = world.getBlockMetadata(x, y, z); - if (meta == 0) - { - ItemStack stack = new ItemStack(this.blockID, 1, meta); - DrawbridgeLogic logic = (DrawbridgeLogic) world.getBlockTileEntity(x, y, z); - NBTTagCompound tag = new NBTTagCompound(); - - boolean hasTag = false; - ItemStack contents = logic.getStackInSlot(0); - if (contents != null) - { - NBTTagCompound contentTag = new NBTTagCompound(); - contents.writeToNBT(contentTag); - tag.setCompoundTag("Contents", contentTag); - hasTag = true; - } - - ItemStack camo = logic.getStackInSlot(1); - if (camo != null) - { - NBTTagCompound camoTag = new NBTTagCompound(); - camo.writeToNBT(camoTag); - tag.setCompoundTag("Camoflauge", camoTag); - hasTag = true; - } - - if (logic.getPlacementDirection() != 4) - { - tag.setByte("Placement", logic.getPlacementDirection()); - hasTag = true; - } - if (hasTag == true) - stack.setTagCompound(tag); - - dropDrawbridgeLogic(world, x, y, z, stack); - } - - return world.setBlockToAir(x, y, z); - } - - protected void dropDrawbridgeLogic (World world, int x, int y, int z, ItemStack stack) - { - if (!world.isRemote && world.getGameRules().getGameRuleBooleanValue("doTileDrops")) - { - float f = 0.7F; - double d0 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - double d1 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - double d2 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - EntityItem entityitem = new EntityItem(world, (double) x + d0, (double) y + d1, (double) z + d2, stack); - entityitem.delayBeforeCanPickup = 10; - world.spawnEntityInWorld(entityitem); - } - } - - @Override - public void harvestBlock (World world, EntityPlayer player, int x, int y, int z, int meta) - { - if (meta != 0) - super.harvestBlock(world, player, x, y, z, meta); - } - - @Override - public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase living, ItemStack stack) - { - super.onBlockPlacedBy(world, x, y, z, living, stack); - if (stack.hasTagCompound()) - { - DrawbridgeLogic logic = (DrawbridgeLogic) world.getBlockTileEntity(x, y, z); - NBTTagCompound contentTag = stack.getTagCompound().getCompoundTag("Contents"); - if (contentTag != null) - { - ItemStack contents = ItemStack.loadItemStackFromNBT(contentTag); - logic.setInventorySlotContents(0, contents); - } - - NBTTagCompound camoTag = stack.getTagCompound().getCompoundTag("Camoflauge"); - if (camoTag != null) - { - ItemStack camoflauge = ItemStack.loadItemStackFromNBT(camoTag); - logic.setInventorySlotContents(1, camoflauge); - } - - if (stack.getTagCompound().hasKey("Placement")) - { - logic.setPlacementDirection(stack.getTagCompound().getByte("Placement")); - } - } - } - - /* Redstone connections */ - - public boolean canConnectRedstone (IBlockAccess world, int x, int y, int z, int side) - { - return true; - } - - static ArrayList directions = new ArrayList(6); - - static - { - directions.add(new CoordTuple(0, -1, 0)); - directions.add(new CoordTuple(0, 1, 0)); - directions.add(new CoordTuple(0, 0, -1)); - directions.add(new CoordTuple(0, 0, 1)); - directions.add(new CoordTuple(-1, 0, 0)); - directions.add(new CoordTuple(1, 0, 0)); - } -} diff --git a/src/tconstruct/blocks/logic/AdvancedDrawbridgeLogic.java b/src/tconstruct/blocks/logic/AdvancedDrawbridgeLogic.java deleted file mode 100644 index 088615f4..00000000 --- a/src/tconstruct/blocks/logic/AdvancedDrawbridgeLogic.java +++ /dev/null @@ -1,641 +0,0 @@ -package tconstruct.blocks.logic; - -import net.minecraft.inventory.InventoryBasic; - -import net.minecraft.nbt.NBTTagList; - -import java.util.ArrayList; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.*; -import net.minecraft.inventory.Container; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.*; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import tconstruct.inventory.AdvancedDrawbridgeContainer; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.blocks.*; -import tconstruct.library.util.*; -import tconstruct.util.player.FakePlayerLogic; - -public class AdvancedDrawbridgeLogic extends InventoryLogic implements IFacingLogic, IActiveLogic, IDrawbridgeLogicBase -{ - boolean active; - boolean working; - int ticks; - public int selSlot = 0; - byte extension; - byte direction; - byte placementDirection = 4; - FakePlayerLogic fakePlayer; - - ItemStack[] bufferStacks = new ItemStack[getSizeInventory()]; - - public InvCamo camoInventory = new InvCamo(); - - public AdvancedDrawbridgeLogic() - { - super(16); - } - - @Override - public void setWorldObj (World par1World) - { - this.worldObj = par1World; - fakePlayer = new FakePlayerLogic(worldObj, "Player.Drawbridge", this); - } - - @Override - public boolean getActive () - { - return active; - } - - @Override - public void setActive (boolean flag) - { - active = flag; - working = true; - } - - @Override - public byte getRenderDirection () - { - return direction; - } - - @Override - public ForgeDirection getForgeDirection () - { - return ForgeDirection.VALID_DIRECTIONS[direction]; - } - - @Override - public void setDirection (int side) - { - } - - public boolean canDropInventorySlot (int slot) - { - return false; - } - - @Override - public void setDirection (float yaw, float pitch, EntityLivingBase player) - { - if (pitch > 45) - { - direction = 1; - } - else if (pitch < -45) - { - direction = 0; - } - else - { - int facing = MathHelper.floor_double((double) (yaw / 360) + 0.5D) & 3; - switch (facing) - { - case 0: - direction = 2; - break; - - case 1: - direction = 5; - break; - - case 2: - direction = 3; - break; - - case 3: - direction = 4; - break; - } - } - } - - /* - * 0 = Up 1 = Right 2 = Down 3 = Left 4 = Center, neutral - */ - public void setPlacementDirection (byte keycode) - { - if (keycode == 4) - { - fakePlayer.rotationYaw = 0; - fakePlayer.rotationPitch = 0; - } - else if (this.direction == 0 || this.direction == 1) - { - switch (keycode) - { - case 0: - fakePlayer.rotationYaw = 0; - break; - case 1: - fakePlayer.rotationYaw = 90; - break; - case 2: - fakePlayer.rotationYaw = 180; - break; - case 3: - fakePlayer.rotationYaw = 270; - break; - } - - if (this.direction == 0) - fakePlayer.rotationPitch = -90; - else - fakePlayer.rotationPitch = 90; - } - else - { - if (keycode == 0) // Forward - { - fakePlayer.rotationYaw = mapDirection() * 90; - - if (keycode == 0) - fakePlayer.rotationPitch = 90; - else - fakePlayer.rotationPitch = -90; - } - else if (keycode == 2) // Backward - { - int face = mapDirection() + 2; - if (face > 3) - face -= 4; - fakePlayer.rotationYaw = face * 90; - - if (keycode == 0) - fakePlayer.rotationPitch = 90; - else - fakePlayer.rotationPitch = -90; - } - else - { - fakePlayer.rotationPitch = 0; - - int facing = mapDirection(); - if (keycode == 1) - facing += 1; - else - facing -= 1; - - if (facing >= 4) - facing = 0; - if (facing < 0) - facing = 3; - - fakePlayer.rotationYaw = facing * 90; - } - } - placementDirection = keycode; - } - - int mapDirection () - { - if (this.direction == 2) // North - return 0; - if (this.direction == 5) // East - return 1; - if (this.direction == 3) // South - return 2; - - return 3; // West - } - - public byte getPlacementDirection () - { - return placementDirection; - } - - @Override - public ItemStack getStackInSlot (int slot) - { - return slot < inventory.length ? inventory[slot] : null; - } - - public ItemStack getStackInBufferSlot (int slot) - { - return slot < bufferStacks.length ? bufferStacks[slot] : null; - } - - public void setBufferSlotContents (int slot, ItemStack itemstack) - { - if (slot < bufferStacks.length) - { - bufferStacks[slot] = itemstack; - } - else - { - return; - } - if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) - { - itemstack.stackSize = getInventoryStackLimit(); - } - } - - @Override - public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) - { - return new AdvancedDrawbridgeContainer(inventoryplayer, this); - } - - @Override - protected String getDefaultName () - { - return "tinker.drawbridge"; - } - - @Override - public ItemStack decrStackSize (int slot, int quantity) - { - ItemStack stack = super.decrStackSize(slot, quantity); - if (slot == 1) - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - return stack; - } - - public void updateEntity () - { - if (working) - { - ticks++; - if (ticks == 5) - { - ticks = 0; - if (active) // Placement - { - if (getStackInSlot(extension) != null && getStackInSlot(extension).stackSize > 0 && extension < 15) - { - extension++; - int xPos = xCoord; - int yPos = yCoord; - int zPos = zCoord; - - switch (direction) - { - case 0: - yPos -= extension; - break; - case 1: - yPos += extension; - break; - case 2: - zPos -= extension; - break; - case 3: - zPos += extension; - break; - case 4: - xPos -= extension; - break; - case 5: - xPos += extension; - break; - } - - Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)]; - if (block == null || block.isAirBlock(worldObj, xPos, yPos, zPos) || block.isBlockReplaceable(worldObj, xPos, yPos, zPos)) - { - // tryExtend(worldObj, xPos, yPos, zPos, direction); - int blockToItem = getStackInBufferSlot(extension - 1) != null ? TConstructRegistry.blockToItemMapping[getStackInBufferSlot(extension - 1).itemID] : 0; - if (blockToItem == 0) - { - if (getStackInSlot(extension - 1) == null || getStackInSlot(extension - 1).itemID >= 4096 || Block.blocksList[getStackInSlot(extension - 1).itemID] == null) - return; - Block placeBlock = Block.blocksList[getStackInBufferSlot(extension - 1).itemID]; - placeBlockAt(getStackInSlot(extension - 1), fakePlayer, worldObj, xPos, yPos, zPos, direction, 0, 0, 0, getStackInSlot(extension - 1).getItemDamage(), placeBlock); - } - else - { - Block placeBlock = Block.blocksList[blockToItem]; - placeBlockAt(getStackInSlot(extension - 1), fakePlayer, worldObj, xPos, yPos, zPos, direction, 0, 0, 0, getStackInSlot(extension - 1).getItemDamage(), placeBlock); - } - worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "tile.piston.out", 0.25F, worldObj.rand.nextFloat() * 0.25F + 0.6F); - decrStackSize(extension - 1, 1); - } - else - { - extension--; - working = false; - } - } - else - { - working = false; - } - } - else - // Retraction - { - if ((getStackInSlot(extension) == null || getStackInSlot(extension).stackSize < getStackInSlot(extension).getMaxStackSize()) && extension > 0) - { - int xPos = xCoord; - int yPos = yCoord; - int zPos = zCoord; - - switch (direction) - { - case 0: - yPos -= extension; - break; - case 1: - yPos += extension; - break; - case 2: - zPos -= extension; - break; - case 3: - zPos += extension; - break; - case 4: - xPos -= extension; - break; - case 5: - xPos += extension; - break; - } - - Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)]; - if (block != null) - { - int meta = worldObj.getBlockMetadata(xPos, yPos, zPos); - if (getStackInBufferSlot(extension - 1) != null && validBlock(extension - 1, block) && validMetadata(extension - 1, block.blockID, meta)) - { - worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "tile.piston.in", 0.25F, worldObj.rand.nextFloat() * 0.15F + 0.6F); - if (worldObj.setBlock(xPos, yPos, zPos, 0)) - if (getStackInSlot(extension - 1) == null) - { - setInventorySlotContents(extension - 1, getStackInBufferSlot(extension - 1).copy()); - } - else - { - getStackInSlot(extension - 1).stackSize++; - } - } - else - { - working = false; - } - } - extension--; - } - else - { - working = false; - } - } - } - } - } - - /** - * Called to actually place the block, after the location is determined and - * all permission checks have been made. Copied from ItemBlock - * - * @param stack - * The item stack that was used to place the block. This can be - * changed inside the method. - * @param player - * The player who is placing the block. Can be null if the block - * is not being placed by a player. - * @param side - * The side the player (or machine) right-clicked on. - */ - public boolean placeBlockAt (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata, Block block) - { - if (!world.setBlock(x, y, z, block.blockID, metadata, 3)) - { - return false; - } - - if (world.getBlockId(x, y, z) == block.blockID) - { - block.onBlockPlacedBy(world, x, y, z, player, stack); - block.onPostBlockPlaced(world, x, y, z, metadata); - } - - return true; - } - - boolean validBlock (int slot, Block block) - { - int type = TConstructRegistry.interchangableBlockMapping[block.blockID]; - if (type != 0) - { - if (type == getStackInBufferSlot(slot).itemID) - return true; - } - int blockToItem = TConstructRegistry.blockToItemMapping[block.blockID]; - if (blockToItem != 0) - { - if (blockToItem == getStackInBufferSlot(slot).itemID) - return true; - } - return block.blockID == getStackInBufferSlot(slot).itemID; - } - - boolean validMetadata (int slot, int blockID, int metadata) - { - int type = TConstructRegistry.drawbridgeState[blockID]; - if (type == 0) - { - return metadata == getStackInBufferSlot(slot).getItemDamage(); - } - if (type == 1) - { - return true; - } - if (type == 2) - { - return false; - } - if (type == 3) - { - return true; // TODO: rotational metadata, probably not needed - // anymore - } - if (type == 4) - { - return true; - } - if (type == 5) - { - return metadata == getStackInBufferSlot(slot).getItemDamage(); - } - return false; - } - - @Override - public void readFromNBT (NBTTagCompound tags) - { - super.readFromNBT(tags); - active = tags.getBoolean("Active"); - working = tags.getBoolean("Working"); - extension = tags.getByte("Extension"); - - NBTTagCompound camoTag = (NBTTagCompound) tags.getTag("Camo"); - if (camoTag != null) - { - camoInventory.setInventorySlotContents(0, ItemStack.loadItemStackFromNBT(camoTag)); - } - - readBufferFromNBT(tags); - readCustomNBT(tags); - } - - @Override - public void writeToNBT (NBTTagCompound tags) - { - super.writeToNBT(tags); - tags.setBoolean("Active", active); - tags.setBoolean("Working", working); - tags.setByte("Extension", extension); - - if (camoInventory.getStackInSlot(0) != null) - { - NBTTagCompound camoTag = new NBTTagCompound(); - camoInventory.getStackInSlot(0).writeToNBT(camoTag); - tags.setTag("Camo", camoTag); - } - - writeBufferToNBT(tags); - writeCustomNBT(tags); - } - - public void readBufferFromNBT (NBTTagCompound tags) - { - NBTTagList nbttaglist = tags.getTagList("Buffer"); - bufferStacks = new ItemStack[getSizeInventory()]; - // bufferStacks.ensureCapacity(nbttaglist.tagCount() > getSizeInventory() ? getSizeInventory() : nbttaglist.tagCount()); - for (int iter = 0; iter < nbttaglist.tagCount(); iter++) - { - NBTTagCompound tagList = (NBTTagCompound) nbttaglist.tagAt(iter); - byte slotID = tagList.getByte("Slot"); - if (slotID >= 0 && slotID < bufferStacks.length) - { - setBufferSlotContents(slotID, ItemStack.loadItemStackFromNBT(tagList)); - } - } - } - - public void writeBufferToNBT (NBTTagCompound tags) - { - NBTTagList nbttaglist = new NBTTagList(); - for (int iter = 0; iter < bufferStacks.length; iter++) - { - if (getStackInBufferSlot(iter) != null) - { - NBTTagCompound tagList = new NBTTagCompound(); - tagList.setByte("Slot", (byte) iter); - getStackInBufferSlot(iter).writeToNBT(tagList); - nbttaglist.appendTag(tagList); - } - } - - tags.setTag("Buffer", nbttaglist); - } - - public void readCustomNBT (NBTTagCompound tags) - { - direction = tags.getByte("Direction"); - placementDirection = tags.getByte("Placement"); - } - - public void writeCustomNBT (NBTTagCompound tags) - { - tags.setByte("Direction", direction); - tags.setByte("Placement", placementDirection); - } - - /* Packets */ - @Override - public Packet getDescriptionPacket () - { - NBTTagCompound tag = new NBTTagCompound(); - writeToNBT(tag); - return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag); - } - - @Override - public void onDataPacket (INetworkManager net, Packet132TileEntityData packet) - { - readFromNBT(packet.data); - worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); - } - - public boolean hasExtended () - { - return extension != 0; - } - - @Override - public void onInventoryChanged () - { - super.onInventoryChanged(); - for (int i = 0; i < getSizeInventory(); i++) - { - if (getStackInSlot(i) != null) - { - setBufferSlotContents(i, getStackInSlot(i).copy()); - getStackInBufferSlot(i).stackSize = 1; - } - } - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - - // @Override - // public int getMaxSize() { - // return 16; - // } - - @Override - public int getInventoryStackLimit () - { - return 1; - } - - public class InvCamo extends InventoryBasic - { - - private InvCamo() - { - super("camoSlot", false, 1); - } - - public ItemStack getCamoStack () - { - return this.getStackInSlot(0); - } - - @Override - public void setInventorySlotContents (int slot, ItemStack content) - { - super.setInventorySlotContents(slot, content); - if (slot == 0 && worldObj != null) - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - - @Override - public void onInventoryChanged () - { - super.onInventoryChanged(); - if (worldObj != null) - { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - } - - @Override - public int getInventoryStackLimit () - { - return 1; - } - } -} diff --git a/src/tconstruct/blocks/logic/DrawbridgeLogic.java b/src/tconstruct/blocks/logic/DrawbridgeLogic.java deleted file mode 100644 index 39ee9263..00000000 --- a/src/tconstruct/blocks/logic/DrawbridgeLogic.java +++ /dev/null @@ -1,537 +0,0 @@ -package tconstruct.blocks.logic; - -import tconstruct.library.blocks.IDrawbridgeLogicBase; - -import net.minecraft.nbt.NBTTagCompound; - -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.*; -import net.minecraft.inventory.Container; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.*; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.*; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; -import net.minecraftforge.common.ForgeDirection; -import tconstruct.inventory.DrawbridgeContainer; -import tconstruct.library.TConstructRegistry; -import tconstruct.library.blocks.InventoryLogic; -import tconstruct.library.util.*; -import tconstruct.util.player.FakePlayerLogic; - -public class DrawbridgeLogic extends InventoryLogic implements IFacingLogic, IActiveLogic, IDrawbridgeLogicBase -{ - boolean active; - boolean working; - int ticks; - byte extension; - byte direction; - byte placementDirection = 4; - FakePlayerLogic fakePlayer; - - ItemStack bufferStack = null; - - public DrawbridgeLogic() - { - super(2); - } - - @Override - public void setWorldObj (World par1World) - { - this.worldObj = par1World; - fakePlayer = new FakePlayerLogic(worldObj, "Player.Drawbridge", this); - } - - @Override - public boolean getActive () - { - return active; - } - - @Override - public void setActive (boolean flag) - { - active = flag; - working = true; - } - - @Override - public byte getRenderDirection () - { - return direction; - } - - @Override - public ForgeDirection getForgeDirection () - { - return ForgeDirection.VALID_DIRECTIONS[direction]; - } - - @Override - public void setDirection (int side) - { - } - - public boolean canDropInventorySlot (int slot) - { - return false; - } - - @Override - public void setDirection (float yaw, float pitch, EntityLivingBase player) - { - if (pitch > 45) - { - direction = 1; - } - else if (pitch < -45) - { - direction = 0; - } - else - { - int facing = MathHelper.floor_double((double) (yaw / 360) + 0.5D) & 3; - switch (facing) - { - case 0: - direction = 2; - break; - - case 1: - direction = 5; - break; - - case 2: - direction = 3; - break; - - case 3: - direction = 4; - break; - } - } - } - - /* 0 = Up - * 1 = Right - * 2 = Down - * 3 = Left - * 4 = Center, neutral - */ - public void setPlacementDirection (byte keycode) - { - if (keycode == 4) - { - fakePlayer.rotationYaw = 0; - fakePlayer.rotationPitch = 0; - } - else if (this.direction == 0 || this.direction == 1) - { - switch (keycode) - { - case 0: - fakePlayer.rotationYaw = 0; - break; - case 1: - fakePlayer.rotationYaw = 90; - break; - case 2: - fakePlayer.rotationYaw = 180; - break; - case 3: - fakePlayer.rotationYaw = 270; - break; - } - - if (this.direction == 0) - fakePlayer.rotationPitch = -90; - else - fakePlayer.rotationPitch = 90; - } - else - { - if (keycode == 0) //Forward - { - fakePlayer.rotationYaw = mapDirection() * 90; - - if (keycode == 0) - fakePlayer.rotationPitch = 90; - else - fakePlayer.rotationPitch = -90; - } - else if (keycode == 2) //Backward - { - int face = mapDirection() + 2; - if (face > 3) - face -= 4; - fakePlayer.rotationYaw = face * 90; - - if (keycode == 0) - fakePlayer.rotationPitch = 90; - else - fakePlayer.rotationPitch = -90; - } - else - { - fakePlayer.rotationPitch = 0; - - int facing = mapDirection(); - if (keycode == 1) - facing += 1; - else - facing -= 1; - - if (facing >= 4) - facing = 0; - if (facing < 0) - facing = 3; - - fakePlayer.rotationYaw = facing * 90; - } - } - placementDirection = keycode; - } - - int mapDirection () - { - if (this.direction == 2) //North - return 0; - if (this.direction == 5) //East - return 1; - if (this.direction == 3) //South - return 2; - - return 3; //West - } - - public byte getPlacementDirection () - { - return placementDirection; - } - - @Override - public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) - { - return new DrawbridgeContainer(inventoryplayer, this); - } - - @Override - protected String getDefaultName () - { - return "tinker.drawbridge"; - } - - @Override - public void setInventorySlotContents (int slot, ItemStack itemstack) - { - super.setInventorySlotContents(slot, itemstack); - if (slot == 1) - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } - - @Override - public ItemStack decrStackSize (int slot, int quantity) - { - ItemStack stack = super.decrStackSize(slot, quantity); - if (slot == 1) - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - return stack; - } - - public void updateEntity () - { - if (working) - { - ticks++; - if (ticks == 5) - { - ticks = 0; - if (active) //Placement - { - if (inventory[0] != null && inventory[0].stackSize > 0 && extension < 15) - { - extension++; - int xPos = xCoord; - int yPos = yCoord; - int zPos = zCoord; - - bufferStack = inventory[0].copy(); - bufferStack.stackSize = 1; - - switch (direction) - { - case 0: - yPos -= extension; - break; - case 1: - yPos += extension; - break; - case 2: - zPos -= extension; - break; - case 3: - zPos += extension; - break; - case 4: - xPos -= extension; - break; - case 5: - xPos += extension; - break; - } - - Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)]; - if (block == null || block.isAirBlock(worldObj, xPos, yPos, zPos) || block.isBlockReplaceable(worldObj, xPos, yPos, zPos)) - { - //tryExtend(worldObj, xPos, yPos, zPos, direction); - int blockToItem = TConstructRegistry.blockToItemMapping[bufferStack.itemID]; - if (blockToItem == 0) - { - if (inventory[0].itemID >= 4096 || Block.blocksList[inventory[0].itemID] == null) - return; - Block placeBlock = Block.blocksList[bufferStack.itemID]; - placeBlockAt(bufferStack, fakePlayer, worldObj, xPos, yPos, zPos, direction, 0, 0, 0, bufferStack.getItemDamage(), placeBlock); - } - else - { - Block placeBlock = Block.blocksList[blockToItem]; - placeBlockAt(bufferStack, fakePlayer, worldObj, xPos, yPos, zPos, direction, 0, 0, 0, bufferStack.getItemDamage(), placeBlock); - } - worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "tile.piston.out", 0.25F, worldObj.rand.nextFloat() * 0.25F + 0.6F); - decrStackSize(0, 1); - } - else - { - extension--; - working = false; - } - } - - else - { - working = false; - } - } - else - //Retraction - { - if ((inventory[0] == null || inventory[0].stackSize < inventory[0].getMaxStackSize()) && extension > 0) - { - int xPos = xCoord; - int yPos = yCoord; - int zPos = zCoord; - - switch (direction) - { - case 0: - yPos -= extension; - break; - case 1: - yPos += extension; - break; - case 2: - zPos -= extension; - break; - case 3: - zPos += extension; - break; - case 4: - xPos -= extension; - break; - case 5: - xPos += extension; - break; - } - - Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)]; - if (block != null) - { - int meta = worldObj.getBlockMetadata(xPos, yPos, zPos); - if (bufferStack != null && validBlock(block) && validMetadata(block.blockID, meta)) - { - worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "tile.piston.in", 0.25F, worldObj.rand.nextFloat() * 0.15F + 0.6F); - if (worldObj.setBlock(xPos, yPos, zPos, 0)) - if (inventory[0] == null) - { - inventory[0] = bufferStack.copy(); - } - else - { - inventory[0].stackSize++; - } - } - else - { - working = false; - } - } - extension--; - } - else - { - working = false; - } - } - } - } - } - - /** - * Called to actually place the block, after the location is determined - * and all permission checks have been made. - * Copied from ItemBlock - * - * @param stack The item stack that was used to place the block. This can be changed inside the method. - * @param player The player who is placing the block. Can be null if the block is not being placed by a player. - * @param side The side the player (or machine) right-clicked on. - */ - public boolean placeBlockAt (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata, Block block) - { - if (!world.setBlock(x, y, z, block.blockID, metadata, 3)) - { - return false; - } - - if (world.getBlockId(x, y, z) == block.blockID) - { - block.onBlockPlacedBy(world, x, y, z, player, stack); - block.onPostBlockPlaced(world, x, y, z, metadata); - } - - return true; - } - - boolean validBlock (Block block) - { - int type = TConstructRegistry.interchangableBlockMapping[block.blockID]; - if (type != 0) - { - if (type == bufferStack.itemID) - return true; - } - int blockToItem = TConstructRegistry.blockToItemMapping[block.blockID]; - if (blockToItem != 0) - { - if (blockToItem == bufferStack.itemID) - return true; - } - return block.blockID == bufferStack.itemID; - } - - boolean validMetadata (int blockID, int metadata) - { - int type = TConstructRegistry.drawbridgeState[blockID]; - if (type == 0) - { - return metadata == bufferStack.getItemDamage(); - } - if (type == 1) - { - return true; - } - if (type == 2) - { - return false; - } - if (type == 3) - { - return true; //TODO: rotational metadata, probably not needed anymore - } - if (type == 4) - { - return true; - } - if (type == 5) - { - return metadata == bufferStack.getItemDamage(); - } - return false; - } - - @Override - public void readFromNBT (NBTTagCompound tags) - { - super.readFromNBT(tags); - active = tags.getBoolean("Active"); - working = tags.getBoolean("Working"); - extension = tags.getByte("Extension"); - - NBTTagCompound bufferInv = (NBTTagCompound) tags.getTag("BufferInv"); - if (bufferInv != null) - { - bufferStack = ItemStack.loadItemStackFromNBT(bufferInv); - } - if (bufferStack == null && inventory[0] != null) - { - bufferStack = inventory[0]; - } - - readCustomNBT(tags); - } - - @Override - public void writeToNBT (NBTTagCompound tags) - { - super.writeToNBT(tags); - tags.setBoolean("Active", active); - tags.setBoolean("Working", working); - tags.setByte("Extension", extension); - - if (bufferStack != null) - { - NBTTagCompound bufferInv = new NBTTagCompound(); - bufferStack.writeToNBT(bufferInv); - tags.setTag("BufferInv", bufferInv); - } - - writeCustomNBT(tags); - } - - public void readCustomNBT (NBTTagCompound tags) - { - direction = tags.getByte("Direction"); - placementDirection = tags.getByte("Placement"); - } - - public void writeCustomNBT (NBTTagCompound tags) - { - tags.setByte("Direction", direction); - tags.setByte("Placement", placementDirection); - } - - /* Packets */ - @Override - public Packet getDescriptionPacket () - { - NBTTagCompound tag = new NBTTagCompound(); - writeToNBT(tag); - return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag); - } - - @Override - public void onDataPacket (INetworkManager net, Packet132TileEntityData packet) - { - readFromNBT(packet.data); - worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); - } - - public boolean hasExtended () - { - return extension != 0; - } - - @Override - public void onInventoryChanged () - { - super.onInventoryChanged(); - if (getStackInSlot(0) != null) - { - bufferStack = getStackInSlot(0).copy(); - bufferStack.stackSize = 1; - } - this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - } -} diff --git a/src/tconstruct/blocks/logic/FirestarterLogic.java b/src/tconstruct/blocks/logic/FirestarterLogic.java deleted file mode 100644 index 57e2fb4b..00000000 --- a/src/tconstruct/blocks/logic/FirestarterLogic.java +++ /dev/null @@ -1,197 +0,0 @@ -package tconstruct.blocks.logic; - -import tconstruct.TConstruct; -import tconstruct.library.tools.AbilityHelper; -import tconstruct.library.util.IActiveLogic; -import tconstruct.library.util.IFacingLogic; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.INetworkManager; -import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.Packet132TileEntityData; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.MathHelper; -import net.minecraftforge.common.ForgeDirection; - -public class FirestarterLogic extends TileEntity implements IFacingLogic, IActiveLogic -{ - boolean active; - //boolean putOut; - boolean shouldActivate; - byte direction; - - @Override - public boolean getActive () - { - return active; - } - - @Override - public void setActive (boolean flag) - { - /*if (active && !flag) - { - putOut = true; - }*/ - - active = flag; - shouldActivate = true; - //setFire(); - } - - void setFire () - { - int xPos = xCoord; - int yPos = yCoord; - int zPos = zCoord; - - switch (direction) - { - case 0: - yPos -= 1; - break; - case 1: - yPos += 1; - break; - case 2: - zPos -= 1; - break; - case 3: - zPos += 1; - break; - case 4: - xPos -= 1; - break; - case 5: - xPos += 1; - break; - } - - Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)]; - if (active) - { - TConstruct.logger.info("Setting fire"); - if (block == null || block.isAirBlock(worldObj, xPos, yPos, zPos)) - { - worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "fire.ignite", 1.0F, AbilityHelper.random.nextFloat() * 0.4F + 0.8F); - worldObj.setBlock(xPos, yPos, zPos, Block.fire.blockID); - } - } - else - { - //TConstruct.logger.info("Stopping fire "+putOut); - if (block == Block.fire) - { - //worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "random.fizz", 1.0F, AbilityHelper.random.nextFloat() * 0.4F + 0.8F); - worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "fire.ignite", 1.0F, AbilityHelper.random.nextFloat() * 0.4F + 0.8F); - worldObj.setBlock(xPos, yPos, zPos, 0, 0, 3); - //putOut = false; - shouldActivate = true; - } - } - } - - public void updateEntity () - { - if (shouldActivate) - { - shouldActivate = false; - setFire(); - } - } - - @Override - public byte getRenderDirection () - { - return direction; - } - - @Override - public ForgeDirection getForgeDirection () - { - return ForgeDirection.VALID_DIRECTIONS[direction]; - } - - @Override - public void setDirection (int side) - { - } - - @Override - public void setDirection (float yaw, float pitch, EntityLivingBase player) - { - if (pitch > 45) - { - direction = 1; - } - else if (pitch < -45) - { - direction = 0; - } - else - { - int facing = MathHelper.floor_double((double) (yaw / 360) + 0.5D) & 3; - switch (facing) - { - case 0: - direction = 2; - break; - - case 1: - direction = 5; - break; - - case 2: - direction = 3; - break; - - case 3: - direction = 4; - break; - } - } - } - - @Override - public void readFromNBT (NBTTagCompound tags) - { - super.readFromNBT(tags); - tags.setBoolean("Active", active); - readCustomNBT(tags); - } - - @Override - public void writeToNBT (NBTTagCompound tags) - { - super.writeToNBT(tags); - active = tags.getBoolean("Active"); - writeCustomNBT(tags); - } - - public void readCustomNBT (NBTTagCompound tags) - { - direction = tags.getByte("Direction"); - } - - public void writeCustomNBT (NBTTagCompound tags) - { - tags.setByte("Direction", direction); - } - - /* Packets */ - @Override - public Packet getDescriptionPacket () - { - NBTTagCompound tag = new NBTTagCompound(); - writeCustomNBT(tag); - return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag); - } - - @Override - public void onDataPacket (INetworkManager net, Packet132TileEntityData packet) - { - readCustomNBT(packet.data); - worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord); - } -} diff --git a/src/tconstruct/client/TProxyClient.java b/src/tconstruct/client/TProxyClient.java index c00046c5..7a12430c 100644 --- a/src/tconstruct/client/TProxyClient.java +++ b/src/tconstruct/client/TProxyClient.java @@ -81,14 +81,12 @@ public class TProxyClient extends TProxyCommon return new StencilTableGui(player.inventory, (StencilTableLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == toolForgeID) return new ToolForgeGui(player.inventory, (ToolForgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); - if (ID == drawbridgeID) - return new DrawbridgeGui(player.inventory, (DrawbridgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); + if (ID == landmineID) return new GuiLandmine(new ContainerLandmine(player, (TileEntityLandmine) world.getBlockTileEntity(x, y, z))); if (ID == craftingStationID) return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.getBlockTileEntity(x, y, z), x, y, z); - if (ID == advDrawbridgeID) - return new AdvDrawbridgeGui(player, (AdvancedDrawbridgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); + if (ID == furnaceID) return new FurnaceGui(player.inventory, (FurnaceLogic) world.getBlockTileEntity(x, y, z)); @@ -215,7 +213,6 @@ public class TProxyClient extends TProxyCommon RenderingRegistry.registerBlockHandler(new SearedRender()); RenderingRegistry.registerBlockHandler(new OreberryRender()); RenderingRegistry.registerBlockHandler(new BarricadeRender()); - RenderingRegistry.registerBlockHandler(new MachineRender()); RenderingRegistry.registerBlockHandler(new DryingRackRender()); RenderingRegistry.registerBlockHandler(new PaneRender()); RenderingRegistry.registerBlockHandler(new PaneConnectedRender()); @@ -503,11 +500,6 @@ public class TProxyClient extends TProxyCommon ItemStack blankCast = new ItemStack(TContent.blankPattern, 1, 1); ItemStack redstone = new ItemStack(Item.redstone); - TConstructClientRegistry.registerManualLargeRecipe("drawbridge", new ItemStack(TContent.redstoneMachine, 1, 0), alubrassIngot, blankCast, alubrassIngot, bronzeIngot, new ItemStack( - Block.dispenser), bronzeIngot, bronzeIngot, redstone, bronzeIngot); - TConstructClientRegistry.registerManualLargeRecipe("igniter", new ItemStack(TContent.redstoneMachine, 1, 1), alubrassIngot, new ItemStack(TContent.largePlate, 1, 7), alubrassIngot, - bronzeIngot, new ItemStack(Item.flintAndSteel), bronzeIngot, bronzeIngot, redstone, bronzeIngot); - // Modifier recipes ItemStack ironpick = ToolBuilder.instance.buildTool(new ItemStack(TContent.pickaxeHead, 1, 6), new ItemStack(TContent.toolRod, 1, 2), new ItemStack(TContent.binding, 1, 6), ""); TConstructClientRegistry.registerManualIcon("ironpick", ironpick); diff --git a/src/tconstruct/client/block/MachineRender.java b/src/tconstruct/client/block/MachineRender.java deleted file mode 100644 index 171c41d2..00000000 --- a/src/tconstruct/client/block/MachineRender.java +++ /dev/null @@ -1,102 +0,0 @@ -package tconstruct.client.block; - -import tconstruct.client.TProxyClient; -import tconstruct.library.util.IFacingLogic; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.world.IBlockAccess; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; - -public class MachineRender implements ISimpleBlockRenderingHandler -{ - public static int model = RenderingRegistry.getNextAvailableRenderId(); - - @Override - public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer) - { - if (modelID == model) - { - TProxyClient.renderStandardInvBlock(renderer, block, metadata); - } - } - - @Override - public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer) - { - if (modelID == model) - { - int metadata = world.getBlockMetadata(x, y, z); - if (metadata == 0) - { - renderer.renderStandardBlock(block, x, y, z); - } - else - { - renderRotatedBlock(block, x, y, z, world, renderer); - } - } - return true; - } - - public boolean renderRotatedBlock (Block block, int x, int y, int z, IBlockAccess world, RenderBlocks renderer) - { - IFacingLogic logic = (IFacingLogic) world.getBlockTileEntity(x, y, z); - byte direction = logic.getRenderDirection(); - - if (direction == 0) - { - renderer.uvRotateEast = 3; - renderer.uvRotateWest = 3; - renderer.uvRotateNorth = 3; - renderer.uvRotateSouth = 3; - } - if (direction == 2) - { - renderer.uvRotateNorth = 2; - renderer.uvRotateSouth = 1; - } - if (direction == 3) - { - renderer.uvRotateNorth = 1; - renderer.uvRotateSouth = 2; - renderer.uvRotateTop = 3; - renderer.uvRotateBottom = 3; - } - if (direction == 4) - { - renderer.uvRotateEast = 1; - renderer.uvRotateWest = 2; - renderer.uvRotateTop = 2; - renderer.uvRotateBottom = 1; - } - if (direction == 5) - { - renderer.uvRotateEast = 2; - renderer.uvRotateWest = 1; - renderer.uvRotateTop = 1; - renderer.uvRotateBottom = 2; - } - - boolean flag = renderer.renderStandardBlock(block, x, y, z); - renderer.uvRotateSouth = 0; - renderer.uvRotateEast = 0; - renderer.uvRotateWest = 0; - renderer.uvRotateNorth = 0; - renderer.uvRotateTop = 0; - renderer.uvRotateBottom = 0; - return flag; - } - - @Override - public boolean shouldRender3DInInventory () - { - return true; - } - - @Override - public int getRenderId () - { - return model; - } -} diff --git a/src/tconstruct/client/gui/AdvDrawbridgeButton.java b/src/tconstruct/client/gui/AdvDrawbridgeButton.java deleted file mode 100644 index 80707d5a..00000000 --- a/src/tconstruct/client/gui/AdvDrawbridgeButton.java +++ /dev/null @@ -1,160 +0,0 @@ -package tconstruct.client.gui; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -import net.minecraft.client.gui.GuiButton; - -public class AdvDrawbridgeButton extends GuiButton -{ - protected static final ResourceLocation buttonTextures = new ResourceLocation("tinker:textures/gui/slotButton.png"); - - /** Button width in pixels */ - protected int width; - - /** Button height in pixels */ - protected int height; - - /** The x position of this control. */ - public int xPosition; - - /** The y position of this control. */ - public int yPosition; - - /** The x position of this control when the GUI is expanded. */ - public int xPositionExp; - - /** The x position of this control when the GUI is expanded. */ - public int yPositionExp; - - /** Is the GUI expanded. */ - public boolean isGuiExpanded = false; - - /** The string displayed on this control. */ - public String displayString; - - /** ID for this control. */ - public int id; - - /** True if this control is enabled, false to disable. */ - public boolean enabled; - - /** Hides the button completely if false. */ - public boolean drawButton; - protected boolean field_82253_i; - - public AdvDrawbridgeButton(int par1, int par2, int par3, int par4, int par5, String par6Str) - { - this(par1, par2, par3, par4, par5, 200, 20, par6Str); - } - - public AdvDrawbridgeButton(int par1, int par2, int par3, int par4, int par5, int par6, int par7, String par8Str) - { - super(par1, par2, par3, par6, par7, par8Str); - this.width = 200; - this.height = 20; - this.enabled = true; - this.drawButton = true; - this.id = par1; - this.xPosition = par2; - this.yPosition = par3; - this.xPositionExp = par4; - this.yPositionExp = par5; - this.width = par6; - this.height = par7; - this.displayString = par8Str; - } - - /** - * Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over - * this button and 2 if it IS hovering over this button. - */ - protected int getHoverState (boolean par1) - { - byte b0 = 1; - - if (!this.enabled) - { - b0 = 0; - } - else if (par1) - { - b0 = 2; - } - - return b0; - } - - /** - * Draws this button to the screen. - */ - public void drawButton (Minecraft par1Minecraft, int par2, int par3) - { - if (this.drawButton) - { - FontRenderer fontrenderer = par1Minecraft.fontRenderer; - par1Minecraft.getTextureManager().bindTexture(buttonTextures); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - int xPosition = isGuiExpanded ? this.xPositionExp : this.xPosition; - int yPosition = isGuiExpanded ? this.yPositionExp : this.yPosition; - - this.field_82253_i = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + this.width && par3 < yPosition + this.height; - int k = this.getHoverState(this.field_82253_i); - this.drawTexturedModalRect(xPosition, yPosition, 0, 46 + k * 26, this.width / 2, this.height); - this.drawTexturedModalRect(xPosition + this.width / 2, yPosition, 200 - this.width / 2, 46 + k * 26, this.width / 2, this.height); - this.mouseDragged(par1Minecraft, par2, par3); - int l = 14737632; - - if (!this.enabled) - { - l = -6250336; - } - else if (this.field_82253_i) - { - l = 16777120; - } - - this.drawCenteredString(fontrenderer, this.displayString, xPosition + this.width / 2, yPosition + (this.height - 8) / 2, l); - } - } - - /** - * Fired when the mouse button is dragged. Equivalent of - * MouseListener.mouseDragged(MouseEvent e). - */ - protected void mouseDragged (Minecraft par1Minecraft, int par2, int par3) - { - } - - /** - * Fired when the mouse button is released. Equivalent of - * MouseListener.mouseReleased(MouseEvent e). - */ - public void mouseReleased (int par1, int par2) - { - } - - /** - * Returns true if the mouse has been pressed on this control. Equivalent of - * MouseListener.mousePressed(MouseEvent e). - */ - public boolean mousePressed (Minecraft par1Minecraft, int par2, int par3) - { - int xPosition = isGuiExpanded ? this.xPositionExp : this.xPosition; - int yPosition = isGuiExpanded ? this.yPositionExp : this.yPosition; - - return this.enabled && this.drawButton && par2 >= xPosition && par3 >= yPosition && par2 < xPosition + this.width && par3 < yPosition + this.height; - } - - public boolean func_82252_a () - { - return this.field_82253_i; - } - - public void func_82251_b (int par1, int par2) - { - } -} \ No newline at end of file diff --git a/src/tconstruct/client/gui/AdvDrawbridgeGui.java b/src/tconstruct/client/gui/AdvDrawbridgeGui.java deleted file mode 100644 index 9474dc6a..00000000 --- a/src/tconstruct/client/gui/AdvDrawbridgeGui.java +++ /dev/null @@ -1,170 +0,0 @@ -package tconstruct.client.gui; - -import cpw.mods.fml.common.network.PacketDispatcher; -import java.io.*; -import java.util.Iterator; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.network.packet.Packet250CustomPayload; -import net.minecraft.util.*; -import net.minecraft.world.World; -import org.lwjgl.opengl.GL11; -import tconstruct.blocks.logic.AdvancedDrawbridgeLogic; -import tconstruct.inventory.AdvancedDrawbridgeContainer; - -public class AdvDrawbridgeGui extends GuiContainer -{ - public AdvancedDrawbridgeLogic logic; - - public boolean isGuiExpanded = false; - public boolean containerNeglectMouse = false; - - public AdvDrawbridgeGui(EntityPlayer player, AdvancedDrawbridgeLogic frypan, World world, int x, int y, int z) - { - super(frypan.getGuiContainer(player.inventory, world, x, y, z)); - this.inventorySlots = new AdvancedDrawbridgeContainer(player.inventory, frypan, this); - player.openContainer = this.inventorySlots; - logic = frypan; - } - - protected void drawGuiContainerForegroundLayer (int par1, int par2) - { - fontRenderer.drawString("Advanced Drawbridge", 8, 6, 0x404040); - fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040); - } - - private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/drawbridgeAdvanced.png"); - - protected void drawGuiContainerBackgroundLayer (float f, int i, int j) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(background); - int cornerX = (width - xSize) / 2; - int cornerY = (height - ySize) / 2; - drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize); - if (!isGuiExpanded) - { - drawTexturedModalRect(cornerX + 34, cornerY + 35, 238, 0, 18, 18); - } - else - { - for (int index = 0; index < 16; index++) - { - drawTexturedModalRect(index < 8 ? cornerX + 9 + 20 * index : cornerX + 9 + 20 * (index - 8), cornerY + 34 + (int) Math.floor(index / 8) * 18 + (index < 8 ? 0 : 1), 238, 0, 18, 18); - if (index != 15) - { - drawTexturedModalRect(index < 8 ? cornerX + 26 + 20 * index : cornerX + 26 + 20 * (index - 8), cornerY + 34 + (int) Math.floor(index / 8) * 18 + (index < 8 ? 0 : 1) + 6, 253, 18, - 3, 5); - } - } - // drawTexturedModalRect(cornerX - 7, cornerY + 29, 0, 167, 10, 40); - // drawTexturedModalRect(cornerX - 7, cornerY + 29, 0, 167, 10, 40); - // drawTexturedModalRect(cornerX + 173, cornerY + 29, 10, 167, 10, 40); - } - } - - public void initGui () - { - super.initGui(); - int cornerX = (this.width - this.xSize) / 2; - int cornerY = (this.height - this.ySize) / 2; - - this.setExpanded(false); - this.buttonList.clear(); - GuiButton button = new DrawbridgeButton(0, cornerX + 131, cornerY + 18, 176, 0, 21, 22); - if (logic.getPlacementDirection() == 0) - button.enabled = false; - this.buttonList.add(button); - button = new DrawbridgeButton(1, cornerX + 146, cornerY + 34, 199, 23, 22, 21); - if (logic.getPlacementDirection() == 1) - button.enabled = false; - this.buttonList.add(button); - button = new DrawbridgeButton(2, cornerX + 132, cornerY + 48, 199, 0, 21, 22); - if (logic.getPlacementDirection() == 2) - button.enabled = false; - this.buttonList.add(button); - button = new DrawbridgeButton(3, cornerX + 117, cornerY + 34, 178, 23, 22, 21); - if (logic.getPlacementDirection() == 3) - button.enabled = false; - this.buttonList.add(button); - button = new DrawbridgeButton(4, cornerX + 135, cornerY + 40, 217, 0, 10, 10); - if (logic.getPlacementDirection() == 4) - button.enabled = false; - this.buttonList.add(button); - - this.buttonList.add(new AdvDrawbridgeButton(5, this.width / 2 - 13, this.height / 2 - 52, this.width / 2 + 58, this.height / 2 - 79, 26, 26, "Inv")); - } - - public void setExpanded (boolean flag) - { - this.isGuiExpanded = flag; - this.containerNeglectMouse = true; - Iterator i1 = this.buttonList.iterator(); - while (i1.hasNext()) - { - GuiButton b = i1.next(); - if (b instanceof AdvDrawbridgeButton) - { - ((AdvDrawbridgeButton) b).isGuiExpanded = flag; - } - else - { - b.drawButton = !flag; - } - } - ((AdvancedDrawbridgeContainer) this.inventorySlots).updateContainerSlots(); - } - - protected void actionPerformed (GuiButton button) - { - if (button.id == 5) - { - setExpanded(!isGuiExpanded); - return; - } - - for (Object o : buttonList) - { - GuiButton b = (GuiButton) o; - b.enabled = true; - } - button.enabled = false; - - logic.setPlacementDirection((byte) button.id); - updateServer((byte) button.id); - } - - void updateServer (byte direction) - { - ByteArrayOutputStream bos = new ByteArrayOutputStream(8); - DataOutputStream outputStream = new DataOutputStream(bos); - try - { - outputStream.writeByte(5); - outputStream.writeInt(logic.worldObj.provider.dimensionId); - outputStream.writeInt(logic.xCoord); - outputStream.writeInt(logic.yCoord); - outputStream.writeInt(logic.zCoord); - outputStream.writeByte(direction); - } - catch (Exception ex) - { - ex.printStackTrace(); - } - - Packet250CustomPayload packet = new Packet250CustomPayload(); - packet.channel = "TConstruct"; - packet.data = bos.toByteArray(); - packet.length = bos.size(); - - PacketDispatcher.sendPacketToServer(packet); - } - - @Override - public void updateScreen () - { - super.updateScreen(); - this.containerNeglectMouse = false; - } -} diff --git a/src/tconstruct/client/gui/DrawbridgeButton.java b/src/tconstruct/client/gui/DrawbridgeButton.java deleted file mode 100644 index 21d9e69c..00000000 --- a/src/tconstruct/client/gui/DrawbridgeButton.java +++ /dev/null @@ -1,49 +0,0 @@ -package tconstruct.client.gui; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class DrawbridgeButton extends GuiButton -{ - /** - * True for pointing right (next page), false for pointing left (previous page). - */ - int uPos; - int vPos; - - public DrawbridgeButton(int id, int xPos, int yPos, int u, int v, int xSize, int ySize) - { - super(id, xPos, yPos, xSize, ySize, ""); - uPos = u; - vPos = v; - } - - private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/drawbridge.png"); - - /** - * Draws this button to the screen. - */ - public void drawButton (Minecraft mc, int par2, int par3) - { - if (this.drawButton) - { - boolean hovering = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height; - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - mc.getTextureManager().bindTexture(background); - int offset = 0; - if (!this.enabled) - offset = 46; - else if (hovering) - offset = 92; - - this.drawTexturedModalRect(this.xPosition, this.yPosition, uPos, vPos + offset, width, height); - } - } -} diff --git a/src/tconstruct/client/gui/DrawbridgeGui.java b/src/tconstruct/client/gui/DrawbridgeGui.java deleted file mode 100644 index 65835819..00000000 --- a/src/tconstruct/client/gui/DrawbridgeGui.java +++ /dev/null @@ -1,114 +0,0 @@ -package tconstruct.client.gui; - -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.network.packet.Packet250CustomPayload; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -import org.lwjgl.opengl.GL11; - -import tconstruct.blocks.logic.DrawbridgeLogic; -import cpw.mods.fml.common.network.PacketDispatcher; - -public class DrawbridgeGui extends GuiContainer -{ - public DrawbridgeLogic logic; - - public DrawbridgeGui(InventoryPlayer inventoryplayer, DrawbridgeLogic frypan, World world, int x, int y, int z) - { - super(frypan.getGuiContainer(inventoryplayer, world, x, y, z)); - logic = frypan; - } - - protected void drawGuiContainerForegroundLayer (int par1, int par2) - { - //fontRenderer.drawString(StatCollector.translateToLocal("aggregator.glowstone"), 60, 6, 0x404040); - fontRenderer.drawString("Drawbridge", 8, 6, 0x404040); - fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040); - } - - private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/drawbridge.png"); - - protected void drawGuiContainerBackgroundLayer (float f, int i, int j) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(background); - int cornerX = (width - xSize) / 2; - int cornerY = (height - ySize) / 2; - drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize); - } - - public void initGui () - { - super.initGui(); - int cornerX = (this.width - this.xSize) / 2; - int cornerY = (this.height - this.ySize) / 2; - - this.buttonList.clear(); - GuiButton button = new DrawbridgeButton(0, cornerX + 131, cornerY + 18, 176, 0, 21, 22); - if (logic.getPlacementDirection() == 0) - button.enabled = false; - this.buttonList.add(button); - button = new DrawbridgeButton(1, cornerX + 146, cornerY + 34, 199, 23, 22, 21); - if (logic.getPlacementDirection() == 1) - button.enabled = false; - this.buttonList.add(button); - button = new DrawbridgeButton(2, cornerX + 132, cornerY + 48, 199, 0, 21, 22); - if (logic.getPlacementDirection() == 2) - button.enabled = false; - this.buttonList.add(button); - button = new DrawbridgeButton(3, cornerX + 117, cornerY + 34, 178, 23, 22, 21); - if (logic.getPlacementDirection() == 3) - button.enabled = false; - this.buttonList.add(button); - button = new DrawbridgeButton(4, cornerX + 135, cornerY + 40, 217, 0, 10, 10); - if (logic.getPlacementDirection() == 4) - button.enabled = false; - this.buttonList.add(button); - } - - protected void actionPerformed (GuiButton button) - { - for (Object o : buttonList) - { - GuiButton b = (GuiButton) o; - b.enabled = true; - } - button.enabled = false; - - logic.setPlacementDirection((byte) button.id); - updateServer((byte) button.id); - } - - void updateServer (byte direction) - { - ByteArrayOutputStream bos = new ByteArrayOutputStream(8); - DataOutputStream outputStream = new DataOutputStream(bos); - try - { - outputStream.writeByte(5); - outputStream.writeInt(logic.worldObj.provider.dimensionId); - outputStream.writeInt(logic.xCoord); - outputStream.writeInt(logic.yCoord); - outputStream.writeInt(logic.zCoord); - outputStream.writeByte(direction); - } - catch (Exception ex) - { - ex.printStackTrace(); - } - - Packet250CustomPayload packet = new Packet250CustomPayload(); - packet.channel = "TConstruct"; - packet.data = bos.toByteArray(); - packet.length = bos.size(); - - PacketDispatcher.sendPacketToServer(packet); - } -} diff --git a/src/tconstruct/common/TContent.java b/src/tconstruct/common/TContent.java index 13b4bcc6..1c98de87 100644 --- a/src/tconstruct/common/TContent.java +++ b/src/tconstruct/common/TContent.java @@ -141,7 +141,6 @@ public class TContent implements IFuelHandler public static Block metalBlock; public static Block tankAir; - public static Block redstoneMachine; public static Block dryingRack; //Decoration @@ -412,13 +411,6 @@ public class TContent implements IFuelHandler GameRegistry.registerBlock(tankAir, "TankAir"); GameRegistry.registerTileEntity(TankAirLogic.class, "tconstruct.tank.air"); - //Redstone machines - redstoneMachine = new RedstoneMachine(PHConstruct.redstoneMachine).setUnlocalizedName("Redstone.Machine"); - GameRegistry.registerBlock(redstoneMachine, RedstoneMachineItem.class, "Redstone.Machine"); - GameRegistry.registerTileEntity(DrawbridgeLogic.class, "Drawbridge"); - GameRegistry.registerTileEntity(FirestarterLogic.class, "Firestarter"); - GameRegistry.registerTileEntity(AdvancedDrawbridgeLogic.class, "AdvDrawbridge"); - //Traps landmine = new BlockLandmine(PHConstruct.landmine).setHardness(0.5F).setResistance(0F).setStepSound(Block.soundMetalFootstep).setCreativeTab(CreativeTabs.tabRedstone) .setUnlocalizedName("landmine"); @@ -1125,22 +1117,6 @@ public class TContent implements IFuelHandler toolForgeBlocks[sc])); } - // Drawbridge Recipes - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 0), "aca", "#d#", "#r#", '#', "ingotBronze", 'a', "ingotAluminumBrass", 'c', new ItemStack(blankPattern, 1, 1), - 'r', new ItemStack(Item.redstone), 'd', new ItemStack(Block.dispenser))); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 0), "aca", "#d#", "#r#", '#', "ingotBronze", 'a', "ingotAluminumBrass", 'c', new ItemStack(blankPattern, 1, 2), - 'r', new ItemStack(Item.redstone), 'd', new ItemStack(Block.dispenser))); - - // Igniter Recipes - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 1), "aca", "#d#", "#r#", '#', "ingotBronze", 'a', "ingotAluminumBrass", 'c', new ItemStack(largePlate, 1, 7), 'r', - new ItemStack(Item.redstone), 'd', new ItemStack(Item.flintAndSteel))); - - // Advanced Drawbridge Recipes - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 2), " c ", "rdr", " a ", 'a', "ingotAluminumBrass", 'c', new ItemStack(blankPattern, 1, 1), 'r', new ItemStack( - Item.redstone), 'd', new ItemStack(redstoneMachine, 1, 0))); - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 2), " c ", "rdr", " a ", 'a', "ingotAluminumBrass", 'c', new ItemStack(blankPattern, 1, 2), 'r', new ItemStack( - Item.redstone), 'd', new ItemStack(redstoneMachine, 1, 0))); - // ToolStation Recipes (Wooden Version) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', "crafterWood")); GameRegistry.addRecipe(new ItemStack(toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(craftingStationWood, 1, 0)); diff --git a/src/tconstruct/common/TProxyCommon.java b/src/tconstruct/common/TProxyCommon.java index cc858a99..f8ec6605 100644 --- a/src/tconstruct/common/TProxyCommon.java +++ b/src/tconstruct/common/TProxyCommon.java @@ -28,10 +28,10 @@ public class TProxyCommon implements IGuiHandler public static int smelteryGuiID = 7; public static int furnaceID = 8; - public static int drawbridgeID = 9; +// public static int drawbridgeID = 9; // Moved to TMechworks public static int landmineID = 10; public static int craftingStationID = 11; - public static int advDrawbridgeID = 12; +// public static int advDrawbridgeID = 12; // Moved to TMechworks public static int inventoryGui = 100; public static int armorGuiID = 101; public static int knapsackGuiID = 102; diff --git a/src/tconstruct/inventory/AdvancedDrawbridgeContainer.java b/src/tconstruct/inventory/AdvancedDrawbridgeContainer.java deleted file mode 100644 index c2bdc3ea..00000000 --- a/src/tconstruct/inventory/AdvancedDrawbridgeContainer.java +++ /dev/null @@ -1,171 +0,0 @@ -package tconstruct.inventory; - -import net.minecraft.entity.player.EntityPlayer; - -import java.util.Iterator; -import net.minecraft.entity.player.*; -import net.minecraft.inventory.*; -import net.minecraft.item.ItemStack; -import tconstruct.blocks.logic.AdvancedDrawbridgeLogic; -import tconstruct.client.gui.AdvDrawbridgeGui; - -public class AdvancedDrawbridgeContainer extends Container -{ - public AdvancedDrawbridgeLogic logic; - public int progress = 0; - public int fuel = 0; - public int fuelGague = 0; - - private AdvDrawbridgeGui gui = null; - - public AdvancedDrawbridgeContainer(InventoryPlayer inventoryplayer, AdvancedDrawbridgeLogic logic) - { - this.logic = logic; - - addContainerSlots(logic); - bindPlayerInventory(inventoryplayer); - updateContainerSlots(); - } - - public AdvancedDrawbridgeContainer(InventoryPlayer inventoryplayer, AdvancedDrawbridgeLogic logic, AdvDrawbridgeGui gui) - { - this.logic = logic; - this.gui = gui; - - addContainerSlots(logic); - bindPlayerInventory(inventoryplayer); - updateContainerSlots(); - } - - public void bindPlayerInventory (InventoryPlayer inventoryPlayer) - { - for (int column = 0; column < 3; column++) - { - for (int row = 0; row < 9; row++) - { - this.addSlotToContainer(new Slot(inventoryPlayer, row + column * 9 + 9, 8 + row * 18, 84 + column * 18)); - } - } - - for (int column = 0; column < 9; column++) - { - this.addSlotToContainer(new Slot(inventoryPlayer, column, 8 + column * 18, 142)); - } - } - - public void addContainerSlots (AdvancedDrawbridgeLogic logic) - { - this.addSlotToContainer(new SlotOpaqueBlocksOnly(logic.camoInventory, 0, 35, 36)); - - for (int i = 0; i < logic.getSizeInventory(); i++) - { - int ind = (int) (Math.floor(i / 8) * 8); - int x = i < 8 ? 10 + 20 * i : 10 + 20 * (i - 8); - int y = 35 + (int) Math.floor(i / 8) * 18 + (i < 8 ? 0 : 1); - this.addSlotToContainer(new DrawbridgeSlot(logic, i, x, y, logic)); - } - } - - @Override - public boolean canInteractWith (EntityPlayer entityplayer) - { - return logic.isUseableByPlayer(entityplayer); - } - - @Override - public ItemStack transferStackInSlot (EntityPlayer player, int slotID) - { - ItemStack stack = null; - Slot slot = (Slot) this.inventorySlots.get(slotID); - - if (slot != null && slot.getHasStack()) - { - ItemStack slotStack = slot.getStack(); - stack = slotStack.copy(); - - if (slotID < logic.getSizeInventory()) - { - if (!this.mergeItemStack(slotStack, logic.getSizeInventory(), this.inventorySlots.size(), true)) - { - return null; - } - } - else if (!this.mergeItemStack(slotStack, 0, logic.getSizeInventory(), false)) - { - return null; - } - - if (slotStack.stackSize == 0) - { - slot.putStack((ItemStack) null); - } - else - { - slot.onSlotChanged(); - } - } - - return stack; - } - - public void updateContainerSlots () - { - if (gui == null) - { - return; - } - else if (gui.isGuiExpanded) - { - Iterator i1 = inventorySlots.iterator(); - int index = 0; - while (i1.hasNext()) - { - Slot sl = i1.next(); - if (index == 0) - { - sl.xDisplayPosition = -1000; - sl.yDisplayPosition = -1000; - } - else if (sl instanceof DrawbridgeSlot) - { - sl.xDisplayPosition = (index - 1) < 8 ? 10 + 20 * (index - 1) : 10 + 20 * ((index - 1) - 8); - sl.yDisplayPosition = 35 + (int) Math.floor((index - 1) / 8) * 18 + ((index - 1) < 8 ? 0 : 1); - } - index++; - } - } - else - { - Iterator i1 = inventorySlots.iterator(); - int index = 0; - while (i1.hasNext()) - { - Slot sl = i1.next(); - if (index == 0) - { - sl.xDisplayPosition = 35; - sl.yDisplayPosition = 36; - } - else if (sl instanceof DrawbridgeSlot) - { - sl.xDisplayPosition = -1000; - sl.yDisplayPosition = -1000; - } - index++; - } - } - } - - @Override - public ItemStack slotClick (int par1, int par2, int par3, EntityPlayer par4EntityPlayer) - { - if (gui != null && gui.containerNeglectMouse) - { - return null; - } - else - { - return super.slotClick(par1, par2, par3, par4EntityPlayer); - } - } -} diff --git a/src/tconstruct/inventory/DrawbridgeContainer.java b/src/tconstruct/inventory/DrawbridgeContainer.java deleted file mode 100644 index 4bd7a9c9..00000000 --- a/src/tconstruct/inventory/DrawbridgeContainer.java +++ /dev/null @@ -1,80 +0,0 @@ -package tconstruct.inventory; - -import tconstruct.blocks.logic.DrawbridgeLogic; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class DrawbridgeContainer extends Container -{ - public DrawbridgeLogic logic; - public int progress = 0; - public int fuel = 0; - public int fuelGague = 0; - - public DrawbridgeContainer(InventoryPlayer inventoryplayer, DrawbridgeLogic logic) - { - this.logic = logic; - - this.addSlotToContainer(new DrawbridgeSlot(logic, 0, 80, 36, logic)); - this.addSlotToContainer(new SlotOpaqueBlocksOnly(logic, 1, 35, 36)); - - /* Player inventory */ - for (int column = 0; column < 3; column++) - { - for (int row = 0; row < 9; row++) - { - this.addSlotToContainer(new Slot(inventoryplayer, row + column * 9 + 9, 8 + row * 18, 84 + column * 18)); - } - } - - for (int column = 0; column < 9; column++) - { - this.addSlotToContainer(new Slot(inventoryplayer, column, 8 + column * 18, 142)); - } - } - - @Override - public boolean canInteractWith (EntityPlayer entityplayer) - { - return logic.isUseableByPlayer(entityplayer); - } - - @Override - public ItemStack transferStackInSlot (EntityPlayer player, int slotID) - { - ItemStack stack = null; - Slot slot = (Slot) this.inventorySlots.get(slotID); - - if (slot != null && slot.getHasStack()) - { - ItemStack slotStack = slot.getStack(); - stack = slotStack.copy(); - - if (slotID < logic.getSizeInventory()) - { - if (!this.mergeItemStack(slotStack, logic.getSizeInventory(), this.inventorySlots.size(), true)) - { - return null; - } - } - else if (!this.mergeItemStack(slotStack, 0, logic.getSizeInventory(), false)) - { - return null; - } - - if (slotStack.stackSize == 0) - { - slot.putStack((ItemStack) null); - } - else - { - slot.onSlotChanged(); - } - } - - return stack; - } -} diff --git a/src/tconstruct/inventory/DrawbridgeSlot.java b/src/tconstruct/inventory/DrawbridgeSlot.java deleted file mode 100644 index 13595cfc..00000000 --- a/src/tconstruct/inventory/DrawbridgeSlot.java +++ /dev/null @@ -1,47 +0,0 @@ -package tconstruct.inventory; - -import tconstruct.library.blocks.IDrawbridgeLogicBase; - -import tconstruct.blocks.logic.DrawbridgeLogic; -import tconstruct.library.TConstructRegistry; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class DrawbridgeSlot extends SlotBlocksOnly -{ - IDrawbridgeLogicBase logic; - - public DrawbridgeSlot(IInventory iinventory, int par2, int par3, int par4, IDrawbridgeLogicBase logic) - { - super(iinventory, par2, par3, par4); - this.logic = logic; - } - - @Override - public boolean isItemValid (ItemStack par1ItemStack) - { - if (!super.isItemValid(par1ItemStack)) - { - if (TConstructRegistry.blockToItemMapping[par1ItemStack.itemID] == 0) - { - return false; - } - } - - return !logic.hasExtended(); - } - - @Override - public boolean canTakeStack (EntityPlayer par1EntityPlayer) - { - return !logic.hasExtended(); - } - - @Override - public int getSlotStackLimit () - { - return inventory.getInventoryStackLimit(); - } -} diff --git a/src/tconstruct/items/blocks/RedstoneMachineItem.java b/src/tconstruct/items/blocks/RedstoneMachineItem.java deleted file mode 100644 index dd7faa6e..00000000 --- a/src/tconstruct/items/blocks/RedstoneMachineItem.java +++ /dev/null @@ -1,75 +0,0 @@ -package tconstruct.items.blocks; - -import java.util.List; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; - -public class RedstoneMachineItem extends ItemBlock -{ - public static final String blockType[] = { "drawbridge", "firestarter", "advdrawbridge" }; - - public RedstoneMachineItem(int id) - { - super(id); - setMaxDamage(0); - setHasSubtypes(true); - } - - public int getMetadata (int meta) - { - return meta; - } - - public String getUnlocalizedName (ItemStack itemstack) - { - int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1); - return (new StringBuilder()).append("block.").append(blockType[pos]).toString(); - } - - @Override - public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) - { - if (stack.hasTagCompound() && stack.getItemDamage() == 0) - { - NBTTagCompound contentTags = stack.getTagCompound().getCompoundTag("Contents"); - if (contentTags != null) - { - ItemStack contents = ItemStack.loadItemStackFromNBT(contentTags); - if (contents != null) - { - list.add("Inventory: " + contents.getDisplayName()); - list.add("Amount: " + contents.stackSize); - } - } - NBTTagCompound camoTag = stack.getTagCompound().getCompoundTag("Camoflauge"); - if (camoTag != null) - { - ItemStack camo = ItemStack.loadItemStackFromNBT(camoTag); - if (camo != null) - list.add("Camoflauge: " + camo.getDisplayName()); - } - - if (stack.getTagCompound().hasKey("Placement")) - { - String string = getDirectionString(stack.getTagCompound().getByte("Placement")); - list.add("Placement Direction: " + string); - } - } - } - - String getDirectionString (byte key) - { - if (key == 0) - return ("Up"); - if (key == 1) - return ("Right"); - if (key == 2) - return ("Down"); - - return "Left"; - } -} diff --git a/src/tconstruct/util/config/PHConstruct.java b/src/tconstruct/util/config/PHConstruct.java index 1b7322c3..34b69993 100644 --- a/src/tconstruct/util/config/PHConstruct.java +++ b/src/tconstruct/util/config/PHConstruct.java @@ -131,12 +131,12 @@ public class PHConstruct moltenEnder = config.getBlock("Molten Ender", 3218).getInt(3218); - signalBus = config.getBlock("Signal Bus", 3221).getInt(3221); - signalTerminal = config.getBlock("Signal Terminal", 3222).getInt(3222); +// signalBus = config.getBlock("Signal Bus", 3221).getInt(3221); +// signalTerminal = config.getBlock("Signal Terminal", 3222).getInt(3222); glass = config.getBlock("Clear Glass", 3223).getInt(3223); stainedGlass = config.getBlock("Stained Glass", 3224).getInt(3224); stainedGlassClear = config.getBlock("Clear Stained Glass", 3225).getInt(3225); - redstoneMachine = config.getBlock("Redstone Machines", 3226).getInt(3226); +// redstoneMachine = config.getBlock("Redstone Machines", 3226).getInt(3226); // Migrated to TMechworks dryingRack = config.getBlock("Drying Rack", 3227).getInt(3227); glassPane = config.getBlock("Glass Pane", 3228).getInt(3228); stainedGlassClearPane = config.getBlock("Clear Stained Glass Pane", 3229).getInt(3229); @@ -260,8 +260,8 @@ public class PHConstruct goldHead = config.getItem("Patterns and Misc", "Golden Head", 14113).getInt(14113); jerky = config.getItem("Patterns and Misc", "Jerky", 14115).getInt(14115); - spoolWire = config.getItem("Logic", "SpoolWire", 14120).getInt(14120); - lengthWire = config.getItem("Logic", "LengthWire", 14121).getInt(14121); +// spoolWire = config.getItem("Logic", "SpoolWire", 14120).getInt(14120); +// lengthWire = config.getItem("Logic", "LengthWire", 14121).getInt(14121); boolean ic2 = true; boolean xycraft = true; @@ -413,8 +413,8 @@ public class PHConstruct public static int woodenRail; - public static int signalBus; - public static int signalTerminal; +// public static int signalBus; +// public static int signalTerminal; //Crops public static int oreBerry; @@ -580,8 +580,8 @@ public class PHConstruct public static int heartCanister; - public static int spoolWire; - public static int lengthWire; +// public static int spoolWire; +// public static int lengthWire; //Ore values public static boolean generateCopper; diff --git a/src/tconstruct/util/network/TPacketHandler.java b/src/tconstruct/util/network/TPacketHandler.java index 00db4e71..5a331a9c 100644 --- a/src/tconstruct/util/network/TPacketHandler.java +++ b/src/tconstruct/util/network/TPacketHandler.java @@ -15,7 +15,6 @@ import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; import tconstruct.TConstruct; -import tconstruct.blocks.logic.DrawbridgeLogic; import tconstruct.blocks.logic.SmelteryLogic; import tconstruct.blocks.logic.ToolForgeLogic; import tconstruct.blocks.logic.ToolStationLogic; @@ -124,22 +123,6 @@ public class TPacketHandler implements IPacketHandler } } - else if (packetID == 5) //Drawbridge - { - int dimension = inputStream.readInt(); - World world = DimensionManager.getWorld(dimension); - int x = inputStream.readInt(); - int y = inputStream.readInt(); - int z = inputStream.readInt(); - TileEntity te = world.getBlockTileEntity(x, y, z); - - byte direction = inputStream.readByte(); - if (te instanceof DrawbridgeLogic) - { - ((DrawbridgeLogic) te).setPlacementDirection(direction); - } - } - else if (packetID == 10) //Double jump { //String user = inputStream.readUTF(); diff --git a/src/tconstruct/util/player/FakePlayerLogic.java b/src/tconstruct/util/player/FakePlayerLogic.java deleted file mode 100644 index bcc9e76b..00000000 --- a/src/tconstruct/util/player/FakePlayerLogic.java +++ /dev/null @@ -1,22 +0,0 @@ -package tconstruct.util.player; - -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; -import net.minecraftforge.common.FakePlayer; -import tconstruct.library.blocks.InventoryLogic; - -public class FakePlayerLogic extends FakePlayer -{ - InventoryLogic logic; - - public FakePlayerLogic(World world, String name, InventoryLogic logic) - { - super(world, name); - this.logic = logic; - } - - public ChunkCoordinates getPlayerCoordinates () - { - return new ChunkCoordinates(logic.xCoord, logic.yCoord, logic.zCoord); - } -}