From 2553eb2377e2c83dfdd23795f269802b7154fbce Mon Sep 17 00:00:00 2001 From: mDiyo Date: Sun, 10 Nov 2013 17:05:50 -0800 Subject: [PATCH] Fix Smeltery null crash, remove crystalline content --- .../blocks/machines/crystal_machine_top.png | Bin 540 -> 0 bytes .../blocks/machines/essencecrystal.png | Bin 756 -> 0 bytes .../textures/blocks/machines/lightstone.png | Bin 937 -> 0 bytes .../textures/blocks/machines/terracrystal.png | Bin 699 -> 0 bytes .../textures/blocks/machines/terrafreezer.png | Bin 819 -> 0 bytes .../textures/blocks/machines/terrafumer.png | Bin 680 -> 0 bytes .../textures/blocks/machines/terragrower.png | Bin 690 -> 0 bytes .../textures/blocks/machines/terraleecher.png | Bin 682 -> 0 bytes .../textures/blocks/machines/terralighter.png | Bin 682 -> 0 bytes .../blocks/machines/terralighter_top.png | Bin 735 -> 0 bytes .../machines/terralighter_top_inactive.png | Bin 735 -> 0 bytes .../textures/blocks/machines/terranether.png | Bin 737 -> 0 bytes .../textures/blocks/machines/terrawaver.png | Bin 717 -> 0 bytes .../materials/material_essencecrystal.png | Bin 1260 -> 0 bytes .../material_essencecrystal.png.mcmeta | 19 - .../materials/material_essencecrystal.txt | 12 - src/appeng/api/Blocks.java | 81 +- src/appeng/api/DimentionalCoord.java | 98 +- src/appeng/api/IAEItemStack.java | 300 ++--- src/appeng/api/IAETagCompound.java | 43 +- src/appeng/api/IAppEngApi.java | 287 ++-- src/appeng/api/IAppEngGrinderRecipe.java | 75 +- src/appeng/api/ICellHandler.java | 33 +- src/appeng/api/ICellRegistry.java | 45 +- src/appeng/api/IExternalStorageHandler.java | 33 +- src/appeng/api/IExternalStorageRegistry.java | 33 +- src/appeng/api/IGridCacheRegistry.java | 33 +- src/appeng/api/IGrinderRecipeManager.java | 45 +- src/appeng/api/IItemComparisionProvider.java | 33 +- src/appeng/api/IItemComparison.java | 10 +- src/appeng/api/IItemList.java | 34 +- src/appeng/api/ILocateableRegistry.java | 15 +- .../api/ISpecialComparisonRegistry.java | 31 +- src/appeng/api/IWirelessTermHandler.java | 79 +- src/appeng/api/IWirelessTermRegistery.java | 53 +- src/appeng/api/Items.java | 40 +- src/appeng/api/Materials.java | 46 +- src/appeng/api/TileRef.java | 118 +- src/appeng/api/Util.java | 206 +-- src/appeng/api/WorldCoord.java | 136 +- src/appeng/api/config/ActionItems.java | 25 +- src/appeng/api/config/CondenserOuput.java | 28 +- src/appeng/api/config/EnableDisable.java | 27 +- src/appeng/api/config/FullnessMode.java | 30 +- src/appeng/api/config/FuzzyMode.java | 40 +- src/appeng/api/config/IConfigEnum.java | 15 +- .../api/config/InterfaceBlockingMode.java | 28 +- .../api/config/InterfaceCraftingMode.java | 28 +- src/appeng/api/config/ItemFlow.java | 28 +- src/appeng/api/config/ListMode.java | 28 +- src/appeng/api/config/MatchingMode.java | 25 +- src/appeng/api/config/OperationMode.java | 29 +- src/appeng/api/config/PowerUnits.java | 28 +- src/appeng/api/config/RedstoneModeInput.java | 29 +- .../api/config/RedstoneModeInputOnOff.java | 28 +- src/appeng/api/config/RedstoneModeOutput.java | 27 +- src/appeng/api/config/SearchBoxMode.java | 30 +- src/appeng/api/config/SortDir.java | 24 +- src/appeng/api/config/SortOrder.java | 26 +- src/appeng/api/config/StackModeInput.java | 27 +- src/appeng/api/config/StackModeOutput.java | 29 +- src/appeng/api/config/TransferDir.java | 24 +- src/appeng/api/config/ViewItems.java | 25 +- src/appeng/api/events/AEWorldEvent.java | 12 +- src/appeng/api/events/GridErrorEvent.java | 19 +- .../api/events/GridPatternUpdateEvent.java | 24 +- .../api/events/GridStorageUpdateEvent.java | 24 +- .../api/events/GridTileConnectivityEvent.java | 24 +- src/appeng/api/events/GridTileLoadEvent.java | 24 +- .../api/events/GridTileUnloadEvent.java | 24 +- .../api/events/LocateableEventAnnounce.java | 34 +- .../api/events/MultiBlockUpdateEvent.java | 24 +- .../api/exceptions/AppEngException.java | 6 +- .../AppEngTileMissingException.java | 46 +- .../api/me/items/IAEChargeableItem.java | 24 +- src/appeng/api/me/items/IAEWrench.java | 5 +- src/appeng/api/me/items/IMemoryCard.java | 65 +- src/appeng/api/me/items/ISpatialStorage.java | 35 +- src/appeng/api/me/items/IStorageCell.java | 64 +- .../api/me/items/IStorageComponent.java | 11 +- src/appeng/api/me/tiles/IAssemblerMB.java | 23 +- .../me/tiles/IAssemblerPatternProvider.java | 2 +- src/appeng/api/me/tiles/ICellContainer.java | 25 +- src/appeng/api/me/tiles/ICellProvider.java | 26 +- src/appeng/api/me/tiles/IColoredMETile.java | 88 +- .../api/me/tiles/IConfigureableTile.java | 41 +- .../api/me/tiles/IConnectionSensitive.java | 9 +- src/appeng/api/me/tiles/ICraftingTracker.java | 7 +- .../api/me/tiles/IDirectionalMETile.java | 14 +- .../api/me/tiles/IExtendedCellProvider.java | 6 +- .../api/me/tiles/IFulllyOptionalMETile.java | 7 +- src/appeng/api/me/tiles/IGridMachine.java | 10 +- src/appeng/api/me/tiles/IGridTeleport.java | 2 +- src/appeng/api/me/tiles/IGridTileEntity.java | 26 +- src/appeng/api/me/tiles/ILocateable.java | 10 +- src/appeng/api/me/tiles/IMEPowerStorage.java | 93 +- src/appeng/api/me/tiles/INonSignalBlock.java | 5 +- src/appeng/api/me/tiles/IOptionalMETile.java | 17 +- src/appeng/api/me/tiles/IOrientableTile.java | 35 +- src/appeng/api/me/tiles/IPriorityTile.java | 24 +- src/appeng/api/me/tiles/IStorageAware.java | 17 +- src/appeng/api/me/tiles/IStorageMonitor.java | 29 +- src/appeng/api/me/tiles/ITileCable.java | 7 +- src/appeng/api/me/tiles/ITileIOCable.java | 44 +- .../api/me/tiles/ITileInterfaceApi.java | 129 +- src/appeng/api/me/tiles/ITilePushable.java | 38 +- .../me/tiles/InterfaceCraftingPattern.java | 25 +- src/appeng/api/me/util/Grid.java | 32 +- src/appeng/api/me/util/IAssemblerCluster.java | 55 +- src/appeng/api/me/util/IConfigManager.java | 4 +- src/appeng/api/me/util/ICraftRequest.java | 3 +- src/appeng/api/me/util/ICraftWatcher.java | 12 +- src/appeng/api/me/util/ICraftingPattern.java | 49 +- .../api/me/util/ICraftingPatternMAC.java | 37 +- src/appeng/api/me/util/IGridCache.java | 65 +- src/appeng/api/me/util/IGridInterface.java | 374 +++--- src/appeng/api/me/util/IMEInventory.java | 52 +- .../api/me/util/IMEInventoryHandler.java | 99 +- src/appeng/api/me/util/IMEInventoryUtil.java | 19 +- .../api/me/util/ITileCraftingProvider.java | 15 +- .../me/util/InterfaceCraftingResponse.java | 13 +- src/appeng/api/me/util/TransitionResult.java | 23 +- src/appeng/api/movable/IMovableHandler.java | 67 +- src/appeng/api/movable/IMovableRegistry.java | 92 +- src/appeng/api/movable/IMovableTile.java | 27 +- .../api/networkevents/MENetworkEvent.java | 118 +- .../MENetworkEventSubscribe.java | 3 +- .../networkevents/MENetworkPowerStorage.java | 29 +- .../networkevents/MENetworkStorageEvent.java | 20 +- src/cofh/api/energy/IEnergyContainerItem.java | 67 +- src/cofh/util/MathHelper.java | 271 ++-- src/ic2/api/item/IBoxable.java | 18 +- src/ic2/api/item/ICustomElectricItem.java | 85 +- src/ic2/api/item/IElectricItem.java | 78 +- src/ic2/api/item/IElectricItemManager.java | 133 +- src/ic2/api/item/ISpecialElectricItem.java | 17 +- src/ic2/api/item/Items.java | 1164 +++++++++-------- src/mcp/mobius/waila/api/IWailaBlock.java | 52 +- .../mobius/waila/api/IWailaConfigHandler.java | 41 +- .../mobius/waila/api/IWailaDataAccessor.java | 29 +- .../mobius/waila/api/IWailaDataProvider.java | 3 +- src/mcp/mobius/waila/api/IWailaRegistrar.java | 35 +- .../api/FactoryRegistry.java | 919 +++++++------ .../api/FertilizerType.java | 24 +- .../minefactoryreloaded/api/HarvestType.java | 48 +- .../api/IDeepStorageUnit.java | 38 +- .../api/IFactoryFertilizable.java | 50 +- .../api/IFactoryFertilizer.java | 42 +- .../api/IFactoryFruit.java | 104 +- .../api/IFactoryGrindable.java | 34 +- .../api/IFactoryHarvestable.java | 107 +- .../api/IFactoryPlantable.java | 108 +- .../api/IFactoryRanchable.java | 24 +- .../api/ILiquidDrinkHandler.java | 2 +- .../api/IMobEggHandler.java | 10 +- .../minefactoryreloaded/api/INeedleAmmo.java | 8 +- .../api/IRandomMobProvider.java | 3 +- .../api/ISafariNetHandler.java | 26 +- .../minefactoryreloaded/api/ISyringe.java | 34 +- .../api/IToolHammerAdvanced.java | 2 +- .../minefactoryreloaded/api/MobDrop.java | 27 +- .../minefactoryreloaded/api/RanchedItem.java | 109 +- .../minefactoryreloaded/api/RandomMob.java | 27 +- .../api/rednet/IConnectableRedNet.java | 124 +- .../api/rednet/IRedNetLogicCircuit.java | 27 +- .../api/rednet/IRedNetNetworkContainer.java | 36 +- .../api/rednet/IRedNetNoConnection.java | 2 +- .../api/rednet/RedNetConnectionType.java | 75 +- src/tconstruct/TConstruct.java | 2 +- src/tconstruct/blocks/EssenceExtractor.java | 181 --- src/tconstruct/blocks/Terraformer.java | 77 -- .../blocks/logic/EssenceExtractorLogic.java | 245 ---- .../blocks/logic/TerraformerLogic.java | 131 -- src/tconstruct/client/gui/SmelteryGui.java | 11 +- src/tconstruct/common/TContent.java | 18 - src/tconstruct/items/EssenceCrystal.java | 102 -- .../items/blocks/TerraformerItem.java | 50 - .../waila/EssenceExtractorDataProvider.java | 39 - src/tconstruct/util/config/PHConstruct.java | 11 - 179 files changed, 4578 insertions(+), 5290 deletions(-) delete mode 100644 resources/assets/tinker/textures/blocks/machines/crystal_machine_top.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/essencecrystal.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/lightstone.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terracrystal.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terrafreezer.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terrafumer.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terragrower.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terraleecher.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terralighter.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terralighter_top.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terralighter_top_inactive.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terranether.png delete mode 100644 resources/assets/tinker/textures/blocks/machines/terrawaver.png delete mode 100644 resources/assets/tinker/textures/items/materials/material_essencecrystal.png delete mode 100644 resources/assets/tinker/textures/items/materials/material_essencecrystal.png.mcmeta delete mode 100644 resources/assets/tinker/textures/items/materials/material_essencecrystal.txt delete mode 100644 src/tconstruct/blocks/EssenceExtractor.java delete mode 100644 src/tconstruct/blocks/Terraformer.java delete mode 100644 src/tconstruct/blocks/logic/EssenceExtractorLogic.java delete mode 100644 src/tconstruct/blocks/logic/TerraformerLogic.java delete mode 100644 src/tconstruct/items/EssenceCrystal.java delete mode 100644 src/tconstruct/items/blocks/TerraformerItem.java delete mode 100644 src/tconstruct/plugins/waila/EssenceExtractorDataProvider.java diff --git a/resources/assets/tinker/textures/blocks/machines/crystal_machine_top.png b/resources/assets/tinker/textures/blocks/machines/crystal_machine_top.png deleted file mode 100644 index 2ef1d5ce757572291a15d74a3be59e9810f197ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 zcmV+%0^|LOP)+6Z}q z6%CBl3NXT&N*}Dk34$!wzoL|9_+pN`}#ez=k7rSkTgB~ z^kF(W2fC|C?rjeKyg52;u0J-DAI%hSH#f7=0ji3mo#F7{>F!~FWBcSd1E{V%Rx%(ugB$BkZ`|B%kIUdW_1N1#(^kN@!SOQAh0ttxlRmsZiZW}=6?Uc5yCX*n#81=lu zoym$+Z9qs_grs>PT+y}fQrbG!74pjBMo(TY6RLo9W#M-J;;b$%O-JVk{lP(hu=o2L zkk{7p+WNhH?_Zo%%ye{~fW!VqO{_w#EB9y>mb$K#{X e=OgH@CjSBFx8Br~?zY$f0000#~4|m`aEVcAQ(85%Lj0uEmi@-rauPES5kD0szn6Ig>K~I{%_bwOgHqdDz=N0ssJr(R+5x!G=;7O<8$U zRSSg$5+3fKs6tQXH_b*{t48I`!~8C=2S_o-(mq*lWOQC(ae4O#Nuj{4^?gnC)$X?S zHgPoN41@rHoBPr2bi^F#ayksb?(Mt<04W4#$Qb}6K;jrX?bY$s>EYl+fJDTz;aBp` z9`3&5nS;SG5vss}Bn5Vy`Eoks%%h8+s1N`u zXEkYwlmI$QeIG4Jg((K86@kN_@ee8R?csZ4O>iY4p`!8CZvcqFi(2z$GNjGb{S>*N zhOsl0G}wAsd83uqO6SBOIp!#(EGrW^&Yq@}Vyx??5F+Q~f&%~)h)4he1cl^MN~gom z3KcW=me;A(=l}=+h$#>v0C47$#cgTHRRF(o6l7okF+D zYL+4^s!8kTvvNX`kg(TYLsjc9ZyszOTVK6;e)7Ll%25gtV*miUxI52@9~TcR-L*nD zH8m?(WKNCxQch{DH@KM$`zu?s`7MZae({|k<<0(HcX@p>y?!d^^-fDlGH#Yr781Ly mo-P`{M&Fu6>-p9ZBK-r#3wor9h+o|R0000WFU8GbZ8()Nlj2>E@cM*00Rw4L_t(I%QcZ(PaI_c zK+kuX+1aa0Yb)7WF2!1UF^U$`5S3cn#OQ-R)x<=_2cn^|5XGj2g}O9~BBhn=b#~`I z^L;)L&+~aY2WzcOlGOHlzWwf-4eO5r+dUoGu^-sqwmNoeW6v66Y@X%z^wq$A`}Kw$ z4kq@0w6&Hb&Il(lSj+nNn|Kw6R_hWc$6Z!dZy|)h7)ul;#BoA6iP2h7t$E0?A2J$D za9oXcG!MR9p;E2zyz>`tOixj(mkA~@uTJ`;Nrtt8q9_>j$M~ZF8AmCOt7-3a@X8t? z1n)23q}K3QxYi;JV$vj|-}RAFU`0lIx5HlhfIKVE&-OZu{e+KJKR`->QVL^ogaD-! zc~Ow1In$TU^UI?reEQi6j-wD#u)em59*rU%e7-^$#59_9(j+GgVvI2uV^K=c-hYlU z1xZ$5i~*tWhXJ45TSnJw71A`Pag5!7AS-$fwlW~Msaq%iHMQ#X#guKX+QZN}u#8JY_e|qRRPH9fnQA%Qr zB@9ylv{tyT1AtM6C``z*ob?~JP)d>~iiNjZ=&5scl$K{=VbEG)v1D0JspOC(8CjZB zsd^}-Sh{^3Aq6{+f9K8F3rNS+NGTZ&1B4Lx!+>8mcbNDQ{oa^h5&^Kj_J~qh;<}n5 zFQ_%kL}7}y#*!o%-P0il`+qWjwZ+{0499=J;OOXI>J5)!Z$fjb#^Uuw>dh)y*I?2d zx1^E%-k6i)E{>ydN{ZRp%Ty{QX0Kdk_1=e!h9Rr>?_g0FV<_?hB_WElvsUe=&&UhI z%i|t%^D{J>Rmx=-V+>hVaPi`6SZld)>n(PlcDS~9g~P)m(k$cQPupl~Bsbr=%FIm2 zADtI;Pe;rxOyibZMuQ<)es<*ig$A|8d#tZ*G4*CBEexWaOoa#qfkiHZh-M)~(6T@x zsEuUOBFv3oi=fpA1wtrPLW2vDK?HN0KkvPJPm4G6#wpM8-us<Pl)B64ih3pCd!Db$l=*VE|@ITk)Tj(mqOQg!<0_)>=HTK3ff=2EKiio>U5e<Z|2z9-evOP1Y#Z5h7lDM zN^6|67(^oQ0j^3boGz9JIubGB|ScZ zh)~=wS`k=aUg=0152vac7B&~$tMggYu|t3oMmz03!Y~hmMREZL?W%Lht^t- zwI0E*gnV9Frd$rVa_u7R9c`Fo6DFC&B$IKYh=RC=>6)4im5NVOvtj7MSqgh4cD8rp z`_T6>CTgM;D&~HWf^$N#7^z~6M|(#bN-09$uS-iLE!r~;P3}LqgR>4}B13(c`^3## zY0AYyqc_w)M#}b$G(33m>=nmPw2>YkZJ;^4z7!kD6tXL%`v;?&AB$xBMli`{045(! z{O8Ew^(E3RQTQ_1`Dlq_EnV@08aS3K2oJS(4P%1MJiXIXah!u%7DRB)A>xo~s65YO hBbOtSohMU`^It?+7W3Tc?B4(Y002ovPDHLkV1hx3D(3(I diff --git a/resources/assets/tinker/textures/blocks/machines/terrafreezer.png b/resources/assets/tinker/textures/blocks/machines/terrafreezer.png deleted file mode 100644 index eb0a529c0133c85ebade290fe77dab162ed56e92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 819 zcmV-31I+x1P)DW` zK~y-)ZIexCQ(F{;zk5$AEfmw-{HIB2d_qtoRs;=5K^zEH?L;UlgohIc^@k3eNsDa| zbR;M`a3ZK+6a;@N)(WCz5+za<2iEsMX|OJRInzPj zE|a&*JXyVq?!FO399O(y?^OT{(`3ityF6Xp?ed#59nkjIS_wwl#UDyYc5qA{ycfw8 zCdCT0%GTb8a=JJr{%}Hag-LnvUL-p>CRU(T{Go*S0x_X&MOyr!gm|rpczt2X6(+?W zPKZC8kkiE}DSZ|9oGVO<*B2JAFDzCtE?z4lM%#+C%zgX9@8};c(V2=;7@uZr^b>c_ z?W9(zxOJrzT5C-C$)t{+EA$VS82#r1ovA2i&c38?QiycpC+{~z^t={PjBwvXk9lqo?Iid|9$>t ze5DjSkKAMZwxD}=a(5>pg4R`Pl?oouGOD$COar67BnvotyM)%7;WOLmOhsKWz~O6; zfAPV<#54>rl?SC1-F+iul5vjSE&)&&pXSb`*VJki4&@(_Nyh2!8(Dh50MgHHN!QE^ z>6&>VRv@DHT`f8fVkBq$juZvc)rHwuuXl~<;$?2Qk}(Fi%ntxj4_}z z3*|DkJ4>tXJ@ezQ-W)n4c>z)h;M>uCm;xj?=GW^_ExM-5D}bnXaI2*qcu^Z27p-WiM^=BpI+Bn$uNim5p>q3 zPPoE!Wy^oZrvrLXi}CRZ^7%a9-ppc5z|>-$s8PdOiy-J!iZHcUrxUJVN7YYGj?r2( zHaB*wdlNA4lmY#|i@!nEsp|{c?LeCWn-o=Y} zvi%c!C@Hic2))*}_=8kqNMbg-*_r8KlTBj#PBRa_zaH<2!s};tWF`;5_=Ee@pS+=8 z24gH(3xHIT^!{6#fv=b(yUoxnp1M3jB7{?`*i5cq!o zkHirIq;iJla1$H^K2{sF4sH=m`Ek~ee43su9nMeafVuBf_INMSRD(GuT(w=_h4;o zYRFox(PFlkBb7~($|jjD=BRZSt5-dY(>bj$zr7iqbK~-wR5nSi(fa4zvt245Q0kuZ YUu&ikn#7?wpa1{>07*qoM6N<$g0L4XTL1t6 diff --git a/resources/assets/tinker/textures/blocks/machines/terraleecher.png b/resources/assets/tinker/textures/blocks/machines/terraleecher.png deleted file mode 100644 index 15ac8ac18a6495a2a074760e6cad7aa9a6f9ac3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 682 zcmV;b0#*HqP)({ie&|`*@%Cz27HF&mX(gbP<5@JGW`x zf5EUU);e$w0I4Js?_LsB_W|e~)zPWxBHtdB*^H0bitBuiBR^^l))-8`2Y^xvgk&)Y zSXo$NH9f`L#u^%6Gd@l<&*C;hNE}0D0AmbF4cP`WV)4s+HyZ>1e7bp;e)o)jm5>rC z1X86~`uYKY?*|8n*&DZ9+-_m5q2KFzT%7{vJOvSR8t44*1+PL1 z-*k~cNig0DfD$RJwLSx94NA(S`N_ivfh zsZ^p;sa&G@-HAqbL;ST!(Z{FsdR_9@u5)twi^ge#Lb1ri_yom`1?nS2vk>|UegQWT zEi8z{jSIy_aA1&36sf_5h(&+Ku@~ok@4YQv=T4eudC&9kJm=i=i1W{%*;r>g0O_GT zwI?rVmBAPb)&d}vBD}>ogDj1B8%RTFL-gYm{nvYjQ+y`K|5BWB^#sJtS-#I#6YK z7J&TVC_+l45J(lH@cA78+tn(f>r$Wf5B4!e69x?`%d;d?X>$47tgkKrkQ*3bWg#M6 zz3~7L2q`f}<6&(?KAJU^Zo`Yk5lWI97;$bAi4=*{S+v&CPDBi245I5|udUa9aI%C_ zPIc(cW5TdO*l4)EQVOj#(*Cog_0>hzR~G>s8K5-(27ryVCBAHy9o}N`thLc!1Apqj zT{D$#JNBkj48LB(2fTRPxe*t-uh{)x-#M)|*FFN!fBhZ+)>^a<2pbJNFHR61;t7PC z2XGcIXA5NeZvqfYB;6SK!O_;9ka$9XRGzb5`}xfQK9%PI=qubk)u9k44yn{Lb_`Hn zdJn+B(0!~m?tOS`&K;6hFI5=N7NX9^2TDC-c=0m;T)Xw?Kh@!_ImVMw_==?&B)~+n z!vUIPmw_NW)qa!X1v`6mPffZw2hA*4i!lak4fZHhN-4IhRf?q@TPk5~64;83buy zOw!6xbm2ZUG!dp;n4!23nZ#;z{QMrjds}=H)LEZ<&b{{>QU0hmR8|Tg($bK*(uW*~ zh`|g%Dp~a5>E7HD0B8eo&d11zAh@NPTARABIA2*-{Xf(4e=jazblTH)t^4$d1hxj^JaK>@YNt7 zgp@=^f|1DKkgjuaefYN^*+Syl)DDYEySRd;AB48Rx zfbRTg;25xTE%JQ)kASAV&2;6^Ku~Ybbr5`wh?$r@TPk5~64;83buy zOw!6xbm2ZUG!dp;n4!23nZ#;z{QMrjds}=H)LEZ<&b{{>QU0hmR8|Tg($bK*(uW*~ zh`|g%Dp~a5>E7HD0B8eo&d11zAh@NPTARABIA2*-{Xf(4e=jazblTH)t^4$d1hxj^JaK>@YNt7 zgp@=^f|1DKkgjuaefYN^*+Syl)DDYEySRd;AB48Rx zfbRTg;25xTE%JQ)kASAV&2;6^Ku~Ybbr5`wh?$rfmfwdNZzJ~LC(q&?6YL)V$4NN#MfmCX`< zc$a~jR|wc4!jTAJrN|u~vTpyb;x!tnwJ!g4<lL%}FR!6@B7KLKF)0~r3mnThOKo2}x_bf#?L zaIm=wI8Ag*&Y6u)I7VrEkNCuR^_)v5x1cqi=b^QSt{jz8ip^Y(vGg=!m2>_Nq3;#v TM{1sL00000NkvXXu0mjfMea(6 diff --git a/resources/assets/tinker/textures/blocks/machines/terrawaver.png b/resources/assets/tinker/textures/blocks/machines/terrawaver.png deleted file mode 100644 index a42c919f858416eda15775ebf3c4f5cef5138709..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 717 zcmV;;0y6!HP)j&&C-v&;~J(DM2yE2m(=T(V~ruXctr9A7DX&&_Y6!GTI4+ z)F0p?sZF&}Bq(dq2uWknNKqsOA?84gGd-R6?!7IZ^YnREU+#}{zTbP#5l3%cHL=zd z0Li{nlrE032aVPSi~&Gel7=UDDd+M4c)vHWW34HETp4G^U1!$a;JsT8u4;u=3gvqM zSe6Asl1Zn@cJ(q8Z{gU(+t>gz?s}-X<5mztV%Sp#P)cE0d%e}}h|KbH)0R#Huyo=) zesw22bnnq8Mu&TXgHj@eKw2?+3oiipxweLAYws~`WecqpzE=&}wPRom*KWNcb>uK( z*H2@VMkzlS1%Z$ftrZeu&{|Q*FNU)UDVUu80KmqdzudXMjId-l%Ie3r7-P^{BLNEe zMY>L&*<}Z#6aa}t9DuE|%YJlp_p`e428=YRJT(}8V-2?Lpp+LiQm%6_(yG`cQl5`7I$R(4wh$W0F6Z)OyLyA2 zFLU(GCTMPIU}B^XrM!qMH;W~5*$UZs5Wex;vmgsY@s>y)Hj5=DrgCf+O8_)CHH38y zL-7{I0dX+SXJ59HN*)SaSl*7*0I$z|kHq;uKpYn|p53jJWPVq<3KgDpIFSqgqYc`~`+^h5JL0E(kX%!s6qs9LgCJ za4xJR@5w7Ki8sfj*m;&LygQaxML^TInEl@S-qUx7{APe37VP2v}y&SeF)F-@sH%e&>oF(V}z4E zPop_QyFLn?W1LFy&>npkxkS1wf(e?L#3%RR!9@}t&`zSd&m;@;a4Jc7P^mMK=kY~S zDzRD4A+Ct>A?2p!0d>lAAR~E@kvyo#oE%1Ffozi~XJpW~OynkbPyrK%lW82EnQZqh z6W?YV_@UawGieE5yblisNq9gziRwO+EX>2%PQrujIuivRUnHdxe^$;Ru88s>>C^In zIu$suD0#4`r%~Vmwq;HZqOw4?Nu(PYxRwcB@}MBIu?;2;Cet`RGud`66JKW=__5l= zn&g2ic|b)pl><~uK)Vaq@iCMOyYz4 z@W4&N1KLSc_nBm29!@O@4{CKL)_Hu9luBGI=MYy!`H+^UgqLyu-b=d@yJUH(Saq?z>w|3}6 zQ#nXiO9e36t&Tq@@fS48=c^3(EwI&E^`k>tT6J&jEsU`O&`KPn4k zn?$Qd2A7tJRmp=*nT;JVu|Ju{@tMi?rDfvFYy-bsHj$M)==X-`z8T=P9Xioe4nD4y z@OQh5Gsnk!$paGK8m7q|e6eBRw<8Dd-2ks85BB4DK$kmUf@UW1{(X4RPr?J*NmTcl zWMLjoeK!FQ>bp$vt@t7-mAL$Q4sk`44{2pu9#AK~1?Z9ox}FB#3IKVx_aY(-WSd0B zY6jX<6Ncmg-wLyVT_&i=!fi8?ZSARvC)oz@yor@xLmu?x{|i(^Q#n|DUc%W=T{vex zT*(9b)o2V&wSx`Iz){D6>jto2h2KQ(;Kt=H6Eri4$Ax$P8GA{1Ks$-*K9ejYKK}s% WKbG>LCQ;k~0000 cl ); - - /** - * requests a new instance of a grid cache for use, used internally - * @param id - * @return - */ - IGridCache[] createCacheInstance(); - +public interface IGridCacheRegistry +{ + + /** + * Register a new grid cache for use during operation, must be called during the loading phase. + * @param cl + * @return cache id ( can be used later to ask the grid for you cache. ) + */ + int registerGridCache (Class cl); + + /** + * requests a new instance of a grid cache for use, used internally + * @param id + * @return + */ + IGridCache[] createCacheInstance (); + } diff --git a/src/appeng/api/IGrinderRecipeManager.java b/src/appeng/api/IGrinderRecipeManager.java index 16b60830..a3e4e255 100644 --- a/src/appeng/api/IGrinderRecipeManager.java +++ b/src/appeng/api/IGrinderRecipeManager.java @@ -7,26 +7,27 @@ import net.minecraft.item.ItemStack; /** * Lets you manipulate Grinder Recipes, by adding or editing existing ones. */ -public interface IGrinderRecipeManager { - - /** - * Current list of registered recipes, you can modify this if you want too. - * @return currentlyRegistredRecipes - */ - public List getRecipes(); - - /** - * add a new recipe the easy way, in -> out, how many turns. - * @param in - * @param out - * @param cost - */ - public void addRecipe( ItemStack in, ItemStack out, int cost ); - - /** - * Searches for a recipe for a given input, and returns it. - * @param input - * @return identified recipe, or null - */ - public IAppEngGrinderRecipe getRecipeForInput(ItemStack input); +public interface IGrinderRecipeManager +{ + + /** + * Current list of registered recipes, you can modify this if you want too. + * @return currentlyRegistredRecipes + */ + public List getRecipes (); + + /** + * add a new recipe the easy way, in -> out, how many turns. + * @param in + * @param out + * @param cost + */ + public void addRecipe (ItemStack in, ItemStack out, int cost); + + /** + * Searches for a recipe for a given input, and returns it. + * @param input + * @return identified recipe, or null + */ + public IAppEngGrinderRecipe getRecipeForInput (ItemStack input); } diff --git a/src/appeng/api/IItemComparisionProvider.java b/src/appeng/api/IItemComparisionProvider.java index b93194e0..63556863 100644 --- a/src/appeng/api/IItemComparisionProvider.java +++ b/src/appeng/api/IItemComparisionProvider.java @@ -6,20 +6,21 @@ import net.minecraft.item.ItemStack; * Provider for special comparisons. * when an item is encountered AE Will request if the comparison function handles the item, by trying to request a IItemComparison class. */ -public interface IItemComparisionProvider { - - /** - * should return a new IItemComparison, or return null if it dosn't handle the supplied item. - * @param is - * @return IItemComparison, or null - */ - IItemComparison getComparison( ItemStack is ); - - /** - * Simple test for support ( AE generally skips this and calls the above function. ) - * @param stack - * @return true, if getComparison will return a valid IItemComparison Object. - */ - public boolean canHandle( ItemStack stack); - +public interface IItemComparisionProvider +{ + + /** + * should return a new IItemComparison, or return null if it dosn't handle the supplied item. + * @param is + * @return IItemComparison, or null + */ + IItemComparison getComparison (ItemStack is); + + /** + * Simple test for support ( AE generally skips this and calls the above function. ) + * @param stack + * @return true, if getComparison will return a valid IItemComparison Object. + */ + public boolean canHandle (ItemStack stack); + } diff --git a/src/appeng/api/IItemComparison.java b/src/appeng/api/IItemComparison.java index 4bfc35f9..aefd71b4 100644 --- a/src/appeng/api/IItemComparison.java +++ b/src/appeng/api/IItemComparison.java @@ -1,10 +1,10 @@ package appeng.api; +public interface IItemComparison +{ -public interface IItemComparison { - - public boolean sameAsPrecise( IItemComparison comp); + public boolean sameAsPrecise (IItemComparison comp); + + public boolean sameAsFuzzy (IItemComparison comp); - public boolean sameAsFuzzy(IItemComparison comp); - } diff --git a/src/appeng/api/IItemList.java b/src/appeng/api/IItemList.java index 9f722000..91ffd28e 100644 --- a/src/appeng/api/IItemList.java +++ b/src/appeng/api/IItemList.java @@ -15,18 +15,24 @@ import net.minecraft.item.ItemStack; */ public interface IItemList extends Iterable { - public void addStorage( IAEItemStack option ); // adds a stack as stored. - public void addCrafting( IAEItemStack option ); // adds a stack as craftable. - public void addRequestable( IAEItemStack option ); // adds a stack as requestable. - public void add( IAEItemStack option ); // adds stack as is. - - IAEItemStack getFirstItem(); - - public List getItems(); - IAEItemStack findItem(IAEItemStack i); - int size(); - - @Override - public Iterator iterator(); - public void setCurrentPriority(int priority); + public void addStorage (IAEItemStack option); // adds a stack as stored. + + public void addCrafting (IAEItemStack option); // adds a stack as craftable. + + public void addRequestable (IAEItemStack option); // adds a stack as requestable. + + public void add (IAEItemStack option); // adds stack as is. + + IAEItemStack getFirstItem (); + + public List getItems (); + + IAEItemStack findItem (IAEItemStack i); + + int size (); + + @Override + public Iterator iterator (); + + public void setCurrentPriority (int priority); } diff --git a/src/appeng/api/ILocateableRegistry.java b/src/appeng/api/ILocateableRegistry.java index 8e75cbef..eca3e9b0 100644 --- a/src/appeng/api/ILocateableRegistry.java +++ b/src/appeng/api/ILocateableRegistry.java @@ -3,13 +3,14 @@ package appeng.api; /** * A Registry for locatable items, works based on serial numbers. */ -public interface ILocateableRegistry { +public interface ILocateableRegistry +{ - /** - * Attempts to find the object with the serial specifed, if it can it returns the object. - * @param ser - * @return requestedObject, or null - */ - public abstract Object findLocateableBySerial(long ser); + /** + * Attempts to find the object with the serial specifed, if it can it returns the object. + * @param ser + * @return requestedObject, or null + */ + public abstract Object findLocateableBySerial (long ser); } \ No newline at end of file diff --git a/src/appeng/api/ISpecialComparisonRegistry.java b/src/appeng/api/ISpecialComparisonRegistry.java index 0a30baec..af002e0f 100644 --- a/src/appeng/api/ISpecialComparisonRegistry.java +++ b/src/appeng/api/ISpecialComparisonRegistry.java @@ -6,19 +6,20 @@ import net.minecraft.item.ItemStack; * A Registry of any special comparison handlers for AE To use. * */ -public interface ISpecialComparisonRegistry { - - /** - * returns a handler it found for a specific item. - * @param stack - * @return TheHandler or null - */ - IItemComparison getSpecialComparion( ItemStack stack ); - - /** - * Register a new cpecial comparison function with AE. - * @param prov - */ - public void addComparisonProvider( IItemComparisionProvider prov ); - +public interface ISpecialComparisonRegistry +{ + + /** + * returns a handler it found for a specific item. + * @param stack + * @return TheHandler or null + */ + IItemComparison getSpecialComparion (ItemStack stack); + + /** + * Register a new cpecial comparison function with AE. + * @param prov + */ + public void addComparisonProvider (IItemComparisionProvider prov); + } diff --git a/src/appeng/api/IWirelessTermHandler.java b/src/appeng/api/IWirelessTermHandler.java index c38c7ee0..b1b070d0 100644 --- a/src/appeng/api/IWirelessTermHandler.java +++ b/src/appeng/api/IWirelessTermHandler.java @@ -7,43 +7,44 @@ import cpw.mods.fml.common.network.Player; /** * A handler for a wireless terminal. */ -public interface IWirelessTermHandler { - - /** - * return true, if usePower, hasPower, ect... can be called for the provided item. - * @param is - * @return - */ - boolean canHandle( ItemStack is ); - - /** - * use an amount of power, in AE units - * @param amount is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for hasPower - * @param is - * @return - */ - boolean usePower( Player player, float amount, ItemStack is ); - - /** - * gets the power status of the item. - * @param is - * @return returns true if there is any power left. - */ - boolean hasPower( Player player, ItemStack is ); - - /** - * Used to get the current key from the item. - * @param player - * @param item - * @return - */ - String getEncryptionKey( ItemStack item ); - - /** - * Encode the wireless frequency via the Controller. - * @param item - the wireless terminal. - * @param encKey - the wireless encryption key. - * @param name - null for now. - */ - void setEncryptionKey( ItemStack item, String encKey, String name ); +public interface IWirelessTermHandler +{ + + /** + * return true, if usePower, hasPower, ect... can be called for the provided item. + * @param is + * @return + */ + boolean canHandle (ItemStack is); + + /** + * use an amount of power, in AE units + * @param amount is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for hasPower + * @param is + * @return + */ + boolean usePower (Player player, float amount, ItemStack is); + + /** + * gets the power status of the item. + * @param is + * @return returns true if there is any power left. + */ + boolean hasPower (Player player, ItemStack is); + + /** + * Used to get the current key from the item. + * @param player + * @param item + * @return + */ + String getEncryptionKey (ItemStack item); + + /** + * Encode the wireless frequency via the Controller. + * @param item - the wireless terminal. + * @param encKey - the wireless encryption key. + * @param name - null for now. + */ + void setEncryptionKey (ItemStack item, String encKey, String name); } diff --git a/src/appeng/api/IWirelessTermRegistery.java b/src/appeng/api/IWirelessTermRegistery.java index b9b0a483..3c4bd5dd 100644 --- a/src/appeng/api/IWirelessTermRegistery.java +++ b/src/appeng/api/IWirelessTermRegistery.java @@ -8,31 +8,32 @@ import appeng.api.me.util.IMEInventoryHandler; /** * Registratio record for a Custom Cell handler. */ -public interface IWirelessTermRegistery { - - /** - * add thsi handler to the list of other wireless handler. - * @param handler - */ - void registerWirelessHandler( IWirelessTermHandler handler ); +public interface IWirelessTermRegistery +{ + + /** + * add thsi handler to the list of other wireless handler. + * @param handler + */ + void registerWirelessHandler (IWirelessTermHandler handler); + + /** + * returns true if theres a handler for this item. + * @param is + * @return + */ + boolean isWirelessTerminal (ItemStack is); + + /** + * returns a register handler for the item in question, or null if there isn't one. + * @param is + * @return + */ + IWirelessTermHandler getWirelessTerminalHandler (ItemStack is); + + /** + * opens the wireless terminal gui, the wireless terminal item, must be in the active slot on the tool bar. + */ + void OpenWirelessTermainlGui (ItemStack item, World w, EntityPlayer player); - /** - * returns true if theres a handler for this item. - * @param is - * @return - */ - boolean isWirelessTerminal( ItemStack is ); - - /** - * returns a register handler for the item in question, or null if there isn't one. - * @param is - * @return - */ - IWirelessTermHandler getWirelessTerminalHandler( ItemStack is ); - - /** - * opens the wireless terminal gui, the wireless terminal item, must be in the active slot on the tool bar. - */ - void OpenWirelessTermainlGui( ItemStack item, World w, EntityPlayer player ); - } diff --git a/src/appeng/api/Items.java b/src/appeng/api/Items.java index f4627257..aa3b1947 100644 --- a/src/appeng/api/Items.java +++ b/src/appeng/api/Items.java @@ -8,33 +8,33 @@ import net.minecraft.item.ItemStack; */ public class Items { - public static ItemStack toolQuartzAxe; - public static ItemStack toolQuartzHoe; - public static ItemStack toolQuartzShovel; - public static ItemStack toolQuartzPick; - public static ItemStack toolQuartzSword; - public static ItemStack toolQuartzWrench; - + public static ItemStack toolQuartzAxe; + public static ItemStack toolQuartzHoe; + public static ItemStack toolQuartzShovel; + public static ItemStack toolQuartzPick; + public static ItemStack toolQuartzSword; + public static ItemStack toolQuartzWrench; + public static ItemStack toolEntropyAccelerator; public static ItemStack toolVibrationCatalyst; - public static ItemStack toolMassCannon; - - public static ItemStack toolQuartzKnife; + public static ItemStack toolMassCannon; + + public static ItemStack toolQuartzKnife; + + public static ItemStack itemMemoryCard; - public static ItemStack itemMemoryCard; - public static ItemStack itemCell1k; public static ItemStack itemCell4k; public static ItemStack itemCell16k; - public static ItemStack itemCell64k; + public static ItemStack itemCell64k; + + public static ItemStack itemSpatialCell2; + public static ItemStack itemSpatialCell16; + public static ItemStack itemSpatialCell128; - public static ItemStack itemSpatialCell2; - public static ItemStack itemSpatialCell16; - public static ItemStack itemSpatialCell128; - public static ItemStack itemEncodedAsemblerPattern; - public static ItemStack toolWirelessTerminal; - - @Deprecated + public static ItemStack toolWirelessTerminal; + + @Deprecated public static ItemStack itemWirelessTerminal; } diff --git a/src/appeng/api/Materials.java b/src/appeng/api/Materials.java index a1bd2387..4496118f 100644 --- a/src/appeng/api/Materials.java +++ b/src/appeng/api/Materials.java @@ -10,26 +10,26 @@ import net.minecraft.item.ItemStack; */ public class Materials { - // Tech 1 + // Tech 1 public static ItemStack matWoodenGear; - public static ItemStack matIronNugget; + public static ItemStack matIronNugget; public static ItemStack matCrank; // Grinder... - public static ItemStack matQuartzDustNether; + public static ItemStack matQuartzDustNether; public static ItemStack matQuartzDust; public static ItemStack matIronDust; public static ItemStack matGoldDust; public static ItemStack matFlour; - + // Tech 3 public static ItemStack matSilicon; - public static ItemStack matProcessorBasicUncooked; - public static ItemStack matProcessorAdvancedUncooked; - public static ItemStack matProcessorBasic; - public static ItemStack matProcessorAdvanced; - - // ME Construction... + public static ItemStack matProcessorBasicUncooked; + public static ItemStack matProcessorAdvancedUncooked; + public static ItemStack matProcessorBasic; + public static ItemStack matProcessorAdvanced; + + // ME Construction... public static ItemStack matConversionMatrix; public static ItemStack matStorageCell; public static ItemStack matStorageBlock; @@ -38,25 +38,25 @@ public class Materials public static ItemStack matStorageCellHouseing; public static ItemStack matStorageCellHouseingFuzzy; public static ItemStack matBlankPattern; - public static ItemStack matStorageSegment; + public static ItemStack matStorageSegment; public static ItemStack matFluxDust; public static ItemStack matFluxCrystal; - public static ItemStack matFluxPearl; + public static ItemStack matFluxPearl; + + public static ItemStack matSpatialStorageCell; + public static ItemStack matSpatialStorageBlock; + public static ItemStack matSpatialStorageCluster; - public static ItemStack matSpatialStorageCell; - public static ItemStack matSpatialStorageBlock; - public static ItemStack matSpatialStorageCluster; - // World gen... public static ItemStack matQuartz; - + // Other items, such as upgrades. public static ItemStack matWirelessBooster; - public static ItemStack matMatterBall; - public static ItemStack matSingularity; - public static ItemStack matEnderPearlDust; - public static ItemStack matQuantumEntangledSingularity; - + public static ItemStack matMatterBall; + public static ItemStack matSingularity; + public static ItemStack matEnderPearlDust; + public static ItemStack matQuantumEntangledSingularity; + // TEST ITEMS! - public static ItemStack testItem; + public static ItemStack testItem; } diff --git a/src/appeng/api/TileRef.java b/src/appeng/api/TileRef.java index d5429429..cca71263 100644 --- a/src/appeng/api/TileRef.java +++ b/src/appeng/api/TileRef.java @@ -8,62 +8,66 @@ import appeng.api.events.GridTileUnloadEvent; import appeng.api.exceptions.AppEngTileMissingException; import appeng.api.me.tiles.IGridTileEntity; -public class TileRef extends WorldCoord { - - //private int dimension; - private World w; - private Class myType; - - boolean wasGrid; - - public TileRef( TileEntity gte ) { - super( gte.xCoord, gte.yCoord, gte.zCoord ); - TileEntity te = gte; - myType = gte.getClass(); - wasGrid = te instanceof IGridTileEntity; - w = te.worldObj; - if ( te.worldObj == null ) - throw new RuntimeException("Tile has no world."); - } - - @SuppressWarnings("unchecked") - public T getTile() throws AppEngTileMissingException - { - // there might be a possible tick where we have TileRefs for unloaded tiles? - if ( w.getChunkProvider().chunkExists(x >> 4, z >> 4) ) - { - TileEntity te = w.getBlockTileEntity( x, y, z ); - if ( te != null && myType.isInstance( te ) ) - return (T)te; - } - - /** - * was this a grid tile? if so inform the grid enum that something has derped. - */ - if ( wasGrid ) - { - wasGrid = false; // no need to keep this up.. - MinecraftForge.EVENT_BUS.post( new GridTileUnloadEvent( null, w, this ) ); - } - - throw new AppEngTileMissingException( w, x,y,z); - } +public class TileRef extends WorldCoord +{ + + //private int dimension; + private World w; + private Class myType; + + boolean wasGrid; + + public TileRef(TileEntity gte) + { + super(gte.xCoord, gte.yCoord, gte.zCoord); + TileEntity te = gte; + myType = gte.getClass(); + wasGrid = te instanceof IGridTileEntity; + w = te.worldObj; + if (te.worldObj == null) + throw new RuntimeException("Tile has no world."); + } + + @SuppressWarnings("unchecked") + public T getTile () throws AppEngTileMissingException + { + // there might be a possible tick where we have TileRefs for unloaded tiles? + if (w.getChunkProvider().chunkExists(x >> 4, z >> 4)) + { + TileEntity te = w.getBlockTileEntity(x, y, z); + if (te != null && myType.isInstance(te)) + return (T) te; + } + + /** + * was this a grid tile? if so inform the grid enum that something has derped. + */ + if (wasGrid) + { + wasGrid = false; // no need to keep this up.. + MinecraftForge.EVENT_BUS.post(new GridTileUnloadEvent(null, w, this)); + } + + throw new AppEngTileMissingException(w, x, y, z); + } + + public DimentionalCoord getCoord () + { + return new DimentionalCoord(w, x, y, z); + } + + @Override + public boolean equals (Object obj) + { + + // is it the same? + if (obj instanceof TileEntity) + { + TileEntity te = (TileEntity) obj; + return w == te.worldObj && te.xCoord == x && te.yCoord == y && te.zCoord == z; + } + + return super.equals(obj); + } - public DimentionalCoord getCoord() { - return new DimentionalCoord( w, x, y, z ); - } - - @Override - public boolean equals(Object obj) { - - // is it the same? - if ( obj instanceof TileEntity ) - { - TileEntity te = (TileEntity) obj; - return w == te.worldObj && te.xCoord == x && te.yCoord == y && te.zCoord == z; - } - - return super.equals( obj ); - } - }; diff --git a/src/appeng/api/Util.java b/src/appeng/api/Util.java index b228830f..8afbcd24 100644 --- a/src/appeng/api/Util.java +++ b/src/appeng/api/Util.java @@ -22,210 +22,232 @@ import appeng.api.me.util.IMEInventoryUtil; */ public class Util { - static private IAppEngApi api = null; - - /** - * All future API calls should be made via this method. - * @return - */ - public static IAppEngApi getAppEngApi() - { - try { - Class c = ReflectionHelper.getClass( Util.class.getClassLoader(), "appeng.common.AppEngApi" ); - api = (IAppEngApi) c.getMethod( "getInstance" ).invoke( c ); - } catch ( Throwable e) { - return null; - } - return api; - } - + static private IAppEngApi api = null; + + /** + * All future API calls should be made via this method. + * @return + */ + public static IAppEngApi getAppEngApi () + { + try + { + Class c = ReflectionHelper.getClass(Util.class.getClassLoader(), "appeng.common.AppEngApi"); + api = (IAppEngApi) c.getMethod("getInstance").invoke(c); + } + catch (Throwable e) + { + return null; + } + return api; + } + /** * returns the wireless terminal registry. * @return */ - public static IWirelessTermRegistery getWirelessTermRegistery() + public static IWirelessTermRegistery getWirelessTermRegistery () { - if ( api == null ) return null; - return api.getWirelessRegistry(); + if (api == null) + return null; + return api.getWirelessRegistry(); } - + /** * Find an object by its serial. * @param ser * @return LocatedObject or null */ - public static Object getLocateableBySerial( long ser ) + public static Object getLocateableBySerial (long ser) { - if ( api == null ) return null; - return api.getLocateableBySerial( ser ); + if (api == null) + return null; + return api.getLocateableBySerial(ser); } - + /** * Creates a new AEItemstack. * @param is * @return newly generated AE Itemstack */ - public static IAEItemStack createItemStack( ItemStack is ) + public static IAEItemStack createItemStack (ItemStack is) { - if ( api == null ) return null; - return api.createItemStack( is ); + if (api == null) + return null; + return api.createItemStack(is); } - + /** * Simple Wrapper of the insertion process.. * @param inv * @param is * @return ItemsNotInserted or null */ - public static ItemStack addItemsToInv( IMEInventory inv, ItemStack is ) + public static ItemStack addItemsToInv (IMEInventory inv, ItemStack is) { - if ( api == null ) return null; - return api.addItemsToInv( inv, is ); + if (api == null) + return null; + return api.addItemsToInv(inv, is); } - + /** * Simple Wrapper of the extraction process * @param inv * @param is * @return ItemsExtracted or null */ - public static ItemStack extractItemsFromInv( IMEInventory inv, ItemStack is ) + public static ItemStack extractItemsFromInv (IMEInventory inv, ItemStack is) { - if ( api == null ) return null; - return api.extractItems( inv, is ); + if (api == null) + return null; + return api.extractItems(inv, is); } - + /** * Create a new Blank ItemList * @return new itemlist. */ - public static IItemList createItemList() + public static IItemList createItemList () { - if ( api == null ) return null; - return api.createItemList(); + if (api == null) + return null; + return api.createItemList(); } - + /** * creates a new IMEInventoryUtil, only useful if you want to use the fancy get items by recipe functionaility. * @param ime * @return created InvUtil */ - public static IMEInventoryUtil getIMEInventoryUtil( IMEInventory ime ) + public static IMEInventoryUtil getIMEInventoryUtil (IMEInventory ime) { - if ( api == null ) return null; - return api.getIMEInventoryUtil( ime ); + if (api == null) + return null; + return api.getIMEInventoryUtil(ime); } - + /** * Gets the instance of the special comparison registry ( Bees / Trees ) that sort of stuff * @return specialComparisonRegistry */ - public static ISpecialComparisonRegistry getSpecialComparisonRegistry() + public static ISpecialComparisonRegistry getSpecialComparisonRegistry () { - if ( api == null ) return null; - return api.getSpecialComparsonRegistry(); + if (api == null) + return null; + return api.getSpecialComparsonRegistry(); } - + /** * Gets the instance of the external storage registry - Storage Bus * @return externStorgeRegitry */ - public static IExternalStorageRegistry getExternalStorageRegistry() + public static IExternalStorageRegistry getExternalStorageRegistry () { - if ( api == null ) return null; - return api.getExternalStorageRegistry(); + if (api == null) + return null; + return api.getExternalStorageRegistry(); } - + /** * Gets the instance of the Cell Registry * @return returns the cell registry */ - public static ICellRegistry getCellRegistry() + public static ICellRegistry getCellRegistry () { - if ( api == null ) return null; - return api.getCellRegistry(); + if (api == null) + return null; + return api.getCellRegistry(); } - + /** * Gets instance for the grinder recipe manager. * @return the grinder manager instance. */ - public static IGrinderRecipeManager getGrinderRecipeManage() + public static IGrinderRecipeManager getGrinderRecipeManage () { - if ( api == null ) return null; - return api.getGrinderRecipeManage(); + if (api == null) + return null; + return api.getGrinderRecipeManage(); } /** Is it a Blank Pattern? */ - public static Boolean isBlankPattern(ItemStack i) + public static Boolean isBlankPattern (ItemStack i) { - if ( api == null ) return null; - return api.isBlankPattern( i ); + if (api == null) + return null; + return api.isBlankPattern(i); } - + /** Is it an IAssemblerPattern? */ - public static Boolean isAssemblerPattern(ItemStack i) + public static Boolean isAssemblerPattern (ItemStack i) { - if ( api == null ) return null; - return api.isAssemblerPattern( i ); + if (api == null) + return null; + return api.isAssemblerPattern(i); } - + /** Gets the IAssemblerPattern of the Assembly Pattern. */ - public static ICraftingPatternMAC getAssemblerPattern(ItemStack i) + public static ICraftingPatternMAC getAssemblerPattern (ItemStack i) { - if ( api == null ) return null; - return api.getAssemblerPattern( i ); + if (api == null) + return null; + return api.getAssemblerPattern(i); } - + /** Is it a IStorageCell, this will only return true for IStoreCells and not custom cells, you should probobly not use it unless you have a specific case. */ - public static Boolean isBasicCell(ItemStack i) + public static Boolean isBasicCell (ItemStack i) { - if ( api == null ) return null; - return api.isBasicCell( i ); + if (api == null) + return null; + return api.isBasicCell(i); } - + /** * if the item is a ME Compatible Storage Cell of any type. * @param i * @return true, if it is a storage call. */ - public static Boolean isCell(ItemStack i) + public static Boolean isCell (ItemStack i) { - if ( api == null ) return null; - return getCellRegistry().isCellHandled( i ); + if (api == null) + return null; + return getCellRegistry().isCellHandled(i); } - + /** * Gets the Interface to insert/extract from the Storage Cell for the item. * @param i * @return newly procured cell handler. */ - public static IMEInventoryHandler getCell(ItemStack i) + public static IMEInventoryHandler getCell (ItemStack i) { - if ( api == null ) return null; - return getCellRegistry().getHandlerForCell( i ); + if (api == null) + return null; + return getCellRegistry().getHandlerForCell(i); } - + /** * Lets you access internal storage of IStorageCell's * @param i * @return only works with Basic Cells, not custom ones, suggested not to use. */ - public static IMEInventory getBasicCell(ItemStack i) + public static IMEInventory getBasicCell (ItemStack i) { - if ( api == null ) return null; - return api.getBasicCell( i ); + if (api == null) + return null; + return api.getBasicCell(i); } - + /** * Lets you blast list a specific item from being stored in basic cells, this works on any mod cells that use IStorageCell as well. * @param ItemID * @param Meta */ - public static void addBasicBlackList( int ItemID, int Meta ) + public static void addBasicBlackList (int ItemID, int Meta) { - if ( api == null ) return; - api.addBasicBlackList( ItemID, Meta ); + if (api == null) + return; + api.addBasicBlackList(ItemID, Meta); } - + } diff --git a/src/appeng/api/WorldCoord.java b/src/appeng/api/WorldCoord.java index 4e525647..55d1ac21 100644 --- a/src/appeng/api/WorldCoord.java +++ b/src/appeng/api/WorldCoord.java @@ -10,8 +10,8 @@ public class WorldCoord public int x; public int y; public int z; - - public WorldCoord add(ForgeDirection direction, int length) + + public WorldCoord add (ForgeDirection direction, int length) { x += direction.offsetX * length; y += direction.offsetY * length; @@ -19,114 +19,114 @@ public class WorldCoord return this; } - public WorldCoord subtract(ForgeDirection direction, int length) + public WorldCoord subtract (ForgeDirection direction, int length) { x -= direction.offsetX * length; y -= direction.offsetY * length; z -= direction.offsetZ * length; return this; } - - public WorldCoord add(int _x, int _y, int _z) + + public WorldCoord add (int _x, int _y, int _z) { x += _x; y += _y; z += _z; return this; } - - public WorldCoord subtract(int _x, int _y, int _z) + + public WorldCoord subtract (int _x, int _y, int _z) { x -= _x; y -= _y; z -= _z; return this; } - - public WorldCoord multiple(int _x, int _y, int _z) + + public WorldCoord multiple (int _x, int _y, int _z) { x *= _x; y *= _y; z *= _z; return this; } - - public WorldCoord divide(int _x, int _y, int _z) + + public WorldCoord divide (int _x, int _y, int _z) { x /= _x; y /= _y; z /= _z; return this; } - + public WorldCoord(int _x, int _y, int _z) { x = _x; y = _y; z = _z; } - + /** * Will Return NULL if it's at some diagonal! */ - public ForgeDirection DirectionTo(WorldCoord loc) - { - int ox = x - loc.x; - int oy = y - loc.y; - int oz = z - loc.z; - - int xlen = Math.abs( ox ); - int ylen = Math.abs( oy ); - int zlen = Math.abs( oz ); - - if ( loc.isEqual( this.copy().add( ForgeDirection.EAST, xlen ) ) ) - return ForgeDirection.EAST; - - if ( loc.isEqual( this.copy().add( ForgeDirection.WEST, xlen ) ) ) - return ForgeDirection.WEST; - - if ( loc.isEqual( this.copy().add( ForgeDirection.NORTH, zlen ) ) ) - return ForgeDirection.NORTH; - - if ( loc.isEqual( this.copy().add( ForgeDirection.SOUTH, zlen ) ) ) - return ForgeDirection.SOUTH; - - if ( loc.isEqual( this.copy().add( ForgeDirection.UP, ylen ) ) ) - return ForgeDirection.UP; - - if ( loc.isEqual( this.copy().add( ForgeDirection.DOWN, ylen ) ) ) - return ForgeDirection.DOWN; - - return null; - } - - public boolean isEqual( WorldCoord c ) - { - return x == c.x && y == c.y && z == c.z; - } - - public WorldCoord copy() - { - return new WorldCoord( x, y, z ); - } - - @Override - public boolean equals(Object obj) - { - if ( obj instanceof WorldCoord ) - return isEqual( (WorldCoord)obj ); - return false; - } + public ForgeDirection DirectionTo (WorldCoord loc) + { + int ox = x - loc.x; + int oy = y - loc.y; + int oz = z - loc.z; + + int xlen = Math.abs(ox); + int ylen = Math.abs(oy); + int zlen = Math.abs(oz); + + if (loc.isEqual(this.copy().add(ForgeDirection.EAST, xlen))) + return ForgeDirection.EAST; + + if (loc.isEqual(this.copy().add(ForgeDirection.WEST, xlen))) + return ForgeDirection.WEST; + + if (loc.isEqual(this.copy().add(ForgeDirection.NORTH, zlen))) + return ForgeDirection.NORTH; + + if (loc.isEqual(this.copy().add(ForgeDirection.SOUTH, zlen))) + return ForgeDirection.SOUTH; + + if (loc.isEqual(this.copy().add(ForgeDirection.UP, ylen))) + return ForgeDirection.UP; + + if (loc.isEqual(this.copy().add(ForgeDirection.DOWN, ylen))) + return ForgeDirection.DOWN; + + return null; + } + + public boolean isEqual (WorldCoord c) + { + return x == c.x && y == c.y && z == c.z; + } + + public WorldCoord copy () + { + return new WorldCoord(x, y, z); + } @Override - public String toString() + public boolean equals (Object obj) + { + if (obj instanceof WorldCoord) + return isEqual((WorldCoord) obj); + return false; + } + + @Override + public String toString () { return "" + x + "," + y + "," + z; } - - @Override - public int hashCode() - { - return (y << 24) ^ x ^ z; - } + + @Override + public int hashCode () + { + return (y << 24) ^ x ^ z; + } } diff --git a/src/appeng/api/config/ActionItems.java b/src/appeng/api/config/ActionItems.java index ff4559de..5f4f5480 100644 --- a/src/appeng/api/config/ActionItems.java +++ b/src/appeng/api/config/ActionItems.java @@ -1,17 +1,18 @@ package appeng.api.config; +public enum ActionItems implements IConfigEnum +{ + Wrench, Close; -public enum ActionItems implements IConfigEnum { - Wrench, - Close; + @Override + public IConfigEnum[] getValues () + { + return values(); + } - @Override - public IConfigEnum[] getValues() { - return values(); - } - - @Override - public String getName() { - return "FuzzyMode"; - } + @Override + public String getName () + { + return "FuzzyMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/CondenserOuput.java b/src/appeng/api/config/CondenserOuput.java index 2c187dae..dd127cd2 100644 --- a/src/appeng/api/config/CondenserOuput.java +++ b/src/appeng/api/config/CondenserOuput.java @@ -1,19 +1,19 @@ package appeng.api.config; +public enum CondenserOuput implements IConfigEnum +{ + Trash, MatterBalls, Singularity; -public enum CondenserOuput implements IConfigEnum { - Trash, - MatterBalls, - Singularity; - - @Override - public IConfigEnum[] getValues() { - return values(); - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "CondenserOutput"; + } - @Override - public String getName() { - return "CondenserOutput"; - } - } \ No newline at end of file diff --git a/src/appeng/api/config/EnableDisable.java b/src/appeng/api/config/EnableDisable.java index 20c195bb..156973b6 100644 --- a/src/appeng/api/config/EnableDisable.java +++ b/src/appeng/api/config/EnableDisable.java @@ -1,18 +1,19 @@ package appeng.api.config; +public enum EnableDisable implements IConfigEnum +{ + Enabled, Disabled; -public enum EnableDisable implements IConfigEnum { - Enabled, - Disabled; - - @Override - public IConfigEnum[] getValues() { - return values(); - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "CondenserOutput"; + } - @Override - public String getName() { - return "CondenserOutput"; - } - } \ No newline at end of file diff --git a/src/appeng/api/config/FullnessMode.java b/src/appeng/api/config/FullnessMode.java index a3f79f4b..1db54373 100644 --- a/src/appeng/api/config/FullnessMode.java +++ b/src/appeng/api/config/FullnessMode.java @@ -1,19 +1,19 @@ package appeng.api.config; - // do not change names.. -public enum FullnessMode implements IConfigEnum { - Empty, - Half, - Full; - - @Override - public IConfigEnum[] getValues() { - return values(); - } - - @Override - public String getName() { - return "FullnessMode"; - } +public enum FullnessMode implements IConfigEnum +{ + Empty, Half, Full; + + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "FullnessMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/FuzzyMode.java b/src/appeng/api/config/FuzzyMode.java index 40d57127..cfa6fd82 100644 --- a/src/appeng/api/config/FuzzyMode.java +++ b/src/appeng/api/config/FuzzyMode.java @@ -1,27 +1,25 @@ package appeng.api.config; +public enum FuzzyMode implements IConfigEnum +{ + IgnoreAll(-1.0F), Percent_99(1.0F), Percent_75(0.75F), Percent_50(0.5F), Percent_25(0.25F); -public enum FuzzyMode implements IConfigEnum { - IgnoreAll(-1.0F), - Percent_99(1.0F), - Percent_75(0.75F), - Percent_50(0.5F), - Percent_25(0.25F); - - public float breakPoint; - - private FuzzyMode( float p ) - { - breakPoint = p; - } + public float breakPoint; - @Override - public IConfigEnum[] getValues() { - return values(); - } + private FuzzyMode(float p) + { + breakPoint = p; + } - @Override - public String getName() { - return "FuzzyMode"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "FuzzyMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/IConfigEnum.java b/src/appeng/api/config/IConfigEnum.java index 18bafec7..e5d5af52 100644 --- a/src/appeng/api/config/IConfigEnum.java +++ b/src/appeng/api/config/IConfigEnum.java @@ -1,11 +1,12 @@ package appeng.api.config; -public interface IConfigEnum { - - IConfigEnum[] getValues(); - - int ordinal(); +public interface IConfigEnum +{ + + IConfigEnum[] getValues (); + + int ordinal (); + + String getName (); - String getName(); - } diff --git a/src/appeng/api/config/InterfaceBlockingMode.java b/src/appeng/api/config/InterfaceBlockingMode.java index 08978d20..d3435fa9 100644 --- a/src/appeng/api/config/InterfaceBlockingMode.java +++ b/src/appeng/api/config/InterfaceBlockingMode.java @@ -1,17 +1,19 @@ package appeng.api.config; -public enum InterfaceBlockingMode implements IConfigEnum { - NonBlocking, - Blocking; - - @Override - public IConfigEnum[] getValues() { - return values(); - } +public enum InterfaceBlockingMode implements IConfigEnum +{ + NonBlocking, Blocking; + + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "InterfaceBlockingMode"; + } - @Override - public String getName() { - return "InterfaceBlockingMode"; - } - } \ No newline at end of file diff --git a/src/appeng/api/config/InterfaceCraftingMode.java b/src/appeng/api/config/InterfaceCraftingMode.java index ce783b42..0b3c1996 100644 --- a/src/appeng/api/config/InterfaceCraftingMode.java +++ b/src/appeng/api/config/InterfaceCraftingMode.java @@ -1,17 +1,19 @@ package appeng.api.config; -public enum InterfaceCraftingMode implements IConfigEnum { - Craft, - DontCraft; - - @Override - public IConfigEnum[] getValues() { - return values(); - } +public enum InterfaceCraftingMode implements IConfigEnum +{ + Craft, DontCraft; + + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "InterfaceCraftingMode"; + } - @Override - public String getName() { - return "InterfaceCraftingMode"; - } - } diff --git a/src/appeng/api/config/ItemFlow.java b/src/appeng/api/config/ItemFlow.java index b7d60cd6..1f9119db 100644 --- a/src/appeng/api/config/ItemFlow.java +++ b/src/appeng/api/config/ItemFlow.java @@ -1,18 +1,20 @@ package appeng.api.config; +public enum ItemFlow implements IConfigEnum +{ -public enum ItemFlow implements IConfigEnum { - - READ, WRITE, READ_WRITE; - - @Override - public IConfigEnum[] getValues() { - return values(); - } + READ, WRITE, READ_WRITE; + + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "ItemFlow"; + } - @Override - public String getName() { - return "ItemFlow"; - } - } \ No newline at end of file diff --git a/src/appeng/api/config/ListMode.java b/src/appeng/api/config/ListMode.java index 71bf9377..e2341ca3 100644 --- a/src/appeng/api/config/ListMode.java +++ b/src/appeng/api/config/ListMode.java @@ -1,18 +1,20 @@ package appeng.api.config; +public enum ListMode implements IConfigEnum +{ -public enum ListMode implements IConfigEnum { - - WHITELIST, BLACKLIST; - - @Override - public IConfigEnum[] getValues() { - return values(); - } + WHITELIST, BLACKLIST; + + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "ListMode"; + } - @Override - public String getName() { - return "ListMode"; - } - } \ No newline at end of file diff --git a/src/appeng/api/config/MatchingMode.java b/src/appeng/api/config/MatchingMode.java index 8ce433a8..0fec7801 100644 --- a/src/appeng/api/config/MatchingMode.java +++ b/src/appeng/api/config/MatchingMode.java @@ -1,17 +1,18 @@ package appeng.api.config; +public enum MatchingMode implements IConfigEnum +{ + Fuzzy, Precision; -public enum MatchingMode implements IConfigEnum { - Fuzzy, - Precision; - - @Override - public IConfigEnum[] getValues() { - return MatchingMode.values(); - } + @Override + public IConfigEnum[] getValues () + { + return MatchingMode.values(); + } - @Override - public String getName() { - return "MatchingMode"; - } + @Override + public String getName () + { + return "MatchingMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/OperationMode.java b/src/appeng/api/config/OperationMode.java index 6a3f94e1..4da2df20 100644 --- a/src/appeng/api/config/OperationMode.java +++ b/src/appeng/api/config/OperationMode.java @@ -1,18 +1,19 @@ package appeng.api.config; - // do not change names.. -public enum OperationMode implements IConfigEnum { - Fill, - Empty; - - @Override - public IConfigEnum[] getValues() { - return values(); - } - - @Override - public String getName() { - return "OperationMode"; - } +public enum OperationMode implements IConfigEnum +{ + Fill, Empty; + + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "OperationMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/PowerUnits.java b/src/appeng/api/config/PowerUnits.java index e227f42b..d264f3d3 100644 --- a/src/appeng/api/config/PowerUnits.java +++ b/src/appeng/api/config/PowerUnits.java @@ -1,20 +1,18 @@ package appeng.api.config; +public enum PowerUnits implements IConfigEnum +{ + AE, MJ, EU, UE, WA; -public enum PowerUnits implements IConfigEnum { - AE, - MJ, - EU, - UE, - WA; + @Override + public IConfigEnum[] getValues () + { + return values(); + } - @Override - public IConfigEnum[] getValues() { - return values(); - } - - @Override - public String getName() { - return "PowerUnits"; - } + @Override + public String getName () + { + return "PowerUnits"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/RedstoneModeInput.java b/src/appeng/api/config/RedstoneModeInput.java index edbc51f9..23374d7d 100644 --- a/src/appeng/api/config/RedstoneModeInput.java +++ b/src/appeng/api/config/RedstoneModeInput.java @@ -1,20 +1,19 @@ package appeng.api.config; - // do not change names.. -public enum RedstoneModeInput implements IConfigEnum { - Ignore, - WhenOff, - WhenOn, - OnPulse; - - @Override - public IConfigEnum[] getValues() { - return values(); - } +public enum RedstoneModeInput implements IConfigEnum +{ + Ignore, WhenOff, WhenOn, OnPulse; - @Override - public String getName() { - return "RedstoneMode"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "RedstoneMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/RedstoneModeInputOnOff.java b/src/appeng/api/config/RedstoneModeInputOnOff.java index e01cad66..a03ec6cc 100644 --- a/src/appeng/api/config/RedstoneModeInputOnOff.java +++ b/src/appeng/api/config/RedstoneModeInputOnOff.java @@ -1,19 +1,19 @@ package appeng.api.config; - // do not change names.. -public enum RedstoneModeInputOnOff implements IConfigEnum { - Ignore, - WhenOff, - WhenOn; - - @Override - public IConfigEnum[] getValues() { - return values(); - } +public enum RedstoneModeInputOnOff implements IConfigEnum +{ + Ignore, WhenOff, WhenOn; - @Override - public String getName() { - return "RedstoneMode"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "RedstoneMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/RedstoneModeOutput.java b/src/appeng/api/config/RedstoneModeOutput.java index b94b116f..8bb55942 100644 --- a/src/appeng/api/config/RedstoneModeOutput.java +++ b/src/appeng/api/config/RedstoneModeOutput.java @@ -1,18 +1,19 @@ package appeng.api.config; - // do not change names.. -public enum RedstoneModeOutput implements IConfigEnum { - WhenOff, - WhenOn; - - @Override - public IConfigEnum[] getValues() { - return values(); - } +public enum RedstoneModeOutput implements IConfigEnum +{ + WhenOff, WhenOn; - @Override - public String getName() { - return "RedstoneMode"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "RedstoneMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/SearchBoxMode.java b/src/appeng/api/config/SearchBoxMode.java index 7a99d1ed..ccffa9be 100644 --- a/src/appeng/api/config/SearchBoxMode.java +++ b/src/appeng/api/config/SearchBoxMode.java @@ -2,21 +2,21 @@ package appeng.api.config; import net.minecraft.src.ModLoader; -public enum SearchBoxMode implements IConfigEnum { - Autosearch, - Standard, - NEIAutoSearch, - NEIStandard; +public enum SearchBoxMode implements IConfigEnum +{ + Autosearch, Standard, NEIAutoSearch, NEIStandard; - @Override - public IConfigEnum[] getValues() { - if ( ModLoader.isModLoaded( "NotEnoughItems" ) ) - return values(); - return new SearchBoxMode[]{ Autosearch, Standard }; - } + @Override + public IConfigEnum[] getValues () + { + if (ModLoader.isModLoaded("NotEnoughItems")) + return values(); + return new SearchBoxMode[] { Autosearch, Standard }; + } - @Override - public String getName() { - return "SearchBoxMode"; - } + @Override + public String getName () + { + return "SearchBoxMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/SortDir.java b/src/appeng/api/config/SortDir.java index d09904e5..69553f20 100644 --- a/src/appeng/api/config/SortDir.java +++ b/src/appeng/api/config/SortDir.java @@ -1,18 +1,18 @@ package appeng.api.config; - public enum SortDir implements IConfigEnum { - ASC, - DESC; - - @Override - public IConfigEnum[] getValues() { - return values(); - } + ASC, DESC; - @Override - public String getName() { - return "SortDir"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "SortDir"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/SortOrder.java b/src/appeng/api/config/SortOrder.java index fc18c4a4..5c0ae9cf 100644 --- a/src/appeng/api/config/SortOrder.java +++ b/src/appeng/api/config/SortOrder.java @@ -1,20 +1,18 @@ package appeng.api.config; - public enum SortOrder implements IConfigEnum { - Name, - Size, - Priority, - ItemID; - - @Override - public IConfigEnum[] getValues() { - return values(); - } + Name, Size, Priority, ItemID; - @Override - public String getName() { - return "SortOrder"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "SortOrder"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/StackModeInput.java b/src/appeng/api/config/StackModeInput.java index d99dda19..d87fef0b 100644 --- a/src/appeng/api/config/StackModeInput.java +++ b/src/appeng/api/config/StackModeInput.java @@ -1,18 +1,19 @@ package appeng.api.config; - // do not change names.. -public enum StackModeInput implements IConfigEnum { - Single, - Stack; - - @Override - public IConfigEnum[] getValues() { - return values(); - } +public enum StackModeInput implements IConfigEnum +{ + Single, Stack; - @Override - public String getName() { - return "StackMode"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "StackMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/StackModeOutput.java b/src/appeng/api/config/StackModeOutput.java index 546b283a..d6c4a6f7 100644 --- a/src/appeng/api/config/StackModeOutput.java +++ b/src/appeng/api/config/StackModeOutput.java @@ -1,20 +1,19 @@ package appeng.api.config; - // do not change names.. -public enum StackModeOutput implements IConfigEnum { - Single, - Stack, - Craft, - CraftOnly; - - @Override - public IConfigEnum[] getValues() { - return values(); - } +public enum StackModeOutput implements IConfigEnum +{ + Single, Stack, Craft, CraftOnly; - @Override - public String getName() { - return "StackMode"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "StackMode"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/TransferDir.java b/src/appeng/api/config/TransferDir.java index ed8cd4e1..a7787525 100644 --- a/src/appeng/api/config/TransferDir.java +++ b/src/appeng/api/config/TransferDir.java @@ -1,18 +1,18 @@ package appeng.api.config; - public enum TransferDir implements IConfigEnum { - LEFT, - RIGHT; - - @Override - public IConfigEnum[] getValues() { - return values(); - } + LEFT, RIGHT; - @Override - public String getName() { - return "TransferDir"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "TransferDir"; + } } \ No newline at end of file diff --git a/src/appeng/api/config/ViewItems.java b/src/appeng/api/config/ViewItems.java index ec5c2d0f..44642275 100644 --- a/src/appeng/api/config/ViewItems.java +++ b/src/appeng/api/config/ViewItems.java @@ -1,19 +1,18 @@ package appeng.api.config; - public enum ViewItems implements IConfigEnum { - ALL, - STORED, - CRAFTABLE; - - @Override - public IConfigEnum[] getValues() { - return values(); - } + ALL, STORED, CRAFTABLE; - @Override - public String getName() { - return "ViewItems"; - } + @Override + public IConfigEnum[] getValues () + { + return values(); + } + + @Override + public String getName () + { + return "ViewItems"; + } } \ No newline at end of file diff --git a/src/appeng/api/events/AEWorldEvent.java b/src/appeng/api/events/AEWorldEvent.java index d4cb74b0..bf504efd 100644 --- a/src/appeng/api/events/AEWorldEvent.java +++ b/src/appeng/api/events/AEWorldEvent.java @@ -8,10 +8,10 @@ import net.minecraftforge.event.Event; */ public class AEWorldEvent extends Event { - final public World world; - - public AEWorldEvent( World w ) - { - world = w; - } + final public World world; + + public AEWorldEvent(World w) + { + world = w; + } } diff --git a/src/appeng/api/events/GridErrorEvent.java b/src/appeng/api/events/GridErrorEvent.java index 748f1a6e..171c25f1 100644 --- a/src/appeng/api/events/GridErrorEvent.java +++ b/src/appeng/api/events/GridErrorEvent.java @@ -7,12 +7,15 @@ import appeng.api.WorldCoord; /** * an error, basically just causes an update, use it if there is really an error, other wise just ignore it. */ -public class GridErrorEvent extends AEWorldEvent { - - public WorldCoord coord; - public GridErrorEvent(World world, WorldCoord wc ) { - super(world); - coord = wc; - } - +public class GridErrorEvent extends AEWorldEvent +{ + + public WorldCoord coord; + + public GridErrorEvent(World world, WorldCoord wc) + { + super(world); + coord = wc; + } + } diff --git a/src/appeng/api/events/GridPatternUpdateEvent.java b/src/appeng/api/events/GridPatternUpdateEvent.java index 413b13e9..e8f5dae3 100644 --- a/src/appeng/api/events/GridPatternUpdateEvent.java +++ b/src/appeng/api/events/GridPatternUpdateEvent.java @@ -8,15 +8,17 @@ import appeng.api.me.util.IGridInterface; /** * Posted when crafting options in a AE Network update, you can watch for them if you want to. */ -public class GridPatternUpdateEvent extends AEWorldEvent { - - final public WorldCoord coord; - final public IGridInterface grid; - - public GridPatternUpdateEvent(World world, WorldCoord wc, IGridInterface gi ) { - super(world); - grid = gi; - coord = wc; - } - +public class GridPatternUpdateEvent extends AEWorldEvent +{ + + final public WorldCoord coord; + final public IGridInterface grid; + + public GridPatternUpdateEvent(World world, WorldCoord wc, IGridInterface gi) + { + super(world); + grid = gi; + coord = wc; + } + } diff --git a/src/appeng/api/events/GridStorageUpdateEvent.java b/src/appeng/api/events/GridStorageUpdateEvent.java index aab73c42..b77180f8 100644 --- a/src/appeng/api/events/GridStorageUpdateEvent.java +++ b/src/appeng/api/events/GridStorageUpdateEvent.java @@ -8,15 +8,17 @@ import appeng.api.me.util.IGridInterface; /** * Posted when storage options in a AE Network update, such as a new Storage Bus or Cell is added, or removed. */ -public class GridStorageUpdateEvent extends AEWorldEvent { - - final public WorldCoord coord; - final public IGridInterface grid; - - public GridStorageUpdateEvent(World world, WorldCoord wc, IGridInterface gi ) { - super(world); - grid = gi; - coord = wc; - } - +public class GridStorageUpdateEvent extends AEWorldEvent +{ + + final public WorldCoord coord; + final public IGridInterface grid; + + public GridStorageUpdateEvent(World world, WorldCoord wc, IGridInterface gi) + { + super(world); + grid = gi; + coord = wc; + } + } diff --git a/src/appeng/api/events/GridTileConnectivityEvent.java b/src/appeng/api/events/GridTileConnectivityEvent.java index 9d793899..e170a83e 100644 --- a/src/appeng/api/events/GridTileConnectivityEvent.java +++ b/src/appeng/api/events/GridTileConnectivityEvent.java @@ -8,15 +8,17 @@ import appeng.api.me.tiles.IGridTileEntity; /** * The network has changed, and must be updated. */ -public class GridTileConnectivityEvent extends AEWorldEvent { - - public WorldCoord coord; - public IGridTileEntity te; - - public GridTileConnectivityEvent( IGridTileEntity _te, World world, WorldCoord wc ) { - super(world); - te = _te; - coord = wc; - } - +public class GridTileConnectivityEvent extends AEWorldEvent +{ + + public WorldCoord coord; + public IGridTileEntity te; + + public GridTileConnectivityEvent(IGridTileEntity _te, World world, WorldCoord wc) + { + super(world); + te = _te; + coord = wc; + } + } diff --git a/src/appeng/api/events/GridTileLoadEvent.java b/src/appeng/api/events/GridTileLoadEvent.java index 2293f56a..6587906a 100644 --- a/src/appeng/api/events/GridTileLoadEvent.java +++ b/src/appeng/api/events/GridTileLoadEvent.java @@ -8,15 +8,17 @@ import appeng.api.me.tiles.IGridTileEntity; /** * A Tile has been added to the world, and should be evaluated for Network Connectivity. */ -public class GridTileLoadEvent extends AEWorldEvent { - - public WorldCoord coord; - public IGridTileEntity te; - - public GridTileLoadEvent(IGridTileEntity _te, World world, WorldCoord wc ) { - super(world); - te = _te; - coord = wc; - } - +public class GridTileLoadEvent extends AEWorldEvent +{ + + public WorldCoord coord; + public IGridTileEntity te; + + public GridTileLoadEvent(IGridTileEntity _te, World world, WorldCoord wc) + { + super(world); + te = _te; + coord = wc; + } + } diff --git a/src/appeng/api/events/GridTileUnloadEvent.java b/src/appeng/api/events/GridTileUnloadEvent.java index d96ccefb..2727aa5b 100644 --- a/src/appeng/api/events/GridTileUnloadEvent.java +++ b/src/appeng/api/events/GridTileUnloadEvent.java @@ -8,15 +8,17 @@ import appeng.api.me.tiles.IGridTileEntity; /** * A Tile has been removed from the world, and should no longer be considered for connectivity. */ -public class GridTileUnloadEvent extends AEWorldEvent { - - public WorldCoord coord; - public IGridTileEntity te; - - public GridTileUnloadEvent(IGridTileEntity _te,World world, WorldCoord wc ) { - super(world); - te = _te; - coord = wc; - } - +public class GridTileUnloadEvent extends AEWorldEvent +{ + + public WorldCoord coord; + public IGridTileEntity te; + + public GridTileUnloadEvent(IGridTileEntity _te, World world, WorldCoord wc) + { + super(world); + te = _te; + coord = wc; + } + } diff --git a/src/appeng/api/events/LocateableEventAnnounce.java b/src/appeng/api/events/LocateableEventAnnounce.java index 2605629e..d29ab2a1 100644 --- a/src/appeng/api/events/LocateableEventAnnounce.java +++ b/src/appeng/api/events/LocateableEventAnnounce.java @@ -6,20 +6,22 @@ import appeng.api.me.tiles.ILocateable; /** * Used to Notify the Location Registry of objects, and their availability. */ -public class LocateableEventAnnounce extends Event { - - public enum LocateableEvent { - Register, // Adds the locateable to the registry - Unregister // Removes the Locatable from the registry - }; - - final public ILocateable target; - final public LocateableEvent change; - - public LocateableEventAnnounce( ILocateable o, LocateableEvent ev ) - { - target = o; - change = ev; - } - +public class LocateableEventAnnounce extends Event +{ + + public enum LocateableEvent + { + Register, // Adds the locateable to the registry + Unregister // Removes the Locatable from the registry + }; + + final public ILocateable target; + final public LocateableEvent change; + + public LocateableEventAnnounce(ILocateable o, LocateableEvent ev) + { + target = o; + change = ev; + } + } diff --git a/src/appeng/api/events/MultiBlockUpdateEvent.java b/src/appeng/api/events/MultiBlockUpdateEvent.java index 280abddd..6ab6d597 100644 --- a/src/appeng/api/events/MultiBlockUpdateEvent.java +++ b/src/appeng/api/events/MultiBlockUpdateEvent.java @@ -8,15 +8,17 @@ import appeng.api.me.tiles.IGridTileEntity; /** * Used by the MAC to trigger updates in its structure. */ -public class MultiBlockUpdateEvent extends AEWorldEvent { - - public WorldCoord coord; - public IGridTileEntity te; - - public MultiBlockUpdateEvent( IGridTileEntity _te, World world, WorldCoord wc ) { - super(world); - coord = wc; - te = _te; - } - +public class MultiBlockUpdateEvent extends AEWorldEvent +{ + + public WorldCoord coord; + public IGridTileEntity te; + + public MultiBlockUpdateEvent(IGridTileEntity _te, World world, WorldCoord wc) + { + super(world); + coord = wc; + te = _te; + } + } diff --git a/src/appeng/api/exceptions/AppEngException.java b/src/appeng/api/exceptions/AppEngException.java index 940e7bee..2803e9d7 100644 --- a/src/appeng/api/exceptions/AppEngException.java +++ b/src/appeng/api/exceptions/AppEngException.java @@ -2,10 +2,10 @@ package appeng.api.exceptions; public class AppEngException extends Exception { - - private static final long serialVersionUID = -9051434206368465494L; - public AppEngException(String t) + private static final long serialVersionUID = -9051434206368465494L; + + public AppEngException(String t) { super(t); } diff --git a/src/appeng/api/exceptions/AppEngTileMissingException.java b/src/appeng/api/exceptions/AppEngTileMissingException.java index 067e47f1..9fae0d33 100644 --- a/src/appeng/api/exceptions/AppEngTileMissingException.java +++ b/src/appeng/api/exceptions/AppEngTileMissingException.java @@ -4,27 +4,29 @@ import cpw.mods.fml.common.FMLLog; import net.minecraft.world.World; import appeng.api.DimentionalCoord; -public class AppEngTileMissingException extends Exception { +public class AppEngTileMissingException extends Exception +{ + + private static final long serialVersionUID = -3502227742711078681L; + public DimentionalCoord dc; + + @Override + public void printStackTrace () + { + try + { + FMLLog.info("[AppEng] Missing Tile at " + dc.x + ", " + dc.y + ", " + dc.z + " in +" + dc.getWorld().getWorldInfo().getVanillaDimension()); + } + catch (Throwable _) + { + FMLLog.info("[AppEng] Missing Tile at " + dc.x + ", " + dc.y + ", " + dc.z); + } + super.printStackTrace(); + } + + public AppEngTileMissingException(World w, int x, int y, int z) + { + dc = new DimentionalCoord(w, x, y, z); + } - private static final long serialVersionUID = -3502227742711078681L; - public DimentionalCoord dc; - - @Override - public void printStackTrace() { - try - { - FMLLog.info( "[AppEng] Missing Tile at "+dc.x+", "+dc.y+", "+dc.z+" in +"+dc.getWorld().getWorldInfo().getVanillaDimension() ); - } - catch( Throwable _ ) - { - FMLLog.info( "[AppEng] Missing Tile at "+dc.x+", "+dc.y+", "+dc.z ); - } - super.printStackTrace(); - } - - public AppEngTileMissingException(World w, int x, int y, int z) - { - dc = new DimentionalCoord( w, x, y, z ); - } - } diff --git a/src/appeng/api/me/items/IAEChargeableItem.java b/src/appeng/api/me/items/IAEChargeableItem.java index 8619a8b7..68944651 100644 --- a/src/appeng/api/me/items/IAEChargeableItem.java +++ b/src/appeng/api/me/items/IAEChargeableItem.java @@ -1,4 +1,3 @@ - package appeng.api.me.items; import net.minecraft.item.Item; @@ -7,19 +6,20 @@ import net.minecraft.item.ItemStack; /* * A simple AE interface used internally for PowerRelay charging. */ -public interface IAEChargeableItem { - - /* - * Return the amount of energy not used. - * - * if you return the same amount out, as was passed in, then it will consider charging done. - * - */ - public float addEnergy( ItemStack target, float energy ); +public interface IAEChargeableItem +{ + + /* + * Return the amount of energy not used. + * + * if you return the same amount out, as was passed in, then it will consider charging done. + * + */ + public float addEnergy (ItemStack target, float energy); /* * Must return true for the target item for it to be considered a charageable item. */ - public boolean isChargeable( ItemStack it ); - + public boolean isChargeable (ItemStack it); + } diff --git a/src/appeng/api/me/items/IAEWrench.java b/src/appeng/api/me/items/IAEWrench.java index 6abead7b..ed2c3c26 100644 --- a/src/appeng/api/me/items/IAEWrench.java +++ b/src/appeng/api/me/items/IAEWrench.java @@ -2,8 +2,9 @@ package appeng.api.me.items; import net.minecraft.entity.player.EntityPlayer; -public interface IAEWrench { +public interface IAEWrench +{ - boolean canWrench(EntityPlayer player, int x, int y, int z); + boolean canWrench (EntityPlayer player, int x, int y, int z); } diff --git a/src/appeng/api/me/items/IMemoryCard.java b/src/appeng/api/me/items/IMemoryCard.java index 9e9a685e..1ee3e300 100644 --- a/src/appeng/api/me/items/IMemoryCard.java +++ b/src/appeng/api/me/items/IMemoryCard.java @@ -6,36 +6,37 @@ import net.minecraft.nbt.NBTTagCompound; /** * used to interact with memory card items. */ -public interface IMemoryCard { - - /** - * returns true if the item is in fact a memory card. - * @param is - * @return - */ - boolean isMemoryCard( ItemStack is ); - - /** - * Configures the data stored on the memory card, the SettingsName, will be localized when displayed. - * @param is - * @param SettingsName - * @param data - * - tooltip - is a unlocalized string displayed after the settings name. - */ - void setMemoryCardContents( ItemStack is, String SettingsName, NBTTagCompound data ); - - /** - * returns the settings name provided previously by setMemoryCardContents, or "AppEng.GuiITooltip.Blank" if there is no settings. - * @param is - * @return - */ - String getSettingsName( ItemStack is ); - - /** - * returns the NBT Data previously saved by setMemoryCardContents, or an empty NBTCompound - * @param is - * @return - */ - NBTTagCompound getData( ItemStack is ); - +public interface IMemoryCard +{ + + /** + * returns true if the item is in fact a memory card. + * @param is + * @return + */ + boolean isMemoryCard (ItemStack is); + + /** + * Configures the data stored on the memory card, the SettingsName, will be localized when displayed. + * @param is + * @param SettingsName + * @param data + * - tooltip - is a unlocalized string displayed after the settings name. + */ + void setMemoryCardContents (ItemStack is, String SettingsName, NBTTagCompound data); + + /** + * returns the settings name provided previously by setMemoryCardContents, or "AppEng.GuiITooltip.Blank" if there is no settings. + * @param is + * @return + */ + String getSettingsName (ItemStack is); + + /** + * returns the NBT Data previously saved by setMemoryCardContents, or an empty NBTCompound + * @param is + * @return + */ + NBTTagCompound getData (ItemStack is); + } diff --git a/src/appeng/api/me/items/ISpatialStorage.java b/src/appeng/api/me/items/ISpatialStorage.java index 4f4863c1..f34c0578 100644 --- a/src/appeng/api/me/items/ISpatialStorage.java +++ b/src/appeng/api/me/items/ISpatialStorage.java @@ -5,22 +5,23 @@ import appeng.api.me.util.TransitionResult; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -public interface ISpatialStorage { - - boolean isSpatialStorage( ItemStack is ); - - int getMaxStoredDim( ItemStack is ); - - World getWorld( ItemStack is ); - - WorldCoord getStoredSize( ItemStack is ); - - WorldCoord getMin( ItemStack is ); - - WorldCoord getMax( ItemStack is ); - - TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition ); +public interface ISpatialStorage +{ + + boolean isSpatialStorage (ItemStack is); + + int getMaxStoredDim (ItemStack is); + + World getWorld (ItemStack is); + + WorldCoord getStoredSize (ItemStack is); + + WorldCoord getMin (ItemStack is); + + WorldCoord getMax (ItemStack is); + + TransitionResult doSpatialTransition (ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition); + + World createNewWorld (ItemStack is); - World createNewWorld(ItemStack is); - } diff --git a/src/appeng/api/me/items/IStorageCell.java b/src/appeng/api/me/items/IStorageCell.java index 33968a71..27e7dab4 100644 --- a/src/appeng/api/me/items/IStorageCell.java +++ b/src/appeng/api/me/items/IStorageCell.java @@ -14,42 +14,42 @@ public interface IStorageCell * @param cellItem * @return numberofBytes */ - int getBytes( ItemStack cellItem ); - + int getBytes (ItemStack cellItem); + /** * rv0 - Determines the number of bytes used for any type included on the cell. * @param cellItem * @return numberOfBytes */ - int BytePerType( ItemStack iscellItem ); - - /** - * rv11 - Must be between 1 and 63, indicates how many types you want to store on the item. - * @param cellItem - * @return numberOfTypes - */ - int getTotalTypes( ItemStack cellItem ); - - /** - * rv11 - allows you to fine tune which items are allowed on a given cell, - * if you don't care, just return false; - * As the handler for this type of cell is still the default cells, the normal AE black list is also applied. - * @param cellItem - * @param requsetedAddition - * @return preventAdditionOfItem - */ - boolean isBlackListed( ItemStack cellItem, IAEItemStack requsetedAddition ); - - /** - * rv11 - allows you to specify if this storage cell can be stored inside other storage cells, only set this for special items like the matter cannon that are not general purpose storage. - * @return - */ - boolean storableInStorageCell(); + int BytePerType (ItemStack iscellItem); - /** - * rv14 - allows an item to selectivly enable or disable its status as a storage cell. - * @param i - * @return - */ - boolean isStorageCell( ItemStack i ); + /** + * rv11 - Must be between 1 and 63, indicates how many types you want to store on the item. + * @param cellItem + * @return numberOfTypes + */ + int getTotalTypes (ItemStack cellItem); + + /** + * rv11 - allows you to fine tune which items are allowed on a given cell, + * if you don't care, just return false; + * As the handler for this type of cell is still the default cells, the normal AE black list is also applied. + * @param cellItem + * @param requsetedAddition + * @return preventAdditionOfItem + */ + boolean isBlackListed (ItemStack cellItem, IAEItemStack requsetedAddition); + + /** + * rv11 - allows you to specify if this storage cell can be stored inside other storage cells, only set this for special items like the matter cannon that are not general purpose storage. + * @return + */ + boolean storableInStorageCell (); + + /** + * rv14 - allows an item to selectivly enable or disable its status as a storage cell. + * @param i + * @return + */ + boolean isStorageCell (ItemStack i); } diff --git a/src/appeng/api/me/items/IStorageComponent.java b/src/appeng/api/me/items/IStorageComponent.java index f905373f..a1509aa7 100644 --- a/src/appeng/api/me/items/IStorageComponent.java +++ b/src/appeng/api/me/items/IStorageComponent.java @@ -2,20 +2,21 @@ package appeng.api.me.items; import net.minecraft.item.ItemStack; -public interface IStorageComponent { +public interface IStorageComponent +{ /** * rv11 - This isn't necessarily the same as if you make a storage cell out of it, but all of AE's default cells do it that way, its currently only used for the condenser. * @param cellItem * @return numberofBytes */ - int getBytes( ItemStack is ); - + int getBytes (ItemStack is); + /** * rv11 - just true or false for the item stack. * @param is * @return */ - boolean isStorageComponent( ItemStack is ); - + boolean isStorageComponent (ItemStack is); + } diff --git a/src/appeng/api/me/tiles/IAssemblerMB.java b/src/appeng/api/me/tiles/IAssemblerMB.java index 9b7cf72a..9eef465b 100644 --- a/src/appeng/api/me/tiles/IAssemblerMB.java +++ b/src/appeng/api/me/tiles/IAssemblerMB.java @@ -3,18 +3,23 @@ package appeng.api.me.tiles; import appeng.api.WorldCoord; import appeng.api.me.util.IAssemblerCluster; -public interface IAssemblerMB { +public interface IAssemblerMB +{ /** * Do this: * return new WorldCoord( TileEntity.xCoord, TileEntity.yCoord, TileEntity.zCoord ); */ - public WorldCoord getLocation(); - public IAssemblerCluster getCluster(); - public void updateStatus( IAssemblerCluster ac ); - public boolean isComplete(); - - void calculateMultiblock( long instanceCalc ); - public long markViewed(long inst); - + public WorldCoord getLocation (); + + public IAssemblerCluster getCluster (); + + public void updateStatus (IAssemblerCluster ac); + + public boolean isComplete (); + + void calculateMultiblock (long instanceCalc); + + public long markViewed (long inst); + } diff --git a/src/appeng/api/me/tiles/IAssemblerPatternProvider.java b/src/appeng/api/me/tiles/IAssemblerPatternProvider.java index d8a5f53b..00473fe4 100644 --- a/src/appeng/api/me/tiles/IAssemblerPatternProvider.java +++ b/src/appeng/api/me/tiles/IAssemblerPatternProvider.java @@ -7,5 +7,5 @@ import appeng.api.me.util.ICraftingPattern; */ public interface IAssemblerPatternProvider { - public ICraftingPattern provideAssemblerPattern(); + public ICraftingPattern provideAssemblerPattern (); } diff --git a/src/appeng/api/me/tiles/ICellContainer.java b/src/appeng/api/me/tiles/ICellContainer.java index 40481a5e..a9dd21c3 100644 --- a/src/appeng/api/me/tiles/ICellContainer.java +++ b/src/appeng/api/me/tiles/ICellContainer.java @@ -9,16 +9,17 @@ import appeng.api.me.util.IMEInventoryHandler; * * Remember to trigger the appropriate storage update vents, when your getCellArray Changes. * */ -public interface ICellContainer { - - /** - * Inventory of the tile for use with ME, should always return an valid list, never NULL. - */ - List getCellArray(); - - /** - * the storage's priority. - */ - int getPriority(); - +public interface ICellContainer +{ + + /** + * Inventory of the tile for use with ME, should always return an valid list, never NULL. + */ + List getCellArray (); + + /** + * the storage's priority. + */ + int getPriority (); + } diff --git a/src/appeng/api/me/tiles/ICellProvider.java b/src/appeng/api/me/tiles/ICellProvider.java index e65d09ad..e8418d26 100644 --- a/src/appeng/api/me/tiles/ICellProvider.java +++ b/src/appeng/api/me/tiles/ICellProvider.java @@ -7,17 +7,17 @@ import appeng.api.me.util.IMEInventoryHandler; */ public interface ICellProvider { - /** - * consume power to add an item to the storage system. - * @param items - * @param multiplier - * @return - */ - public int usePowerForAddition( int items, int multiplier ); - - /** - * returns a ME Inventory for interaction. - */ - public IMEInventoryHandler provideCell(); - + /** + * consume power to add an item to the storage system. + * @param items + * @param multiplier + * @return + */ + public int usePowerForAddition (int items, int multiplier); + + /** + * returns a ME Inventory for interaction. + */ + public IMEInventoryHandler provideCell (); + } diff --git a/src/appeng/api/me/tiles/IColoredMETile.java b/src/appeng/api/me/tiles/IColoredMETile.java index 2c54757d..4d2ea70a 100644 --- a/src/appeng/api/me/tiles/IColoredMETile.java +++ b/src/appeng/api/me/tiles/IColoredMETile.java @@ -7,62 +7,38 @@ import net.minecraftforge.common.ForgeDirection; */ public interface IColoredMETile { - /** - * Named Colors by int - */ - public static String[] Colors = { - "Blue", - "Black", - "White", - "Brown", - "Red", - "Yellow", - "Green" - }; + /** + * Named Colors by int + */ + public static String[] Colors = { "Blue", "Black", "White", "Brown", "Red", "Yellow", "Green" }; - public static int[] ColorValues = { - 0x514AFF, - 0x666666, - 0xDBDBDB, - 0x724E35, - 0xFF003C, - 0xFFC651, - 0x7CFF4A - }; + public static int[] ColorValues = { 0x514AFF, 0x666666, 0xDBDBDB, 0x724E35, 0xFF003C, 0xFFC651, 0x7CFF4A }; - public static int[] ColorValuesBright = { - 0xCAEAFC, - 0xE7E7E7, - 0xFCFCFC, - 0xD5AD91, - 0xFCECF0, - 0xFCF2C7, - 0xDBFCCF - }; - - /** - * Fluix Colored, color for isColored() == false - */ - public static String ClearName = "Clear"; - public static int ClearColor = 0x895CA8; - public static int ClearColorBright = 0xBFADD8; - - /** - * return true, if your block has a color, or false, if it dosn't. - * this allows you to have a colored block that can pretend to be colorless. - * @return true, if colored, false if not. - */ - boolean isColored( ForgeDirection dir ); - - /** - * Change the color, AE dosn't call this except for its own blocks, its simply included for completeness. - * @param offset - */ - void setColor( int offset ); - - /** - * which color is this tile? - * @return index into the above ColorsList. - */ - int getColor(); + public static int[] ColorValuesBright = { 0xCAEAFC, 0xE7E7E7, 0xFCFCFC, 0xD5AD91, 0xFCECF0, 0xFCF2C7, 0xDBFCCF }; + + /** + * Fluix Colored, color for isColored() == false + */ + public static String ClearName = "Clear"; + public static int ClearColor = 0x895CA8; + public static int ClearColorBright = 0xBFADD8; + + /** + * return true, if your block has a color, or false, if it dosn't. + * this allows you to have a colored block that can pretend to be colorless. + * @return true, if colored, false if not. + */ + boolean isColored (ForgeDirection dir); + + /** + * Change the color, AE dosn't call this except for its own blocks, its simply included for completeness. + * @param offset + */ + void setColor (int offset); + + /** + * which color is this tile? + * @return index into the above ColorsList. + */ + int getColor (); } diff --git a/src/appeng/api/me/tiles/IConfigureableTile.java b/src/appeng/api/me/tiles/IConfigureableTile.java index fbaa38de..500c6a72 100644 --- a/src/appeng/api/me/tiles/IConfigureableTile.java +++ b/src/appeng/api/me/tiles/IConfigureableTile.java @@ -5,24 +5,25 @@ import java.util.List; /** * Some ME Tiles can be configured, generally via interface, but these let you do this programatically. */ -public interface IConfigureableTile { - - /** Switches configuration to next option... ( returns new configuration. ) */ - String prevConfiguration(String name); - - /** Switches configuration to next option... ( returns new configuration. ) */ - String nextConfiguration(String name); - - /** Gets a list off all the configurations... */ - List getConfigurations(); - - /** Gets the options of a particular configuration. */ - List getConfiguationOptions( String name ); - - /** Set a configuration to a specific option... ( returns the old one. ) */ - String setConfiguration(String name, String value); - - /** The the current value for a configuration. */ - String getConfiguration(String name); - +public interface IConfigureableTile +{ + + /** Switches configuration to next option... ( returns new configuration. ) */ + String prevConfiguration (String name); + + /** Switches configuration to next option... ( returns new configuration. ) */ + String nextConfiguration (String name); + + /** Gets a list off all the configurations... */ + List getConfigurations (); + + /** Gets the options of a particular configuration. */ + List getConfiguationOptions (String name); + + /** Set a configuration to a specific option... ( returns the old one. ) */ + String setConfiguration (String name, String value); + + /** The the current value for a configuration. */ + String getConfiguration (String name); + } diff --git a/src/appeng/api/me/tiles/IConnectionSensitive.java b/src/appeng/api/me/tiles/IConnectionSensitive.java index 723401c1..4040ee46 100644 --- a/src/appeng/api/me/tiles/IConnectionSensitive.java +++ b/src/appeng/api/me/tiles/IConnectionSensitive.java @@ -4,8 +4,9 @@ import java.util.Set; import net.minecraftforge.common.ForgeDirection; -public interface IConnectionSensitive { - - void onMEConnectionsChanged( Set connections, Set visualConnections ); - +public interface IConnectionSensitive +{ + + void onMEConnectionsChanged (Set connections, Set visualConnections); + } diff --git a/src/appeng/api/me/tiles/ICraftingTracker.java b/src/appeng/api/me/tiles/ICraftingTracker.java index 779ea903..70c2082f 100644 --- a/src/appeng/api/me/tiles/ICraftingTracker.java +++ b/src/appeng/api/me/tiles/ICraftingTracker.java @@ -3,8 +3,9 @@ package appeng.api.me.tiles; import appeng.api.me.util.ICraftingPattern; import appeng.api.me.util.ITileCraftingProvider; -public interface ICraftingTracker { +public interface ICraftingTracker +{ + + void addCraftingOption (ITileCraftingProvider provider, ICraftingPattern api); - void addCraftingOption( ITileCraftingProvider provider, ICraftingPattern api ); - } diff --git a/src/appeng/api/me/tiles/IDirectionalMETile.java b/src/appeng/api/me/tiles/IDirectionalMETile.java index 1cccdc63..6c6a7511 100644 --- a/src/appeng/api/me/tiles/IDirectionalMETile.java +++ b/src/appeng/api/me/tiles/IDirectionalMETile.java @@ -10,11 +10,11 @@ import net.minecraftforge.common.ForgeDirection; */ public interface IDirectionalMETile { - - /** - * return true if this tile can connect in a specific direction. - * @param dir - * @return true, if it can connect. - */ - boolean canConnect( ForgeDirection dir ); + + /** + * return true if this tile can connect in a specific direction. + * @param dir + * @return true, if it can connect. + */ + boolean canConnect (ForgeDirection dir); } diff --git a/src/appeng/api/me/tiles/IExtendedCellProvider.java b/src/appeng/api/me/tiles/IExtendedCellProvider.java index 5df4532b..8cf09614 100644 --- a/src/appeng/api/me/tiles/IExtendedCellProvider.java +++ b/src/appeng/api/me/tiles/IExtendedCellProvider.java @@ -7,7 +7,7 @@ import appeng.api.me.util.IMEInventoryHandler; */ public interface IExtendedCellProvider extends ICellProvider { - - public IMEInventoryHandler provideCell( String Filter ); - + + public IMEInventoryHandler provideCell (String Filter); + } diff --git a/src/appeng/api/me/tiles/IFulllyOptionalMETile.java b/src/appeng/api/me/tiles/IFulllyOptionalMETile.java index 664bd228..2b451301 100644 --- a/src/appeng/api/me/tiles/IFulllyOptionalMETile.java +++ b/src/appeng/api/me/tiles/IFulllyOptionalMETile.java @@ -4,8 +4,9 @@ package appeng.api.me.tiles; * Cables will disconnect if its not enabled, * this means that they will fail to appear connected, example - MAC */ -public interface IFulllyOptionalMETile extends IOptionalMETile { +public interface IFulllyOptionalMETile extends IOptionalMETile +{ + + boolean isSeperated (); - boolean isSeperated(); - } diff --git a/src/appeng/api/me/tiles/IGridMachine.java b/src/appeng/api/me/tiles/IGridMachine.java index 383902dd..5721ad2d 100644 --- a/src/appeng/api/me/tiles/IGridMachine.java +++ b/src/appeng/api/me/tiles/IGridMachine.java @@ -8,18 +8,18 @@ public abstract interface IGridMachine extends IGridTileEntity /** * how much power this entity drains to run constantly. */ - public float getPowerDrainPerTick(); - + public float getPowerDrainPerTick (); + /** * when a network is reset, this is trigger false, until booting is complete, please respect this and disable * network related activity during that time. * @param isReady */ - public void setNetworkReady( boolean isReady ); - + public void setNetworkReady (boolean isReady); + /** * return true, when the machine is properly powered, the network is ready, and any other conditions required for running are met. * @return */ - public boolean isMachineActive(); + public boolean isMachineActive (); } diff --git a/src/appeng/api/me/tiles/IGridTeleport.java b/src/appeng/api/me/tiles/IGridTeleport.java index 6703b4e1..c8bfff5d 100644 --- a/src/appeng/api/me/tiles/IGridTeleport.java +++ b/src/appeng/api/me/tiles/IGridTeleport.java @@ -7,5 +7,5 @@ import appeng.api.DimentionalCoord; */ public interface IGridTeleport { - DimentionalCoord[] findRemoteSide(); + DimentionalCoord[] findRemoteSide (); } diff --git a/src/appeng/api/me/tiles/IGridTileEntity.java b/src/appeng/api/me/tiles/IGridTileEntity.java index 7b956302..f2497855 100644 --- a/src/appeng/api/me/tiles/IGridTileEntity.java +++ b/src/appeng/api/me/tiles/IGridTileEntity.java @@ -13,37 +13,37 @@ public abstract interface IGridTileEntity * Do this: * return new WorldCoord( TileEntity.xCoord, TileEntity.yCoord, TileEntity.zCoord ); */ - public abstract WorldCoord getLocation(); - + public abstract WorldCoord getLocation (); + /** * If your tile entity is valid return true. */ - public boolean isValid(); - + public boolean isValid (); + /** * Informs you of either true or false. * if the power feed has stopped, or been continued, only called when changes happens, or when grid updates happen. */ - public abstract void setPowerStatus(boolean hasPower); - + public abstract void setPowerStatus (boolean hasPower); + /** * Yes if the device has a powered status. */ - public abstract boolean isPowered(); - + public abstract boolean isPowered (); + /** * Return your last grid you got via setGrid. */ - public IGridInterface getGrid(); - + public IGridInterface getGrid (); + /** * Informs you of your new grid, YOU MUST return this via getGrid. * Store for later. */ - public void setGrid(IGridInterface gi); - + public void setGrid (IGridInterface gi); + /** * Return worldObj */ - public World getWorld(); + public World getWorld (); } diff --git a/src/appeng/api/me/tiles/ILocateable.java b/src/appeng/api/me/tiles/ILocateable.java index 18417876..90849e2f 100644 --- a/src/appeng/api/me/tiles/ILocateable.java +++ b/src/appeng/api/me/tiles/ILocateable.java @@ -2,9 +2,9 @@ package appeng.api.me.tiles; public interface ILocateable { - /** - * returns the serial for a locateable object. - * @return - */ - long getLocatableSerial(); + /** + * returns the serial for a locateable object. + * @return + */ + long getLocatableSerial (); } diff --git a/src/appeng/api/me/tiles/IMEPowerStorage.java b/src/appeng/api/me/tiles/IMEPowerStorage.java index f92b3e44..316893de 100644 --- a/src/appeng/api/me/tiles/IMEPowerStorage.java +++ b/src/appeng/api/me/tiles/IMEPowerStorage.java @@ -6,50 +6,51 @@ import appeng.api.config.ItemFlow; * Used to access information about AE's various power accepting blocks for monitoring purposes. * */ -public interface IMEPowerStorage { - - /** - * ME power storage asset, pass the amount you want to use, and what you want to use it for. - * @param use - * @param for_what - * @return if you can use it. - */ - boolean useMEEnergy( float use, String for_what ); - - /** - * Add energy to an ME Power storage. - * @param amt that was not added to storage myEnergy = addMEPower( myEnergy ); // pushes your power into the network. - * @return - */ - public double addMEPower( double amt ); - - /** - * returns the current maximum power ( this can change :P ) - */ - public double getMEMaxPower(); - - /** - * returns the current AE Power Level, this may exceed getMEMaxPower() - */ - public double getMECurrentPower(); - - /** - * Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control the behavior ) - * @return - */ - public boolean isPublicPowerStorage(); - - /** - * Control the power flow by telling what the controller can do, either add? or subtract? or both! - * @return - */ - public ItemFlow getPowerFlow(); - - /** - * Drains power from this storage, it returns the power it was able to obtain. - * @param amt - amount of power to drain. - * @return amount of power obtained. - */ - double drainMEPower(double amt); - +public interface IMEPowerStorage +{ + + /** + * ME power storage asset, pass the amount you want to use, and what you want to use it for. + * @param use + * @param for_what + * @return if you can use it. + */ + boolean useMEEnergy (float use, String for_what); + + /** + * Add energy to an ME Power storage. + * @param amt that was not added to storage myEnergy = addMEPower( myEnergy ); // pushes your power into the network. + * @return + */ + public double addMEPower (double amt); + + /** + * returns the current maximum power ( this can change :P ) + */ + public double getMEMaxPower (); + + /** + * returns the current AE Power Level, this may exceed getMEMaxPower() + */ + public double getMECurrentPower (); + + /** + * Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control the behavior ) + * @return + */ + public boolean isPublicPowerStorage (); + + /** + * Control the power flow by telling what the controller can do, either add? or subtract? or both! + * @return + */ + public ItemFlow getPowerFlow (); + + /** + * Drains power from this storage, it returns the power it was able to obtain. + * @param amt - amount of power to drain. + * @return amount of power obtained. + */ + double drainMEPower (double amt); + } diff --git a/src/appeng/api/me/tiles/INonSignalBlock.java b/src/appeng/api/me/tiles/INonSignalBlock.java index eb0fb801..32ac1856 100644 --- a/src/appeng/api/me/tiles/INonSignalBlock.java +++ b/src/appeng/api/me/tiles/INonSignalBlock.java @@ -4,6 +4,7 @@ package appeng.api.me.tiles; * By simply implenting this, the networks can be become aware of a block they touch, but they don't propogate signal or really belong to a network. * Not sure what it would be used for to be honest beyond the power relay. */ -public interface INonSignalBlock { - +public interface INonSignalBlock +{ + } diff --git a/src/appeng/api/me/tiles/IOptionalMETile.java b/src/appeng/api/me/tiles/IOptionalMETile.java index ff0d525d..dde425da 100644 --- a/src/appeng/api/me/tiles/IOptionalMETile.java +++ b/src/appeng/api/me/tiles/IOptionalMETile.java @@ -3,12 +3,13 @@ package appeng.api.me.tiles; /** * Cables will connect, but signal will not propagate. ( IFulllyOptionalMETile disconnects ) */ -public interface IOptionalMETile { - - /** - * if false, the signal will not propigate via this tile, remember to use connectivity events. - * @return - */ - public boolean isEnabled(); - +public interface IOptionalMETile +{ + + /** + * if false, the signal will not propigate via this tile, remember to use connectivity events. + * @return + */ + public boolean isEnabled (); + } diff --git a/src/appeng/api/me/tiles/IOrientableTile.java b/src/appeng/api/me/tiles/IOrientableTile.java index 26336736..988b6bd7 100644 --- a/src/appeng/api/me/tiles/IOrientableTile.java +++ b/src/appeng/api/me/tiles/IOrientableTile.java @@ -6,21 +6,22 @@ import net.minecraftforge.common.ForgeDirection; * Please note that none of these methods will cause a block update, * if you use set ori/spin/cycle, must mark the block for update if it was already sent to the client. */ -public interface IOrientableTile { - - // returns the main direction for rotation. - ForgeDirection getPrimaryOrientation(); - - // used for up or down orientation to spin the tile around, 0 - 3 clockwise ( probobly ) - int getSpin(); - - // returns the main direction for rotation. - void setPrimaryOrientation( ForgeDirection s ); - - // used for up or down orientation. - void setSpin( int spin ); - - // acts like a wrench was used on it, if a wrench does nothing, this does nothing. - void cycleOrientation(); - +public interface IOrientableTile +{ + + // returns the main direction for rotation. + ForgeDirection getPrimaryOrientation (); + + // used for up or down orientation to spin the tile around, 0 - 3 clockwise ( probobly ) + int getSpin (); + + // returns the main direction for rotation. + void setPrimaryOrientation (ForgeDirection s); + + // used for up or down orientation. + void setSpin (int spin); + + // acts like a wrench was used on it, if a wrench does nothing, this does nothing. + void cycleOrientation (); + } diff --git a/src/appeng/api/me/tiles/IPriorityTile.java b/src/appeng/api/me/tiles/IPriorityTile.java index b4243a3f..d22226d9 100644 --- a/src/appeng/api/me/tiles/IPriorityTile.java +++ b/src/appeng/api/me/tiles/IPriorityTile.java @@ -2,16 +2,16 @@ package appeng.api.me.tiles; public interface IPriorityTile { - /** - * gets the current priroity, can be negitive or positive. - * implemented by storage systems, and is used for sorting. - * @return - */ - int getPriority(); - - /** - * change the priority. - * @param p - */ - void setPriority( int p ); + /** + * gets the current priroity, can be negitive or positive. + * implemented by storage systems, and is used for sorting. + * @return + */ + int getPriority (); + + /** + * change the priority. + * @param p + */ + void setPriority (int p); } diff --git a/src/appeng/api/me/tiles/IStorageAware.java b/src/appeng/api/me/tiles/IStorageAware.java index c5d7c433..e74487bf 100644 --- a/src/appeng/api/me/tiles/IStorageAware.java +++ b/src/appeng/api/me/tiles/IStorageAware.java @@ -3,12 +3,13 @@ package appeng.api.me.tiles; import appeng.api.IItemList; @Deprecated -public interface IStorageAware { - - /** - * if your GridTile Implements this interface, the Network will notify it of changes, and send you a list of the contents so you can updates statues, WAY BETTER then polling. - * @param iss - */ - void onNetworkInventoryChange( IItemList iss ); - +public interface IStorageAware +{ + + /** + * if your GridTile Implements this interface, the Network will notify it of changes, and send you a list of the contents so you can updates statues, WAY BETTER then polling. + * @param iss + */ + void onNetworkInventoryChange (IItemList iss); + } diff --git a/src/appeng/api/me/tiles/IStorageMonitor.java b/src/appeng/api/me/tiles/IStorageMonitor.java index f8886b10..64fcdcca 100644 --- a/src/appeng/api/me/tiles/IStorageMonitor.java +++ b/src/appeng/api/me/tiles/IStorageMonitor.java @@ -2,19 +2,20 @@ package appeng.api.me.tiles; import appeng.api.IAEItemStack; -public interface IStorageMonitor { +public interface IStorageMonitor +{ + + /** + * Get the item being displayed on the storage monitor, in AEItemstack Form, you can use that to get the equivalent MC ItemStack, if you need it. + * If the quantity is important remember to use getStackSize() on the IAEItemStack,and not ItemStack.stackSize + * @return + */ + IAEItemStack getItem (); + + /** + * Get the current locked state of the access terminal. + * @return + */ + boolean isLocked (); - /** - * Get the item being displayed on the storage monitor, in AEItemstack Form, you can use that to get the equivalent MC ItemStack, if you need it. - * If the quantity is important remember to use getStackSize() on the IAEItemStack,and not ItemStack.stackSize - * @return - */ - IAEItemStack getItem(); - - /** - * Get the current locked state of the access terminal. - * @return - */ - boolean isLocked(); - } diff --git a/src/appeng/api/me/tiles/ITileCable.java b/src/appeng/api/me/tiles/ITileCable.java index ed64d54d..1014e7e0 100644 --- a/src/appeng/api/me/tiles/ITileCable.java +++ b/src/appeng/api/me/tiles/ITileCable.java @@ -1,7 +1,8 @@ package appeng.api.me.tiles; -public interface ITileCable { +public interface ITileCable +{ + + public boolean coveredConnections (); - public boolean coveredConnections(); - } diff --git a/src/appeng/api/me/tiles/ITileIOCable.java b/src/appeng/api/me/tiles/ITileIOCable.java index d63dd2be..0ceafe4e 100644 --- a/src/appeng/api/me/tiles/ITileIOCable.java +++ b/src/appeng/api/me/tiles/ITileIOCable.java @@ -6,25 +6,27 @@ import net.minecraft.inventory.IInventory; * used to allow you to inspect, and configure a Export / Import / Storage Bus * Export and Import buses also implement IConfigureableTile, which may be of interest. */ -public interface ITileIOCable { - - public enum Version { - Basic, Precision, Fuzzy - }; - - /** - * returns one of the above, to indicate which version of the bus it is. - */ - Version getVersion(); - - /** - * Returns an IInventory that represents the configuration. - */ - IInventory getConfiguration(); - - /** - * Returns the name of the bus.. - */ - String getName(); - +public interface ITileIOCable +{ + + public enum Version + { + Basic, Precision, Fuzzy + }; + + /** + * returns one of the above, to indicate which version of the bus it is. + */ + Version getVersion (); + + /** + * Returns an IInventory that represents the configuration. + */ + IInventory getConfiguration (); + + /** + * Returns the name of the bus.. + */ + String getName (); + } diff --git a/src/appeng/api/me/tiles/ITileInterfaceApi.java b/src/appeng/api/me/tiles/ITileInterfaceApi.java index f4a2855b..2c6e7fd6 100644 --- a/src/appeng/api/me/tiles/ITileInterfaceApi.java +++ b/src/appeng/api/me/tiles/ITileInterfaceApi.java @@ -10,69 +10,70 @@ import appeng.api.me.util.InterfaceCraftingResponse; * Implemented by the ME Interface * give direct access to some more complicated logic, in a simpler way, was used for earily LP integration. */ -public interface ITileInterfaceApi { - - /** - * how much space is available. - * @param i - * @param MaxNeeded, a cut off where you stop caring - * @return totalAmountNeeded - */ - int apiCurrentAvailableSpace(ItemStack i, int MaxNeeded); - - /** - * Attempt to extract an item from the network. - * @param i, item to extract. - * @param doExtract, if you don't its just a simulation. - * @return anyExtracted Items, or null - */ - ItemStack apiExtractNetworkItem(ItemStack i, boolean doExtract); - - /** - * Adds an item to the network - * @param i - * @param doAdd, or simulate - * @return any items that couldn't be added, or nul - */ - ItemStack apiAddNetworkItem(ItemStack i, boolean doAdd); - - /** - * returns a list of ItemStacks that are contined in the network. - * @return - */ - List apiGetNetworkContents(); - - /** - * get access to the networks IMEInventory. - * @return - */ - IMEInventory getApiArray(); - - /** - * get a list of items that can be crafted by the network. - * @return - */ - List getCraftingOptions(); - - /** - * get access to the crafting patterns. - * @param req - * @return - */ - List findCraftingPatterns( ItemStack req ); - - /** - * issue a new crafting request. - * @param req - * @param enableRecursive - * @return - */ - InterfaceCraftingResponse requestCrafting( ItemStack req, boolean enableRecursive ); +public interface ITileInterfaceApi +{ + + /** + * how much space is available. + * @param i + * @param MaxNeeded, a cut off where you stop caring + * @return totalAmountNeeded + */ + int apiCurrentAvailableSpace (ItemStack i, int MaxNeeded); + + /** + * Attempt to extract an item from the network. + * @param i, item to extract. + * @param doExtract, if you don't its just a simulation. + * @return anyExtracted Items, or null + */ + ItemStack apiExtractNetworkItem (ItemStack i, boolean doExtract); + + /** + * Adds an item to the network + * @param i + * @param doAdd, or simulate + * @return any items that couldn't be added, or nul + */ + ItemStack apiAddNetworkItem (ItemStack i, boolean doAdd); + + /** + * returns a list of ItemStacks that are contined in the network. + * @return + */ + List apiGetNetworkContents (); + + /** + * get access to the networks IMEInventory. + * @return + */ + IMEInventory getApiArray (); + + /** + * get a list of items that can be crafted by the network. + * @return + */ + List getCraftingOptions (); + + /** + * get access to the crafting patterns. + * @param req + * @return + */ + List findCraftingPatterns (ItemStack req); + + /** + * issue a new crafting request. + * @param req + * @param enableRecursive + * @return + */ + InterfaceCraftingResponse requestCrafting (ItemStack req, boolean enableRecursive); + + /** + * if there is anything at all available it returns true. + * @return + */ + boolean containsItems (); - /** - * if there is anything at all available it returns true. - * @return - */ - boolean containsItems(); - } diff --git a/src/appeng/api/me/tiles/ITilePushable.java b/src/appeng/api/me/tiles/ITilePushable.java index 8d98b6f4..56c09763 100644 --- a/src/appeng/api/me/tiles/ITilePushable.java +++ b/src/appeng/api/me/tiles/ITilePushable.java @@ -8,23 +8,23 @@ import net.minecraft.item.ItemStack; */ public interface ITilePushable { - /** - * is this pushable busy? - * @return - */ - boolean isBusy(); - - /** - * Attempt to send an item. - * @param out - * @return - */ - ItemStack pushItem( ItemStack out ); - - /** - * Test if a push is possible. - * @param out - * @return - */ - boolean canPushItem(ItemStack out); + /** + * is this pushable busy? + * @return + */ + boolean isBusy (); + + /** + * Attempt to send an item. + * @param out + * @return + */ + ItemStack pushItem (ItemStack out); + + /** + * Test if a push is possible. + * @param out + * @return + */ + boolean canPushItem (ItemStack out); } diff --git a/src/appeng/api/me/tiles/InterfaceCraftingPattern.java b/src/appeng/api/me/tiles/InterfaceCraftingPattern.java index 3ba69b43..228ae986 100644 --- a/src/appeng/api/me/tiles/InterfaceCraftingPattern.java +++ b/src/appeng/api/me/tiles/InterfaceCraftingPattern.java @@ -4,16 +4,17 @@ import java.util.List; import net.minecraft.item.ItemStack; -public class InterfaceCraftingPattern { - - /** - * list of all the inputs. - */ - public List Inputs; - - /** - * the output of the pattern. - */ - public ItemStack Output; - +public class InterfaceCraftingPattern +{ + + /** + * list of all the inputs. + */ + public List Inputs; + + /** + * the output of the pattern. + */ + public ItemStack Output; + } diff --git a/src/appeng/api/me/util/Grid.java b/src/appeng/api/me/util/Grid.java index 74a81349..76fd8647 100644 --- a/src/appeng/api/me/util/Grid.java +++ b/src/appeng/api/me/util/Grid.java @@ -9,15 +9,15 @@ import appeng.api.me.tiles.IGridTileEntity; */ public class Grid { - /** - * Attempts to find a grid interface for the specified location. - * @param w - * @param x - * @param y - * @param z - * @return interfaceForGrid - */ - public static IGridInterface getGridInterface(World w, int x, int y, int z) + /** + * Attempts to find a grid interface for the specified location. + * @param w + * @param x + * @param y + * @param z + * @return interfaceForGrid + */ + public static IGridInterface getGridInterface (World w, int x, int y, int z) { IGridTileEntity te = getGridEntity(w, x, y, z); @@ -28,7 +28,7 @@ public class Grid return null; } - + /** * Simple test to see if the tile at the specified location is in fact a grid entity. * @param w @@ -37,11 +37,11 @@ public class Grid * @param z * @return isTileGridEntity */ - public static boolean isGridEntity(World w, int x, int y, int z) + public static boolean isGridEntity (World w, int x, int y, int z) { return getGridEntity(w, x, y, z) != null; } - + /** * Returns the grid entity at the given location, or null if its not a grid entity. * @param w @@ -50,18 +50,18 @@ public class Grid * @param z * @return gridEntity */ - public static IGridTileEntity getGridEntity(World w, int x, int y, int z) + public static IGridTileEntity getGridEntity (World w, int x, int y, int z) { TileEntity te = w.getBlockTileEntity(x, y, z); if (te instanceof IGridTileEntity) { - return (IGridTileEntity)te; + return (IGridTileEntity) te; } return null; } - + /** * Tests if the given grid entity is on a Network. * @param w @@ -70,7 +70,7 @@ public class Grid * @param z * @return isOnNetwork */ - public static boolean isOnGrid(World w, int x, int y, int z) + public static boolean isOnGrid (World w, int x, int y, int z) { IGridTileEntity te = getGridEntity(w, x, y, z); diff --git a/src/appeng/api/me/util/IAssemblerCluster.java b/src/appeng/api/me/util/IAssemblerCluster.java index 39902290..6e5e0e28 100644 --- a/src/appeng/api/me/util/IAssemblerCluster.java +++ b/src/appeng/api/me/util/IAssemblerCluster.java @@ -6,32 +6,33 @@ import net.minecraft.tileentity.TileEntity; * Definition for a MAC * */ -public interface IAssemblerCluster { - - /** - * cycles the cpus, should be called once a tick, if called more, crafting will accelerate. - */ - public void cycleCpus(); - - /** - * Tells the MAC one of the cpus was used. - */ - void addCraft(); - - /** - * is there a CPU available for Crafting? - * @return hasCPUReady - */ - boolean canCraft(); - - /** - * Gets a TileAssembler from the MAC - * @param assemblerOffset - * @return TileEntity for that Assembler or Null - */ - TileEntity getAssembler( int assemblerOffset ); +public interface IAssemblerCluster +{ - public int getLastOffset(); - - public void setLastOffset( int x ); + /** + * cycles the cpus, should be called once a tick, if called more, crafting will accelerate. + */ + public void cycleCpus (); + + /** + * Tells the MAC one of the cpus was used. + */ + void addCraft (); + + /** + * is there a CPU available for Crafting? + * @return hasCPUReady + */ + boolean canCraft (); + + /** + * Gets a TileAssembler from the MAC + * @param assemblerOffset + * @return TileEntity for that Assembler or Null + */ + TileEntity getAssembler (int assemblerOffset); + + public int getLastOffset (); + + public void setLastOffset (int x); } diff --git a/src/appeng/api/me/util/IConfigManager.java b/src/appeng/api/me/util/IConfigManager.java index 42f3ae4c..8ac61569 100644 --- a/src/appeng/api/me/util/IConfigManager.java +++ b/src/appeng/api/me/util/IConfigManager.java @@ -5,6 +5,6 @@ import appeng.api.me.tiles.IConfigureableTile; public interface IConfigManager extends IConfigureableTile { - - IConfigEnum getSetting( String sName ); + + IConfigEnum getSetting (String sName); } diff --git a/src/appeng/api/me/util/ICraftRequest.java b/src/appeng/api/me/util/ICraftRequest.java index 2812e514..895d1e0c 100644 --- a/src/appeng/api/me/util/ICraftRequest.java +++ b/src/appeng/api/me/util/ICraftRequest.java @@ -4,6 +4,7 @@ package appeng.api.me.util; * Pretty much just a place holder right now * */ -public interface ICraftRequest { +public interface ICraftRequest +{ } diff --git a/src/appeng/api/me/util/ICraftWatcher.java b/src/appeng/api/me/util/ICraftWatcher.java index 2ba84108..b465e607 100644 --- a/src/appeng/api/me/util/ICraftWatcher.java +++ b/src/appeng/api/me/util/ICraftWatcher.java @@ -4,9 +4,11 @@ package appeng.api.me.util; * Not used. * */ -public interface ICraftWatcher { - - void markChainCrafted(); - void markComplete( ICraftRequest cr ); - +public interface ICraftWatcher +{ + + void markChainCrafted (); + + void markComplete (ICraftRequest cr); + } diff --git a/src/appeng/api/me/util/ICraftingPattern.java b/src/appeng/api/me/util/ICraftingPattern.java index 13a91f30..2b33e349 100644 --- a/src/appeng/api/me/util/ICraftingPattern.java +++ b/src/appeng/api/me/util/ICraftingPattern.java @@ -15,39 +15,38 @@ import net.minecraft.world.World; */ public interface ICraftingPattern { - /** - * returns the outcome, MUST have a value. - * @return - */ - ItemStack getOutput(); - + /** + * returns the outcome, MUST have a value. + * @return + */ + ItemStack getOutput (); + /** * Returns a condensed list of requirements. * * Example: sticks, will return a single stack of 2, rather then two stacks of 1. * The same Item will not show more than one stack. */ - public List getRequirements(); - + public List getRequirements (); + /** * returns a list of all providers, called by AE * @return */ - List getProviders(); - - /** - * adds a provider to the pattern, called by AE - * @param a - */ - void addProviders(ITileCraftingProvider a); - - /** - * Compare to Patterns, make sure you check your class types. - * @param obj - * @return - */ - @Override - public boolean equals(Object obj); - -} + List getProviders (); + /** + * adds a provider to the pattern, called by AE + * @param a + */ + void addProviders (ITileCraftingProvider a); + + /** + * Compare to Patterns, make sure you check your class types. + * @param obj + * @return + */ + @Override + public boolean equals (Object obj); + +} diff --git a/src/appeng/api/me/util/ICraftingPatternMAC.java b/src/appeng/api/me/util/ICraftingPatternMAC.java index 5c592893..39f59014 100644 --- a/src/appeng/api/me/util/ICraftingPatternMAC.java +++ b/src/appeng/api/me/util/ICraftingPatternMAC.java @@ -14,39 +14,40 @@ import appeng.api.IItemList; * Do not implement this version, implement ICraftingPattern * */ -public interface ICraftingPatternMAC extends ICraftingPattern { +public interface ICraftingPatternMAC extends ICraftingPattern +{ /** * Encode a pattern. * craftingMatrix - accepts a 3x3 grid of ItemStacks and Nulls. * output - accepts a single ItemStack, NEVER SEND NULL */ - void encodePattern(ItemStack[] craftingMatrix, ItemStack output); - + void encodePattern (ItemStack[] craftingMatrix, ItemStack output); + /** * I have no idea what the World is for, its just part of IRecipe... */ - boolean isCraftable(World w); - + boolean isCraftable (World w); + /** Returns true if there is a pattern encoded. */ - boolean isEncoded(); - - IAssemblerCluster getCluster(); - + boolean isEncoded (); + + IAssemblerCluster getCluster (); + /** Returns a 3x3 matrix of nulls or ItemStacks, or null if it is not included. */ - ItemStack[] getCraftingMatrix(); - + ItemStack[] getCraftingMatrix (); + /** * Same as getCraftingMatrix(), but gets a crafting inventory for real crafting. * * Item pool is optional, null will work, but it won't be able to edit items... */ - InventoryCrafting getCraftingInv( World w, IMEInventory itemPool, List missing, List used, IItemList all ); + InventoryCrafting getCraftingInv (World w, IMEInventory itemPool, List missing, List used, IItemList all); + + /** returns the output of the pattern */ + ItemStack getRecipeOutput (InventoryCrafting ic, World w); + + /** returns the recipe for the patterns */ + IRecipe getMatchingRecipe (InventoryCrafting ic, World w); - /** returns the output of the pattern */ - ItemStack getRecipeOutput( InventoryCrafting ic, World w ); - - /** returns the recipe for the patterns */ - IRecipe getMatchingRecipe( InventoryCrafting ic, World w ); - } diff --git a/src/appeng/api/me/util/IGridCache.java b/src/appeng/api/me/util/IGridCache.java index 3dce582b..cd15c77d 100644 --- a/src/appeng/api/me/util/IGridCache.java +++ b/src/appeng/api/me/util/IGridCache.java @@ -11,36 +11,37 @@ import net.minecraft.nbt.NBTTagCompound; * Register this with Util.getAppEngApi().registerGridCache( MyGridCache.class ); * */ -public interface IGridCache { - - /** - * Called each time a network is reset ( changed ), the grid will persist your classes instance, but call this method. - * @param grid - */ - void reset( IGridInterface grid ); - - /** - * Called each tick for the controller, allows you to have active network wide behaviors. - * @param grid - */ - void onUpdateTick( IGridInterface grid ); - - /** - * used to uniquely identify your cache when saving/loading - * @return - */ - String getCacheName(); - - /** - * Save your caches state if necessary, if no saving is required, return null. - * @return - */ - NBTTagCompound savetoNBTData(); - - /** - * Load save cache data, this is called when a controller is loaded with previously saved data if there was no data, data will be an empty tag. - * @param data - */ - void loadfromNBTData( NBTTagCompound data ); - +public interface IGridCache +{ + + /** + * Called each time a network is reset ( changed ), the grid will persist your classes instance, but call this method. + * @param grid + */ + void reset (IGridInterface grid); + + /** + * Called each tick for the controller, allows you to have active network wide behaviors. + * @param grid + */ + void onUpdateTick (IGridInterface grid); + + /** + * used to uniquely identify your cache when saving/loading + * @return + */ + String getCacheName (); + + /** + * Save your caches state if necessary, if no saving is required, return null. + * @return + */ + NBTTagCompound savetoNBTData (); + + /** + * Load save cache data, this is called when a controller is loaded with previously saved data if there was no data, data will be an empty tag. + * @param data + */ + void loadfromNBTData (NBTTagCompound data); + } diff --git a/src/appeng/api/me/util/IGridInterface.java b/src/appeng/api/me/util/IGridInterface.java index d4d9a594..fc128cd4 100644 --- a/src/appeng/api/me/util/IGridInterface.java +++ b/src/appeng/api/me/util/IGridInterface.java @@ -20,222 +20,222 @@ import appeng.api.networkevents.MENetworkPowerStorage; */ public interface IGridInterface { - /** - * Issue a new crafting request. - * @param whatToCraft - * @param showInMonitor - * @param enableRecursion - * @return the ICraftRequest - * @throws AppEngTileMissingException - */ - public ICraftRequest craftingRequest( ItemStack whatToCraft, boolean showInMonitor, boolean enableRecursion ) throws AppEngTileMissingException; - - /** - * deprecated version of creaftingRequest. - * @param what - * @return - * @throws AppEngTileMissingException - */ - public ICraftRequest craftingRequest( ItemStack what ) throws AppEngTileMissingException; - - /** - * opens the crafting gui. - * @param pmp - * @param gte - * @param s - * @throws AppEngTileMissingException - */ - public void craftGui( EntityPlayerMP pmp, IGridTileEntity gte, ItemStack s ) throws AppEngTileMissingException; - + /** + * Issue a new crafting request. + * @param whatToCraft + * @param showInMonitor + * @param enableRecursion + * @return the ICraftRequest + * @throws AppEngTileMissingException + */ + public ICraftRequest craftingRequest (ItemStack whatToCraft, boolean showInMonitor, boolean enableRecursion) throws AppEngTileMissingException; + + /** + * deprecated version of creaftingRequest. + * @param what + * @return + * @throws AppEngTileMissingException + */ + public ICraftRequest craftingRequest (ItemStack what) throws AppEngTileMissingException; + + /** + * opens the crafting gui. + * @param pmp + * @param gte + * @param s + * @throws AppEngTileMissingException + */ + public void craftGui (EntityPlayerMP pmp, IGridTileEntity gte, ItemStack s) throws AppEngTileMissingException; + /** * Updates the interface requested, used internally * @param te */ - public void requestUpdate( IGridTileEntity te ); - + public void requestUpdate (IGridTileEntity te); + /** * returns a list of all machines on the grid. * @return */ - List< TileRef > getMachines(); - + List> getMachines (); + /** * Labeled version for debugging... */ - boolean useMEEnergy(float use, String for_what); - - /** - * returns energy to the system to prevent endless energy sinks. - */ - void refundMEEnergy( float use, String for_what ); - - /** - * Reports previous 20 ticks avg of energy usage. - * @return - */ - public float getPowerUsageAvg(); - + boolean useMEEnergy (float use, String for_what); + + /** + * returns energy to the system to prevent endless energy sinks. + */ + void refundMEEnergy (float use, String for_what); + + /** + * Reports previous 20 ticks avg of energy usage. + * @return + */ + public float getPowerUsageAvg (); + /** * this is used for standard items, anything else just use useMEEnergy. * @param items * @param multipler * @return */ - int usePowerForAddition(int items, int multipler); - + int usePowerForAddition (int items, int multipler); + /** * returns a single IMEInventory that represents the entire networks. * @return */ - public IMEInventoryHandler getCellArray(); - + public IMEInventoryHandler getCellArray (); + /** * returns a single IMEInventory that represents the entire network, and all crafting available. * @return */ - public IMEInventoryHandler getFullCellArray(); - - /** - * add which users should be notified of terminal updates. - * @param p - */ - void addViewingPlayer(EntityPlayer p); - - /** - * remove which users should be notified of terminal updates. - * @param p - */ - void rmvViewingPlayer(EntityPlayer p); - - /** - * add which users should be notified of crafting queue updates. - * @param p - */ - void addCraftingPlayer(EntityPlayer p); - - /** - * remove which users should be notified of crafting queue updates. - * @param p - */ - void rmvCraftingPlayer(EntityPlayer p); - - /** - * aquire the controller tile entity. - * @return - */ - public TileEntity getController(); - - /** - * create a waiting job. - * @param what - * @return - */ - ICraftRequest waitingRequest(ItemStack what); - - /** - * creates a crafting job to push the item out of IPushable, and to enable crafting to acocomplish this goal. - * @param willAdd - * @param out - * @param allowCrafting - * @return - */ - ICraftRequest pushRequest( ItemStack willAdd, ITilePushable out, boolean allowCrafting ); - - /** - * is the grid valid? - * @return - */ - public boolean isValid(); - - /** - * tell AE to re-examin items in the waiting list. - */ - void resetWaitingQueue(); + public IMEInventoryHandler getFullCellArray (); - /** - * craftable items - * @return - */ - IMEInventoryHandler getCraftableArray(); + /** + * add which users should be notified of terminal updates. + * @param p + */ + void addViewingPlayer (EntityPlayer p); - /** - * get a numeric id for this grid, used internally for cable animations, and not much else. - * @return - */ - public int getGridIndex(); + /** + * remove which users should be notified of terminal updates. + * @param p + */ + void rmvViewingPlayer (EntityPlayer p); - /** - * Try to find the pattern for the item in question. - * @param req - * @return - */ - public ICraftingPattern getPatternFor(ItemStack req); + /** + * add which users should be notified of crafting queue updates. + * @param p + */ + void addCraftingPlayer (EntityPlayer p); - /** - * Inform the network that power costs have changed. - */ - public void triggerPowerUpdate(); - - /** - * Inform the netowrk that these items were removed from storage ( don't do this for items remove though the grid, it already knows about those. ) - * @param removed - */ - public void notifyExtractItems(IAEItemStack removed); + /** + * remove which users should be notified of crafting queue updates. + * @param p + */ + void rmvCraftingPlayer (EntityPlayer p); - /** - * Inform the network that these items were added to storage ( don't do this for items added via the grid, it already knows about those. ) - * @param vo - */ - public void notifyAddItems(IAEItemStack vo); - - /** - * return a cache by its identifier ( the number you get when you register your cache with AE ) - * @param id - * @return - */ - public IGridCache getCacheByID( int id ); - - /** - * Potential future use, for now just returns the network encryption key. - * @return - */ - public String getName(); - - /** - * inform the network that energy was transfered between two nodes on the network, - * this will be used to calculates future information, but also causes the network - * to flash presently. - * - * this will automatically be handled by the standard extractItem / addItem API in the future, only - * Processes that skip the vanilla AE storage system should use this. - * - * @param a - * @param b - * @param amt - */ - void signalEnergyTransfer(IGridTileEntity a, IGridTileEntity b, float amt); + /** + * aquire the controller tile entity. + * @return + */ + public TileEntity getController (); + + /** + * create a waiting job. + * @param what + * @return + */ + ICraftRequest waitingRequest (ItemStack what); + + /** + * creates a crafting job to push the item out of IPushable, and to enable crafting to acocomplish this goal. + * @param willAdd + * @param out + * @param allowCrafting + * @return + */ + ICraftRequest pushRequest (ItemStack willAdd, ITilePushable out, boolean allowCrafting); + + /** + * is the grid valid? + * @return + */ + public boolean isValid (); + + /** + * tell AE to re-examin items in the waiting list. + */ + void resetWaitingQueue (); + + /** + * craftable items + * @return + */ + IMEInventoryHandler getCraftableArray (); + + /** + * get a numeric id for this grid, used internally for cable animations, and not much else. + * @return + */ + public int getGridIndex (); + + /** + * Try to find the pattern for the item in question. + * @param req + * @return + */ + public ICraftingPattern getPatternFor (ItemStack req); + + /** + * Inform the network that power costs have changed. + */ + public void triggerPowerUpdate (); + + /** + * Inform the netowrk that these items were removed from storage ( don't do this for items remove though the grid, it already knows about those. ) + * @param removed + */ + public void notifyExtractItems (IAEItemStack removed); + + /** + * Inform the network that these items were added to storage ( don't do this for items added via the grid, it already knows about those. ) + * @param vo + */ + public void notifyAddItems (IAEItemStack vo); + + /** + * return a cache by its identifier ( the number you get when you register your cache with AE ) + * @param id + * @return + */ + public IGridCache getCacheByID (int id); + + /** + * Potential future use, for now just returns the network encryption key. + * @return + */ + public String getName (); + + /** + * inform the network that energy was transfered between two nodes on the network, + * this will be used to calculates future information, but also causes the network + * to flash presently. + * + * this will automatically be handled by the standard extractItem / addItem API in the future, only + * Processes that skip the vanilla AE storage system should use this. + * + * @param a + * @param b + * @param amt + */ + void signalEnergyTransfer (IGridTileEntity a, IGridTileEntity b, float amt); + + /** + * posts an event into the network, blocks with the event listeners on them will receive them. + * @param ev + * @return + */ + public MENetworkEvent postEvent (MENetworkEvent ev); + + @Override + public boolean equals (Object obj); + + /** + * total amount of power available + * @return + */ + public double getAvailablePower (); + + /** + * Returns if the system can provide this much power, returns the amount of power the system can provide. + * @param powerRequired + * @return + */ + public float canUsePower (float powerRequired); - /** - * posts an event into the network, blocks with the event listeners on them will receive them. - * @param ev - * @return - */ - public MENetworkEvent postEvent( MENetworkEvent ev ); - - @Override - public boolean equals(Object obj); - - /** - * total amount of power available - * @return - */ - public double getAvailablePower(); - - /** - * Returns if the system can provide this much power, returns the amount of power the system can provide. - * @param powerRequired - * @return - */ - public float canUsePower( float powerRequired ); - } diff --git a/src/appeng/api/me/util/IMEInventory.java b/src/appeng/api/me/util/IMEInventory.java index 3e369149..d5bbefd5 100644 --- a/src/appeng/api/me/util/IMEInventory.java +++ b/src/appeng/api/me/util/IMEInventory.java @@ -11,67 +11,67 @@ public interface IMEInventory /** * The number of different item types stored in inventory. */ - public long storedItemTypes(); - + public long storedItemTypes (); + /** * The number of stored items total, regardless of type. */ - public long storedItemCount(); - + public long storedItemCount (); + /** * The estimated number of additional items this inventory can hold, regardless of type. */ - public long remainingItemCount(); - + public long remainingItemCount (); + /** * The estimated number of additional types the inventory could hold. */ - public long remainingItemTypes(); + public long remainingItemTypes (); /** * True or False if this item is inside this inventory. */ - public boolean containsItemType(IAEItemStack i); - + public boolean containsItemType (IAEItemStack i); + /** * The total number of types holdable in this inventory. */ - public long getTotalItemTypes(); - + public long getTotalItemTypes (); + /** * Returns how many of this item are in the inventory, regardless of a how many stacks / cells or anything else. */ - public long countOfItemType(IAEItemStack i); - + public long countOfItemType (IAEItemStack i); + /** * Adds input, to the inventory, and returns items not added, complete failure yields a copy of the stack that was passed. */ - public IAEItemStack addItems( IAEItemStack input ); - + public IAEItemStack addItems (IAEItemStack input); + /** * Attempts to extract the requested item, in the count specified by the request, returns items extracted, complete failure yields NULL. */ - public IAEItemStack extractItems( IAEItemStack request ); - + public IAEItemStack extractItems (IAEItemStack request); + // DO NOT USE ItemStack.split, these are for information purpose ONLY! // I you wan to remove items from the cell, use extractItemss - + /** * Returns a list of all available items, with stackSize set to the real amount, without stack limits. */ - public IItemList getAvailableItems( IItemList out ); - + public IItemList getAvailableItems (IItemList out); + /** * Returns a list of all available items, with stackSize set to the real amount, without stack limits. */ - public IItemList getAvailableItems(); - + public IItemList getAvailableItems (); + /** * Identical to addItems(...) but it don't change anything, its just a simulation. * this is used when dealing with pipes/tubes, and routing. */ - public IAEItemStack calculateItemAddition(IAEItemStack stack); - - // calculates available space for a specific item. - public long getAvailableSpaceByItem( IAEItemStack i, long maxNeeded ); + public IAEItemStack calculateItemAddition (IAEItemStack stack); + + // calculates available space for a specific item. + public long getAvailableSpaceByItem (IAEItemStack i, long maxNeeded); } diff --git a/src/appeng/api/me/util/IMEInventoryHandler.java b/src/appeng/api/me/util/IMEInventoryHandler.java index 947f5178..cf34e888 100644 --- a/src/appeng/api/me/util/IMEInventoryHandler.java +++ b/src/appeng/api/me/util/IMEInventoryHandler.java @@ -11,66 +11,77 @@ import appeng.api.config.IConfigEnum; import appeng.api.config.ItemFlow; import appeng.api.config.ListMode; -public interface IMEInventoryHandler extends IMEInventory { - - public ItemFlow getFlow(); - public void setFlow( ItemFlow p ); - - public int getPriority(); - public void setPriority( int p ); - +public interface IMEInventoryHandler extends IMEInventory +{ + + public ItemFlow getFlow (); + + public void setFlow (ItemFlow p); + + public int getPriority (); + + public void setPriority (int p); + /** * Returns estimated number of total bytes represented by the inventory, used mainly for display. */ - public long totalBytes(); - + public long totalBytes (); + /** * Returns estimated number of free bytes represented by inventory, used mainly for display. */ - public long freeBytes(); - + public long freeBytes (); + /** * Returns number of used bytes represented by the inventory, used mainly for display. */ - public long usedBytes(); - + public long usedBytes (); + /** * The number of items you could add before the freeBytes() decreases. */ - public long unusedItemCount(); - + public long unusedItemCount (); + /** * True of False, if you could add a new item type. */ - public boolean canHoldNewItem(); - + public boolean canHoldNewItem (); + /** * This tells you where it found your cell, so if your cell changes, you should update this block... */ - void setUpdateTarget(TileEntity e); - - List getPreformattedItems(); - void setPreformattedItems(IItemList in, FuzzyMode mode, ListMode m); - - boolean isPreformatted(); - boolean isFuzzyPreformatted(); - - ListMode getListMode(); - FuzzyMode getFuzzyModePreformatted(); - - void setFuzzyPreformatted( boolean nf ); - - public void setName(String name); - String getName(); - - void setGrid( IGridInterface grid ); - IGridInterface getGrid(); - - void setParent( IMEInventoryHandler p ); - IMEInventoryHandler getParent(); - - void removeGrid(IGridInterface grid, IMEInventoryHandler ignore, List duplicates ); - public void validate( List duplicates ); - public boolean canAccept(IAEItemStack input); - + void setUpdateTarget (TileEntity e); + + List getPreformattedItems (); + + void setPreformattedItems (IItemList in, FuzzyMode mode, ListMode m); + + boolean isPreformatted (); + + boolean isFuzzyPreformatted (); + + ListMode getListMode (); + + FuzzyMode getFuzzyModePreformatted (); + + void setFuzzyPreformatted (boolean nf); + + public void setName (String name); + + String getName (); + + void setGrid (IGridInterface grid); + + IGridInterface getGrid (); + + void setParent (IMEInventoryHandler p); + + IMEInventoryHandler getParent (); + + void removeGrid (IGridInterface grid, IMEInventoryHandler ignore, List duplicates); + + public void validate (List duplicates); + + public boolean canAccept (IAEItemStack input); + } diff --git a/src/appeng/api/me/util/IMEInventoryUtil.java b/src/appeng/api/me/util/IMEInventoryUtil.java index e43bce07..ed9ea950 100644 --- a/src/appeng/api/me/util/IMEInventoryUtil.java +++ b/src/appeng/api/me/util/IMEInventoryUtil.java @@ -7,13 +7,14 @@ import net.minecraft.world.World; import appeng.api.IAEItemStack; import appeng.api.IItemList; -public interface IMEInventoryUtil { - - // ignores meta data - is always Fuzzy... - // will only remove single items, this ignores your stack size... - public ItemStack extractItemsByRecipe(World w, IRecipe r, ItemStack output, InventoryCrafting ci, ItemStack providedTemplate, int slot, IItemList all ); - - // ignores meta data - is always Fuzzy... - //public ItemStack extractItemsByType( ItemStack is ); // will only remove single items, this ignores your stack size... - +public interface IMEInventoryUtil +{ + + // ignores meta data - is always Fuzzy... + // will only remove single items, this ignores your stack size... + public ItemStack extractItemsByRecipe (World w, IRecipe r, ItemStack output, InventoryCrafting ci, ItemStack providedTemplate, int slot, IItemList all); + + // ignores meta data - is always Fuzzy... + //public ItemStack extractItemsByType( ItemStack is ); // will only remove single items, this ignores your stack size... + } diff --git a/src/appeng/api/me/util/ITileCraftingProvider.java b/src/appeng/api/me/util/ITileCraftingProvider.java index cafb63fb..23968f4e 100644 --- a/src/appeng/api/me/util/ITileCraftingProvider.java +++ b/src/appeng/api/me/util/ITileCraftingProvider.java @@ -6,12 +6,13 @@ import appeng.api.me.tiles.ITilePushable; /** * Allows a tile to provide crafting patterns to the network, post a GridPatternUpdateEvent to tell AE to update. */ -public interface ITileCraftingProvider extends ITilePushable { - - /** - * called when the network is looking for possible crafting jobs. - * @param craftingTracker - */ - void provideCrafting( ICraftingTracker craftingTracker ); +public interface ITileCraftingProvider extends ITilePushable +{ + + /** + * called when the network is looking for possible crafting jobs. + * @param craftingTracker + */ + void provideCrafting (ICraftingTracker craftingTracker); } diff --git a/src/appeng/api/me/util/InterfaceCraftingResponse.java b/src/appeng/api/me/util/InterfaceCraftingResponse.java index 6a50915e..cb391392 100644 --- a/src/appeng/api/me/util/InterfaceCraftingResponse.java +++ b/src/appeng/api/me/util/InterfaceCraftingResponse.java @@ -4,10 +4,11 @@ import java.util.List; import net.minecraft.item.ItemStack; -public class InterfaceCraftingResponse { - - public ItemStack Request; - - public List UsedMaterials; - +public class InterfaceCraftingResponse +{ + + public ItemStack Request; + + public List UsedMaterials; + } diff --git a/src/appeng/api/me/util/TransitionResult.java b/src/appeng/api/me/util/TransitionResult.java index b06c3d8d..6fdaba63 100644 --- a/src/appeng/api/me/util/TransitionResult.java +++ b/src/appeng/api/me/util/TransitionResult.java @@ -7,15 +7,16 @@ import net.minecraft.world.World; * Defines the result of performing a transition from the world into a storage cell, if its possible, and what the energy usage is. * */ -public class TransitionResult { - - public TransitionResult( boolean _success, double power ) - { - success = _success; - energyUsage = power; - } - - public final boolean success; - public final double energyUsage; - +public class TransitionResult +{ + + public TransitionResult(boolean _success, double power) + { + success = _success; + energyUsage = power; + } + + public final boolean success; + public final double energyUsage; + } diff --git a/src/appeng/api/movable/IMovableHandler.java b/src/appeng/api/movable/IMovableHandler.java index 568b5aa0..5ea3f918 100644 --- a/src/appeng/api/movable/IMovableHandler.java +++ b/src/appeng/api/movable/IMovableHandler.java @@ -4,40 +4,41 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; -public interface IMovableHandler { - - /** - * if you return true from this, your saying you can handle the class, not that single entity, - * you cannot opt out of single entities. - * - * @param myClass - * @param tile - * @return - */ - boolean canHandle( Class myClass, TileEntity tile); - - /** - * request that the handler move the the tile from its current location to the new one. - * the tile has already been invalidated, and the blocks have already been fully moved. - * - * Potential Example: - * - Chunk c = w.getChunkFromBlockCoords( x, z ); - c.setChunkBlockTileEntity( x & 0xF, y + y, z & 0xF, te ); - +public interface IMovableHandler +{ + + /** + * if you return true from this, your saying you can handle the class, not that single entity, + * you cannot opt out of single entities. + * + * @param myClass + * @param tile + * @return + */ + boolean canHandle (Class myClass, TileEntity tile); + + /** + * request that the handler move the the tile from its current location to the new one. + * the tile has already been invalidated, and the blocks have already been fully moved. + * + * Potential Example: + * + Chunk c = w.getChunkFromBlockCoords( x, z ); + c.setChunkBlockTileEntity( x & 0xF, y + y, z & 0xF, te ); + if ( c.isChunkLoaded ) { - w.addTileEntity( te ); - w.markBlockForUpdate( x, y, z ); + w.addTileEntity( te ); + w.markBlockForUpdate( x, y, z ); } - * - * @param tile - * @param w - * @param x - * @param y - * @param z - * @return - */ - void moveTile( TileEntity tile, World w, int x, int y, int z ); - + * + * @param tile + * @param w + * @param x + * @param y + * @param z + * @return + */ + void moveTile (TileEntity tile, World w, int x, int y, int z); + } diff --git a/src/appeng/api/movable/IMovableRegistry.java b/src/appeng/api/movable/IMovableRegistry.java index 4a9fd145..4280ae31 100644 --- a/src/appeng/api/movable/IMovableRegistry.java +++ b/src/appeng/api/movable/IMovableRegistry.java @@ -31,52 +31,52 @@ import net.minecraft.tileentity.TileEntity; * If you need a build of deobf build of AE for testing, do not hesitate to ask. * */ -public interface IMovableRegistry { +public interface IMovableRegistry +{ - - /** - * White list your tile entity with the registry. - * - * You can also use the ICM, - * FMLInterModComms.sendMessage( "AppliedEnergistics", "movabletile", "appeng.common.AppEngTile" ); - * - * If you tile is handled with IMovableHandler or IMovableTile you do not need to white list it. - * - */ - void whiteListTileEntity( Class c ); - - /** - * returns true if the tile has accepted your request to move it. - * @param te - * @return - */ - boolean askToMove( TileEntity te ); - - /** - * tells the tile you are done moving it. - * @param te - */ - void doneMoveing( TileEntity te ); - - /** - * add a new handler movable handler. - * @param han - */ - void addHandler( IMovableHandler han ); - - /** - * handlers are used to perform movement, this allows you to override AE's internal version. - * - * only valid after askToMove(...) = true - * @param te - * @return - */ - IMovableHandler getHandler(TileEntity te); + /** + * White list your tile entity with the registry. + * + * You can also use the ICM, + * FMLInterModComms.sendMessage( "AppliedEnergistics", "movabletile", "appeng.common.AppEngTile" ); + * + * If you tile is handled with IMovableHandler or IMovableTile you do not need to white list it. + * + */ + void whiteListTileEntity (Class c); + + /** + * returns true if the tile has accepted your request to move it. + * @param te + * @return + */ + boolean askToMove (TileEntity te); + + /** + * tells the tile you are done moving it. + * @param te + */ + void doneMoveing (TileEntity te); + + /** + * add a new handler movable handler. + * @param han + */ + void addHandler (IMovableHandler han); + + /** + * handlers are used to perform movement, this allows you to override AE's internal version. + * + * only valid after askToMove(...) = true + * @param te + * @return + */ + IMovableHandler getHandler (TileEntity te); + + /** + * returns a copy of the default handler + * @return + */ + IMovableHandler getDefaultHandler (); - /** - * returns a copy of the default handler - * @return - */ - IMovableHandler getDefaultHandler(); - } diff --git a/src/appeng/api/movable/IMovableTile.java b/src/appeng/api/movable/IMovableTile.java index bce572d3..c9e56e0e 100644 --- a/src/appeng/api/movable/IMovableTile.java +++ b/src/appeng/api/movable/IMovableTile.java @@ -3,17 +3,18 @@ package appeng.api.movable; /** * You can implement this, or use the IMovableRegistry o white list your tile, please see the registry for more information. */ -public interface IMovableTile { - - /** - * notification that your block will be moved, called instead of invalidate, return false to prevent movement. - * @return - */ - boolean prepareToMove(); - - /** - * notification that your block was moved, called after validate. - */ - void doneMoving(); - +public interface IMovableTile +{ + + /** + * notification that your block will be moved, called instead of invalidate, return false to prevent movement. + * @return + */ + boolean prepareToMove (); + + /** + * notification that your block was moved, called after validate. + */ + void doneMoving (); + } diff --git a/src/appeng/api/networkevents/MENetworkEvent.java b/src/appeng/api/networkevents/MENetworkEvent.java index b5416295..18c184ec 100644 --- a/src/appeng/api/networkevents/MENetworkEvent.java +++ b/src/appeng/api/networkevents/MENetworkEvent.java @@ -6,64 +6,66 @@ import appeng.api.me.util.IGridInterface; /** * These events are posted via IGridInterface.PostEvent */ -public class MENetworkEvent { +public class MENetworkEvent +{ - private int visited = 0; - private int available = 0; - private boolean canceled; + private int visited = 0; + private int available = 0; + private boolean canceled; - /** - * The tile omitting the event, not necessarily non-null, but included to suggest standard practice. - */ - public final IGridTileEntity tile; - - public MENetworkEvent( IGridTileEntity t ) { - tile = t; - } - - /** - * Call to prevent AE from posting the event to any further objects. - */ - public void cancel() - { - canceled = true; - } - - /** - * called by AE after each object is called to cancel any future calls. - * @return - */ - public boolean isCanceled() - { - return canceled; - } - - /** - * the number of objects that were visited by the event. - * @return - */ - public int getVisitedObjects() - { - return visited; - } - - /** - * May differ from visited is the event is canceled. - * @return - */ - public int getAvailableObjects() - { - return available; - } - - /** - * Called by AE after iterating the event subscribers. - * @param v - * @param a - */ - public void setVisitedObjects( int v, int a ) - { - visited = v; - available = a; - } + /** + * The tile omitting the event, not necessarily non-null, but included to suggest standard practice. + */ + public final IGridTileEntity tile; + + public MENetworkEvent(IGridTileEntity t) + { + tile = t; + } + + /** + * Call to prevent AE from posting the event to any further objects. + */ + public void cancel () + { + canceled = true; + } + + /** + * called by AE after each object is called to cancel any future calls. + * @return + */ + public boolean isCanceled () + { + return canceled; + } + + /** + * the number of objects that were visited by the event. + * @return + */ + public int getVisitedObjects () + { + return visited; + } + + /** + * May differ from visited is the event is canceled. + * @return + */ + public int getAvailableObjects () + { + return available; + } + + /** + * Called by AE after iterating the event subscribers. + * @param v + * @param a + */ + public void setVisitedObjects (int v, int a) + { + visited = v; + available = a; + } } diff --git a/src/appeng/api/networkevents/MENetworkEventSubscribe.java b/src/appeng/api/networkevents/MENetworkEventSubscribe.java index cb760483..3e4aedbc 100644 --- a/src/appeng/api/networkevents/MENetworkEventSubscribe.java +++ b/src/appeng/api/networkevents/MENetworkEventSubscribe.java @@ -4,6 +4,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.RUNTIME) -public @interface MENetworkEventSubscribe { +public @interface MENetworkEventSubscribe +{ } diff --git a/src/appeng/api/networkevents/MENetworkPowerStorage.java b/src/appeng/api/networkevents/MENetworkPowerStorage.java index 4dcf4681..803272ae 100644 --- a/src/appeng/api/networkevents/MENetworkPowerStorage.java +++ b/src/appeng/api/networkevents/MENetworkPowerStorage.java @@ -6,18 +6,21 @@ import appeng.api.me.util.IGridInterface; /** * informs the controller, that a IMEPowerStorage block that had either run, out of power, or was full, is no longer in that state. */ -public class MENetworkPowerStorage extends MENetworkEvent { - - public enum PowerEventType { - REQUEST_POWER, // informs the network this tile is ready to receive power again. - PROVIDE_POWER // informs the network this tile is ready to provide power again. - }; - - public final PowerEventType type; - - public MENetworkPowerStorage(IGridTileEntity t, PowerEventType y) { - super(t); - type = y; - } +public class MENetworkPowerStorage extends MENetworkEvent +{ + + public enum PowerEventType + { + REQUEST_POWER, // informs the network this tile is ready to receive power again. + PROVIDE_POWER // informs the network this tile is ready to provide power again. + }; + + public final PowerEventType type; + + public MENetworkPowerStorage(IGridTileEntity t, PowerEventType y) + { + super(t); + type = y; + } } diff --git a/src/appeng/api/networkevents/MENetworkStorageEvent.java b/src/appeng/api/networkevents/MENetworkStorageEvent.java index 6b8d50cc..bb27059d 100644 --- a/src/appeng/api/networkevents/MENetworkStorageEvent.java +++ b/src/appeng/api/networkevents/MENetworkStorageEvent.java @@ -4,13 +4,15 @@ import appeng.api.IItemList; import appeng.api.me.tiles.IGridTileEntity; import appeng.api.me.util.IMEInventory; -public class MENetworkStorageEvent extends MENetworkEvent { - - public final IItemList currentItems; - - public MENetworkStorageEvent(IGridTileEntity t, IItemList o ) { - super(t); - currentItems = o; - } - +public class MENetworkStorageEvent extends MENetworkEvent +{ + + public final IItemList currentItems; + + public MENetworkStorageEvent(IGridTileEntity t, IItemList o) + { + super(t); + currentItems = o; + } + } diff --git a/src/cofh/api/energy/IEnergyContainerItem.java b/src/cofh/api/energy/IEnergyContainerItem.java index 0a220296..d40c0999 100644 --- a/src/cofh/api/energy/IEnergyContainerItem.java +++ b/src/cofh/api/energy/IEnergyContainerItem.java @@ -10,42 +10,43 @@ import net.minecraft.item.ItemStack; * @author King Lemming * */ -public interface IEnergyContainerItem { +public interface IEnergyContainerItem +{ - /** - * Adds energy to an item. Returns the quantity of energy that was accepted. This should always return 0 if the item cannot be externally charged. - * - * @param container - * ItemStack to be charged. - * @param maxReceive - * Maximum amount of energy to be sent into the item. - * @param simulate - * If TRUE, the charge will only be simulated. - * @return Amount of energy that was (or would have been, if simulated) received by the item. - */ - int receiveEnergy(ItemStack container, int maxReceive, boolean simulate); + /** + * Adds energy to an item. Returns the quantity of energy that was accepted. This should always return 0 if the item cannot be externally charged. + * + * @param container + * ItemStack to be charged. + * @param maxReceive + * Maximum amount of energy to be sent into the item. + * @param simulate + * If TRUE, the charge will only be simulated. + * @return Amount of energy that was (or would have been, if simulated) received by the item. + */ + int receiveEnergy (ItemStack container, int maxReceive, boolean simulate); - /** - * Removes energy from an item. Returns the quantity of energy that was removed. This should always return 0 if the item cannot be externally discharged. - * - * @param container - * ItemStack to be discharged. - * @param maxExtract - * Maximum amount of energy to be extracted from the item. - * @param simulate - * If TRUE, the discharge will only be simulated. - * @return Amount of energy that was (or would have been, if simulated) extracted from the item. - */ - int extractEnergy(ItemStack container, int maxExtract, boolean simulate); + /** + * Removes energy from an item. Returns the quantity of energy that was removed. This should always return 0 if the item cannot be externally discharged. + * + * @param container + * ItemStack to be discharged. + * @param maxExtract + * Maximum amount of energy to be extracted from the item. + * @param simulate + * If TRUE, the discharge will only be simulated. + * @return Amount of energy that was (or would have been, if simulated) extracted from the item. + */ + int extractEnergy (ItemStack container, int maxExtract, boolean simulate); - /** - * Get the amount of energy currently stored in the item. - */ - int getEnergyStored(ItemStack container); + /** + * Get the amount of energy currently stored in the item. + */ + int getEnergyStored (ItemStack container); - /** - * Get the max amount of energy that can be stored in the item. - */ - int getMaxEnergyStored(ItemStack container); + /** + * Get the max amount of energy that can be stored in the item. + */ + int getMaxEnergyStored (ItemStack container); } \ No newline at end of file diff --git a/src/cofh/util/MathHelper.java b/src/cofh/util/MathHelper.java index a442353b..48b639e4 100644 --- a/src/cofh/util/MathHelper.java +++ b/src/cofh/util/MathHelper.java @@ -6,178 +6,211 @@ package cofh.util; * @author King Lemming * */ -public final class MathHelper { +public final class MathHelper +{ - private MathHelper() { + private MathHelper() + { - } + } - public static final double PHI = 1.618034; - public static final double[] SIN_TABLE = new double[65536]; + public static final double PHI = 1.618034; + public static final double[] SIN_TABLE = new double[65536]; - static { - for (int i = 0; i < 65536; i++) { - SIN_TABLE[i] = Math.sin(i / 65536D * 2 * Math.PI); - } - SIN_TABLE[0] = 0; - SIN_TABLE[16384] = 1; - SIN_TABLE[32768] = 0; - SIN_TABLE[49152] = 1; - } + static + { + for (int i = 0; i < 65536; i++) + { + SIN_TABLE[i] = Math.sin(i / 65536D * 2 * Math.PI); + } + SIN_TABLE[0] = 0; + SIN_TABLE[16384] = 1; + SIN_TABLE[32768] = 0; + SIN_TABLE[49152] = 1; + } - public static double sin(double d) { + public static double sin (double d) + { - return SIN_TABLE[(int) ((float) d * 10430.378F) & 65535]; - } + return SIN_TABLE[(int) ((float) d * 10430.378F) & 65535]; + } - public static double cos(double d) { + public static double cos (double d) + { - return SIN_TABLE[(int) ((float) d * 10430.378F + 16384.0F) & 65535]; - } + return SIN_TABLE[(int) ((float) d * 10430.378F + 16384.0F) & 65535]; + } - public static float approachLinear(float a, float b, float max) { + public static float approachLinear (float a, float b, float max) + { - return a > b ? a - b < max ? b : a - max : b - a < max ? b : a + max; - } + return a > b ? a - b < max ? b : a - max : b - a < max ? b : a + max; + } - public static double approachLinear(double a, double b, double max) { + public static double approachLinear (double a, double b, double max) + { - return a > b ? a - b < max ? b : a - max : b - a < max ? b : a + max; - } + return a > b ? a - b < max ? b : a - max : b - a < max ? b : a + max; + } - public static float interpolate(float a, float b, float d) { + public static float interpolate (float a, float b, float d) + { - return a + (b - a) * d; - } + return a + (b - a) * d; + } - public static double interpolate(double a, double b, double d) { + public static double interpolate (double a, double b, double d) + { - return a + (b - a) * d; - } + return a + (b - a) * d; + } - public static double approachExp(double a, double b, double ratio) { + public static double approachExp (double a, double b, double ratio) + { - return a + (b - a) * ratio; - } + return a + (b - a) * ratio; + } - public static double approachExp(double a, double b, double ratio, double cap) { + public static double approachExp (double a, double b, double ratio, double cap) + { - double d = (b - a) * ratio; + double d = (b - a) * ratio; - if (Math.abs(d) > cap) { - d = Math.signum(d) * cap; - } - return a + d; - } + if (Math.abs(d) > cap) + { + d = Math.signum(d) * cap; + } + return a + d; + } - public static double retreatExp(double a, double b, double c, double ratio, double kick) { + public static double retreatExp (double a, double b, double c, double ratio, double kick) + { - double d = (Math.abs(c - a) + kick) * ratio; + double d = (Math.abs(c - a) + kick) * ratio; - if (d > Math.abs(b - a)) { - return b; - } - return a + Math.signum(b - a) * d; - } + if (d > Math.abs(b - a)) + { + return b; + } + return a + Math.signum(b - a) * d; + } - public static double clip(double value, double min, double max) { + public static double clip (double value, double min, double max) + { - if (value > max) { - value = max; - } else if (value < min) { - value = min; - } - return value; - } + if (value > max) + { + value = max; + } + else if (value < min) + { + value = min; + } + return value; + } - public static boolean between(double a, double x, double b) { + public static boolean between (double a, double x, double b) + { - return a <= x && x <= b; - } + return a <= x && x <= b; + } - public static int approachExpI(int a, int b, double ratio) { + public static int approachExpI (int a, int b, double ratio) + { - int r = (int) Math.round(approachExp(a, b, ratio)); - return r == a ? b : r; - } + int r = (int) Math.round(approachExp(a, b, ratio)); + return r == a ? b : r; + } - public static int retreatExpI(int a, int b, int c, double ratio, int kick) { + public static int retreatExpI (int a, int b, int c, double ratio, int kick) + { - int r = (int) Math.round(retreatExp(a, b, c, ratio, kick)); - return r == a ? b : r; - } + int r = (int) Math.round(retreatExp(a, b, c, ratio, kick)); + return r == a ? b : r; + } - public static int floor_double(double d) { + public static int floor_double (double d) + { - return net.minecraft.util.MathHelper.floor_double(d); - } + return net.minecraft.util.MathHelper.floor_double(d); + } - /** - * Unchecked implementation to round a number. Parameter should be known to be valid in advance. - */ - public static int round(double d) { + /** + * Unchecked implementation to round a number. Parameter should be known to be valid in advance. + */ + public static int round (double d) + { - return (int) (d + 0.5D); - } + return (int) (d + 0.5D); + } - /** - * Unchecked implementation to round a number up. Parameter should be known to be valid in advance. - */ - public static int ceil(double d) { + /** + * Unchecked implementation to round a number up. Parameter should be known to be valid in advance. + */ + public static int ceil (double d) + { - return (int) (d + 0.9999D); - } + return (int) (d + 0.9999D); + } - /** - * Unchecked implementation to determine the smaller of two Floats. Parameters should be known to be valid in advance. - */ - public static float minF(float a, float b) { + /** + * Unchecked implementation to determine the smaller of two Floats. Parameters should be known to be valid in advance. + */ + public static float minF (float a, float b) + { - return a < b ? a : b; - } + return a < b ? a : b; + } - public static float minF(int a, float b) { + public static float minF (int a, float b) + { - return a < b ? a : b; - } + return a < b ? a : b; + } - public static float minF(float a, int b) { + public static float minF (float a, int b) + { - return a < b ? a : b; - } + return a < b ? a : b; + } - /** - * Unchecked implementation to determine the larger of two Floats. Parameters should be known to be valid in advance. - */ - public static float maxF(float a, float b) { + /** + * Unchecked implementation to determine the larger of two Floats. Parameters should be known to be valid in advance. + */ + public static float maxF (float a, float b) + { - return a > b ? a : b; - } + return a > b ? a : b; + } - public static float maxF(int a, float b) { + public static float maxF (int a, float b) + { - return a > b ? a : b; - } + return a > b ? a : b; + } - public static float maxF(float a, int b) { + public static float maxF (float a, int b) + { - return a > b ? a : b; - } + return a > b ? a : b; + } - /** - * Unchecked implementation to determine the smaller of two Integers. Parameters should be known to be valid in advance. - */ - public static int minI(int a, int b) { + /** + * Unchecked implementation to determine the smaller of two Integers. Parameters should be known to be valid in advance. + */ + public static int minI (int a, int b) + { - return a < b ? a : b; - } + return a < b ? a : b; + } - /** - * Unchecked implementation to determine the larger of two Integers. Parameters should be known to be valid in advance. - */ - public static int maxI(int a, int b) { + /** + * Unchecked implementation to determine the larger of two Integers. Parameters should be known to be valid in advance. + */ + public static int maxI (int a, int b) + { - return a > b ? a : b; - } + return a > b ? a : b; + } } diff --git a/src/ic2/api/item/IBoxable.java b/src/ic2/api/item/IBoxable.java index bca2cc0d..6214662c 100644 --- a/src/ic2/api/item/IBoxable.java +++ b/src/ic2/api/item/IBoxable.java @@ -2,13 +2,13 @@ package ic2.api.item; import net.minecraft.item.ItemStack; - -public interface IBoxable { - /** - * Determine whether an item can be stored in a toolbox or not. - * - * @param itemstack item to be stored - * @return Whether to store the item in the toolbox or not - */ - public abstract boolean canBeStoredInToolbox(ItemStack itemstack); +public interface IBoxable +{ + /** + * Determine whether an item can be stored in a toolbox or not. + * + * @param itemstack item to be stored + * @return Whether to store the item in the toolbox or not + */ + public abstract boolean canBeStoredInToolbox (ItemStack itemstack); } diff --git a/src/ic2/api/item/ICustomElectricItem.java b/src/ic2/api/item/ICustomElectricItem.java index 9f4b1a68..a65b4b29 100644 --- a/src/ic2/api/item/ICustomElectricItem.java +++ b/src/ic2/api/item/ICustomElectricItem.java @@ -19,49 +19,50 @@ import net.minecraft.item.ItemStack; * @deprecated Use ISpecialElectricItem instead. */ @Deprecated -public interface ICustomElectricItem extends IElectricItem { - /** - * Charge an item with a specified amount of energy - * - * @param itemStack electric item's stack - * @param amount amount of energy to charge in EU - * @param tier tier of the charging device, has to be at least as high as the item to charge - * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() - * @param simulate don't actually change the item, just determine the return value - * @return Energy transferred into the electric item - */ - public int charge(ItemStack itemStack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate); +public interface ICustomElectricItem extends IElectricItem +{ + /** + * Charge an item with a specified amount of energy + * + * @param itemStack electric item's stack + * @param amount amount of energy to charge in EU + * @param tier tier of the charging device, has to be at least as high as the item to charge + * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() + * @param simulate don't actually change the item, just determine the return value + * @return Energy transferred into the electric item + */ + public int charge (ItemStack itemStack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate); - /** - * Discharge an item by a specified amount of energy - * - * @param itemStack electric item's stack - * @param amount amount of energy to charge in EU - * @param tier tier of the discharging device, has to be at least as high as the item to discharge - * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() - * @param simulate don't actually discharge the item, just determine the return value - * @return Energy retrieved from the electric item - */ - public int discharge(ItemStack itemStack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate); + /** + * Discharge an item by a specified amount of energy + * + * @param itemStack electric item's stack + * @param amount amount of energy to charge in EU + * @param tier tier of the discharging device, has to be at least as high as the item to discharge + * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() + * @param simulate don't actually discharge the item, just determine the return value + * @return Energy retrieved from the electric item + */ + public int discharge (ItemStack itemStack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate); - /** - * Determine if the specified electric item has at least a specific amount of EU. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * BatPacks are not taken into account. - * - * @param itemStack electric item's stack - * @param amount minimum amount of energy required - * @return true if there's enough energy - */ - public boolean canUse(ItemStack itemStack, int amount); + /** + * Determine if the specified electric item has at least a specific amount of EU. + * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. + * BatPacks are not taken into account. + * + * @param itemStack electric item's stack + * @param amount minimum amount of energy required + * @return true if there's enough energy + */ + public boolean canUse (ItemStack itemStack, int amount); - /** - * Determine whether to show the charge tool tip with NEI or other means. - * - * Return false if IC2's handler is incompatible, you want to implement your own or you don't - * want to display the charge at all. - * - * @return true to show the tool tip (x/y EU) - */ - public boolean canShowChargeToolTip(ItemStack itemStack); + /** + * Determine whether to show the charge tool tip with NEI or other means. + * + * Return false if IC2's handler is incompatible, you want to implement your own or you don't + * want to display the charge at all. + * + * @return true to show the tool tip (x/y EU) + */ + public boolean canShowChargeToolTip (ItemStack itemStack); } diff --git a/src/ic2/api/item/IElectricItem.java b/src/ic2/api/item/IElectricItem.java index adaf3b76..2b7fcce7 100644 --- a/src/ic2/api/item/IElectricItem.java +++ b/src/ic2/api/item/IElectricItem.java @@ -7,48 +7,48 @@ import net.minecraft.item.ItemStack; * * The item should have a maximum damage of 13. */ -public interface IElectricItem { - /** - * Determine if the item can be used in a machine or as an armor part to supply energy. - * - * @return Whether the item can supply energy - */ - boolean canProvideEnergy(ItemStack itemStack); +public interface IElectricItem +{ + /** + * Determine if the item can be used in a machine or as an armor part to supply energy. + * + * @return Whether the item can supply energy + */ + boolean canProvideEnergy (ItemStack itemStack); - /** - * Get the item ID to use for a charge energy greater than 0. - * - * @return Item ID to use - */ - int getChargedItemId(ItemStack itemStack); + /** + * Get the item ID to use for a charge energy greater than 0. + * + * @return Item ID to use + */ + int getChargedItemId (ItemStack itemStack); - /** - * Get the item ID to use for a charge energy of 0. - * - * @return Item ID to use - */ - int getEmptyItemId(ItemStack itemStack); + /** + * Get the item ID to use for a charge energy of 0. + * + * @return Item ID to use + */ + int getEmptyItemId (ItemStack itemStack); - /** - * Get the item's maximum charge energy in EU. - * - * @return Maximum charge energy - */ - int getMaxCharge(ItemStack itemStack); + /** + * Get the item's maximum charge energy in EU. + * + * @return Maximum charge energy + */ + int getMaxCharge (ItemStack itemStack); - /** - * Get the item's tier, lower tiers can't send energy to higher ones. - * Batteries are Tier 1, Energy Crystals are Tier 2, Lapotron Crystals are Tier 3. - * - * @return Item's tier - */ - int getTier(ItemStack itemStack); + /** + * Get the item's tier, lower tiers can't send energy to higher ones. + * Batteries are Tier 1, Energy Crystals are Tier 2, Lapotron Crystals are Tier 3. + * + * @return Item's tier + */ + int getTier (ItemStack itemStack); - /** - * Get the item's transfer limit in EU per transfer operation. - * - * @return Transfer limit - */ - int getTransferLimit(ItemStack itemStack); + /** + * Get the item's transfer limit in EU per transfer operation. + * + * @return Transfer limit + */ + int getTransferLimit (ItemStack itemStack); } - diff --git a/src/ic2/api/item/IElectricItemManager.java b/src/ic2/api/item/IElectricItemManager.java index 88eab750..cdfb49e5 100644 --- a/src/ic2/api/item/IElectricItemManager.java +++ b/src/ic2/api/item/IElectricItemManager.java @@ -17,76 +17,77 @@ import net.minecraft.item.ItemStack; * to minimize its dependency on its own constraints/structure and delegates most work back to the * more atomic features in the gateway manager. */ -public interface IElectricItemManager { - /** - * Charge an item with a specified amount of energy - * - * @param itemStack electric item's stack - * @param amount amount of energy to charge in EU - * @param tier tier of the charging device, has to be at least as high as the item to charge - * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() - * @param simulate don't actually change the item, just determine the return value - * @return Energy transferred into the electric item - */ - int charge(ItemStack itemStack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate); +public interface IElectricItemManager +{ + /** + * Charge an item with a specified amount of energy + * + * @param itemStack electric item's stack + * @param amount amount of energy to charge in EU + * @param tier tier of the charging device, has to be at least as high as the item to charge + * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() + * @param simulate don't actually change the item, just determine the return value + * @return Energy transferred into the electric item + */ + int charge (ItemStack itemStack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate); - /** - * Discharge an item by a specified amount of energy - * - * @param itemStack electric item's stack - * @param amount amount of energy to charge in EU - * @param tier tier of the discharging device, has to be at least as high as the item to discharge - * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() - * @param simulate don't actually discharge the item, just determine the return value - * @return Energy retrieved from the electric item - */ - int discharge(ItemStack itemStack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate); + /** + * Discharge an item by a specified amount of energy + * + * @param itemStack electric item's stack + * @param amount amount of energy to charge in EU + * @param tier tier of the discharging device, has to be at least as high as the item to discharge + * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() + * @param simulate don't actually discharge the item, just determine the return value + * @return Energy retrieved from the electric item + */ + int discharge (ItemStack itemStack, int amount, int tier, boolean ignoreTransferLimit, boolean simulate); - /** - * Determine the charge level for the specified item - * - * @param itemStack ItemStack containing the electric item - * @return charge level in EU - */ - int getCharge(ItemStack itemStack); + /** + * Determine the charge level for the specified item + * + * @param itemStack ItemStack containing the electric item + * @return charge level in EU + */ + int getCharge (ItemStack itemStack); - /** - * Determine if the specified electric item has at least a specific amount of EU. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * BatPacks are not taken into account. - * - * @param itemStack electric item's stack - * @param amount minimum amount of energy required - * @return true if there's enough energy - */ - boolean canUse(ItemStack itemStack, int amount); + /** + * Determine if the specified electric item has at least a specific amount of EU. + * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. + * BatPacks are not taken into account. + * + * @param itemStack electric item's stack + * @param amount minimum amount of energy required + * @return true if there's enough energy + */ + boolean canUse (ItemStack itemStack, int amount); - /** - * Try to retrieve a specific amount of energy from an Item, and if applicable, a BatPack. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * - * @param itemStack electric item's stack - * @param amount amount of energy to discharge in EU - * @param entity entity holding the item - * @return true if the operation succeeded - */ - boolean use(ItemStack itemStack, int amount, EntityLivingBase entity); + /** + * Try to retrieve a specific amount of energy from an Item, and if applicable, a BatPack. + * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. + * + * @param itemStack electric item's stack + * @param amount amount of energy to discharge in EU + * @param entity entity holding the item + * @return true if the operation succeeded + */ + boolean use (ItemStack itemStack, int amount, EntityLivingBase entity); - /** - * Charge an item from the BatPack a player is wearing. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * use() already contains this functionality. - * - * @param itemStack electric item's stack - * @param entity entity holding the item - */ - void chargeFromArmor(ItemStack itemStack, EntityLivingBase entity); + /** + * Charge an item from the BatPack a player is wearing. + * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. + * use() already contains this functionality. + * + * @param itemStack electric item's stack + * @param entity entity holding the item + */ + void chargeFromArmor (ItemStack itemStack, EntityLivingBase entity); - /** - * Get the tool tip to display for electric items. - * - * @param itemStack ItemStack to determine the tooltip for - * @return tool tip string or null for none - */ - String getToolTip(ItemStack itemStack); + /** + * Get the tool tip to display for electric items. + * + * @param itemStack ItemStack to determine the tooltip for + * @return tool tip string or null for none + */ + String getToolTip (ItemStack itemStack); } diff --git a/src/ic2/api/item/ISpecialElectricItem.java b/src/ic2/api/item/ISpecialElectricItem.java index a7302f53..86916eef 100644 --- a/src/ic2/api/item/ISpecialElectricItem.java +++ b/src/ic2/api/item/ISpecialElectricItem.java @@ -2,12 +2,13 @@ package ic2.api.item; import net.minecraft.item.ItemStack; -public interface ISpecialElectricItem extends IElectricItem { - /** - * Supply a custom IElectricItemManager. - * - * @param itemStack ItemStack to get the manager for - * @return IElectricItemManager instance - */ - IElectricItemManager getManager(ItemStack itemStack); +public interface ISpecialElectricItem extends IElectricItem +{ + /** + * Supply a custom IElectricItemManager. + * + * @param itemStack ItemStack to get the manager for + * @return IElectricItemManager instance + */ + IElectricItemManager getManager (ItemStack itemStack); } diff --git a/src/ic2/api/item/Items.java b/src/ic2/api/item/Items.java index a7291ea4..1b7ed558 100644 --- a/src/ic2/api/item/Items.java +++ b/src/ic2/api/item/Items.java @@ -13,587 +13,597 @@ import net.minecraft.item.ItemStack; * Blocks: Block.blocksList[x.itemID] * Items: x.getItem() */ -public final class Items { - /** - * Get an ItemStack for a specific item name, example: Items.getItem("resin") - * See the list below for item names. - * Make sure to copy() the ItemStack if you want to modify it. - * - * @param name item name - * @return The item or null if the item does not exist or an error occurred - */ - public static ItemStack getItem(String name) { - try { - if (Ic2Items == null) Ic2Items = Class.forName(getPackage() + ".core.Ic2Items"); +public final class Items +{ + /** + * Get an ItemStack for a specific item name, example: Items.getItem("resin") + * See the list below for item names. + * Make sure to copy() the ItemStack if you want to modify it. + * + * @param name item name + * @return The item or null if the item does not exist or an error occurred + */ + public static ItemStack getItem (String name) + { + try + { + if (Ic2Items == null) + Ic2Items = Class.forName(getPackage() + ".core.Ic2Items"); - Object ret = Ic2Items.getField(name).get(null); + Object ret = Ic2Items.getField(name).get(null); - if (ret instanceof ItemStack) { - return (ItemStack) ret; - } else { - return null; - } - } catch (Exception e) { + if (ret instanceof ItemStack) + { + return (ItemStack) ret; + } + else + { + return null; + } + } + catch (Exception e) + { System.out.println("IC2 API: Call getItem failed for " + name); - return null; - } - } - - /* Possible values: - - // ores - copperOre; // Copper Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreCopper, null with enableWorldGenOreCopper=false - tinOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreTin, null with enableWorldGenOreTin=false - uraniumOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreUranium, null with enableWorldGenOreUranium=false - leadOre; // Lead Ore Block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreLead, null with enableWorldGenOreLead=false - - // rubber related - - Rubber wood block, meta reflects the state, meta in ItemStack set to 0, ore dictionary: woodRubber (with meta 0), null with enableWorldGenTreeRubber=false - dropped (as an item) -> metadata 0 - block, no resin spot -> metadata 0 or 1 - block, wet resin spot -> metadata 2-5 (according to the side) - block, dry resin spot -> metadata 8-11 (wet state + 6) - - rubberWood; - rubberLeaves; // Rubber Leaves block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false - rubberSapling; // Rubber Sapling block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false - resinSheet; // Resin Sheet block, currently not meta sensitive - rubberTrampoline; // Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0 - - // building/storage - ironFence; // Iron Fence block, currently not meta sensitive - - reinforcedStone; // Reinforced Stone block, currently not meta sensitive - reinforcedGlass; // Reinforced Glass block, currently not meta sensitive - reinforcedDoorBlock; // Reinforced Door block, meta reflects the state (see vanilla doors), meta in ItemStack set to 0 - - constructionreinforcedFoam; // Construction Reinforced Foam block, currently not meta sensitive - constructionFoam; // Construction Foam block, currently not meta sensitive - constructionFoamWall; // Construction Foam Wall block, meta = color, implements IPaintableBlock - scaffold; // Scaffold block, meta reflects internal physical model data - ironScaffold; // Scaffold block, meta reflects internal physical model data - - bronzeBlock; // Bronze block, meta sensitive - copperBlock; // Copper block, meta sensitive - tinBlock; // Tin block, meta sensitive - uraniumBlock; // Uranium block, meta sensitive - leadBlock; // Uranium block, meta sensitive - - // cables (when placed as a block, inventory items are different; TE implements IEnergyConductor) - - copperCableBlock; // Copper Cable block, meta sensitive - insulatedCopperCableBlock; // Insulated Copper Cable block, meta sensitive - - goldCableBlock; // Gold Cable block, meta sensitive - insulatedGoldCableBlock; // Insulated Gold Cable block, meta sensitive - doubleInsulatedGoldCableBlock; // Double Insulated Gold Cable block, meta sensitive - - ironCableBlock; // Iron Cable block, meta sensitive - insulatedIronCableBlock; // Insulated Iron Cable block, meta sensitive - doubleInsulatedIronCableBlock; // Double Insulated Iron Cable block, meta sensitive - trippleInsulatedIronCableBlock; // Tripple Insulated Iron Cable block, meta sensitive + return null; + } + } + + /* Possible values: + + // ores + copperOre; // Copper Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreCopper, null with enableWorldGenOreCopper=false + tinOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreTin, null with enableWorldGenOreTin=false + uraniumOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreUranium, null with enableWorldGenOreUranium=false + leadOre; // Lead Ore Block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreLead, null with enableWorldGenOreLead=false + + // rubber related + + Rubber wood block, meta reflects the state, meta in ItemStack set to 0, ore dictionary: woodRubber (with meta 0), null with enableWorldGenTreeRubber=false + dropped (as an item) -> metadata 0 + block, no resin spot -> metadata 0 or 1 + block, wet resin spot -> metadata 2-5 (according to the side) + block, dry resin spot -> metadata 8-11 (wet state + 6) + + rubberWood; + rubberLeaves; // Rubber Leaves block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false + rubberSapling; // Rubber Sapling block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false + resinSheet; // Resin Sheet block, currently not meta sensitive + rubberTrampoline; // Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0 + + // building/storage + ironFence; // Iron Fence block, currently not meta sensitive + + reinforcedStone; // Reinforced Stone block, currently not meta sensitive + reinforcedGlass; // Reinforced Glass block, currently not meta sensitive + reinforcedDoorBlock; // Reinforced Door block, meta reflects the state (see vanilla doors), meta in ItemStack set to 0 + + constructionreinforcedFoam; // Construction Reinforced Foam block, currently not meta sensitive + constructionFoam; // Construction Foam block, currently not meta sensitive + constructionFoamWall; // Construction Foam Wall block, meta = color, implements IPaintableBlock + scaffold; // Scaffold block, meta reflects internal physical model data + ironScaffold; // Scaffold block, meta reflects internal physical model data + + bronzeBlock; // Bronze block, meta sensitive + copperBlock; // Copper block, meta sensitive + tinBlock; // Tin block, meta sensitive + uraniumBlock; // Uranium block, meta sensitive + leadBlock; // Uranium block, meta sensitive + + // cables (when placed as a block, inventory items are different; TE implements IEnergyConductor) + + copperCableBlock; // Copper Cable block, meta sensitive + insulatedCopperCableBlock; // Insulated Copper Cable block, meta sensitive + + goldCableBlock; // Gold Cable block, meta sensitive + insulatedGoldCableBlock; // Insulated Gold Cable block, meta sensitive + doubleInsulatedGoldCableBlock; // Double Insulated Gold Cable block, meta sensitive + + ironCableBlock; // Iron Cable block, meta sensitive + insulatedIronCableBlock; // Insulated Iron Cable block, meta sensitive + doubleInsulatedIronCableBlock; // Double Insulated Iron Cable block, meta sensitive + trippleInsulatedIronCableBlock; // Tripple Insulated Iron Cable block, meta sensitive - glassFiberCableBlock; // Glass Fiber Cable block, meta sensitive + glassFiberCableBlock; // Glass Fiber Cable block, meta sensitive - tinCableBlock; // Tin Cable block, meta sensitive - insulatedtinCableBlock; // Insulated Tin Cable item, meta sensitive - detectorCableBlock; // Detector Cable block, meta sensitive - splitterCableBlock; // Splitter Cable block, meta sensitive - - // generators + related (TE implements IEnergySource ex. reactorChamber) - - generator; // Generator block, meta sensitive - geothermalGenerator; // Geothermal Generator block, meta sensitive - waterMill; // Water Mill block, meta sensitive - solarPanel; // Solar Panel block, meta sensitive - windMill; // Wind Mill block, meta sensitive - nuclearReactor; // Nuclear Reactor block, meta sensitive - reactorChamber; // Reactor Chamber block, currently not meta sensitive - RTGenerator; // Radioisotope Thermoelectric Generator block, meta sensitive - semifluidGenerator; // Semifluid Generator block, meta sensitive - - - // energy storages (TE implements IEnergySource and IEnergyConductor) - - batBox; // BatBox block, meta sensitive - cesuUnit; // CESU Unit block, meta sensitive - mfeUnit; // MFE Unit block, meta sensitive - mfsUnit; // MFS Unit block, meta sensitive - - // transformers (TE implements IEnergySource and IEnergyConductor) - - lvTransformer; // LV Transformer block, meta sensitive - mvTransformer; // MV Transformer block, meta sensitive - hvTransformer; // HV Transformer block, meta sensitive - evTransformer; // EV Transformer block, meta sensitive - - // machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip) - - machine; // Machine block, meta sensitive - advancedMachine; // Advanced Machine block, meta sensitive - - ironFurnace; // Iron Furnace block, meta sensitive - electroFurnace; // Electro Furnace block, meta sensitive - macerator; // Macerator block, meta sensitive - extractor; // Extractor block, meta sensitive - compressor; // Compressor block, meta sensitive - canner; // Canner block, meta sensitive - miner; // Miner block, meta sensitive - pump; // Pump block, meta sensitive - magnetizer; // Magnetizer block, meta sensitive - electrolyzer; // Electrolyzer block, meta sensitive - recycler; // Recycler block, meta sensitive - inductionFurnace; // Induction Furnace block, meta sensitive - massFabricator; // Mass Fabricator block, meta sensitive - terraformer; // Terraformer block, meta sensitive - teleporter; // Teleporter block, meta sensitive - teslaCoil; // Tesla Coil block, meta sensitive - luminator; // Passive (dark) Luminator block, meta = facing - activeLuminator; // Active (bright) Luminator block, meta = facing - centrifuge; // Centrifuge block, meta sensitive - metalformer; // MetalFormer block ,meta sensitive - orewashingplant; // Ore Wasching Plant,Meta sensitive - patternstorage; // Pattern Storage,Meta sensitive - scanner; // Scanner,Meta sensitive - replicator; // Replicator,Meta sensitive - - miningPipe; // Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0 - miningPipeTip; // Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0 - - - // personal blocks - - personalSafe; // Personal Safe block, meta sensitive - tradeOMat; // Trade-O-Mat block, meta sensitive - energyOMat; // Energy-O-Mat block, meta sensitive - - // explosives - - industrialTnt; // Industrial TNT block, currently not meta sensitive - nuke; // Nuke block, currently not meta sensitive - dynamiteStick; // Dynamite Stick block, meta = placement, meta in ItemStack set to 0 - dynamiteStickWithRemote; // Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0 - - // Agriculture Stuff - - crop; // Crop Block, empty, not meta sensitive - cropmatron; // Cropmatron machien block, meta sensititve - - // ----- items ----- - - // rubber + related - resin; // Resin item, currently not meta sensitive - rubber; // Rubber item, currently not meta sensitive, ore dictionary: itemRubber - - FluidCell; - - // Lithium -> Tritium - - reactorLithiumCell; // LithiumCell use in Reaktor, , meta = damage value - TritiumCell; // Tritium, currently not meta sensitive - - // Nuclear Fuel - - UranFuel; // , currently not meta sensitive - MOXFuel; // , currently not meta sensitive - Plutonium; // , currently not meta sensitive - smallPlutonium; // , currently not meta sensitive - Uran235; // , currently not meta sensitive - smallUran235; // , currently not meta sensitive - Uran238; // , currently not meta sensitive - - reactorDepletedUraniumSimple; // Depleted Uranium Cell items, currently not meta sensitive - reactorDepletedUraniumDual; - reactorDepletedUraniumQuad; - reactorDepletedMOXSimple; // Depleted MOX Cell items, currently not meta sensitive - reactorDepletedMOXDual; - reactorDepletedMOXQuad; - reactorMOXSimple; // Depleted MOX Cell items, currently not meta sensitive - reactorMOXDual; - reactorMOXQuad; - RTGPellets; - - - // Recipe Parts - - coil; // Coil, meta sensitive - elemotor; // electric motor, meta sensitive - powerunit; // Item Power Unit, meta sensitive - powerunitsmall; // Item Power Unit, meta sensitive - - - // ItemCasing - - casingcopper; // Copper ItemCasing, meta sensitive - casingtin; // Tin ItemCasing, meta sensitive - casingbronze; // Bronze ItemCasing, meta sensitive - casinggold; // Gold ItemCasing, meta sensitive - casingiron; // Iron ItemCasing, meta sensitive - @Deprecated - casingadviron; // Refined Iron ItemCasing, meta sensitive - casinglead; // Lead ItemCasing, meta sensitive - - // Crushed Ore - crushedIronOre; // Crushed Iron Ore, meta sensitive - crushedCopperOre; // Crushed Copper Ore, meta sensitive - crushedGoldOre; // Crushed Gold Ore, meta sensitive - crushedTinOre; // Crushed Tin Ore, meta sensitive - crushedUraniumOre; // Crushed Uranium Ore, meta sensitive - crushedSilverOre; // Crushed Silver Ore, meta sensitive - crushedLeadOre; // Crushed Lead Ore, meta sensitive - - - //Purify Crushed Ore - purifiedCrushedIronOre; // Purify Crushed Iron Ore, meta sensitive - purifiedCrushedCopperOre; // Purify Crushed Copper Ore, meta sensitive - purifiedCrushedGoldOre; // Purify Crushed Gold Ore, meta sensitive - purifiedCrushedTinOre; // Purify Crushed Tin Ore, meta sensitive - purifiedCrushedUraniumOre; // Purify Crushed Uranium Ore, meta sensitive - purifiedCrushedSilverOre; // Purify Crushed Silver Ore, meta sensitive - purifiedCrushedLeadOre; // Purify Crushed Lead Ore, meta sensitive - - // dusts - stoneDust; - bronzeDust; // Bronze Dust item, meta sensitive, ore dictionary: dustBronze - clayDust; // Clay Dust item, meta sensitive, ore dictionary: dustClay - coalDust; // Coal Dust item, meta sensitive, ore dictionary: dustCoal - copperDust; // Copper Dust item, meta sensitive, ore dictionary: dustCopper - goldDust; // Gold Dust item, meta sensitive, ore dictionary: dustGold - ironDust; // Iron Dust item, meta sensitive, ore dictionary: dustIron - silverDust; // Silver Dust item, meta sensitive, ore dictionary: dustSilver - tinDust; // Tin Dust item, meta sensitive, ore dictionary: dustTin - hydratedCoalDust; // Hydrated Coal Dust item, meta sensitive - leadDust; // Lead Dust item, meta sensitive, ore dictionary: dustLead - obsidianDust; // Obsidian Dust item, meta sensitive, ore dictionary: dustObsidian - lapiDust; // Lapi Dust item, meta sensitive, ore dictionary: dustLapi - sulfurDust; // Sulfur Dust item, meta sensitive, ore dictionary: dustSulfur - lithiumDust; // Lithium dust, meta sensitive, ore dictionary: dustLithium - - // small dusts - - smallIronDust; // Small Iron Dust item, meta sensitive - smallCopperDust; // Small Copper Dust item, meta sensitive - smallGoldDust; // Small Gold Dust item, meta sensitive - smallTinDust; // Small Tin Dust item, meta sensitive - smallSilverDust; // Small Silver Dust item, meta sensitive - smallLeadDust; // Small Lead Dust item, meta sensitive - smallSulfurDust; // Small Sulfur Dust item, meta sensitive - smallLithiumDust; // Small Lithium Dust item, meta sensitive - - - // ingots - @Deprecated - refinedIronIngot; // Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron - copperIngot; // Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper - tinIngot; // Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin - bronzeIngot; // Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze - mixedMetalIngot; // Mixed Metal Ingot item, currently not meta sensitive - leadIngot; // Lead Ingot item, currently not meta sensitive - - - // tools/weapons (without electric tools) - treetap; // Treetap item, meta = damage value - wrench; // Wrench item, meta = damage value - cutter; // Insulation Cutter item, meta = damage value - constructionFoamSprayer; // Construction Foam Sprayer item, meta = charges (as of v1.45) - - bronzePickaxe; // Bronze Pickaxe item, meta = damage value - bronzeAxe; // Bronze Axe item, meta = damage value - bronzeSword; // Bronze Sword item, meta = damage value - bronzeShovel; // Bronze Shovel item, meta = damage value - bronzeHoe; // Bronze Hoe item, meta = damage value - - ForgeHammer; // Refine Iron Hammer item, meta = damage value - - // el. tools/devices/weapons - miningDrill; // Mining Drill item, meta = damage value for charge level - diamondDrill; // Diamond Tipped Mining Drill item, meta = damage value for charge level - chainsaw; // Chainsaw item, meta = damage value for charge level - electricWrench; // Electric Wrench item, meta = damage value for charge level - electricTreetap; // Electric Treetap item, meta = damage value for charge level - miningLaser; // Mining Laser item, meta = damage value for charge level - - ecMeter; // EC-Mater item, meta = itemdata db index (as of v1.45) - odScanner; // Ore Density Scanner item, meta = damage value for charge level - ovScanner; // Ore Value Scanner item, meta = damage value for charge level - obscurator; // Obscurator item, meta = damage value for charge level - - frequencyTransmitter; // Frequency Transmitter item, meta = itemdata db index (as of v1.45) - - nanoSaber; // Idle Nano Saber item, meta = damage value for charge level - enabledNanoSaber; // Enabled Nano Saber item, meta = damage value for charge level - - toolbox; // Open/Empty toolbox, meta = Open (0) / Closed (1) - - // armor/wearable - hazmatHelmet; // Hazmat Helmet item, meta = damage value - hazmatChestplate; // Hazmat Chestplate item, meta = damage value - hazmatLeggings; // Hazmat Leggings item, meta = damage value - hazmatBoots; // Hazmat Boots item, meta = damage value - - bronzeHelmet; // Bronze Helmet Armor item, meta = damage value - bronzeChestplate; // Bronze Chestplate Armor item, meta = damage value - bronzeLeggings; // Bronze Leggings Armor item, meta = damage value - bronzeBoots; // Bronze Boots Armor item, meta = damage value - - compositeArmor; // Composite Armor item, meta = damage value for charge level - - nanoHelmet; // Nano Helmet Armor item, meta = damage value for charge level - nanoBodyarmor; // Nano Bodyarmor item, meta = damage value for charge level - nanoLeggings; // Nano Leggings Armor item, meta = damage value for charge level - nanoBoots; // Nano Boots Armor item, meta = damage value for charge level - - quantumHelmet; // Quantum Helmet Armor item, meta = damage value for charge level - quantumBodyarmor; // Quantum Bodyarmor item, meta = damage value for charge level - quantumLeggings; // Quantum Leggings Armor item, meta = damage value for charge level - quantumBoots; // Quantum Boots Armor item, meta = damage value for charge level - - jetpack; // Jetpack item, meta = damage value for fuel level - electricJetpack; // Electric Jetpack item, meta = damage value for charge level - - batPack; // BatPack item, meta = damage value for charge level - advbatPack; // Adv.BatPack item, meta = damage value for charge level - lapPack; // LapPack item, meta = damage value for charge level - energyPack; // EnergyPack item, meta = damage value for charge level - - cfPack; // CF Pack item, meta = charges (as of v1.45) - solarHelmet; // Solar Helmet, currently not meta sensitive - staticBoots; // Static Boots, currently not meta sensitive - nightvisionGoggles; // Nightvision Goggles, meta = damage value for charge level - - // batteries - reBattery; // Empty RE Battery item, currently not meta sensitive - chargedReBattery; // RE Battery item, meta = damage value for charge level - advBattery; // Adv Batteryitem, meta = damage value for charge level - energyCrystal; // Energy Crystal item, meta = damage value for charge level - lapotronCrystal; // Lapotron Crystal item, meta = damage value for charge level - suBattery; // SU Battery item, meta = damage value for charge level - - // cables - copperCableItem; // Copper Cable item, meta sensitive - insulatedCopperCableItem; // Insulated Copper Cable item, meta sensitive - - goldCableItem; // Gold Cable item, meta sensitive - insulatedGoldCableItem; // Insulated Gold Cable item, meta sensitive - - @Deprecated - doubleInsulatedGoldCableItem; // Double Insulated Gold Cable item, meta sensitive - - ironCableItem; // Iron Cable item, meta sensitive - insulatedIronCableItem; // Insulated Iron Cable item, meta sensitive - - @Deprecated - doubleInsulatedIronCableItem; // Double Insulated Iron Cable item, meta sensitive - @Deprecated - trippleInsulatedIronCableItem; // Tripple Insulated Iron Cable item, meta sensitive - insulatedTinCableItem; - glassFiberCableItem; // Glass Fiber Cable item, meta sensitive - tinCableItem; // Tin Cable item, meta sensitive - - - detectorCableItem; // Detector Cable item, meta sensitive - splitterCableItem; // Splitter Cable item, meta sensitive - - // cells/containers (without reactor components) - - cell; // Empty Cell item, meta sensitive - lavaCell; // Lava Cell item, meta sensitive - waterCell; // Water Cell item, meta sensitive - UuMatterCell; // UUMatter Cell item, meta sensitive - CFCell; // constructionFoam Cell item, meta sensitive - - - fuelRod; // Empy Fuel Rod item, currently not meta sensitive - hydratedCoalCell; // Hydrated Coal Cell item, currently not meta sensitive - bioCell; // Bio Cell item, currently not meta sensitive - coalfuelCell; // Coalfuel Cell item, currently not meta sensitive - biofuelCell; // Biofuel Cell item, currently not meta sensitive - electrolyzedWaterCell; // Electrolyzed Water Cell item, currently not meta sensitive - airCell; // Compressed Air item, currently not meta sensitive - - fuelCan; // Empty Fuel Can item, currently not meta sensitive - filledFuelCan; // Fuel Can item, meta = fuel value (as of v1.45) - - tinCan; // Empty Tin Can item, currently not meta sensitive - filledTinCan; // Filled Tin Can item, currently not meta sensitive - - // reactor components - reactorUraniumSimple; // Uranium Cell items, meta = consumed uranium ticks - reactorUraniumDual; - reactorUraniumQuad; - - reactorCoolantSimple; - reactorCoolantTriple ; // Coolant Cell item, NBT for heat-storage, meta is 0-10000 for display - reactorCoolantSix; - - reactorPlating; // Integrated Reactor Plating item, currently not meta sensitive - reactorPlatingHeat; - reactorPlatingExplosive; - - reactorHeatSwitch; // Integrated Heat Disperser item, NBT for heat-storage, meta is 0-10000 for display - reactorHeatSwitchCore; - reactorHeatSwitchSpread; - reactorHeatSwitchDiamond; - - reactorVent; // Heat Venting component, NBT for heat-storage, meta is 0-10000 for display - reactorVentCore; - reactorVentGold; - reactorVentSpread;// Special: Does not store heat - reactorVentDiamond; - - reactorReflector; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display - reactorReflectorThick; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display - reactorCondensator; // Consumes redstone to absorb heat, NBT for storage, meta is 0-10000 for display - reactorCondensatorLap; // Consumes redstone/lapis to absorb heat, mNBT for storage, meta is 0-10000 for display - - // terraformer blueprints - terraformerBlueprint; // Empty Terraformer Blueprint item, currently not meta sensitive - cultivationTerraformerBlueprint; // Cultivation Terraformer Blueprint item, currently not meta sensitive - irrigationTerraformerBlueprint; // Irrigation Terraformer Blueprint item, currently not meta sensitive - chillingTerraformerBlueprint; // Chilling Terraformer Blueprint item, currently not meta sensitive - desertificationTerraformerBlueprint; // Desertification Terraformer Blueprint item, currently not meta sensitive - flatificatorTerraformerBlueprint; // Flatificator Terraformer Blueprint item, currently not meta sensitive - mushroomTerraformerBlueprint; // Mushroom Terraformer Blueprint item, currently not meta sensitive - - // diamond chain - coalBall; // Coal Ball item, currently not meta sensitive - compressedCoalBall; // Compressed Coal Ball item, currently not meta sensitive - coalChunk; // Coal Chunk item, currently not meta sensitive - industrialDiamond; // Industrial Diamond item, currently not meta sensitive, DEPRECATED - - // recycler chain - scrap; // Scrap item, currently not meta sensitive - scrapBox; // Scrap Box item, currently not meta sensitive - - // fuel production chain - hydratedCoalClump; // Hydrated Coal Clump item, currently not meta sensitive - plantBall; // Plant Ball item, currently not meta sensitive - compressedPlantBall; // Compressed Plant Ball item, currently not meta sensitive - - // painting - painter; // Painter item, currently not meta sensitive - - blackPainter; // Black Painter item, meta = damage value - redPainter; // Red Painter item, meta = damage value - greenPainter; // Green Painter item, meta = damage value - brownPainter; // Brown Painter item, meta = damage value - bluePainter; // Blue Painter item, meta = damage value - purplePainter; // Purple Painter item, meta = damage value - cyanPainter; // Cyan Painter item, meta = damage value - lightGreyPainter; // Light Grey Painter item, meta = damage value - darkGreyPainter; // Dark Grey Painter item, meta = damage value - pinkPainter; // Pink Painter item, meta = damage value - limePainter; // Lime Painter item, meta = damage value - yellowPainter; // Yellow Painter item, meta = damage value - cloudPainter; // Cloud Painter item, meta = damage value - magentaPainter; // Magenta Painter item, meta = damage value - orangePainter; // Orange Painter item, meta = damage value - whitePainter; // White Painter item, meta = damage value - - // explosives + related - dynamite; // Throwable Dynamite item, currently not meta sensitive - stickyDynamite; // Throwable Sticky Dynamite item, currently not meta sensitive - - remote; // Dynamite Remote item, currently not meta sensitive - - // misc intermediate recipe ingredients - electronicCircuit; // Electronic Circuit item, currently not meta sensitive - advancedCircuit; // Advanced Circuit item, currently not meta sensitive - - advancedAlloy; // Advanced Alloy item, currently not meta sensitive - - carbonFiber; // Raw Carbon Fiber item, currently not meta sensitive - carbonMesh; // Raw Carbon Mesh item, currently not meta sensitive - carbonPlate; // Carbon Plate item, currently not meta sensitive - - matter; // UUA item, currently not meta sensitive - iridiumOre; // Iridium Ore item, currently not meta sensitive - iridiumPlate; // Iridium Plate item, currently not meta sensitive - - - // Metal Plates - - platecopper; // Metal plate item, meta sensitive - platetin; // Metal plate item, meta sensitive - platebronze; // Metal plate item, meta sensitive - plategold; // Metal plate item, meta sensitive - plateiron; // Metal plate item, meta sensitive - platelead; // Metal plate item, meta sensitive - platelapi; // Metal plate item, meta sensitive - plateobsidian; // Metal plate item, meta sensitive - plateadviron; // Metal plate item, meta sensitive - - // Metal Dense Plates - denseplatecopper; // Metal dense plate item, meta sensitive - denseplatetin; // Metal dense plate item, meta sensitive - denseplatebronze; // Metal dense plate item, meta sensitive - denseplategold; // Metal dense plate item, meta sensitive - denseplateiron; // Metal dense plate item, meta sensitive - @Deprecated - denseplateadviron; // Metal dense plate item, meta sensitive - denseplatelead; // Metal dense plate item, meta sensitive - denseplatelapi; // Metal dense plate item, meta sensitive - denseplateobsidian; // Metal dense plate item, meta sensitive - - - - // upgrade modules - overclockerUpgrade; // overclocker upgrade item, meta sensitive - transformerUpgrade; // transformer upgrade item, meta sensitive - energyStorageUpgrade; // energy storage upgrade item, meta sensitive - ejectorUpgrade; // ejector upgrade item, meta sensitive - - // misc - coin; // Coin item, currently not meta sensitive - reinforcedDoor; // Reinforced Door item, currently not meta sensitive - constructionFoamPowder; // Construction Foam Powder item, currently not meta sensitive - grinPowder; // Poisonous ingrident, currently not meta sensitive - debug; // Debug item, currently not meta sensitive - boatCarbon; // Carbon Fiber Canoe item, meta sensitive - boatRubber; // Rubber Dinghy item, meta sensitive - boatRubberBroken; // Damaged Rubber Dinghy item, meta sensitive - boatElectric; // Electric Boat item, meta sensitive - - //Agriculture - cropSeed; // Crop seeds, stuff stored in NBT, don't use for crafting recipes! - cropnalyzer; // Cropnalyzer handheld device - fertilizer; // Basic IC2Item, used to provide nutrients toCropBlocks - hydratingCell; // Cell used to hydrate Crops, meta = Content, 0= Full, 9999 = Near empty - electricHoe; // Electric Hoe, Metadata indicates charge level - terraWart; // Mystic opposite of NEtherWart, cures StatusEffects, simply consumeable - weedEx; // Spraying can of WEED-EX, meta indicates usages left - - //Boozeception - mugEmpty; // Simple stone mug - coffeeBeans; // Harvested CoffeeBeans - coffeePowder; // Processed Coffee Beans, used to craft drinkable Coffee - mugCoffee; // Mug of Coffee, Meta indicates status 0 = cold, 1 = Normal, 2 = Sugar'd - hops; // Hops, harvested freshly from crop - barrel; // Carried Barrel, metadata encrypts the information about the liquid inside - blockBarrel; // Unobtainable "placed barrel", TileEntity controlling the Fermentation process - mugBooze; // Mug filled with booze, metadata encrypts the information about the liquid inside - - */ - - /** - * Get the base IC2 package name, used internally. - * - * @return IC2 package name, if unable to be determined defaults to ic2 - */ - private static String getPackage() { - Package pkg = Items.class.getPackage(); - - if (pkg != null) { - String packageName = pkg.getName(); - - return packageName.substring(0, packageName.length() - ".api.item".length()); - } - - return "ic2"; - } - - private static Class Ic2Items; + tinCableBlock; // Tin Cable block, meta sensitive + insulatedtinCableBlock; // Insulated Tin Cable item, meta sensitive + detectorCableBlock; // Detector Cable block, meta sensitive + splitterCableBlock; // Splitter Cable block, meta sensitive + + // generators + related (TE implements IEnergySource ex. reactorChamber) + + generator; // Generator block, meta sensitive + geothermalGenerator; // Geothermal Generator block, meta sensitive + waterMill; // Water Mill block, meta sensitive + solarPanel; // Solar Panel block, meta sensitive + windMill; // Wind Mill block, meta sensitive + nuclearReactor; // Nuclear Reactor block, meta sensitive + reactorChamber; // Reactor Chamber block, currently not meta sensitive + RTGenerator; // Radioisotope Thermoelectric Generator block, meta sensitive + semifluidGenerator; // Semifluid Generator block, meta sensitive + + + // energy storages (TE implements IEnergySource and IEnergyConductor) + + batBox; // BatBox block, meta sensitive + cesuUnit; // CESU Unit block, meta sensitive + mfeUnit; // MFE Unit block, meta sensitive + mfsUnit; // MFS Unit block, meta sensitive + + // transformers (TE implements IEnergySource and IEnergyConductor) + + lvTransformer; // LV Transformer block, meta sensitive + mvTransformer; // MV Transformer block, meta sensitive + hvTransformer; // HV Transformer block, meta sensitive + evTransformer; // EV Transformer block, meta sensitive + + // machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip) + + machine; // Machine block, meta sensitive + advancedMachine; // Advanced Machine block, meta sensitive + + ironFurnace; // Iron Furnace block, meta sensitive + electroFurnace; // Electro Furnace block, meta sensitive + macerator; // Macerator block, meta sensitive + extractor; // Extractor block, meta sensitive + compressor; // Compressor block, meta sensitive + canner; // Canner block, meta sensitive + miner; // Miner block, meta sensitive + pump; // Pump block, meta sensitive + magnetizer; // Magnetizer block, meta sensitive + electrolyzer; // Electrolyzer block, meta sensitive + recycler; // Recycler block, meta sensitive + inductionFurnace; // Induction Furnace block, meta sensitive + massFabricator; // Mass Fabricator block, meta sensitive + terraformer; // Terraformer block, meta sensitive + teleporter; // Teleporter block, meta sensitive + teslaCoil; // Tesla Coil block, meta sensitive + luminator; // Passive (dark) Luminator block, meta = facing + activeLuminator; // Active (bright) Luminator block, meta = facing + centrifuge; // Centrifuge block, meta sensitive + metalformer; // MetalFormer block ,meta sensitive + orewashingplant; // Ore Wasching Plant,Meta sensitive + patternstorage; // Pattern Storage,Meta sensitive + scanner; // Scanner,Meta sensitive + replicator; // Replicator,Meta sensitive + + miningPipe; // Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0 + miningPipeTip; // Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0 + + + // personal blocks + + personalSafe; // Personal Safe block, meta sensitive + tradeOMat; // Trade-O-Mat block, meta sensitive + energyOMat; // Energy-O-Mat block, meta sensitive + + // explosives + + industrialTnt; // Industrial TNT block, currently not meta sensitive + nuke; // Nuke block, currently not meta sensitive + dynamiteStick; // Dynamite Stick block, meta = placement, meta in ItemStack set to 0 + dynamiteStickWithRemote; // Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0 + + // Agriculture Stuff + + crop; // Crop Block, empty, not meta sensitive + cropmatron; // Cropmatron machien block, meta sensititve + + // ----- items ----- + + // rubber + related + resin; // Resin item, currently not meta sensitive + rubber; // Rubber item, currently not meta sensitive, ore dictionary: itemRubber + + FluidCell; + + // Lithium -> Tritium + + reactorLithiumCell; // LithiumCell use in Reaktor, , meta = damage value + TritiumCell; // Tritium, currently not meta sensitive + + // Nuclear Fuel + + UranFuel; // , currently not meta sensitive + MOXFuel; // , currently not meta sensitive + Plutonium; // , currently not meta sensitive + smallPlutonium; // , currently not meta sensitive + Uran235; // , currently not meta sensitive + smallUran235; // , currently not meta sensitive + Uran238; // , currently not meta sensitive + + reactorDepletedUraniumSimple; // Depleted Uranium Cell items, currently not meta sensitive + reactorDepletedUraniumDual; + reactorDepletedUraniumQuad; + reactorDepletedMOXSimple; // Depleted MOX Cell items, currently not meta sensitive + reactorDepletedMOXDual; + reactorDepletedMOXQuad; + reactorMOXSimple; // Depleted MOX Cell items, currently not meta sensitive + reactorMOXDual; + reactorMOXQuad; + RTGPellets; + + + // Recipe Parts + + coil; // Coil, meta sensitive + elemotor; // electric motor, meta sensitive + powerunit; // Item Power Unit, meta sensitive + powerunitsmall; // Item Power Unit, meta sensitive + + + // ItemCasing + + casingcopper; // Copper ItemCasing, meta sensitive + casingtin; // Tin ItemCasing, meta sensitive + casingbronze; // Bronze ItemCasing, meta sensitive + casinggold; // Gold ItemCasing, meta sensitive + casingiron; // Iron ItemCasing, meta sensitive + @Deprecated + casingadviron; // Refined Iron ItemCasing, meta sensitive + casinglead; // Lead ItemCasing, meta sensitive + + // Crushed Ore + crushedIronOre; // Crushed Iron Ore, meta sensitive + crushedCopperOre; // Crushed Copper Ore, meta sensitive + crushedGoldOre; // Crushed Gold Ore, meta sensitive + crushedTinOre; // Crushed Tin Ore, meta sensitive + crushedUraniumOre; // Crushed Uranium Ore, meta sensitive + crushedSilverOre; // Crushed Silver Ore, meta sensitive + crushedLeadOre; // Crushed Lead Ore, meta sensitive + + + //Purify Crushed Ore + purifiedCrushedIronOre; // Purify Crushed Iron Ore, meta sensitive + purifiedCrushedCopperOre; // Purify Crushed Copper Ore, meta sensitive + purifiedCrushedGoldOre; // Purify Crushed Gold Ore, meta sensitive + purifiedCrushedTinOre; // Purify Crushed Tin Ore, meta sensitive + purifiedCrushedUraniumOre; // Purify Crushed Uranium Ore, meta sensitive + purifiedCrushedSilverOre; // Purify Crushed Silver Ore, meta sensitive + purifiedCrushedLeadOre; // Purify Crushed Lead Ore, meta sensitive + + // dusts + stoneDust; + bronzeDust; // Bronze Dust item, meta sensitive, ore dictionary: dustBronze + clayDust; // Clay Dust item, meta sensitive, ore dictionary: dustClay + coalDust; // Coal Dust item, meta sensitive, ore dictionary: dustCoal + copperDust; // Copper Dust item, meta sensitive, ore dictionary: dustCopper + goldDust; // Gold Dust item, meta sensitive, ore dictionary: dustGold + ironDust; // Iron Dust item, meta sensitive, ore dictionary: dustIron + silverDust; // Silver Dust item, meta sensitive, ore dictionary: dustSilver + tinDust; // Tin Dust item, meta sensitive, ore dictionary: dustTin + hydratedCoalDust; // Hydrated Coal Dust item, meta sensitive + leadDust; // Lead Dust item, meta sensitive, ore dictionary: dustLead + obsidianDust; // Obsidian Dust item, meta sensitive, ore dictionary: dustObsidian + lapiDust; // Lapi Dust item, meta sensitive, ore dictionary: dustLapi + sulfurDust; // Sulfur Dust item, meta sensitive, ore dictionary: dustSulfur + lithiumDust; // Lithium dust, meta sensitive, ore dictionary: dustLithium + + // small dusts + + smallIronDust; // Small Iron Dust item, meta sensitive + smallCopperDust; // Small Copper Dust item, meta sensitive + smallGoldDust; // Small Gold Dust item, meta sensitive + smallTinDust; // Small Tin Dust item, meta sensitive + smallSilverDust; // Small Silver Dust item, meta sensitive + smallLeadDust; // Small Lead Dust item, meta sensitive + smallSulfurDust; // Small Sulfur Dust item, meta sensitive + smallLithiumDust; // Small Lithium Dust item, meta sensitive + + + // ingots + @Deprecated + refinedIronIngot; // Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron + copperIngot; // Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper + tinIngot; // Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin + bronzeIngot; // Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze + mixedMetalIngot; // Mixed Metal Ingot item, currently not meta sensitive + leadIngot; // Lead Ingot item, currently not meta sensitive + + + // tools/weapons (without electric tools) + treetap; // Treetap item, meta = damage value + wrench; // Wrench item, meta = damage value + cutter; // Insulation Cutter item, meta = damage value + constructionFoamSprayer; // Construction Foam Sprayer item, meta = charges (as of v1.45) + + bronzePickaxe; // Bronze Pickaxe item, meta = damage value + bronzeAxe; // Bronze Axe item, meta = damage value + bronzeSword; // Bronze Sword item, meta = damage value + bronzeShovel; // Bronze Shovel item, meta = damage value + bronzeHoe; // Bronze Hoe item, meta = damage value + + ForgeHammer; // Refine Iron Hammer item, meta = damage value + + // el. tools/devices/weapons + miningDrill; // Mining Drill item, meta = damage value for charge level + diamondDrill; // Diamond Tipped Mining Drill item, meta = damage value for charge level + chainsaw; // Chainsaw item, meta = damage value for charge level + electricWrench; // Electric Wrench item, meta = damage value for charge level + electricTreetap; // Electric Treetap item, meta = damage value for charge level + miningLaser; // Mining Laser item, meta = damage value for charge level + + ecMeter; // EC-Mater item, meta = itemdata db index (as of v1.45) + odScanner; // Ore Density Scanner item, meta = damage value for charge level + ovScanner; // Ore Value Scanner item, meta = damage value for charge level + obscurator; // Obscurator item, meta = damage value for charge level + + frequencyTransmitter; // Frequency Transmitter item, meta = itemdata db index (as of v1.45) + + nanoSaber; // Idle Nano Saber item, meta = damage value for charge level + enabledNanoSaber; // Enabled Nano Saber item, meta = damage value for charge level + + toolbox; // Open/Empty toolbox, meta = Open (0) / Closed (1) + + // armor/wearable + hazmatHelmet; // Hazmat Helmet item, meta = damage value + hazmatChestplate; // Hazmat Chestplate item, meta = damage value + hazmatLeggings; // Hazmat Leggings item, meta = damage value + hazmatBoots; // Hazmat Boots item, meta = damage value + + bronzeHelmet; // Bronze Helmet Armor item, meta = damage value + bronzeChestplate; // Bronze Chestplate Armor item, meta = damage value + bronzeLeggings; // Bronze Leggings Armor item, meta = damage value + bronzeBoots; // Bronze Boots Armor item, meta = damage value + + compositeArmor; // Composite Armor item, meta = damage value for charge level + + nanoHelmet; // Nano Helmet Armor item, meta = damage value for charge level + nanoBodyarmor; // Nano Bodyarmor item, meta = damage value for charge level + nanoLeggings; // Nano Leggings Armor item, meta = damage value for charge level + nanoBoots; // Nano Boots Armor item, meta = damage value for charge level + + quantumHelmet; // Quantum Helmet Armor item, meta = damage value for charge level + quantumBodyarmor; // Quantum Bodyarmor item, meta = damage value for charge level + quantumLeggings; // Quantum Leggings Armor item, meta = damage value for charge level + quantumBoots; // Quantum Boots Armor item, meta = damage value for charge level + + jetpack; // Jetpack item, meta = damage value for fuel level + electricJetpack; // Electric Jetpack item, meta = damage value for charge level + + batPack; // BatPack item, meta = damage value for charge level + advbatPack; // Adv.BatPack item, meta = damage value for charge level + lapPack; // LapPack item, meta = damage value for charge level + energyPack; // EnergyPack item, meta = damage value for charge level + + cfPack; // CF Pack item, meta = charges (as of v1.45) + solarHelmet; // Solar Helmet, currently not meta sensitive + staticBoots; // Static Boots, currently not meta sensitive + nightvisionGoggles; // Nightvision Goggles, meta = damage value for charge level + + // batteries + reBattery; // Empty RE Battery item, currently not meta sensitive + chargedReBattery; // RE Battery item, meta = damage value for charge level + advBattery; // Adv Batteryitem, meta = damage value for charge level + energyCrystal; // Energy Crystal item, meta = damage value for charge level + lapotronCrystal; // Lapotron Crystal item, meta = damage value for charge level + suBattery; // SU Battery item, meta = damage value for charge level + + // cables + copperCableItem; // Copper Cable item, meta sensitive + insulatedCopperCableItem; // Insulated Copper Cable item, meta sensitive + + goldCableItem; // Gold Cable item, meta sensitive + insulatedGoldCableItem; // Insulated Gold Cable item, meta sensitive + + @Deprecated + doubleInsulatedGoldCableItem; // Double Insulated Gold Cable item, meta sensitive + + ironCableItem; // Iron Cable item, meta sensitive + insulatedIronCableItem; // Insulated Iron Cable item, meta sensitive + + @Deprecated + doubleInsulatedIronCableItem; // Double Insulated Iron Cable item, meta sensitive + @Deprecated + trippleInsulatedIronCableItem; // Tripple Insulated Iron Cable item, meta sensitive + insulatedTinCableItem; + glassFiberCableItem; // Glass Fiber Cable item, meta sensitive + tinCableItem; // Tin Cable item, meta sensitive + + + detectorCableItem; // Detector Cable item, meta sensitive + splitterCableItem; // Splitter Cable item, meta sensitive + + // cells/containers (without reactor components) + + cell; // Empty Cell item, meta sensitive + lavaCell; // Lava Cell item, meta sensitive + waterCell; // Water Cell item, meta sensitive + UuMatterCell; // UUMatter Cell item, meta sensitive + CFCell; // constructionFoam Cell item, meta sensitive + + + fuelRod; // Empy Fuel Rod item, currently not meta sensitive + hydratedCoalCell; // Hydrated Coal Cell item, currently not meta sensitive + bioCell; // Bio Cell item, currently not meta sensitive + coalfuelCell; // Coalfuel Cell item, currently not meta sensitive + biofuelCell; // Biofuel Cell item, currently not meta sensitive + electrolyzedWaterCell; // Electrolyzed Water Cell item, currently not meta sensitive + airCell; // Compressed Air item, currently not meta sensitive + + fuelCan; // Empty Fuel Can item, currently not meta sensitive + filledFuelCan; // Fuel Can item, meta = fuel value (as of v1.45) + + tinCan; // Empty Tin Can item, currently not meta sensitive + filledTinCan; // Filled Tin Can item, currently not meta sensitive + + // reactor components + reactorUraniumSimple; // Uranium Cell items, meta = consumed uranium ticks + reactorUraniumDual; + reactorUraniumQuad; + + reactorCoolantSimple; + reactorCoolantTriple ; // Coolant Cell item, NBT for heat-storage, meta is 0-10000 for display + reactorCoolantSix; + + reactorPlating; // Integrated Reactor Plating item, currently not meta sensitive + reactorPlatingHeat; + reactorPlatingExplosive; + + reactorHeatSwitch; // Integrated Heat Disperser item, NBT for heat-storage, meta is 0-10000 for display + reactorHeatSwitchCore; + reactorHeatSwitchSpread; + reactorHeatSwitchDiamond; + + reactorVent; // Heat Venting component, NBT for heat-storage, meta is 0-10000 for display + reactorVentCore; + reactorVentGold; + reactorVentSpread;// Special: Does not store heat + reactorVentDiamond; + + reactorReflector; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display + reactorReflectorThick; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display + reactorCondensator; // Consumes redstone to absorb heat, NBT for storage, meta is 0-10000 for display + reactorCondensatorLap; // Consumes redstone/lapis to absorb heat, mNBT for storage, meta is 0-10000 for display + + // terraformer blueprints + terraformerBlueprint; // Empty Terraformer Blueprint item, currently not meta sensitive + cultivationTerraformerBlueprint; // Cultivation Terraformer Blueprint item, currently not meta sensitive + irrigationTerraformerBlueprint; // Irrigation Terraformer Blueprint item, currently not meta sensitive + chillingTerraformerBlueprint; // Chilling Terraformer Blueprint item, currently not meta sensitive + desertificationTerraformerBlueprint; // Desertification Terraformer Blueprint item, currently not meta sensitive + flatificatorTerraformerBlueprint; // Flatificator Terraformer Blueprint item, currently not meta sensitive + mushroomTerraformerBlueprint; // Mushroom Terraformer Blueprint item, currently not meta sensitive + + // diamond chain + coalBall; // Coal Ball item, currently not meta sensitive + compressedCoalBall; // Compressed Coal Ball item, currently not meta sensitive + coalChunk; // Coal Chunk item, currently not meta sensitive + industrialDiamond; // Industrial Diamond item, currently not meta sensitive, DEPRECATED + + // recycler chain + scrap; // Scrap item, currently not meta sensitive + scrapBox; // Scrap Box item, currently not meta sensitive + + // fuel production chain + hydratedCoalClump; // Hydrated Coal Clump item, currently not meta sensitive + plantBall; // Plant Ball item, currently not meta sensitive + compressedPlantBall; // Compressed Plant Ball item, currently not meta sensitive + + // painting + painter; // Painter item, currently not meta sensitive + + blackPainter; // Black Painter item, meta = damage value + redPainter; // Red Painter item, meta = damage value + greenPainter; // Green Painter item, meta = damage value + brownPainter; // Brown Painter item, meta = damage value + bluePainter; // Blue Painter item, meta = damage value + purplePainter; // Purple Painter item, meta = damage value + cyanPainter; // Cyan Painter item, meta = damage value + lightGreyPainter; // Light Grey Painter item, meta = damage value + darkGreyPainter; // Dark Grey Painter item, meta = damage value + pinkPainter; // Pink Painter item, meta = damage value + limePainter; // Lime Painter item, meta = damage value + yellowPainter; // Yellow Painter item, meta = damage value + cloudPainter; // Cloud Painter item, meta = damage value + magentaPainter; // Magenta Painter item, meta = damage value + orangePainter; // Orange Painter item, meta = damage value + whitePainter; // White Painter item, meta = damage value + + // explosives + related + dynamite; // Throwable Dynamite item, currently not meta sensitive + stickyDynamite; // Throwable Sticky Dynamite item, currently not meta sensitive + + remote; // Dynamite Remote item, currently not meta sensitive + + // misc intermediate recipe ingredients + electronicCircuit; // Electronic Circuit item, currently not meta sensitive + advancedCircuit; // Advanced Circuit item, currently not meta sensitive + + advancedAlloy; // Advanced Alloy item, currently not meta sensitive + + carbonFiber; // Raw Carbon Fiber item, currently not meta sensitive + carbonMesh; // Raw Carbon Mesh item, currently not meta sensitive + carbonPlate; // Carbon Plate item, currently not meta sensitive + + matter; // UUA item, currently not meta sensitive + iridiumOre; // Iridium Ore item, currently not meta sensitive + iridiumPlate; // Iridium Plate item, currently not meta sensitive + + + // Metal Plates + + platecopper; // Metal plate item, meta sensitive + platetin; // Metal plate item, meta sensitive + platebronze; // Metal plate item, meta sensitive + plategold; // Metal plate item, meta sensitive + plateiron; // Metal plate item, meta sensitive + platelead; // Metal plate item, meta sensitive + platelapi; // Metal plate item, meta sensitive + plateobsidian; // Metal plate item, meta sensitive + plateadviron; // Metal plate item, meta sensitive + + // Metal Dense Plates + denseplatecopper; // Metal dense plate item, meta sensitive + denseplatetin; // Metal dense plate item, meta sensitive + denseplatebronze; // Metal dense plate item, meta sensitive + denseplategold; // Metal dense plate item, meta sensitive + denseplateiron; // Metal dense plate item, meta sensitive + @Deprecated + denseplateadviron; // Metal dense plate item, meta sensitive + denseplatelead; // Metal dense plate item, meta sensitive + denseplatelapi; // Metal dense plate item, meta sensitive + denseplateobsidian; // Metal dense plate item, meta sensitive + + + + // upgrade modules + overclockerUpgrade; // overclocker upgrade item, meta sensitive + transformerUpgrade; // transformer upgrade item, meta sensitive + energyStorageUpgrade; // energy storage upgrade item, meta sensitive + ejectorUpgrade; // ejector upgrade item, meta sensitive + + // misc + coin; // Coin item, currently not meta sensitive + reinforcedDoor; // Reinforced Door item, currently not meta sensitive + constructionFoamPowder; // Construction Foam Powder item, currently not meta sensitive + grinPowder; // Poisonous ingrident, currently not meta sensitive + debug; // Debug item, currently not meta sensitive + boatCarbon; // Carbon Fiber Canoe item, meta sensitive + boatRubber; // Rubber Dinghy item, meta sensitive + boatRubberBroken; // Damaged Rubber Dinghy item, meta sensitive + boatElectric; // Electric Boat item, meta sensitive + + //Agriculture + cropSeed; // Crop seeds, stuff stored in NBT, don't use for crafting recipes! + cropnalyzer; // Cropnalyzer handheld device + fertilizer; // Basic IC2Item, used to provide nutrients toCropBlocks + hydratingCell; // Cell used to hydrate Crops, meta = Content, 0= Full, 9999 = Near empty + electricHoe; // Electric Hoe, Metadata indicates charge level + terraWart; // Mystic opposite of NEtherWart, cures StatusEffects, simply consumeable + weedEx; // Spraying can of WEED-EX, meta indicates usages left + + //Boozeception + mugEmpty; // Simple stone mug + coffeeBeans; // Harvested CoffeeBeans + coffeePowder; // Processed Coffee Beans, used to craft drinkable Coffee + mugCoffee; // Mug of Coffee, Meta indicates status 0 = cold, 1 = Normal, 2 = Sugar'd + hops; // Hops, harvested freshly from crop + barrel; // Carried Barrel, metadata encrypts the information about the liquid inside + blockBarrel; // Unobtainable "placed barrel", TileEntity controlling the Fermentation process + mugBooze; // Mug filled with booze, metadata encrypts the information about the liquid inside + + */ + + /** + * Get the base IC2 package name, used internally. + * + * @return IC2 package name, if unable to be determined defaults to ic2 + */ + private static String getPackage () + { + Package pkg = Items.class.getPackage(); + + if (pkg != null) + { + String packageName = pkg.getName(); + + return packageName.substring(0, packageName.length() - ".api.item".length()); + } + + return "ic2"; + } + + private static Class Ic2Items; } - diff --git a/src/mcp/mobius/waila/api/IWailaBlock.java b/src/mcp/mobius/waila/api/IWailaBlock.java index d7c5bda2..fd7a3db6 100644 --- a/src/mcp/mobius/waila/api/IWailaBlock.java +++ b/src/mcp/mobius/waila/api/IWailaBlock.java @@ -9,29 +9,31 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public interface IWailaBlock { - /* - * Use this method to return an item stack in case the default lookup system fails. - * Return null if you want to use the default lookup system. - * You get the world, the player and the location of the block. With that, it is easy to gather information & tile entities - */ - ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config); - - /* Waila HUD is divided into 3 zones. The head corresponds to the item name, - * body to where you mostly want to put informations, and I reserve the tail for modname display - */ - - /* Those 2 methods works exactly the same way, except they are related to a different zone in Waila HUD. - * You get in input world, player and the block location. You also get the itemstack as returned by the default lookup system or getWailaStack(). - * ConfigHandler provides the current Waila config state so you can show/hide elements depending on the configuration. Refer the ConfigHandler class for more info. - * currenttip represents the current list of text lines in the tooltip zone. - * For example, getWailaHead() will have the current item name as currenttip. - * You can modify the tips, add more, remove some, etc. - * When you are done, just returns the currenttip and it will display in Waila. - * - * Always return the currenttip is you don't want to modify the current zone. - */ - - List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config); - List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config); +public interface IWailaBlock +{ + /* + * Use this method to return an item stack in case the default lookup system fails. + * Return null if you want to use the default lookup system. + * You get the world, the player and the location of the block. With that, it is easy to gather information & tile entities + */ + ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config); + + /* Waila HUD is divided into 3 zones. The head corresponds to the item name, + * body to where you mostly want to put informations, and I reserve the tail for modname display + */ + + /* Those 2 methods works exactly the same way, except they are related to a different zone in Waila HUD. + * You get in input world, player and the block location. You also get the itemstack as returned by the default lookup system or getWailaStack(). + * ConfigHandler provides the current Waila config state so you can show/hide elements depending on the configuration. Refer the ConfigHandler class for more info. + * currenttip represents the current list of text lines in the tooltip zone. + * For example, getWailaHead() will have the current item name as currenttip. + * You can modify the tips, add more, remove some, etc. + * When you are done, just returns the currenttip and it will display in Waila. + * + * Always return the currenttip is you don't want to modify the current zone. + */ + + List getWailaHead (ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config); + + List getWailaBody (ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config); } diff --git a/src/mcp/mobius/waila/api/IWailaConfigHandler.java b/src/mcp/mobius/waila/api/IWailaConfigHandler.java index 00837e3d..4c345e87 100644 --- a/src/mcp/mobius/waila/api/IWailaConfigHandler.java +++ b/src/mcp/mobius/waila/api/IWailaConfigHandler.java @@ -3,24 +3,25 @@ package mcp.mobius.waila.api; import java.util.HashMap; import java.util.Set; -public interface IWailaConfigHandler { - /* Returns a set of all the currently loaded modules in the config handler */ - public Set getModuleNames(); - - /* Returns all the currently available options for a given module */ - public HashMap getConfigKeys(String modName); - - /* Add a new option to a given module - * - * modName is the name of the module to add the option to (ie : Buildcraft, IndustrialCraft2, etc) - * key is the config key (ie : bc.tankcontent, ic2.inputvalue) - * name is the human readable name of the option (ie : "Tank content", "Max EU Input") - * */ - //public void addConfig(String modName, String key, String name); - - /* Returns the current value of an option (true/false) with a default value defvalue if not set*/ - public boolean getConfig(String key, boolean defvalue); - - /* Returns the current value of an option (true/false) with a default value true if not set*/ - public boolean getConfig(String key); +public interface IWailaConfigHandler +{ + /* Returns a set of all the currently loaded modules in the config handler */ + public Set getModuleNames (); + + /* Returns all the currently available options for a given module */ + public HashMap getConfigKeys (String modName); + + /* Add a new option to a given module + * + * modName is the name of the module to add the option to (ie : Buildcraft, IndustrialCraft2, etc) + * key is the config key (ie : bc.tankcontent, ic2.inputvalue) + * name is the human readable name of the option (ie : "Tank content", "Max EU Input") + * */ + //public void addConfig(String modName, String key, String name); + + /* Returns the current value of an option (true/false) with a default value defvalue if not set*/ + public boolean getConfig (String key, boolean defvalue); + + /* Returns the current value of an option (true/false) with a default value true if not set*/ + public boolean getConfig (String key); } diff --git a/src/mcp/mobius/waila/api/IWailaDataAccessor.java b/src/mcp/mobius/waila/api/IWailaDataAccessor.java index 417a7382..0f30baff 100644 --- a/src/mcp/mobius/waila/api/IWailaDataAccessor.java +++ b/src/mcp/mobius/waila/api/IWailaDataAccessor.java @@ -10,14 +10,23 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -public interface IWailaDataAccessor { - World getWorld(); - EntityPlayer getPlayer(); - Block getBlock(); - int getBlockID(); - int getMetadata(); - TileEntity getTileEntity(); - MovingObjectPosition getPosition(); - NBTTagCompound getNBTData(); - int getNBTInteger(NBTTagCompound tag, String keyname); +public interface IWailaDataAccessor +{ + World getWorld (); + + EntityPlayer getPlayer (); + + Block getBlock (); + + int getBlockID (); + + int getMetadata (); + + TileEntity getTileEntity (); + + MovingObjectPosition getPosition (); + + NBTTagCompound getNBTData (); + + int getNBTInteger (NBTTagCompound tag, String keyname); } diff --git a/src/mcp/mobius/waila/api/IWailaDataProvider.java b/src/mcp/mobius/waila/api/IWailaDataProvider.java index 3f73e564..80e15117 100644 --- a/src/mcp/mobius/waila/api/IWailaDataProvider.java +++ b/src/mcp/mobius/waila/api/IWailaDataProvider.java @@ -1,4 +1,5 @@ package mcp.mobius.waila.api; -public interface IWailaDataProvider extends IWailaBlock{ +public interface IWailaDataProvider extends IWailaBlock +{ } diff --git a/src/mcp/mobius/waila/api/IWailaRegistrar.java b/src/mcp/mobius/waila/api/IWailaRegistrar.java index 744e67f1..321d6cfa 100644 --- a/src/mcp/mobius/waila/api/IWailaRegistrar.java +++ b/src/mcp/mobius/waila/api/IWailaRegistrar.java @@ -1,19 +1,22 @@ package mcp.mobius.waila.api; -public interface IWailaRegistrar { - /* Add a config option in the section modname with displayed text configtext and access key keyname */ - public void addConfig(String modname, String keyname, String configtext); - public void addConfigRemote(String modname, String keyname, String configtext); - - /* Register a IWailaDataProvider for the given blockID, either for the Head section or the Body section */ - public void registerHeadProvider (IWailaDataProvider dataProvider, int blockID); - public void registerBodyProvider (IWailaDataProvider dataProvider, int blockID); - - /* Register a stack overrider for the given blockID */ - public void registerStackProvider(IWailaDataProvider dataProvider, int blockID); - - - /* Same thing, but works on a class hierarchy instead */ - public void registerHeadProvider (IWailaDataProvider dataProvider, Class block); - public void registerBodyProvider (IWailaDataProvider dataProvider, Class block); +public interface IWailaRegistrar +{ + /* Add a config option in the section modname with displayed text configtext and access key keyname */ + public void addConfig (String modname, String keyname, String configtext); + + public void addConfigRemote (String modname, String keyname, String configtext); + + /* Register a IWailaDataProvider for the given blockID, either for the Head section or the Body section */ + public void registerHeadProvider (IWailaDataProvider dataProvider, int blockID); + + public void registerBodyProvider (IWailaDataProvider dataProvider, int blockID); + + /* Register a stack overrider for the given blockID */ + public void registerStackProvider (IWailaDataProvider dataProvider, int blockID); + + /* Same thing, but works on a class hierarchy instead */ + public void registerHeadProvider (IWailaDataProvider dataProvider, Class block); + + public void registerBodyProvider (IWailaDataProvider dataProvider, Class block); } diff --git a/src/powercrystals/minefactoryreloaded/api/FactoryRegistry.java b/src/powercrystals/minefactoryreloaded/api/FactoryRegistry.java index 7e2a910e..95ce0f2f 100644 --- a/src/powercrystals/minefactoryreloaded/api/FactoryRegistry.java +++ b/src/powercrystals/minefactoryreloaded/api/FactoryRegistry.java @@ -18,481 +18,480 @@ import net.minecraft.item.ItemStack; */ public class FactoryRegistry { - /** - * Registers a plantable object with the Planter. - * - * @param plantable The thing to plant. - */ - public static void registerPlantable(IFactoryPlantable plantable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerPlantable", IFactoryPlantable.class); - reg.invoke(registry, plantable); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a plantable object with the Planter. + * + * @param plantable The thing to plant. + */ + public static void registerPlantable (IFactoryPlantable plantable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerPlantable", IFactoryPlantable.class); + reg.invoke(registry, plantable); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a harvestable block with the Harvester. - * - * @param harvestable The thing to harvest. - */ - public static void registerHarvestable(IFactoryHarvestable harvestable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerHarvestable", IFactoryHarvestable.class); - reg.invoke(registry, harvestable); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a harvestable block with the Harvester. + * + * @param harvestable The thing to harvest. + */ + public static void registerHarvestable (IFactoryHarvestable harvestable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerHarvestable", IFactoryHarvestable.class); + reg.invoke(registry, harvestable); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a fertilizable block with the Fertilizer. - * - * @param fertilizable The thing to fertilize. - */ - public static void registerFertilizable(IFactoryFertilizable fertilizable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerFertilizable", IFactoryFertilizable.class); - reg.invoke(registry, fertilizable); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a fertilizable block with the Fertilizer. + * + * @param fertilizable The thing to fertilize. + */ + public static void registerFertilizable (IFactoryFertilizable fertilizable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerFertilizable", IFactoryFertilizable.class); + reg.invoke(registry, fertilizable); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a fertilizer item Fertilizer. - * - * @param fertilizable The thing to fertilize with. - */ - public static void registerFertilizer(IFactoryFertilizer fertilizer) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerFertilizer", IFactoryFertilizer.class); - reg.invoke(registry, fertilizer); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a fertilizer item Fertilizer. + * + * @param fertilizable The thing to fertilize with. + */ + public static void registerFertilizer (IFactoryFertilizer fertilizer) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerFertilizer", IFactoryFertilizer.class); + reg.invoke(registry, fertilizer); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a ranchable entity with the Rancher. - * - * @param ranchable The entity to ranch. - */ - public static void registerRanchable(IFactoryRanchable ranchable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerRanchable", IFactoryRanchable.class); - reg.invoke(registry, ranchable); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } - - /** - * Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable" - * on MC 1.6. - * - * @param grindable The entity to grind. - */ - public static void registerGrindable(IFactoryGrindable grindable) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerGrindable", IFactoryGrindable.class); - reg.invoke(registry, grindable); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } - - /** - * Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable" - * on MC 1.6. - * - * @param grindable The entity to grind. - */ - public static void registerGrinderBlacklist(Class ...ungrindables) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerGrinderBlacklist", Class[].class); - reg.invoke(registry, (Object[])ungrindables); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a ranchable entity with the Rancher. + * + * @param ranchable The entity to ranch. + */ + public static void registerRanchable (IFactoryRanchable ranchable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerRanchable", IFactoryRanchable.class); + reg.invoke(registry, ranchable); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a possible output with the sludge boiler. - * - * @param weight Likelihood that this item will be produced. Lower means rarer. - * @param drop The thing being produced by the sludge boiler. - */ - public static void registerSludgeDrop(int weight, ItemStack drop) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerSludgeDrop", int.class, ItemStack.class); - reg.invoke(registry, weight, drop); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable" + * on MC 1.6. + * + * @param grindable The entity to grind. + */ + public static void registerGrindable (IFactoryGrindable grindable) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerGrindable", IFactoryGrindable.class); + reg.invoke(registry, grindable); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers specific food to use in the Breeder (instead of wheat) for a given mob. - * - * @param entityToBreed Entity this food will be used with. - * @param food The item to use when breeding this entity. - */ - public static void registerBreederFood(Class entityToBreed, ItemStack food) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerBreederFood", Class.class, ItemStack.class); - reg.invoke(registry, entityToBreed, food); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a grindable entity with the Grinder using the new grinder interface. This method will be renamed to the standard "registerGrindable" + * on MC 1.6. + * + * @param grindable The entity to grind. + */ + public static void registerGrinderBlacklist (Class... ungrindables) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerGrinderBlacklist", Class[].class); + reg.invoke(registry, (Object[]) ungrindables); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Bans an entity class from being collected by Safari Nets - * - * @param blacklistedEntity Class to blacklist - */ - public static void registerSafariNetBlacklist(Class blacklistedEntity) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerSafariNetBlacklist", Class.class); - reg.invoke(registry, blacklistedEntity); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a possible output with the sludge boiler. + * + * @param weight Likelihood that this item will be produced. Lower means rarer. + * @param drop The thing being produced by the sludge boiler. + */ + public static void registerSludgeDrop (int weight, ItemStack drop) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerSludgeDrop", int.class, ItemStack.class); + reg.invoke(registry, weight, drop); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a Safari Net handler to properly serialize a type of mob. - * - * @param handler The Safari Net handler. - */ - public static void registerSafariNetHandler(ISafariNetHandler handler) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerSafariNetHandler", ISafariNetHandler.class); - reg.invoke(registry, handler); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers specific food to use in the Breeder (instead of wheat) for a given mob. + * + * @param entityToBreed Entity this food will be used with. + * @param food The item to use when breeding this entity. + */ + public static void registerBreederFood (Class entityToBreed, ItemStack food) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerBreederFood", Class.class, ItemStack.class); + reg.invoke(registry, entityToBreed, food); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + /** + * Bans an entity class from being collected by Safari Nets + * + * @param blacklistedEntity Class to blacklist + */ + public static void registerSafariNetBlacklist (Class blacklistedEntity) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerSafariNetBlacklist", Class.class); + reg.invoke(registry, blacklistedEntity); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a mob egg handler, which allows the Safari Net to properly change colors. - * - * @param handler The mob egg handler - */ - public static void registerMobEggHandler(IMobEggHandler handler) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerMobEggHandler", IMobEggHandler.class); - reg.invoke(registry, handler); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a Safari Net handler to properly serialize a type of mob. + * + * @param handler The Safari Net handler. + */ + public static void registerSafariNetHandler (ISafariNetHandler handler) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerSafariNetHandler", ISafariNetHandler.class); + reg.invoke(registry, handler); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Allows Rubber Trees to spawn in the specified biome. - * - * @param biome The biome name. - */ - public static void registerRubberTreeBiome(String biome) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerRubberTreeBiome", String.class); - reg.invoke(registry, biome); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a mob egg handler, which allows the Safari Net to properly change colors. + * + * @param handler The mob egg handler + */ + public static void registerMobEggHandler (IMobEggHandler handler) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerMobEggHandler", IMobEggHandler.class); + reg.invoke(registry, handler); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers an entity as a possible output from villager random safari nets. Note that the "id" field must be initialized - * (i.e. with Entity.addEntityID()) for it to work correctly. - * - * @param savedMob A serialized mob that will be unloaded by the safari net - * @param weight The weight of this mob in the random selection - */ - public static void registerVillagerTradeMob(IRandomMobProvider mobProvider) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerVillagerTradeMob", IRandomMobProvider.class); - reg.invoke(registry, mobProvider); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Allows Rubber Trees to spawn in the specified biome. + * + * @param biome The biome name. + */ + public static void registerRubberTreeBiome (String biome) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerRubberTreeBiome", String.class); + reg.invoke(registry, biome); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a handler for drinking liquids with the straw. - * - * @param liquidId The block ID the handler handles. - * @param liquidDrinkHandler The drink handler instance. - */ - public static void registerLiquidDrinkHandler(int liquidId, ILiquidDrinkHandler liquidDrinkHandler) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerLiquidDrinkHandler", int.class, ILiquidDrinkHandler.class); - reg.invoke(registry, liquidId, liquidDrinkHandler); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers an entity as a possible output from villager random safari nets. Note that the "id" field must be initialized + * (i.e. with Entity.addEntityID()) for it to work correctly. + * + * @param savedMob A serialized mob that will be unloaded by the safari net + * @param weight The weight of this mob in the random selection + */ + public static void registerVillagerTradeMob (IRandomMobProvider mobProvider) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerVillagerTradeMob", IRandomMobProvider.class); + reg.invoke(registry, mobProvider); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a possible output with the laser drill. - * - * @param weight Likelihood that this item will be produced. Lower means rarer. - * @param drop The thing being produced by the laser drill. - */ - public static void registerLaserOre(int weight, ItemStack drop) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerLaserOre", int.class, ItemStack.class); - reg.invoke(registry, weight, drop); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } - - /** - * Registers a preferred ore with the laser drill. Focuses with the specified color will make the specified ore more likely. - * Used by MFR itself for vanilla: Black (Coal), Light Blue (Diamond), Lime (Emerald), Yellow (Gold), Brown (Iron), Blue (Lapis), - * Red (Redstone), and White (nether quartz). - * - * This will replace setLaserPreferredOre on MC 1.6. - * - * @param color The color that the preferred ore is being set for. White is 0. - * @param ore The ore that will be preferred by the drill when a focus with the specified color is present. - */ - public static void addLaserPreferredOre(int color, ItemStack ore) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("addLaserPreferredOre", int.class, ItemStack.class); - reg.invoke(registry, color, ore); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } - - /** - * Registers a block ID as a fruit tree log. When the Fruit Picker sees this block on the ground, it will - * begin a search in tree mode for any fruit nearby. - * - * @param fruitLogBlockId The block ID to mark as a fruit tree log. - */ - public static void registerFruitLogBlockId(Integer fruitLogBlockId) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerFruitLogBlockId", Integer.class); - reg.invoke(registry, fruitLogBlockId); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a handler for drinking liquids with the straw. + * + * @param liquidId The block ID the handler handles. + * @param liquidDrinkHandler The drink handler instance. + */ + public static void registerLiquidDrinkHandler (int liquidId, ILiquidDrinkHandler liquidDrinkHandler) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerLiquidDrinkHandler", int.class, ILiquidDrinkHandler.class); + reg.invoke(registry, liquidId, liquidDrinkHandler); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers a fruit for the Fruit Picker. - * - * @param fruit The fruit to be picked. - */ - public static void registerFruit(IFactoryFruit fruit) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerFruit", IFactoryFruit.class); - reg.invoke(registry, fruit); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a possible output with the laser drill. + * + * @param weight Likelihood that this item will be produced. Lower means rarer. + * @param drop The thing being produced by the laser drill. + */ + public static void registerLaserOre (int weight, ItemStack drop) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerLaserOre", int.class, ItemStack.class); + reg.invoke(registry, weight, drop); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers an entity string as an invalid entry for the autospawner. - * See also: {@link net.minecraft.entity.EntityList}'s classToStringMapping and stringToClassMapping. - * - * @param entityString The entity string to blacklist. - */ - public static void registerAutoSpawnerBlacklist(String entityString) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerAutoSpawnerBlacklist", String.class); - reg.invoke(registry, entityString); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a preferred ore with the laser drill. Focuses with the specified color will make the specified ore more likely. + * Used by MFR itself for vanilla: Black (Coal), Light Blue (Diamond), Lime (Emerald), Yellow (Gold), Brown (Iron), Blue (Lapis), + * Red (Redstone), and White (nether quartz). + * + * This will replace setLaserPreferredOre on MC 1.6. + * + * @param color The color that the preferred ore is being set for. White is 0. + * @param ore The ore that will be preferred by the drill when a focus with the specified color is present. + */ + public static void addLaserPreferredOre (int color, ItemStack ore) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("addLaserPreferredOre", int.class, ItemStack.class); + reg.invoke(registry, color, ore); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } - /** - * Registers logic circuit to be usable in the Programmable RedNet Controller. - * - * @param circuit The circuit to be registered. - */ - public static void registerRedNetLogicCircuit(IRedNetLogicCircuit circuit) - { - try - { - Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); - if(registry != null) - { - Method reg = registry.getMethod("registerRedNetLogicCircuit", IRedNetLogicCircuit.class); - reg.invoke(registry, circuit); - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } + /** + * Registers a block ID as a fruit tree log. When the Fruit Picker sees this block on the ground, it will + * begin a search in tree mode for any fruit nearby. + * + * @param fruitLogBlockId The block ID to mark as a fruit tree log. + */ + public static void registerFruitLogBlockId (Integer fruitLogBlockId) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerFruitLogBlockId", Integer.class); + reg.invoke(registry, fruitLogBlockId); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + /** + * Registers a fruit for the Fruit Picker. + * + * @param fruit The fruit to be picked. + */ + public static void registerFruit (IFactoryFruit fruit) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerFruit", IFactoryFruit.class); + reg.invoke(registry, fruit); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + /** + * Registers an entity string as an invalid entry for the autospawner. + * See also: {@link net.minecraft.entity.EntityList}'s classToStringMapping and stringToClassMapping. + * + * @param entityString The entity string to blacklist. + */ + public static void registerAutoSpawnerBlacklist (String entityString) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerAutoSpawnerBlacklist", String.class); + reg.invoke(registry, entityString); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + /** + * Registers logic circuit to be usable in the Programmable RedNet Controller. + * + * @param circuit The circuit to be registered. + */ + public static void registerRedNetLogicCircuit (IRedNetLogicCircuit circuit) + { + try + { + Class registry = Class.forName("powercrystals.minefactoryreloaded.MFRRegistry"); + if (registry != null) + { + Method reg = registry.getMethod("registerRedNetLogicCircuit", IRedNetLogicCircuit.class); + reg.invoke(registry, circuit); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } } diff --git a/src/powercrystals/minefactoryreloaded/api/FertilizerType.java b/src/powercrystals/minefactoryreloaded/api/FertilizerType.java index 15e8bfb3..7d4f5be5 100644 --- a/src/powercrystals/minefactoryreloaded/api/FertilizerType.java +++ b/src/powercrystals/minefactoryreloaded/api/FertilizerType.java @@ -8,16 +8,16 @@ package powercrystals.minefactoryreloaded.api; */ public enum FertilizerType { - /** - * The fertilizer will fertilize grass. - */ - Grass, - /** - * The fertilizer will grow a plant. - */ - GrowPlant, - /** - * The fertilizer will grow magical crops. - */ - GrowMagicalCrop, + /** + * The fertilizer will fertilize grass. + */ + Grass, + /** + * The fertilizer will grow a plant. + */ + GrowPlant, + /** + * The fertilizer will grow magical crops. + */ + GrowMagicalCrop, } \ No newline at end of file diff --git a/src/powercrystals/minefactoryreloaded/api/HarvestType.java b/src/powercrystals/minefactoryreloaded/api/HarvestType.java index 1552eb57..02f92eb3 100644 --- a/src/powercrystals/minefactoryreloaded/api/HarvestType.java +++ b/src/powercrystals/minefactoryreloaded/api/HarvestType.java @@ -7,28 +7,28 @@ package powercrystals.minefactoryreloaded.api; */ public enum HarvestType { - /** - * Just break the single block - no special action needed. Carrots, flowers, etc. - */ - Normal, - /** - * Search for identical blocks above. - */ - Column, - /** - * Search for identical blocks above but leave this bottom one for the future. Cactus and sugarcane. - */ - LeaveBottom, - /** - * This block is the base of a tree and the harvester should enter tree-cutting mode. - */ - Tree, - /** - * This block is the base of the tree and the harvester should enter tree-cutting mode, but the tree grows upside-down. - */ - TreeFlipped, - /** - * This block is part of a tree as above, but leaves are cut before tree logs so that leaves do not decay more than necessary. - */ - TreeLeaf + /** + * Just break the single block - no special action needed. Carrots, flowers, etc. + */ + Normal, + /** + * Search for identical blocks above. + */ + Column, + /** + * Search for identical blocks above but leave this bottom one for the future. Cactus and sugarcane. + */ + LeaveBottom, + /** + * This block is the base of a tree and the harvester should enter tree-cutting mode. + */ + Tree, + /** + * This block is the base of the tree and the harvester should enter tree-cutting mode, but the tree grows upside-down. + */ + TreeFlipped, + /** + * This block is part of a tree as above, but leaves are cut before tree logs so that leaves do not decay more than necessary. + */ + TreeLeaf } diff --git a/src/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java b/src/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java index 02d36fae..d7039908 100644 --- a/src/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java +++ b/src/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java @@ -4,23 +4,23 @@ import net.minecraft.item.ItemStack; public interface IDeepStorageUnit { - /** - * @return A populated ItemStack with stackSize for the full amount of materials in the DSU. May have a stackSize > getMaxStackSize(). - */ - ItemStack getStoredItemType(); - - /** - * Sets the total amount of the item currently being stored, or zero if it wants to remove all items. - */ - void setStoredItemCount(int amount); - - /** - * Sets the type of the stored item and initializes the number of stored items to amount. Will overwrite any existing stored items. - */ - void setStoredItemType(ItemStack type, int amount); - - /** - * @return The maximum number of items the DSU can hold. - */ - int getMaxStoredCount(); + /** + * @return A populated ItemStack with stackSize for the full amount of materials in the DSU. May have a stackSize > getMaxStackSize(). + */ + ItemStack getStoredItemType (); + + /** + * Sets the total amount of the item currently being stored, or zero if it wants to remove all items. + */ + void setStoredItemCount (int amount); + + /** + * Sets the type of the stored item and initializes the number of stored items to amount. Will overwrite any existing stored items. + */ + void setStoredItemType (ItemStack type, int amount); + + /** + * @return The maximum number of items the DSU can hold. + */ + int getMaxStoredCount (); } diff --git a/src/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java b/src/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java index 1374d597..f5408bf7 100644 --- a/src/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java +++ b/src/powercrystals/minefactoryreloaded/api/IFactoryFertilizable.java @@ -12,29 +12,29 @@ import net.minecraft.world.World; */ public interface IFactoryFertilizable { - /** - * @return The block ID this instance is managing. - */ - public int getFertilizableBlockId(); - - /** - * @param world The world this block belongs to. - * @param x The X coordinate of this block. - * @param y The Y coordinate of this block. - * @param z The Z coordinate of this block. - * @param fertilizerType The kind of fertilizer being used. - * @return True if the block at (x,y,z) can be fertilized with the given type of fertilizer. - */ - public boolean canFertilizeBlock(World world, int x, int y, int z, FertilizerType fertilizerType); - - /** - * @param world The world this block belongs to. - * @param rand A Random instance to use when fertilizing, if necessary. - * @param x The X coordinate of this block. - * @param y The Y coordinate of this block. - * @param z The Z coordinate of this block. - * @param fertilizerType The kind of fertilizer being used. - * @return True if fertilization was successful. If false, the Fertilizer will not consume a fertilizer item and will not drain power. - */ - public boolean fertilize(World world, Random rand, int x, int y, int z, FertilizerType fertilizerType); + /** + * @return The block ID this instance is managing. + */ + public int getFertilizableBlockId (); + + /** + * @param world The world this block belongs to. + * @param x The X coordinate of this block. + * @param y The Y coordinate of this block. + * @param z The Z coordinate of this block. + * @param fertilizerType The kind of fertilizer being used. + * @return True if the block at (x,y,z) can be fertilized with the given type of fertilizer. + */ + public boolean canFertilizeBlock (World world, int x, int y, int z, FertilizerType fertilizerType); + + /** + * @param world The world this block belongs to. + * @param rand A Random instance to use when fertilizing, if necessary. + * @param x The X coordinate of this block. + * @param y The Y coordinate of this block. + * @param z The Z coordinate of this block. + * @param fertilizerType The kind of fertilizer being used. + * @return True if fertilization was successful. If false, the Fertilizer will not consume a fertilizer item and will not drain power. + */ + public boolean fertilize (World world, Random rand, int x, int y, int z, FertilizerType fertilizerType); } diff --git a/src/powercrystals/minefactoryreloaded/api/IFactoryFertilizer.java b/src/powercrystals/minefactoryreloaded/api/IFactoryFertilizer.java index 08589c12..2f673b80 100644 --- a/src/powercrystals/minefactoryreloaded/api/IFactoryFertilizer.java +++ b/src/powercrystals/minefactoryreloaded/api/IFactoryFertilizer.java @@ -9,25 +9,25 @@ import net.minecraft.item.ItemStack; */ public interface IFactoryFertilizer { - /** - * @return The ID of this fertilizer item. - */ - int getFertilizerId(); - - /** - * @return The metadata of this fertilizer item. - */ - int getFertilizerMeta(); - - /** - * @return The type of fertilizer this is. - */ - FertilizerType getFertilizerType(); - - /** - * Called when a fertilization is successful. If you set the ItemStack size to 0, it will be deleted by the fertilizer. - * - * @param fertilizer The ItemStack used to fertilize. - */ - void consume(ItemStack fertilizer); + /** + * @return The ID of this fertilizer item. + */ + int getFertilizerId (); + + /** + * @return The metadata of this fertilizer item. + */ + int getFertilizerMeta (); + + /** + * @return The type of fertilizer this is. + */ + FertilizerType getFertilizerType (); + + /** + * Called when a fertilization is successful. If you set the ItemStack size to 0, it will be deleted by the fertilizer. + * + * @param fertilizer The ItemStack used to fertilize. + */ + void consume (ItemStack fertilizer); } diff --git a/src/powercrystals/minefactoryreloaded/api/IFactoryFruit.java b/src/powercrystals/minefactoryreloaded/api/IFactoryFruit.java index 65ed9f96..256c7733 100644 --- a/src/powercrystals/minefactoryreloaded/api/IFactoryFruit.java +++ b/src/powercrystals/minefactoryreloaded/api/IFactoryFruit.java @@ -14,56 +14,56 @@ import net.minecraft.world.World; */ public interface IFactoryFruit { - /** - * @return The block ID this fruit has in the world. - */ - public int getSourceBlockId(); - - /** - * Used to determine if this fruit can be picked (is it ripe yet, etc) - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - * @return True if the fruit can be picked - */ - public boolean canBePicked(World world, int x, int y, int z); - - /** - * Called by the Fruit Picker to determine what block to replace the picked block with. Only ID and meta/damage will be used. - * At the time this method is called, the fruit still exists. Do not pass an item ID as the return value. - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - * @return The block to replace the fruit block with, or null for air. - */ - public ItemStack getReplacementBlock(World world, int x, int y, int z); - - /** - * Called by the Fruit Picker before the fruit is picked. - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - */ - public void prePick(World world, int x, int y, int z); - - /** - * Called by the Fruit Picker to determine what drops to generate. At the time this method is called, the fruit still exists. - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - */ - public List getDrops(World world, Random rand, int x, int y, int z); - - /** - * Called by the Fruit Picker after the fruit is picked. - * @param world The world where the fruit is being picked - * @param x The x-coordinate of the fruit - * @param y The y-coordinate of the fruit - * @param z The z-coordinate of the fruit - */ - public void postPick(World world, int x, int y, int z); + /** + * @return The block ID this fruit has in the world. + */ + public int getSourceBlockId (); + + /** + * Used to determine if this fruit can be picked (is it ripe yet, etc) + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + * @return True if the fruit can be picked + */ + public boolean canBePicked (World world, int x, int y, int z); + + /** + * Called by the Fruit Picker to determine what block to replace the picked block with. Only ID and meta/damage will be used. + * At the time this method is called, the fruit still exists. Do not pass an item ID as the return value. + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + * @return The block to replace the fruit block with, or null for air. + */ + public ItemStack getReplacementBlock (World world, int x, int y, int z); + + /** + * Called by the Fruit Picker before the fruit is picked. + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + */ + public void prePick (World world, int x, int y, int z); + + /** + * Called by the Fruit Picker to determine what drops to generate. At the time this method is called, the fruit still exists. + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + */ + public List getDrops (World world, Random rand, int x, int y, int z); + + /** + * Called by the Fruit Picker after the fruit is picked. + * @param world The world where the fruit is being picked + * @param x The x-coordinate of the fruit + * @param y The y-coordinate of the fruit + * @param z The z-coordinate of the fruit + */ + public void postPick (World world, int x, int y, int z); } diff --git a/src/powercrystals/minefactoryreloaded/api/IFactoryGrindable.java b/src/powercrystals/minefactoryreloaded/api/IFactoryGrindable.java index 88eef061..cefe9604 100644 --- a/src/powercrystals/minefactoryreloaded/api/IFactoryGrindable.java +++ b/src/powercrystals/minefactoryreloaded/api/IFactoryGrindable.java @@ -14,23 +14,23 @@ import net.minecraft.world.World; @SuppressWarnings("deprecation") public interface IFactoryGrindable { - /** - * @return The class that this grindable instance is handling. This must be a subtype of EntityLivingBase or the entity will never - * be noticed by the Grinder. - */ - public Class getGrindableEntity(); + /** + * @return The class that this grindable instance is handling. This must be a subtype of EntityLivingBase or the entity will never + * be noticed by the Grinder. + */ + public Class getGrindableEntity (); - /** - * @param world The world this entity is in. - * @param entity The entity instance being ground. - * @param random A Random instance. - * @return The drops generated when this entity is killed. - */ - public List grind(World world, EntityLivingBase entity, Random random); + /** + * @param world The world this entity is in. + * @param entity The entity instance being ground. + * @param random A Random instance. + * @return The drops generated when this entity is killed. + */ + public List grind (World world, EntityLivingBase entity, Random random); - /** - * @param entity The entity instance being ground. - * @return Whether this entity has been fully processed or not. - */ - public boolean processEntity(EntityLivingBase entity); + /** + * @param entity The entity instance being ground. + * @return Whether this entity has been fully processed or not. + */ + public boolean processEntity (EntityLivingBase entity); } diff --git a/src/powercrystals/minefactoryreloaded/api/IFactoryHarvestable.java b/src/powercrystals/minefactoryreloaded/api/IFactoryHarvestable.java index 63707375..39b8a86d 100644 --- a/src/powercrystals/minefactoryreloaded/api/IFactoryHarvestable.java +++ b/src/powercrystals/minefactoryreloaded/api/IFactoryHarvestable.java @@ -14,58 +14,57 @@ import net.minecraft.world.World; */ public interface IFactoryHarvestable { - /** - * @return The block ID this harvestable instance is managing. - */ - public int getPlantId(); - - /** - * @return The type of harvest the Harvester should perform on this block. - */ - public HarvestType getHarvestType(); - - - /** - * @return Whether or not the Harvester should break the block when harvesting. If false, no changes will be performed by the Harvester itself. - */ - public boolean breakBlock(); - - /** - * @param world The world this block is in. - * @param harvesterSettings The harvester's current settings. Do not modify these. - * @param x The X coordinate of the block being harvested. - * @param y The Y coordinate of the block being harvested. - * @param z The Z coordinate of the block being harvested. - * @return True if this block can be harvested. - */ - public boolean canBeHarvested(World world, Map harvesterSettings, int x, int y, int z); - - /** - * @param world The world this block is in. - * @param rand A Random instance to use when generating drops. - * @param harvesterSettings The harvester's current settings. Do not modify these. - * @param x The X coordinate of the block being harvested. - * @param y The Y coordinate of the block being harvested. - * @param z The Z coordinate of the block being harvested. - * @return The drops generated by breaking this block. For a default implementation, calling Block.getBlockDropped() is usually sufficient. - */ - public List getDrops(World world, Random rand, Map harvesterSettings, int x, int y, int z); - - /** - * Called before the block is going to be harvested. Usually empty. - * @param world The world this block is in. - * @param x The X coordinate of the block being harvested. - * @param y The Y coordinate of the block being harvested. - * @param z The Z coordinate of the block being harvested. - */ - public void preHarvest(World world, int x, int y, int z); - - /** - * Called after the block is going to be harvested. Used to re-till soil, for example. - * @param world The world this block is in. - * @param x The X coordinate of the block being harvested. - * @param y The Y coordinate of the block being harvested. - * @param z The Z coordinate of the block being harvested. - */ - public void postHarvest(World world, int x, int y, int z); + /** + * @return The block ID this harvestable instance is managing. + */ + public int getPlantId (); + + /** + * @return The type of harvest the Harvester should perform on this block. + */ + public HarvestType getHarvestType (); + + /** + * @return Whether or not the Harvester should break the block when harvesting. If false, no changes will be performed by the Harvester itself. + */ + public boolean breakBlock (); + + /** + * @param world The world this block is in. + * @param harvesterSettings The harvester's current settings. Do not modify these. + * @param x The X coordinate of the block being harvested. + * @param y The Y coordinate of the block being harvested. + * @param z The Z coordinate of the block being harvested. + * @return True if this block can be harvested. + */ + public boolean canBeHarvested (World world, Map harvesterSettings, int x, int y, int z); + + /** + * @param world The world this block is in. + * @param rand A Random instance to use when generating drops. + * @param harvesterSettings The harvester's current settings. Do not modify these. + * @param x The X coordinate of the block being harvested. + * @param y The Y coordinate of the block being harvested. + * @param z The Z coordinate of the block being harvested. + * @return The drops generated by breaking this block. For a default implementation, calling Block.getBlockDropped() is usually sufficient. + */ + public List getDrops (World world, Random rand, Map harvesterSettings, int x, int y, int z); + + /** + * Called before the block is going to be harvested. Usually empty. + * @param world The world this block is in. + * @param x The X coordinate of the block being harvested. + * @param y The Y coordinate of the block being harvested. + * @param z The Z coordinate of the block being harvested. + */ + public void preHarvest (World world, int x, int y, int z); + + /** + * Called after the block is going to be harvested. Used to re-till soil, for example. + * @param world The world this block is in. + * @param x The X coordinate of the block being harvested. + * @param y The Y coordinate of the block being harvested. + * @param z The Z coordinate of the block being harvested. + */ + public void postHarvest (World world, int x, int y, int z); } diff --git a/src/powercrystals/minefactoryreloaded/api/IFactoryPlantable.java b/src/powercrystals/minefactoryreloaded/api/IFactoryPlantable.java index 29bc7fbc..95453383 100644 --- a/src/powercrystals/minefactoryreloaded/api/IFactoryPlantable.java +++ b/src/powercrystals/minefactoryreloaded/api/IFactoryPlantable.java @@ -10,58 +10,58 @@ import net.minecraft.world.World; */ public interface IFactoryPlantable { - /** - * @return The block or item ID this plantable is managing. - */ - public int getSeedId(); - - /** - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - * @return The block ID that will be placed into the world. - */ - public int getPlantedBlockId(World world, int x, int y, int z, ItemStack stack); - - /** - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - * @return The block metadata that will be placed into the world. - */ - public int getPlantedBlockMetadata(World world, int x, int y, int z, ItemStack stack); - - /** - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - * @return True if this plantable can be placed at the provided coordinates. - */ - public boolean canBePlantedHere(World world, int x, int y, int z, ItemStack stack); - - /** - * Called before planting is performed. Used to till soil, for example. - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - */ - public void prePlant(World world, int x, int y, int z, ItemStack stack); - - /** - * Called after planting is performed. Usually empty. - * @param world The world instance this block or item will be placed into. - * @param x The destination X coordinate. - * @param y The destination Y coordinate. - * @param z The destination Z coordinate. - * @param stack The stack being planted. - */ - public void postPlant(World world, int x, int y, int z, ItemStack stack); + /** + * @return The block or item ID this plantable is managing. + */ + public int getSeedId (); + + /** + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + * @return The block ID that will be placed into the world. + */ + public int getPlantedBlockId (World world, int x, int y, int z, ItemStack stack); + + /** + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + * @return The block metadata that will be placed into the world. + */ + public int getPlantedBlockMetadata (World world, int x, int y, int z, ItemStack stack); + + /** + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + * @return True if this plantable can be placed at the provided coordinates. + */ + public boolean canBePlantedHere (World world, int x, int y, int z, ItemStack stack); + + /** + * Called before planting is performed. Used to till soil, for example. + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + */ + public void prePlant (World world, int x, int y, int z, ItemStack stack); + + /** + * Called after planting is performed. Usually empty. + * @param world The world instance this block or item will be placed into. + * @param x The destination X coordinate. + * @param y The destination Y coordinate. + * @param z The destination Z coordinate. + * @param stack The stack being planted. + */ + public void postPlant (World world, int x, int y, int z, ItemStack stack); } diff --git a/src/powercrystals/minefactoryreloaded/api/IFactoryRanchable.java b/src/powercrystals/minefactoryreloaded/api/IFactoryRanchable.java index 36327c53..00bc2be3 100644 --- a/src/powercrystals/minefactoryreloaded/api/IFactoryRanchable.java +++ b/src/powercrystals/minefactoryreloaded/api/IFactoryRanchable.java @@ -13,16 +13,16 @@ import net.minecraft.world.World; */ public interface IFactoryRanchable { - /** - * @return The entity being ranched. Must be a subtype of EntityLivingBase. - */ - public Class getRanchableEntity(); - - /** - * @param world The world this entity is in. - * @param entity The entity instance being ranched. - * @param rancher The rancher instance doing the ranching. Used to access the Rancher's inventory when milking cows, for example. - * @return A list of drops. - */ - public List ranch(World world, EntityLivingBase entity, IInventory rancher); + /** + * @return The entity being ranched. Must be a subtype of EntityLivingBase. + */ + public Class getRanchableEntity (); + + /** + * @param world The world this entity is in. + * @param entity The entity instance being ranched. + * @param rancher The rancher instance doing the ranching. Used to access the Rancher's inventory when milking cows, for example. + * @return A list of drops. + */ + public List ranch (World world, EntityLivingBase entity, IInventory rancher); } diff --git a/src/powercrystals/minefactoryreloaded/api/ILiquidDrinkHandler.java b/src/powercrystals/minefactoryreloaded/api/ILiquidDrinkHandler.java index 2ab4a586..04ddf78c 100644 --- a/src/powercrystals/minefactoryreloaded/api/ILiquidDrinkHandler.java +++ b/src/powercrystals/minefactoryreloaded/api/ILiquidDrinkHandler.java @@ -4,5 +4,5 @@ import net.minecraft.entity.player.EntityPlayer; public interface ILiquidDrinkHandler { - public void onDrink(EntityPlayer player); + public void onDrink (EntityPlayer player); } diff --git a/src/powercrystals/minefactoryreloaded/api/IMobEggHandler.java b/src/powercrystals/minefactoryreloaded/api/IMobEggHandler.java index a322f923..4d9d65ce 100644 --- a/src/powercrystals/minefactoryreloaded/api/IMobEggHandler.java +++ b/src/powercrystals/minefactoryreloaded/api/IMobEggHandler.java @@ -10,9 +10,9 @@ import net.minecraft.item.ItemStack; */ public interface IMobEggHandler { - /** - * @param safariNet The Safari Net that is looking for egg info. - * @return An EntityEggInfo, or null if this instance cannot handle this mob. - */ - public EntityEggInfo getEgg(ItemStack safariNet); + /** + * @param safariNet The Safari Net that is looking for egg info. + * @return An EntityEggInfo, or null if this instance cannot handle this mob. + */ + public EntityEggInfo getEgg (ItemStack safariNet); } diff --git a/src/powercrystals/minefactoryreloaded/api/INeedleAmmo.java b/src/powercrystals/minefactoryreloaded/api/INeedleAmmo.java index db061304..5a79b083 100644 --- a/src/powercrystals/minefactoryreloaded/api/INeedleAmmo.java +++ b/src/powercrystals/minefactoryreloaded/api/INeedleAmmo.java @@ -6,7 +6,9 @@ import net.minecraft.world.World; public interface INeedleAmmo { - public boolean onHitEntity(EntityPlayer owner, Entity hit, double distance); - public void onHitBlock(EntityPlayer owner, World world, int x, int y, int z, int side, double distance); - public float getSpread(); + public boolean onHitEntity (EntityPlayer owner, Entity hit, double distance); + + public void onHitBlock (EntityPlayer owner, World world, int x, int y, int z, int side, double distance); + + public float getSpread (); } diff --git a/src/powercrystals/minefactoryreloaded/api/IRandomMobProvider.java b/src/powercrystals/minefactoryreloaded/api/IRandomMobProvider.java index b03d6f08..7d499285 100644 --- a/src/powercrystals/minefactoryreloaded/api/IRandomMobProvider.java +++ b/src/powercrystals/minefactoryreloaded/api/IRandomMobProvider.java @@ -4,8 +4,7 @@ import java.util.List; import net.minecraft.world.World; - public interface IRandomMobProvider { - public List getRandomMobs(World world); + public List getRandomMobs (World world); } \ No newline at end of file diff --git a/src/powercrystals/minefactoryreloaded/api/ISafariNetHandler.java b/src/powercrystals/minefactoryreloaded/api/ISafariNetHandler.java index 37001795..cb9e5259 100644 --- a/src/powercrystals/minefactoryreloaded/api/ISafariNetHandler.java +++ b/src/powercrystals/minefactoryreloaded/api/ISafariNetHandler.java @@ -12,17 +12,17 @@ import net.minecraft.item.ItemStack; */ public interface ISafariNetHandler { - /** - * @return The class of mob that this handler applies to. - */ - public Class validFor(); - - /** - * @param safariNetStack The Safari Net that is requesting information. - * @param player The player holding the Safari Net. - * @param infoList The current list of information strings. Add yours to this. - * @param advancedTooltips True if the advanced tooltips option is on. - */ - @SuppressWarnings("rawtypes") - public void addInformation(ItemStack safariNetStack, EntityPlayer player, List infoList, boolean advancedTooltips); + /** + * @return The class of mob that this handler applies to. + */ + public Class validFor (); + + /** + * @param safariNetStack The Safari Net that is requesting information. + * @param player The player holding the Safari Net. + * @param infoList The current list of information strings. Add yours to this. + * @param advancedTooltips True if the advanced tooltips option is on. + */ + @SuppressWarnings("rawtypes") + public void addInformation (ItemStack safariNetStack, EntityPlayer player, List infoList, boolean advancedTooltips); } diff --git a/src/powercrystals/minefactoryreloaded/api/ISyringe.java b/src/powercrystals/minefactoryreloaded/api/ISyringe.java index 75cff08d..289eb3b9 100644 --- a/src/powercrystals/minefactoryreloaded/api/ISyringe.java +++ b/src/powercrystals/minefactoryreloaded/api/ISyringe.java @@ -11,21 +11,21 @@ import net.minecraft.world.World; */ public interface ISyringe { - /** - * Called when the vet is deciding if it should use this syringe. - * @param world The world instance. - * @param entity The entity being injected. - * @param syringe The syringe ItemStack. - * @return True if the entity can be injected by this syringe. - */ - public boolean canInject(World world, EntityLivingBase entity, ItemStack syringe); - - /** - * Called to perform an injection. - * @param world The world instance. - * @param entity The entity being injected. - * @param syringe The syringe ItemStack. - * @return True if injection was successful. - */ - public boolean inject(World world, EntityLivingBase entity, ItemStack syringe); + /** + * Called when the vet is deciding if it should use this syringe. + * @param world The world instance. + * @param entity The entity being injected. + * @param syringe The syringe ItemStack. + * @return True if the entity can be injected by this syringe. + */ + public boolean canInject (World world, EntityLivingBase entity, ItemStack syringe); + + /** + * Called to perform an injection. + * @param world The world instance. + * @param entity The entity being injected. + * @param syringe The syringe ItemStack. + * @return True if injection was successful. + */ + public boolean inject (World world, EntityLivingBase entity, ItemStack syringe); } diff --git a/src/powercrystals/minefactoryreloaded/api/IToolHammerAdvanced.java b/src/powercrystals/minefactoryreloaded/api/IToolHammerAdvanced.java index 9c452349..24a187e1 100644 --- a/src/powercrystals/minefactoryreloaded/api/IToolHammerAdvanced.java +++ b/src/powercrystals/minefactoryreloaded/api/IToolHammerAdvanced.java @@ -12,5 +12,5 @@ import net.minecraft.item.ItemStack; */ public interface IToolHammerAdvanced { - public boolean isActive(ItemStack stack); + public boolean isActive (ItemStack stack); } diff --git a/src/powercrystals/minefactoryreloaded/api/MobDrop.java b/src/powercrystals/minefactoryreloaded/api/MobDrop.java index c6c6dcb3..4fecbc1a 100644 --- a/src/powercrystals/minefactoryreloaded/api/MobDrop.java +++ b/src/powercrystals/minefactoryreloaded/api/MobDrop.java @@ -5,17 +5,18 @@ import net.minecraft.util.WeightedRandomItem; public class MobDrop extends WeightedRandomItem { - private ItemStack _stack; - - public MobDrop(int weight, ItemStack stack) - { - super(weight); - _stack = stack; - } - - public ItemStack getStack() - { - if(_stack == null) return null; - return _stack.copy(); - } + private ItemStack _stack; + + public MobDrop(int weight, ItemStack stack) + { + super(weight); + _stack = stack; + } + + public ItemStack getStack () + { + if (_stack == null) + return null; + return _stack.copy(); + } } diff --git a/src/powercrystals/minefactoryreloaded/api/RanchedItem.java b/src/powercrystals/minefactoryreloaded/api/RanchedItem.java index 86791cc5..7d72b6b8 100644 --- a/src/powercrystals/minefactoryreloaded/api/RanchedItem.java +++ b/src/powercrystals/minefactoryreloaded/api/RanchedItem.java @@ -10,59 +10,60 @@ import net.minecraftforge.fluids.FluidStack; * * Defines an ItemStack or a FluidStack that is the result of an entity being ranched */ -public final class RanchedItem { - private final ItemStack item; - private final FluidStack fluid; - - public RanchedItem(Block item, int amount, int meta) - { - this(new ItemStack(item, amount, meta)); - } - - public RanchedItem(Block item, int amount) - { - this(new ItemStack(item, amount)); - } +public final class RanchedItem +{ + private final ItemStack item; + private final FluidStack fluid; - public RanchedItem(Block item) - { - this(new ItemStack(item)); - } - - public RanchedItem(Item item, int amount, int meta) - { - this(new ItemStack(item, amount, meta)); - } - - public RanchedItem(Item item, int amount) - { - this(new ItemStack(item, amount)); - } - - public RanchedItem(Item item) - { - this(new ItemStack(item)); - } - - public RanchedItem(ItemStack item) - { - this.item = item; - fluid = null; - } - - public RanchedItem(FluidStack fluid) - { - this.fluid = fluid; - item = null; - } - - public boolean hasFluid() - { - return item == null & fluid != null; - } - - public Object getResult() - { - return item == null ? fluid : item; - } + public RanchedItem(Block item, int amount, int meta) + { + this(new ItemStack(item, amount, meta)); + } + + public RanchedItem(Block item, int amount) + { + this(new ItemStack(item, amount)); + } + + public RanchedItem(Block item) + { + this(new ItemStack(item)); + } + + public RanchedItem(Item item, int amount, int meta) + { + this(new ItemStack(item, amount, meta)); + } + + public RanchedItem(Item item, int amount) + { + this(new ItemStack(item, amount)); + } + + public RanchedItem(Item item) + { + this(new ItemStack(item)); + } + + public RanchedItem(ItemStack item) + { + this.item = item; + fluid = null; + } + + public RanchedItem(FluidStack fluid) + { + this.fluid = fluid; + item = null; + } + + public boolean hasFluid () + { + return item == null & fluid != null; + } + + public Object getResult () + { + return item == null ? fluid : item; + } } diff --git a/src/powercrystals/minefactoryreloaded/api/RandomMob.java b/src/powercrystals/minefactoryreloaded/api/RandomMob.java index 063699dd..29aee5a8 100644 --- a/src/powercrystals/minefactoryreloaded/api/RandomMob.java +++ b/src/powercrystals/minefactoryreloaded/api/RandomMob.java @@ -5,17 +5,18 @@ import net.minecraft.util.WeightedRandomItem; public class RandomMob extends WeightedRandomItem { - private Entity _mob; - - public RandomMob(Entity savedMob, int weight) - { - super(weight); - _mob = savedMob; - } - - public Entity getMob() - { - if(_mob == null) return null; - return _mob; - } + private Entity _mob; + + public RandomMob(Entity savedMob, int weight) + { + super(weight); + _mob = savedMob; + } + + public Entity getMob () + { + if (_mob == null) + return null; + return _mob; + } } diff --git a/src/powercrystals/minefactoryreloaded/api/rednet/IConnectableRedNet.java b/src/powercrystals/minefactoryreloaded/api/rednet/IConnectableRedNet.java index 3c8529db..678fb4f0 100644 --- a/src/powercrystals/minefactoryreloaded/api/rednet/IConnectableRedNet.java +++ b/src/powercrystals/minefactoryreloaded/api/rednet/IConnectableRedNet.java @@ -21,66 +21,66 @@ import net.minecraftforge.common.ForgeDirection; */ public interface IConnectableRedNet { - /** - * Returns the connection type of this Block. "All" types will cause getOutputValues() and onInputsChanged() to be used, - * whereas "Single" types will onInputChanged() to be called for input changes and the normal redstone power output methods - * to be called for output. If this value must be changed while the block is alive, it must perform a block update on any - * adjacent RedNet wires. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side that connection information is required for. - * @return The connection type. - */ - public RedNetConnectionType getConnectionType(World world, int x, int y, int z, ForgeDirection side); - - /** - * Returns the output values of this RedNet node. This array must be 16 elements long. Only called if your block is connected in "All" mode. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side the output values are required for. - * @return The output values. - */ - public int[] getOutputValues(World world, int x, int y, int z, ForgeDirection side); - - /** - * Returns the output value of this RedNet node for a given subnet. Only called if your block is connected in "All" mode. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side the output value is required for. - * @param subnet The subnet to get the output value for (0-15). - * @return The output value. - */ - public int getOutputValue(World world, int x, int y, int z, ForgeDirection side, int subnet); - - /** - * Called when the input values to this block change. Only called if your block is connected in "All" mode. - * Do not issue a network value update from inside this method call; it will be ignored. Issue your updates - * on the next tick. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side the input values are being changed on. - * @param inputValues The new set of input values. This array will be 16 elements long. - */ - public void onInputsChanged(World world, int x, int y, int z, ForgeDirection side, int[] inputValues); - - /** - * Called when the input value to this block changes. Only called if your block is connected in "Single" mode. - * Do not issue a network value update from inside this method call; it will be ignored. Issue your updates - * on the next tick. - * @param world The world this block is in. - * @param x This block's X coordinate. - * @param y This block's Y coordinate. - * @param z This block's Z coordinate. - * @param side The side the input values are being changed on. - * @param inputValue The new input value - */ - public void onInputChanged(World world, int x, int y, int z, ForgeDirection side, int inputValue); + /** + * Returns the connection type of this Block. "All" types will cause getOutputValues() and onInputsChanged() to be used, + * whereas "Single" types will onInputChanged() to be called for input changes and the normal redstone power output methods + * to be called for output. If this value must be changed while the block is alive, it must perform a block update on any + * adjacent RedNet wires. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side that connection information is required for. + * @return The connection type. + */ + public RedNetConnectionType getConnectionType (World world, int x, int y, int z, ForgeDirection side); + + /** + * Returns the output values of this RedNet node. This array must be 16 elements long. Only called if your block is connected in "All" mode. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side the output values are required for. + * @return The output values. + */ + public int[] getOutputValues (World world, int x, int y, int z, ForgeDirection side); + + /** + * Returns the output value of this RedNet node for a given subnet. Only called if your block is connected in "All" mode. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side the output value is required for. + * @param subnet The subnet to get the output value for (0-15). + * @return The output value. + */ + public int getOutputValue (World world, int x, int y, int z, ForgeDirection side, int subnet); + + /** + * Called when the input values to this block change. Only called if your block is connected in "All" mode. + * Do not issue a network value update from inside this method call; it will be ignored. Issue your updates + * on the next tick. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side the input values are being changed on. + * @param inputValues The new set of input values. This array will be 16 elements long. + */ + public void onInputsChanged (World world, int x, int y, int z, ForgeDirection side, int[] inputValues); + + /** + * Called when the input value to this block changes. Only called if your block is connected in "Single" mode. + * Do not issue a network value update from inside this method call; it will be ignored. Issue your updates + * on the next tick. + * @param world The world this block is in. + * @param x This block's X coordinate. + * @param y This block's Y coordinate. + * @param z This block's Z coordinate. + * @param side The side the input values are being changed on. + * @param inputValue The new input value + */ + public void onInputChanged (World world, int x, int y, int z, ForgeDirection side, int inputValue); } diff --git a/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetLogicCircuit.java b/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetLogicCircuit.java index 0bbbeeb9..98b464d7 100644 --- a/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetLogicCircuit.java +++ b/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetLogicCircuit.java @@ -4,16 +4,19 @@ import net.minecraft.nbt.NBTTagCompound; public interface IRedNetLogicCircuit { - public int getInputCount(); - - public int getOutputCount(); - - public int[] recalculateOutputValues(long worldTime, int[] inputValues); - - public String getUnlocalizedName(); - public String getInputPinLabel(int pin); - public String getOutputPinLabel(int pin); - - public void readFromNBT(NBTTagCompound tag); - public void writeToNBT(NBTTagCompound tag); + public int getInputCount (); + + public int getOutputCount (); + + public int[] recalculateOutputValues (long worldTime, int[] inputValues); + + public String getUnlocalizedName (); + + public String getInputPinLabel (int pin); + + public String getOutputPinLabel (int pin); + + public void readFromNBT (NBTTagCompound tag); + + public void writeToNBT (NBTTagCompound tag); } diff --git a/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetNetworkContainer.java b/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetNetworkContainer.java index 5e27b1fe..6120b065 100644 --- a/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetNetworkContainer.java +++ b/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetNetworkContainer.java @@ -10,22 +10,22 @@ import net.minecraft.world.World; */ public interface IRedNetNetworkContainer { - /** - * Tells the network to recalculate all subnets. - * @param world The world this cable is in. - * @param x The x-coordinate of this cable. - * @param x The y-coordinate of this cable. - * @param x The z-coordinate of this cable. - */ - public void updateNetwork(World world, int x, int y, int z); - - /** - * Tells the network to recalculate a specific subnet. - * @param world The world this cable is in. - * @param x The x-coordinate of this cable. - * @param x The y-coordinate of this cable. - * @param x The z-coordinate of this cable. - * @param subnet The subnet to recalculate. - */ - public void updateNetwork(World world, int x, int y, int z, int subnet); + /** + * Tells the network to recalculate all subnets. + * @param world The world this cable is in. + * @param x The x-coordinate of this cable. + * @param x The y-coordinate of this cable. + * @param x The z-coordinate of this cable. + */ + public void updateNetwork (World world, int x, int y, int z); + + /** + * Tells the network to recalculate a specific subnet. + * @param world The world this cable is in. + * @param x The x-coordinate of this cable. + * @param x The y-coordinate of this cable. + * @param x The z-coordinate of this cable. + * @param subnet The subnet to recalculate. + */ + public void updateNetwork (World world, int x, int y, int z, int subnet); } diff --git a/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetNoConnection.java b/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetNoConnection.java index 8ff95dd4..51b1e6f9 100644 --- a/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetNoConnection.java +++ b/src/powercrystals/minefactoryreloaded/api/rednet/IRedNetNoConnection.java @@ -2,5 +2,5 @@ package powercrystals.minefactoryreloaded.api.rednet; public interface IRedNetNoConnection { - + } diff --git a/src/powercrystals/minefactoryreloaded/api/rednet/RedNetConnectionType.java b/src/powercrystals/minefactoryreloaded/api/rednet/RedNetConnectionType.java index 13e6b0e8..f044c65f 100644 --- a/src/powercrystals/minefactoryreloaded/api/rednet/RedNetConnectionType.java +++ b/src/powercrystals/minefactoryreloaded/api/rednet/RedNetConnectionType.java @@ -24,41 +24,42 @@ import java.util.Map; */ public enum RedNetConnectionType { - None, // 0 - CableSingle, // 11 - PlateSingle, // 13 - CableAll, // 19 - PlateAll, // 21 - ForcedCableSingle, // 43 - ForcedPlateSingle, // 45 - ForcedCableAll, // 51 - ForcedPlateAll; // 53 - - public final boolean isConnected = this.ordinal() != 0; - public final boolean isSingleSubnet = this.name().endsWith("Single"); - public final boolean isAllSubnets = this.name().endsWith("All"); - public final boolean isConnectionForced = this.name().startsWith("Forced"); - public final boolean isPlate = this.name().contains("Plate"); - public final boolean isCable = this.name().contains("Cable"); - public final short flags = toFlags(isConnected, isCable, isPlate, isSingleSubnet, isAllSubnets, isConnectionForced); - - public static final RedNetConnectionType fromFlags(short flags) - { - return connections.get(flags); - } - - private static final short toFlags(boolean ...flags) - { - short ret = 0; - for (int i = flags.length; i --> 0;) - ret |= (flags[i] ? 1 : 0) << i; - return ret; - } - - private static final Map connections = new HashMap(); - - static { - for (RedNetConnectionType type : RedNetConnectionType.values()) - connections.put(type.flags, type); - } + None, // 0 + CableSingle, // 11 + PlateSingle, // 13 + CableAll, // 19 + PlateAll, // 21 + ForcedCableSingle, // 43 + ForcedPlateSingle, // 45 + ForcedCableAll, // 51 + ForcedPlateAll; // 53 + + public final boolean isConnected = this.ordinal() != 0; + public final boolean isSingleSubnet = this.name().endsWith("Single"); + public final boolean isAllSubnets = this.name().endsWith("All"); + public final boolean isConnectionForced = this.name().startsWith("Forced"); + public final boolean isPlate = this.name().contains("Plate"); + public final boolean isCable = this.name().contains("Cable"); + public final short flags = toFlags(isConnected, isCable, isPlate, isSingleSubnet, isAllSubnets, isConnectionForced); + + public static final RedNetConnectionType fromFlags (short flags) + { + return connections.get(flags); + } + + private static final short toFlags (boolean... flags) + { + short ret = 0; + for (int i = flags.length; i-- > 0;) + ret |= (flags[i] ? 1 : 0) << i; + return ret; + } + + private static final Map connections = new HashMap(); + + static + { + for (RedNetConnectionType type : RedNetConnectionType.values()) + connections.put(type.flags, type); + } } diff --git a/src/tconstruct/TConstruct.java b/src/tconstruct/TConstruct.java index e57c646c..c245887e 100644 --- a/src/tconstruct/TConstruct.java +++ b/src/tconstruct/TConstruct.java @@ -98,7 +98,7 @@ public class TConstruct proxy.addNames(); proxy.readManuals(); proxy.registerKeys(); - + MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler()); GameRegistry.registerWorldGenerator(new TBaseWorldGenerator()); diff --git a/src/tconstruct/blocks/EssenceExtractor.java b/src/tconstruct/blocks/EssenceExtractor.java deleted file mode 100644 index 2d253f5a..00000000 --- a/src/tconstruct/blocks/EssenceExtractor.java +++ /dev/null @@ -1,181 +0,0 @@ -package tconstruct.blocks; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import net.minecraftforge.common.FakePlayer; -import tconstruct.blocks.logic.EssenceExtractorLogic; -import tconstruct.common.TContent; -import tconstruct.library.TConstructRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class EssenceExtractor extends BlockContainer -{ - @SideOnly(Side.CLIENT) - private Icon field_94461_a; - @SideOnly(Side.CLIENT) - private Icon field_94460_b; - - public EssenceExtractor(int par1) - { - super(par1, Material.rock); - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F); - this.setLightOpacity(0); - this.setCreativeTab(TConstructRegistry.blockTab); - } - - /** - * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) - */ - public boolean renderAsNormalBlock () - { - return false; - } - - @SideOnly(Side.CLIENT) - /** - * A randomly called display update to be able to add particles or other items for display - */ - public void randomDisplayTick (World par1World, int par2, int par3, int par4, Random par5Random) - { - super.randomDisplayTick(par1World, par2, par3, par4, par5Random); - - for (int l = par2 - 2; l <= par2 + 2; ++l) - { - for (int i1 = par4 - 2; i1 <= par4 + 2; ++i1) - { - if (l > par2 - 2 && l < par2 + 2 && i1 == par4 - 1) - { - i1 = par4 + 2; - } - - if (par5Random.nextInt(16) == 0) - { - for (int j1 = par3; j1 <= par3 + 1; ++j1) - { - if (par1World.getBlockId(l, j1, i1) == Block.bookShelf.blockID) - { - if (!par1World.isAirBlock((l - par2) / 2 + par2, j1, (i1 - par4) / 2 + par4)) - { - break; - } - - par1World.spawnParticle("enchantmenttable", (double) par2 + 0.5D, (double) par3 + 2.0D, (double) par4 + 0.5D, - (double) ((float) (l - par2) + par5Random.nextFloat()) - 0.5D, (double) ((float) (j1 - par3) - par5Random.nextFloat() - 1.0F), - (double) ((float) (i1 - par4) + par5Random.nextFloat()) - 0.5D); - } - } - } - } - } - } - - /** - * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two - * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. - */ - public boolean isOpaqueCube () - { - return false; - } - - @SideOnly(Side.CLIENT) - /** - * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata - */ - public Icon getIcon (int par1, int par2) - { - return par1 == 0 ? this.field_94460_b : (par1 == 1 ? this.field_94461_a : this.blockIcon); - } - - /** - * Returns a new instance of a block's tile entity class. Called on placing the block. - */ - public TileEntity createNewTileEntity (World par1World) - { - return new EssenceExtractorLogic(); - } - - /* Right-click to form a crystal */ - - @Override - public void onBlockClicked (World world, int x, int y, int z, EntityPlayer player) - { - if (world.isRemote) - { - return; - } - else - { - EssenceExtractorLogic logic = (EssenceExtractorLogic) world.getBlockTileEntity(x, y, z); - int amount = logic.removeEssence(); - if (amount > 0) - { - ItemStack crystal = new ItemStack(TContent.essenceCrystal, 1); - NBTTagCompound tags = new NBTTagCompound(); - tags.setInteger("Essence", amount); - crystal.setTagCompound(tags); - - EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, crystal); - world.spawnEntityInWorld(entityitem); - if (!(player instanceof FakePlayer)) - entityitem.onCollideWithPlayer(player); - } - } - } - - /** - * Called upon block activation (right click on the block.) - */ - public boolean onBlockActivated (World par1World, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) - { - if (par1World.isRemote) - { - return true; - } - else - { - EssenceExtractorLogic logic = (EssenceExtractorLogic) par1World.getBlockTileEntity(x, y, z); - logic.addEssence(player); - logic.getEssenceMessage(player); - return true; - } - } - - /** - * Called when the block is placed in the world. - */ - public void onBlockPlacedBy (World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving, ItemStack par6ItemStack) - { - super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLiving, par6ItemStack); - - if (par6ItemStack.hasDisplayName()) - { - ((EssenceExtractorLogic) par1World.getBlockTileEntity(par2, par3, par4)).func_94134_a(par6ItemStack.getDisplayName()); - } - } - - @SideOnly(Side.CLIENT) - /** - * When this method is called, your block should register all the icons it needs with the given IconRegister. This - * is the only chance you get to register icons. - */ - public void registerIcons (IconRegister par1IconRegister) - { - this.blockIcon = par1IconRegister.registerIcon("tinker:extractor_side"); - this.field_94461_a = par1IconRegister.registerIcon("tinker:extractor_top"); - this.field_94460_b = par1IconRegister.registerIcon("tinker:extractor_bottom"); - } -} diff --git a/src/tconstruct/blocks/Terraformer.java b/src/tconstruct/blocks/Terraformer.java deleted file mode 100644 index 531272ed..00000000 --- a/src/tconstruct/blocks/Terraformer.java +++ /dev/null @@ -1,77 +0,0 @@ -package tconstruct.blocks; - -import java.util.List; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Icon; -import net.minecraft.world.World; -import tconstruct.blocks.logic.TerraformerLogic; -import tconstruct.library.TConstructRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class Terraformer extends BlockContainer -{ - public Terraformer(int id) - { - super(id, Material.iron); - this.setCreativeTab(TConstructRegistry.blockTab); - setStepSound(soundMetalFootstep); - } - - @Override - public TileEntity createNewTileEntity (World world) - { - return new TerraformerLogic(); - } - - @Override - public int damageDropped (int meta) - { - return meta; - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks (int id, CreativeTabs tab, List list) - { - for (int iter = 0; iter < textureNames.length - 1; iter++) - { - list.add(new ItemStack(id, 1, iter)); - } - } - - /* Rendering */ - - @SideOnly(Side.CLIENT) - public Icon[] icons; - - @SideOnly(Side.CLIENT) - static String[] textureNames = { "crystal_machine_top", "terrafreezer", "terrafumer", "terrawaver", "terraleecher", "terragrower", "terranether", "terralighter", "terracrystal" }; - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons (IconRegister iconRegister) - { - this.icons = new Icon[textureNames.length]; - - for (int i = 0; i < this.icons.length; ++i) - { - this.icons[i] = iconRegister.registerIcon("tinker:machines/" + textureNames[i]); - } - } - - @Override - @SideOnly(Side.CLIENT) - public Icon getIcon (int side, int meta) - { - if (side == 0 || side == 1) - return icons[0]; - return icons[meta + 1]; - } -} diff --git a/src/tconstruct/blocks/logic/EssenceExtractorLogic.java b/src/tconstruct/blocks/logic/EssenceExtractorLogic.java deleted file mode 100644 index d21b0f7e..00000000 --- a/src/tconstruct/blocks/logic/EssenceExtractorLogic.java +++ /dev/null @@ -1,245 +0,0 @@ -package tconstruct.blocks.logic; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntityEnchantmentTable; - -import java.text.DecimalFormat; -import java.util.Random; - -public class EssenceExtractorLogic extends TileEntityEnchantmentTable -{ - /** Used by the render to make the book 'bounce' */ - public int tickCount; - - /** Value used for determining how the page flip should look. */ - public float pageFlip; - - /** The last tick's pageFlip value. */ - public float pageFlipPrev; - public float field_70373_d; - public float field_70374_e; - - /** The amount that the book is open. */ - public float bookSpread; - - /** The amount that the book is open. */ - public float bookSpreadPrev; - public float bookRotation2; - public float bookRotationPrev; - public float bookRotation; - private static Random rand = new Random(); - private String field_94136_s; - - public int essenceAmount; - static DecimalFormat df = new DecimalFormat("##.##"); - - /*public EssenceExtractorLogic() - { - df.setRoundingMode(RoundingMode.DOWN); - }*/ - - /** - * Writes a tile entity to NBT. - */ - public void writeToNBT (NBTTagCompound tags) - { - super.writeToNBT(tags); - - if (this.func_94135_b()) - { - tags.setString("CustomName", this.field_94136_s); - } - tags.setInteger("Essence", essenceAmount); - } - - /** - * Reads a tile entity from NBT. - */ - public void readFromNBT (NBTTagCompound tags) - { - super.readFromNBT(tags); - - if (tags.hasKey("CustomName")) - { - this.field_94136_s = tags.getString("CustomName"); - } - - essenceAmount = tags.getInteger("Essence"); - } - - /** - * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count - * ticks and creates a new spawn inside its implementation. - */ - public void updateEntity () - { - super.updateEntity(); - this.bookSpreadPrev = this.bookSpread; - this.bookRotationPrev = this.bookRotation2; - EntityPlayer entityplayer = this.worldObj.getClosestPlayer((double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 0.5F), (double) ((float) this.zCoord + 0.5F), 3.0D); - - if (entityplayer != null) - { - double d0 = entityplayer.posX - (double) ((float) this.xCoord + 0.5F); - double d1 = entityplayer.posZ - (double) ((float) this.zCoord + 0.5F); - this.bookRotation = (float) Math.atan2(d1, d0); - this.bookSpread += 0.1F; - - if (this.bookSpread < 0.5F || rand.nextInt(40) == 0) - { - float f = this.field_70373_d; - - do - { - this.field_70373_d += (float) (rand.nextInt(4) - rand.nextInt(4)); - } while (f == this.field_70373_d); - } - } - else - { - this.bookRotation += 0.02F; - this.bookSpread -= 0.1F; - } - - while (this.bookRotation2 >= (float) Math.PI) - { - this.bookRotation2 -= ((float) Math.PI * 2F); - } - - while (this.bookRotation2 < -(float) Math.PI) - { - this.bookRotation2 += ((float) Math.PI * 2F); - } - - while (this.bookRotation >= (float) Math.PI) - { - this.bookRotation -= ((float) Math.PI * 2F); - } - - while (this.bookRotation < -(float) Math.PI) - { - this.bookRotation += ((float) Math.PI * 2F); - } - - float f1; - - for (f1 = this.bookRotation - this.bookRotation2; f1 >= (float) Math.PI; f1 -= ((float) Math.PI * 2F)) - { - ; - } - - while (f1 < -(float) Math.PI) - { - f1 += ((float) Math.PI * 2F); - } - - this.bookRotation2 += f1 * 0.4F; - - if (this.bookSpread < 0.0F) - { - this.bookSpread = 0.0F; - } - - if (this.bookSpread > 1.0F) - { - this.bookSpread = 1.0F; - } - - ++this.tickCount; - this.pageFlipPrev = this.pageFlip; - float f2 = (this.field_70373_d - this.pageFlip) * 0.4F; - float f3 = 0.2F; - - if (f2 < -f3) - { - f2 = -f3; - } - - if (f2 > f3) - { - f2 = f3; - } - - this.field_70374_e += (f2 - this.field_70374_e) * 0.9F; - this.pageFlip += this.field_70374_e; - } - - public String func_94133_a () - { - return this.func_94135_b() ? this.field_94136_s : "container.enchant"; - } - - public boolean func_94135_b () - { - return this.field_94136_s != null && this.field_94136_s.length() > 0; - } - - public void func_94134_a (String par1Str) - { - this.field_94136_s = par1Str; - } - - public void addEssence (EntityPlayer player) - { - int amount = player.experienceTotal; - essenceAmount += amount; - player.addExperienceLevel(-player.experienceLevel - 1); - } - - public int removeEssence () - { - int amount = this.essenceAmount; - this.essenceAmount = 0; - return amount; - } - - public void getEssenceMessage (EntityPlayer player) - { - player.addChatMessage("Total Essence: " + this.essenceAmount); - player.addChatMessage("Stored Levels: " + getEssencelevels(this.essenceAmount)); - } - - public static String getEssencelevels (int essence) - { - if (essence < 255) //0-14 - { - float ret = essence / 17f; - return String.valueOf(df.format(ret)); - } - else if (essence < 825) - { - int amount = essence - 255; - int levels = 15; - int offset = 3; - - int sub = 17 + offset; - while (amount - sub >= 0) - { - amount -= sub; - sub += offset; - levels++; - } - - float ret = levels + amount / (float) sub; - return String.valueOf(df.format(ret)); - } - else - { - int amount = essence - 825; - int levels = 30; - int offset = 7; - - int sub = 62 + offset; - while (amount - sub >= 0) - { - amount -= sub; - sub += offset; - levels++; - } - - float ret = levels + amount / (float) sub; - return String.valueOf(df.format(ret)); - } - } -} diff --git a/src/tconstruct/blocks/logic/TerraformerLogic.java b/src/tconstruct/blocks/logic/TerraformerLogic.java deleted file mode 100644 index 2100f82e..00000000 --- a/src/tconstruct/blocks/logic/TerraformerLogic.java +++ /dev/null @@ -1,131 +0,0 @@ -package tconstruct.blocks.logic; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.tileentity.TileEntity; - -public class TerraformerLogic extends TileEntity -{ - Random random = new Random(); - boolean init; - int type; - - @Override - public void updateEntity () - { - if (!init) - { - init = true; - type = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); - } - if (worldObj.isRemote) - { - switch (type) - { - case 0: //Freezer - for (int i = 0; i < 32; i++) - worldObj.spawnParticle("snowshovel", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - break; - case 1: //Fumer - for (int i = 0; i < 5; i++) - worldObj.spawnParticle("lava", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - for (int i = 0; i < 3; i++) - worldObj.spawnParticle("explode", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - for (int i = 0; i < 5; i++) - worldObj.spawnParticle("smoke", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - break; - case 2: //Waver - for (int i = 0; i < 50; i++) - worldObj.spawnParticle("splash", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - break; - case 3: //Leecher - for (int i = 0; i < 16; i++) - worldObj.spawnParticle("enchantmenttable", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, -1, 0); - break; - case 4: //Grower - break; - case 5: //Nether - for (int i = 0; i < 40; i++) - worldObj.spawnParticle("depthsuspend", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - for (int i = 0; i < 3; i++) - worldObj.spawnParticle("largesmoke", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - break; - case 6: //Lighter - break; - case 7: //Crystal - for (int i = 0; i < 8; i++) - worldObj.spawnParticle("fireworksSpark", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - break; - case 8: //Ender - for (int i = 0; i < 16; i++) - worldObj.spawnParticle("portal", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - for (int i = 0; i < 6; i++) - worldObj.spawnParticle("witchMagic", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - break; - case 9: //Void - for (int i = 0; i < 16; i++) - worldObj.spawnParticle("portal", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - for (int i = 0; i < 8; i++) - worldObj.spawnParticle("dripWater", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - for (int i = 0; i < 8; i++) - worldObj.spawnParticle("dripLava", xCoord + random.nextFloat() * 25 - 12, yCoord + random.nextFloat() * 10, zCoord + random.nextFloat() * 25 - 12, 0, 0, 0); - break; - case 10: //Desert - break; - } - - /* Good combos: - * smoke + flame, 20+5 - * portal + witchMagic, 16+6 - * mobSpellAmbient + spell + mobSpell, 20+3+3 - * lava + explode + smoke, 10+6+10 - * happyVillager + deathsuspend + enchantmenttable, 16+64+20 - * - * Good values: - * fireworksSpark, 16 - * depthsuspend, 40 - * enchantmenttable, 16, x5 - * explode, 110 - * splash, 50 - * snowshovel, 32 - * heart, 16 - */ - } - else - { - if (worldObj.getTotalWorldTime() % 5 == 0) - { - switch (type) - { - case 0: - snow(); - break; - } - } - } - } - - void snow () - { - int x = xCoord + random.nextInt(25) - 12, y = yCoord + random.nextInt(6) - 1, z = zCoord + random.nextInt(25) - 12; - Block block = Block.blocksList[worldObj.getBlockId(x, y, z)]; - if (block == Block.waterStill || block == Block.waterMoving) - { - worldObj.setBlock(x, y, z, Block.ice.blockID); - } - else if (block == Block.snow) - { - int meta = worldObj.getBlockMetadata(x, y, z); - if (meta < 7) - worldObj.setBlockMetadataWithNotify(x, y, z, meta + 1, 3); - } - else if (block == null || block.isBlockReplaceable(worldObj, x, y, z)) - { - if (worldObj.doesBlockHaveSolidTopSurface(x, y - 1, z)) - { - worldObj.setBlock(x, y, z, Block.snow.blockID); - } - } - } -} diff --git a/src/tconstruct/client/gui/SmelteryGui.java b/src/tconstruct/client/gui/SmelteryGui.java index b18384cd..34ad2896 100644 --- a/src/tconstruct/client/gui/SmelteryGui.java +++ b/src/tconstruct/client/gui/SmelteryGui.java @@ -195,10 +195,13 @@ public class SmelteryGui extends NewContainerGui while (liquidSize > 0) { int size = liquidSize >= 16 ? 16 : liquidSize; - drawLiquidRect(cornerX + basePos, (cornerY + 68) - size - base, renderIndex, 16, size); - drawLiquidRect(cornerX + basePos + 16, (cornerY + 68) - size - base, renderIndex, 16, size); - drawLiquidRect(cornerX + basePos + 32, (cornerY + 68) - size - base, renderIndex, 16, size); - drawLiquidRect(cornerX + basePos + 48, (cornerY + 68) - size - base, renderIndex, 4, size); + if (renderIndex != null) + { + drawLiquidRect(cornerX + basePos, (cornerY + 68) - size - base, renderIndex, 16, size); + drawLiquidRect(cornerX + basePos + 16, (cornerY + 68) - size - base, renderIndex, 16, size); + drawLiquidRect(cornerX + basePos + 32, (cornerY + 68) - size - base, renderIndex, 16, size); + drawLiquidRect(cornerX + basePos + 48, (cornerY + 68) - size - base, renderIndex, 4, size); + } liquidSize -= size; base += size; } diff --git a/src/tconstruct/common/TContent.java b/src/tconstruct/common/TContent.java index 6cd3927d..39a01c50 100644 --- a/src/tconstruct/common/TContent.java +++ b/src/tconstruct/common/TContent.java @@ -176,11 +176,6 @@ public class TContent implements IFuelHandler public static Block stainedGlassMagicSlab; public static Block stainedGlassClearMagicSlab; - //Crystalline - public static Block essenceExtractor; - public static Item essenceCrystal; - public static Block terraformer; - //Liquids public static Material liquidMetal; @@ -794,15 +789,6 @@ public class TContent implements IFuelHandler stainedGlassClearPane = new GlassPaneStained(PHConstruct.stainedGlassClearPane); GameRegistry.registerBlock(stainedGlassClearPane, StainedGlassClearPaneItem.class, "GlassPaneClearStained"); - //Crystalline - essenceExtractor = new EssenceExtractor(PHConstruct.essenceExtractor).setHardness(12f).setUnlocalizedName("extractor.essence"); - GameRegistry.registerBlock(essenceExtractor, "extractor.essence"); - GameRegistry.registerTileEntity(EssenceExtractorLogic.class, "extractor.essence"); - - terraformer = new Terraformer(PHConstruct.terraformer).setHardness(50f).setUnlocalizedName("terraformer"); - GameRegistry.registerBlock(terraformer, TerraformerItem.class, "terraformer"); - GameRegistry.registerTileEntity(TerraformerLogic.class, "TerraFreezer"); - //Rail woodenRail = new WoodRail(PHConstruct.woodenRail).setStepSound(Block.soundWoodFootstep).setCreativeTab(TConstructRegistry.blockTab).setUnlocalizedName("rail.wood"); GameRegistry.registerBlock(woodenRail, "rail.wood"); @@ -943,9 +929,6 @@ public class TContent implements IFuelHandler //heavyBoots = new TArmorBase(PHConstruct.heavyBoots, 3).setUnlocalizedName("tconstruct.HeavyBoots"); //glove = new Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove"); knapsack = new Knapsack(PHConstruct.knapsack).setUnlocalizedName("tconstruct.storage"); - - //Crystalline - essenceCrystal = new EssenceCrystal(PHConstruct.essenceCrystal).setUnlocalizedName("tconstruct.crystal.essence"); goldHead = new GoldenHead(PHConstruct.goldHead, 4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead"); LiquidCasting basinCasting = TConstruct.getBasinCasting(); @@ -1399,7 +1382,6 @@ public class TContent implements IFuelHandler GameRegistry.addRecipe(new ItemStack(craftingSlabWood, 1, 3), "b", 'b', new ItemStack(toolStationWood, 1, 13)); GameRegistry.addRecipe(new ItemStack(craftingSlabWood, 1, 5), "b", 'b', new ItemStack(toolForge, 1, Short.MAX_VALUE)); // EssenceExtractor Recipe - GameRegistry.addRecipe(new ItemStack(essenceExtractor, 1, 0), " b ", "eme", "mmm", 'b', Item.book, 'e', Item.emerald, 'm', Block.whiteStone); //Slime Recipes GameRegistry.addRecipe(new ItemStack(slimeGel, 1, 0), "##", "##", '#', strangeFood); GameRegistry.addRecipe(new ItemStack(strangeFood, 4, 0), "#", '#', new ItemStack(slimeGel, 1, 0)); diff --git a/src/tconstruct/items/EssenceCrystal.java b/src/tconstruct/items/EssenceCrystal.java deleted file mode 100644 index c34ae4fd..00000000 --- a/src/tconstruct/items/EssenceCrystal.java +++ /dev/null @@ -1,102 +0,0 @@ -package tconstruct.items; - -import java.util.List; - -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumAction; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import tconstruct.blocks.logic.EssenceExtractorLogic; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class EssenceCrystal extends Item -{ - public EssenceCrystal(int id) - { - super(id); - this.setCreativeTab(CreativeTabs.tabMisc); - } - - @Override - public int getMaxItemUseDuration (ItemStack par1ItemStack) - { - return 32; - } - - @Override - public EnumAction getItemUseAction (ItemStack par1ItemStack) - { - return EnumAction.eat; - } - - @Override - public ItemStack onItemRightClick (ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) - { - par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); - return par1ItemStack; - } - - @Override - public ItemStack onEaten (ItemStack stack, World world, EntityPlayer player) - { - if (stack.hasTagCompound()) - { - EntityXPOrb entity = new EntityXPOrb(world, player.posX, player.posY + 1, player.posZ, stack.getTagCompound().getInteger("Essence")); - spawnEntity(player.posX, player.posY + 1, player.posZ, entity, world, player); - if (!player.capabilities.isCreativeMode) - stack.stackSize--; - } - return stack; - } - - public static void spawnEntity (double x, double y, double z, Entity entity, World world, EntityPlayer player) - { - if (!world.isRemote) - { - world.spawnEntityInWorld(entity); - } - } - - @Override - @SideOnly(Side.CLIENT) - public void registerIcons (IconRegister iconRegister) - { - this.itemIcon = iconRegister.registerIcon("tinker:materials/material_essencecrystal"); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) - { - if (stack.hasTagCompound()) - { - int amount = stack.getTagCompound().getInteger("Essence"); - list.add("Stored Levels: " + EssenceExtractorLogic.getEssencelevels(amount)); - } - else - { - list.add("Stored Levels: 0"); - } - } - - @Override - public void getSubItems (int id, CreativeTabs tab, List list) - { - int[] amount = new int[] { 17, 85, 170, 255, 385, 590, 825 }; - for (int i = 0; i < amount.length; i++) - { - ItemStack crystal = new ItemStack(id, 1, 0); - NBTTagCompound tags = new NBTTagCompound(); - tags.setInteger("Essence", amount[i]); - crystal.setTagCompound(tags); - list.add(crystal); - } - } -} diff --git a/src/tconstruct/items/blocks/TerraformerItem.java b/src/tconstruct/items/blocks/TerraformerItem.java deleted file mode 100644 index bd011735..00000000 --- a/src/tconstruct/items/blocks/TerraformerItem.java +++ /dev/null @@ -1,50 +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.util.MathHelper; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class TerraformerItem extends ItemBlock -{ - static String blockType[] = { "freezer", "fumer", "waver", "leecher", "grower", "nether", "lighter", "crystal" }; - - //static String[] textureNames = { "crystal_machine_top", "terrafreezer", "terrafumer", "terrawaver", "terraleecher", "terragrower", "terranether", "terralighter", "terracrystal" }; - - public TerraformerItem(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("tile.terraformer.").append(blockType[pos]).toString(); - } - - @Override - @SideOnly(Side.CLIENT) - public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) - { - switch (stack.getItemDamage()) - { - case 0: - list.add("\u00a7b\u00a7oCold to the touch"); - break; - case 1: - list.add("\u00a74\u00a7oHot to the touch"); - break; - } - } -} diff --git a/src/tconstruct/plugins/waila/EssenceExtractorDataProvider.java b/src/tconstruct/plugins/waila/EssenceExtractorDataProvider.java deleted file mode 100644 index e40c98ed..00000000 --- a/src/tconstruct/plugins/waila/EssenceExtractorDataProvider.java +++ /dev/null @@ -1,39 +0,0 @@ -package tconstruct.plugins.waila; - -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import net.minecraft.item.ItemStack; -import tconstruct.blocks.logic.EssenceExtractorLogic; - -import java.util.List; - -public class EssenceExtractorDataProvider implements IWailaDataProvider -{ - - @Override - public ItemStack getWailaStack (IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return null; - } - - @Override - public List getWailaHead (ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - return currenttip; - } - - @Override - public List getWailaBody (ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) - { - if (accessor.getTileEntity() instanceof EssenceExtractorLogic) - { - EssenceExtractorLogic te = (EssenceExtractorLogic) accessor.getTileEntity(); - currenttip.add("Total Essence: " + te.essenceAmount); - currenttip.add("Stored Levels: " + EssenceExtractorLogic.getEssencelevels(te.essenceAmount)); - } - - return currenttip; - } - -} diff --git a/src/tconstruct/util/config/PHConstruct.java b/src/tconstruct/util/config/PHConstruct.java index 2540d427..1b7322c3 100644 --- a/src/tconstruct/util/config/PHConstruct.java +++ b/src/tconstruct/util/config/PHConstruct.java @@ -18,9 +18,6 @@ public class PHConstruct * Second: Create the actual config file * Note: Configs are a pain, but absolutely necessary for every mod. */ - //File file = new File(TConstruct.proxy.getLocation() + "/config"); - //file.mkdir(); - //File newFile = new File(TConstruct.proxy.getLocation() + "/config/TinkersWorkshop.txt"); File newFile = new File(location + "/TinkersWorkshop.txt"); /* Some basic debugging will go a long way */ @@ -133,7 +130,6 @@ public class PHConstruct blood = config.getBlock("Liquid Cow", 3217).getInt(3217); moltenEnder = config.getBlock("Molten Ender", 3218).getInt(3218); - terraformer = config.getBlock("Terraformer", 3219).getInt(3219); signalBus = config.getBlock("Signal Bus", 3221).getInt(3221); signalTerminal = config.getBlock("Signal Terminal", 3222).getInt(3222); @@ -150,7 +146,6 @@ public class PHConstruct punji = config.getBlock("Punji", 3232).getInt(3232); woodCrafter = config.getBlock("Crafting Station", 3233).getInt(3233); - essenceExtractor = config.getBlock("Essence Extractor", 3234).getInt(3234); slimePoolBlue = config.getBlock("Liquid Blue Slime", 3235).getInt(3235); slimeGel = config.getBlock("Congealed Slime", 3237).getInt(3237); @@ -263,7 +258,6 @@ public class PHConstruct glove = config.getItem("Equipables", "Gloves", 14111).getInt(14111); knapsack = config.getItem("Equipables", "Knapsack", 14112).getInt(14112); goldHead = config.getItem("Patterns and Misc", "Golden Head", 14113).getInt(14113); - essenceCrystal = config.getItem("Patterns and Misc", "Essence Crystal", 14114).getInt(14114); jerky = config.getItem("Patterns and Misc", "Jerky", 14115).getInt(14115); spoolWire = config.getItem("Logic", "SpoolWire", 14120).getInt(14120); @@ -444,11 +438,6 @@ public class PHConstruct public static int stainedGlassClear; public static int stainedGlassClearPane; - //Crystalline - public static int essenceExtractor; - public static int essenceCrystal; - public static int terraformer; - //Liquids public static int metalFlowing; public static int metalStill;