From 8ed8c659da9496bf49fec94c049b0abae21746a8 Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Wed, 24 May 2017 20:13:22 +0300 Subject: [PATCH] fixing bugs with Iron workbench and fractionator --- assets/ihl/lang/en_US.lang | 9 +- .../textures/blocks/fluidMethanolFlowing.xcf | Bin 4649 -> 0 bytes .../textures/blocks/solarEvaporatorSide.png | Bin 0 -> 627 bytes .../ihl/textures/gui/GUISolarEvaporator.png | Bin 0 -> 4608 bytes assets/ihl/textures/items/itemCellAmmonia.png | Bin 0 -> 331 bytes ihl/ClientProxy.java | 39 +++--- ihl/IHLMod.java | 43 ++++--- ihl/IHLModConfig.java | 31 +++-- ihl/IHLModInfo.java | 2 +- ihl/crop_harvestors/BlobRenderFX.java | 3 +- ihl/crop_harvestors/SackBlock.java | 1 + ihl/crop_harvestors/SackRender.java | 6 +- ihl/crop_harvestors/SackTileEntity.java | 10 +- .../LaserHitMirrorEventHandler.java | 2 +- ihl/enviroment/MirrorBlock.java | 6 +- ihl/enviroment/MirrorRender.java | 21 ++-- ihl/enviroment/MirrorTileEntity.java | 9 +- .../ChunkAndWorldLoadEventHandler.java | 5 +- ihl/explosion/DetonatorMiniGUI.java | 7 +- ihl/explosion/ExplosionRenderFX.java | 3 +- ihl/explosion/ExplosionVectorBlockV2.java | 9 +- ihl/explosion/ExplosiveBlock.java | 10 +- ihl/explosion/GroundRemoverItem.java | 7 +- ihl/explosion/IHLEntityFallingPileRender.java | 11 +- ihl/explosion/PileTileEntityRender.java | 15 ++- ihl/flexible_cable/AnchorBlock.java | 2 +- ihl/flexible_cable/AnchorTileEntity.java | 11 +- .../BatterySwitchUnitModel.java | 2 +- .../FlexibleCableHolderBaseTileEntity.java | 2 - ihl/flexible_cable/IHLENet.java | 5 +- ihl/flexible_cable/IHLGrid.java | 7 +- .../InvSlotOutputInProgress.java | 2 +- .../InvSlotProcessableIronWorkbench.java | 4 +- ihl/flexible_cable/InvSlotTool.java | 5 +- .../InvSlotWorkspaceElement.java | 4 +- .../IronWorkbenchContainer.java | 2 +- ihl/flexible_cable/IronWorkbenchGui.java | 11 +- ihl/flexible_cable/IronWorkbenchInvSlot.java | 2 +- ihl/flexible_cable/IronWorkbenchRender.java | 6 +- .../IronWorkbenchTileEntity.java | 14 +-- ihl/flexible_cable/NodeRender.java | 4 +- ihl/flexible_cable/SetOfDiesMiniGUI.java | 7 +- .../SubAnchorEnergyNetNode.java | 12 +- ihl/flexible_cable/SubRTUEnergyNetNode.java | 8 +- ihl/handpump/AdvancedHandPump.java | 18 ++- ihl/handpump/IHLHandPump.java | 27 ++--- ihl/interfaces/IEnergyNetNode.java | 2 +- ihl/interfaces/IFluidTankVisual.java | 8 ++ ihl/interfaces/IItemHasMiniGUI.java | 4 +- ihl/interfaces/INetworkListener.java | 2 +- ihl/items_blocks/FiberItem.java | 6 +- ihl/items_blocks/FlexibleCableItem.java | 36 +++--- ihl/items_blocks/FlexiblePipeItem.java | 29 +---- ihl/items_blocks/IHLBucketHandler.java | 2 +- ihl/items_blocks/IHLFluidBlock.java | 2 +- ihl/items_blocks/IHLTool.java | 22 ++-- ihl/items_blocks/ItemSubstance.java | 17 ++- ihl/items_blocks/MachineBaseBlock.java | 51 +++++--- ...ableHolderSelectionBoxSpecialRenderer.java | 9 +- ihl/model/FlexibleCableItemRender.java | 9 +- ihl/model/FluidRenderer.java | 10 +- ihl/model/IHLBlockRenderer.java | 9 +- ihl/model/IHLToolRenderer.java | 1 - ihl/model/ImpregnatingMachineBlockRender.java | 42 +++---- ihl/model/IronWorkbenchBlockRender.java | 8 +- .../RectifierTransformerUnitBlockRender.java | 13 +- ...formerUnitSelectionBoxSpecialRenderer.java | 9 +- ihl/model/RefluxCondenserBlockRender.java | 13 +- ihl/model/UniversalTileRender.java | 10 +- .../AchesonFurnaceRecipeHandler.java | 1 - .../CrucibleRecipeHandler.java | 1 - ...etonationSprayingMachineRecipeHandler.java | 1 - .../ElectricEvaporatorRecipeHandler.java | 1 - .../ElectrolysisBathRecipeHandler.java | 1 - .../EvaporatorRecipeHandler.java | 1 - .../ExtruderRecipeHandler.java | 2 - .../FluidizedBedReactorRecipeHandler.java | 1 - .../FractionationColumnRecipeHandler.java | 1 - .../GasWeldingStationGasRecipeHandler.java | 1 - .../IHLBlockHighlightHandler.java | 6 +- ihl/nei_integration/IHLPositionedStack.java | 2 +- ihl/nei_integration/IHLRecipeHandler.java | 16 +-- .../ImpregnatingMachineRecipeHandler.java | 1 - .../InjectionMoldRecipeHandler.java | 1 - .../IronWorkbenchRecipeHandler.java | 21 ++-- .../LabElectrolyzerRecipeHandler.java | 1 - .../LeadOvenRecipeHandler.java | 1 - ihl/nei_integration/MachineRecipeHandler.java | 17 ++- ihl/nei_integration/NEIIHLConfig.java | 6 +- .../PaperMachineRecipeHandler.java | 1 - .../WireMillRecipeHandler.java | 1 - .../ApparatusProcessableInvSlot.java | 8 +- ihl/processing/chemistry/BatteryItem.java | 1 - .../chemistry/ChemicalReactorContainer.java | 3 - .../chemistry/ChemicalReactorGui.java | 6 +- .../chemistry/ChemicalReactorTileEntity.java | 25 ++-- .../CryogenicDistillerContainer.java | 3 - .../CryogenicDistillerTileEntity.java | 4 +- ihl/processing/chemistry/DosingPumpGui.java | 22 ++-- .../chemistry/DosingPumpTileEntity.java | 20 ++-- .../chemistry/ElectricEvaporatorGui.java | 9 +- .../ElectricEvaporatorTileEntity.java | 19 ++- .../chemistry/ElectrolysisBathGui.java | 9 +- .../chemistry/ElectrolysisBathTileEntity.java | 21 ++-- ihl/processing/chemistry/EvaporatorGui.java | 9 +- .../chemistry/EvaporatorTileEntity.java | 21 ++-- ihl/processing/chemistry/ExtruderModel.java | 2 +- .../FluidizedBedReactorContainer.java | 3 - .../chemistry/FluidizedBedReactorGui.java | 6 +- .../FluidizedBedReactorTileEntity.java | 23 ++-- .../FractionatorBottomTileEntity.java | 39 ++++-- .../FractionatorSectionTileEntity.java | 5 +- .../GaedesMercuryRotaryPumpTileEntity.java | 6 +- .../chemistry/LabElectrolyzerGui.java | 6 +- .../chemistry/LabElectrolyzerTileEntity.java | 20 ++-- ihl/processing/chemistry/LeadOvenGui.java | 4 +- .../chemistry/LeadOvenTileEntity.java | 21 ++-- ihl/processing/chemistry/LoomModel.java | 2 +- ihl/processing/chemistry/LoomTileEntity.java | 5 +- .../chemistry/PaperMachineContainer.java | 3 - ihl/processing/chemistry/PaperMachineGui.java | 6 +- .../chemistry/PaperMachineTileEntity.java | 22 ++-- .../chemistry/RefluxCondenserTileEntity.java | 5 +- .../chemistry/SolarEvaporatorContainer.java | 112 ++++++++++++++++++ .../chemistry/SolarEvaporatorGui.java | 78 ++++++++++++ .../chemistry/SolarEvaporatorTileEntity.java | 108 +++++++++++++++++ ihl/processing/invslots/IHLInvSlotOutput.java | 9 +- .../invslots/InvSlotConsumableLiquidIHL.java | 8 +- .../invslots/SlotInvSlotIronWorkbench.java | 5 +- .../invslots/SlotInvSlotOutputInProgress.java | 2 +- .../metallurgy/AchesonFurnaceGui.java | 3 +- .../metallurgy/AchesonFurnanceTileEntity.java | 4 +- .../BasicElectricMotorTileEntity.java | 4 +- ihl/processing/metallurgy/CoilerRender.java | 6 +- .../metallurgy/CoilerTileEntity.java | 4 +- ihl/processing/metallurgy/Crucible.java | 27 ++--- .../metallurgy/CrucibleContainer.java | 6 +- ihl/processing/metallurgy/CrucibleGui.java | 4 +- .../metallurgy/CrucibleInventory.java | 8 +- .../DetonationSprayingMachineGui.java | 7 +- .../DetonationSprayingMachineRender.java | 8 +- .../DetonationSprayingMachineTileEntity.java | 10 +- .../metallurgy/ElectricEngineItem.java | 6 +- ihl/processing/metallurgy/ExtruderModel.java | 2 +- .../metallurgy/ExtruderTileEntity.java | 4 +- .../metallurgy/GasWeldingStationGui.java | 6 +- .../GasWeldingStationTileEntity.java | 20 ++-- .../metallurgy/ImpregnatingMachineGui.java | 6 +- .../metallurgy/ImpregnatingMachineRender.java | 78 ++++++------ .../ImpregnatingMachineTileEntity.java | 35 ++++-- .../metallurgy/InjectionMoldBlock.java | 14 +-- .../metallurgy/InjectionMoldTileEntity.java | 12 +- .../metallurgy/LathePart1TileEntity.java | 5 +- .../metallurgy/MachineBaseContainer.java | 2 +- .../metallurgy/MachineBaseTileEntity.java | 7 +- .../metallurgy/MuffleFurnaceGui.java | 3 +- .../metallurgy/MuffleFurnanceTileEntity.java | 5 +- .../metallurgy/RollingMachinePart1Model.java | 2 +- .../RollingMachinePart1TileEntity.java | 4 +- .../metallurgy/RollingMachinePart2Model.java | 2 +- .../metallurgy/RollingMachineRender.java | 6 +- .../VulcanizationExtrudingMoldModel.java | 2 +- .../metallurgy/WireMillTileEntity.java | 6 +- .../WoodenRollingMachinePart1TileEntity.java | 4 +- .../WoodenRollingMachinePart2Model.java | 2 +- .../WoodenRollingMachineRender.java | 6 +- ihl/recipes/IRecipeInputFluid.java | 1 + ihl/recipes/IronWorkbenchRecipe.java | 12 +- ihl/recipes/RecipeInputDetonator.java | 2 +- ihl/recipes/RecipeInputFluidDictionary.java | 2 +- ihl/recipes/RecipeInputObjectInstance.java | 2 +- ihl/recipes/UniversalRecipeInput.java | 11 +- ihl/recipes/UniversalRecipeManager.java | 2 +- ihl/servitor/BoneBlock.java | 2 +- ihl/servitor/FlameRenderFX.java | 3 +- ihl/servitor/LostHeadEntity.java | 5 +- ihl/servitor/LostHeadRender.java | 3 +- ihl/servitor/SkullItemRender.java | 3 +- .../TDITFrequencyTransmitter.java | 1 - .../TDITGui.java | 5 +- .../TDITTileEntity.java | 23 ++-- ihl/utils/BlockItemRender.java | 8 +- ihl/utils/EntityDropEventHandler.java | 2 +- ihl/utils/IHLInvSlotDischarge.java | 4 +- ihl/utils/IHLItemRenderer.java | 2 +- ihl/utils/IHLUtils.java | 26 ++-- ihl/worldgen/IHLWorldGenerator.java | 10 +- ihl/worldgen/ores/BlockOre.java | 4 +- ihl/worldgen/ores/DebugScannerGui.java | 4 +- ihl/worldgen/ores/DebugScannerTileEntity.java | 10 +- ihl/worldgen/ores/IHLFluid.java | 41 ++----- 191 files changed, 1142 insertions(+), 859 deletions(-) delete mode 100644 assets/ihl/textures/blocks/fluidMethanolFlowing.xcf create mode 100644 assets/ihl/textures/blocks/solarEvaporatorSide.png create mode 100644 assets/ihl/textures/gui/GUISolarEvaporator.png create mode 100644 assets/ihl/textures/items/itemCellAmmonia.png create mode 100644 ihl/interfaces/IFluidTankVisual.java create mode 100644 ihl/processing/chemistry/SolarEvaporatorContainer.java create mode 100644 ihl/processing/chemistry/SolarEvaporatorGui.java create mode 100644 ihl/processing/chemistry/SolarEvaporatorTileEntity.java diff --git a/assets/ihl/lang/en_US.lang b/assets/ihl/lang/en_US.lang index 641ea06..9f6d3ec 100644 --- a/assets/ihl/lang/en_US.lang +++ b/assets/ihl/lang/en_US.lang @@ -2,6 +2,7 @@ language.name=HAYO language.region=US language.code=en_US +ihl.solarEvaporator=Solar evaporator ihl.achesonFurnace=Acheson furnace ihl.chemicalReactor=Chemical reactor ihl.crucible=Crucible @@ -56,9 +57,10 @@ dustSodiumFormate.name=Sodium formate dustMercuryChloride.name=Mercury chloride dustMercuryFulminate.name=Mercury fulminate dustCalciumAcetate.name=Calcium acetate -itemCellMethanol=Methanol cell -itemCellNitroGlycerin=Nitro glycerin cell - +itemCellMethanol.name=Methanol cell +itemCellNitroGlycerin.name=Nitro glycerin cell +itemCellAmmonia.name=Ammonia cell +itemCellGlycerol.name=Glycerol item.skull.name=Wailer remains item.guidebook.name=IHL manual item.handpump.name=IHL handpump @@ -70,6 +72,7 @@ item.handpump_discharged.name=IHL handpump tile.boneBlock.name=Bone pillar entity.LostHead.name=Wailer tile.ihlExplosive.name=Explosive pack +tile.solarEvaporator.name=Solar evaporator tile.evaporatorBlock.name=Evaporator tile.electricEvaporatorBlock.name=Electric evaporator tile.sackBlock.name=Rubber tree sap gathering sack diff --git a/assets/ihl/textures/blocks/fluidMethanolFlowing.xcf b/assets/ihl/textures/blocks/fluidMethanolFlowing.xcf deleted file mode 100644 index d3ca04845d58a1a3c5a3040afc745b6e01e79dec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4649 zcmd^?cUV)&7QpA;G}3^O5CJJcIvAP)0YvFVP!JIm5eP{Lfh5EfioGBzxOTB%MOH;z zbS;3a6}z%1_P(HtHS1!*hO2KbMesfK?YHmGH{W;e`OTR*GiT1+30jp3@8W!A517ZfrsB&V*;541rG&x zT;hhua5%m8zeNmzLaBylih;8S2}LRa50ofHYO&J#(1bGNdJ5Ah&)B3Plln3JkAShdruat;0)Es+(1INwVo5u+kx}^D6#!6uzR!8s*!z;9Rx5m5 zTyk@Boh2fHGnUZL?Y~a=JoDSoXFq3bzt6ej1dG!78mXFtB~_3u&DJP6Dg|F4;&A`{ zCH}{beZuM!$G})ox=1OK!>!`sTPBf<;dRS}615~-&XLH!b;JMAtxpUXcD>gSnB^Y< zE5#Y;pJxHw9}NJ{qyk*hdN_i7zPBiHJivZ=2^J5#-h0S!yz}|R16>5Ws7fN{VCJCM zIF3N0%)z+pZwC+n1?a(lA!A?;tbje>0(amAe1Sg*0mDHwhy&w5G7x|aAOlK}3#NdX zpb!*;#b5t+Fl!cn1wx|orLj%xAG!C7BiqVPaB(wlsh^|7*&>d(sdK5i}UO}7Dr)WD4;HWq@ z&JxGP@o+)7Xj~#L9jC-i!xiC5aAmkETpjKd?h>vUr^UU)6Y)$u2hYX(;=}P{@B;iq z{51Rm{2Kf=d^P?!{t~_g--iE4pc709P6Qu91Ys;eOvoh^5=sbL2>S>p2v-QLgx5qO zkxjHCdJ)5khnUHV&HrmnMYgsxC`x^Ag%weCgTXL@8k8@&L% zWW7mxC3<`G&g*IQ$@;eXLHd0CY5Jx5`}MEsw=_cQAk&`;EFe!r@I7yG?2>Tl$4Br+;8+G%vf=)Ez=IK(*1 zc!_b1@f{PqiKEFVlU$SaCMQg^{aO8e`wRLP_21q9rYUObXc}ue*>tmMgK4{&xmlQ* z!fdtKF*B_>+uYwg(|o!4A@j!;OpBow5{u;)hb^9P3^@TDDQ6YuIH%3h)H2*sW4Xz) z(XwNJ-GDIzW)0Xm;Eol=if5H>wcM)Ss?FNMdW7{9>q_gJHe?%~O@_@%n^QJ#Z0&3l zZ0Fk6*gmo|vWu{rWLIf-+n#Pe%zmPMnf+x4q65z%%VC|v1xM7;!!g6L)bYF%>g4Gp zaa!lpG>|aRd!T$^*}!XD8aIHO!>#1DIJ2FjoM$=LI6rf-c1d(u;&RI6qpOFj)V198 zmYadwaJN}*b#5=*9o+@)rS6vp(FcVNnm(v@(DT7ggGGba55Dff^cdkW*Q4I!FHbK| zrDv7rV=rs3RIjyO*LW;m3~vGNv^T*!(0jV~0q=J{o<3@y-9CT%a(%OWxBEUCVmCxI zqmf&=JE&EE{oqq|HeA$eL&n9TB}O`c8~p%*2>q zMiEEFj4B=VAl5B*O6;l8%+V>Mw~u}u7Z|rF?$#LlF`6;;@p|z|@fGoJ5`q(!CNz(A z89R0Cxp5}rB;#rmNr~}^TN2yHhm2n_zBS1ssW9p41iJ}&6V4=?BukSIrs$>cQ}(11 zQWH|Qr+(l^^UL_{X%T5_)7k_ZWPPw6tmU)2*f#OmCeLHe=gN%FL{pzs_=LI=(b;0x;*#PI3j_{ZeLW1R%$9A??~El;iurA zYOAq?X}svb{}(JQ8iMXU)@%dQPW&IuC{6a z@cs35zIFS4asFlN0m}oW2MrG{Iz%~CaOl(FNr&5yD2`~4ijUr}PpQ9kZ0xbi$44D+ zJP~=~^vTeZ$4&*DI(*vi^no)zXZD}vovk_Nd9J#_qha5#9>4Bu^lYp??{&WRg7<~G zrXfv-E)KhR^iuGplb0hdpSv>hO4HRbSFc}7y4HMMc>U20>5b<%b8dFrnsJ+OyXcPo zoszqzcgucr_-$viXY;|9;FgAaqwn3iFS!5och&D7S_>Y~ACx?_cv$hs{n3HPp^q;- z8ULj9sp4sew(t+eA8Vi4Kim7K|DO$QW7}GvE1!RQvEZfg%dM{lzp8JKX}|kg_PXOu z(OcuU+urfsoqC_}{$WS%2hxXCe>wbB_c8M0?N72#pI{N7FNU8jT#1Y?7IDQ&2`sZa z>j;EmuTtkrMX>Bqi=7@w5@&rE2d8jlSt3aILcv49?oOwhu{Fuv3>7f#!<0Tu z?Zeo261EQ3=umoC4>GoHPa{F-8Dn*GPb{#j+tEF-=X`Lk9<~P7x@~$ESZ6wn5=rhz zNls2nM!&67yT`w!`N_$A%)gIL?e2H#wB+Oztp7jgo^`&e`|R5p2aNLz{oV6{WJKHX zOsjpZMZc}vwAxqL__y>6t@Z^r-bc4}_dE3~t@at#@6oTj`+rwMzn*ozs{8EQ83&B> d3k}cL8Gj$$dtRVL8af^{G(2cP|4%h&_!kupZIl22 diff --git a/assets/ihl/textures/blocks/solarEvaporatorSide.png b/assets/ihl/textures/blocks/solarEvaporatorSide.png new file mode 100644 index 0000000000000000000000000000000000000000..32b5e32bc3cbfb2a58f520cfe03ad9dddeeff81a GIT binary patch literal 627 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GXl47cfP6ciK{6_u5hRa8{e)YR0~)ipIW zwY0Q!baZreb@lZ0^!4=(3=9kn4ULS9jE#*=OiWBoP0h^A%+1X$EG#T7Ev>AqtgWqW zY;0_8ZSCyr?CtFx92^`S9i5zlT%VsQd3jY($dn?(=#$MGBY!?va)h=a&mKX^Yily3JMAf3yX@1ii?X& zOH0ej$|@=gww1>+5xE%f14Gk1@&H-G!lpRn`N@;VkfoEM{Qf z76xHPhFNnYfP(BLp1!W^4_R4w`81oB#|Q$2&U(5yhDcmCJ)IqWFhPRhf%`;X!NXe4 z&wTh~eNwg7@Fq)bKAGwJ?|=P^D%)NA??2!xxZ0QZzvgxGxnf;$cKyTVDaHE@O@FQ} zoW74yK00IN>bs``mR@uIIE~e4S>N6R2VEN;vL3bSGpaw!5G~}ME%UuqMY_dhZ};QH zk!Oo0GNcsr*x&X~iDBrwx#4@2gvo@BTlf94_#?t`>QTAv@j_86d*;B~7N-xNP+v5C z3%g2k`{GHRt$(j*@)UIRFBOqgZ&>_0==eh>BehezKiL0cV7hNMO)_ftLZHVOJYD@< J);T3K0RV5A%OC&% literal 0 HcmV?d00001 diff --git a/assets/ihl/textures/gui/GUISolarEvaporator.png b/assets/ihl/textures/gui/GUISolarEvaporator.png new file mode 100644 index 0000000000000000000000000000000000000000..47547424f6318ffe0b25e14585d59d04c08f18f1 GIT binary patch literal 4608 zcma)f2TYV*u=ehJL_v%n07hvKbs0Is22ut>$3}s5NAR-a`+ZWQL;bGV>E|ru0SNg zXmBY=)N-r5Rb{_JnOj8W2CAu_>@snl60CLE>a@9~Uls-Ek5-tpf z?;yS~lqBp)+$rtlPGEi*pCh7U(CufRj9h(R5Y9AZIJoP`hU{K`YdkgJDRveY9QyJ# zmwmTpH!<^LL}{E)qJ@NZ_8{XC@~NkIYz{RjfxCf1wjvmw7nj{lLmdD=@&oyn;6-HD zDVTh5&}Fs8k`m|R#-~S+CSlzaZ+EY6m{33QG+D@t!Ut&?{j0TG!u$i}dN$IaM3-wp z=BHj;MR$<7R!A$BT;`nThFGBKT!v?V?@kN(`K(0T_*v{;)uquk$aXNny>^ENIrtnT z-vHqV0%-EqIYHbS;T~;AJt3~kA@Mh0MqaOyBqSt~@T{4scud<)g#0B{_>m&lQD9qE z?EaT{C-O9Cz|%Pker-W>^F0w$Fc|6FdD=SX6z?o#DD`{aEcO{wKK^=WU3+O zFKlV4$01B{qyuOgaTVc7N^)iRB=KpajselO3YROGPnlGfN*MihQ65jWk0!N+zKYtg zC20m9(?aby#noS|a++#Uh@%HNNE~SzRg?@k7^pSWp3>6LsWuKXVPW@T?iE^L;eVLq ziLKF12%7nxr#{N*VpxB+$%VgZ4ERAr;_p>YZ38d*VsR z?(ByYCYsfPqEOz%u zl}@CbXN$YhOk5N9_*cm))qop+b9zI1B7?Delu5=If4N<`rCUN>d0jyOE}$kLjbOT^ z&0O)S;Z+_blK07a^`J(M7`f^Q25(@IE|iY?!t+IzQSE0T%8(wbG3JB48e_I(o^rw! z;w*8dI2T7vSJB_$B+XHmWw7HQx6- zSljyL{VV?0=e7H*?EDx80waV$oRRw8W20=dl6%wla10cT`giBeBQppYkc@Hu+h*Iw zxu#}@rv?bq`KmC(5UZHdW$YV_QK_GqlTJpFd({_HA!Eg|Kd*#!gNpb@1U3~3%u+m3 z`cj2fAFbM^o12nRaj1OMhd*3YktAwdX2p8NNQZ~Ura#Oj%xf)=TbXPU3mL2G^*@+< zAds5(^+NLkV^2$x-zH}vk`c8-YSy^QDDPbFcl%z7uh`T?3=h!rkHRe$R3F&1=>RXm zp0;l7QnI$9)eJ3TD1INexluc{H-%|-FYRiVu<&pFeRscOyEbELN}om_d9T>4=<_o1 zYV)4((&#zqnP;!(1m;}3m-_UIe-Qudg^&)CS#X_qyY|cJ5Ff%teciV*5DXJ)una(k z)z#rvkqs6IOE)VGq$!e00!tb3P;4bZYI=GKRea*M6C|A}4auXIZkuG8=AD+FLI_V- z4q4i?g$*L+lHJTbWbE}nr8GQne6WmJZx6uw2QOon`U5?E-};XF>-fsA6FR55a}H+L z6*lZwaPw=;0?XS=R-4lYyemx0W?QF|)^mzOEmPsWU7Zf^`a<;U%06v)f438H63H|# zo){$mz_?>h2u^E`Y8GfIIN!WD3~vgvTVQMr4P&nyvl>87Es@j9^p;X$biNl(X&qkm35 zRK^NK`*+>vs)iTBso=FA=FASP71`Y2mb7wp4_zLO=YH^D9OwP0NYBIE^GcpMDVaLa zJK?&W;4m)c;?QjWkAt&?a7B2c4At+8HrC`0u zSD;aZUV+}7Zk_ImE`?i|JBFv8cjZlSn*NbvaC~zW<`U{h&vBEYo|{7p~<2ZiuZ(wgtsKCjzb$HxXKVY9sW-%%(P_S|9II(pgsI-?n~j zeeuAg*L=R*uhRXa*+27!ib3db+e6GsM<&Z!Zc*-8EIxLB95vQ3;Wm-M-pe{9ds(Mc z*LvpBJCQ_1PNhM`o^qJ{ij_)X`iJY!$;py2lTk_;ioCL94Ytp}lXhg@3B44m|5!I( zw6cglJg@aBZo4hN6kc?}z2f*a$ZEm#li@V^OyTM7X-@Kaa_Z3G& z!d2=I_p%Q|{rUWIy0Uo@flH5v8mErSH_Al1t#9rmZ$I~a`m<+75v+KX)huG&xcmIK zeUY#2$J;+UKPIBUu`J~6*+L3Er_Vz;{0Q`#8s}jmXg6XafLl| z*oj-~&oP`BY2{PVXM0uCn-8R4|A;-hEL$yGqyL9KDa|>ptZcT-TM2pPc^R^O{Cg|1 z;C)2p^TLbe&ret*w(=~cB(C28eoGU}=D(_vn{7^;LdPRckMdS!j{ReN))v^p`+_Gf zlyt~poSK>%4u{jx(J?SEFfuYSF)`h^apUIAo6OA2%CsOB7M5GLZn3hm z-oAaCjg3t}KtNDXP)JBfOiWB%T>LN7k(88_l9G~QQStHdiHV6xNlD4c$pDHb zH8nLeGczkID?2+Ih-Jvh$;r*l&CAPs_wF5##E!vW3JVL1ii%1~N`Nd*AXf~?=c%Zu zsI084uC4~&OW|-hph6ap#{*TGjg5@}?tW8K6HucK)G0JKH@CL7wzszfO?n+29l&Qq zXJ=xZJ+O`i_Pc?DKH#tyI2-^D2Z5t6 zz|lA0=sR#c0uaUk!Z<*f00@)7$zPoTPG*6VIpAysI9~;R?*e}gfQw(iB>}iP1Fp`2 zs|(=z3IG5@&-3noXCGjMFa{~FPdfh_*z0PlgW`y9YyAz#e6=k7K_Cjce+@i3_x$qj zC24^6BMs6eVki|AXPIH_A_zpRsI9JI5l7*_QL2Tc}%ov z$)tRa#r4}HrV+WQ+vOw6>Q#?} zK8LGKjL-}$j{C8x z9&vfRG2sp@B_46;Bua7-O)(yx@-6fi&;UW_H!eQu)3h+q6uq}d7Z+@A*gLqsKCANa za$`ry#gf5v3of_L4!o`;W2Kb6+9+vOtKv08S8CgDu}_Yqr7UEGTan)6SuEUGctzZN z_Qe?YKtQD!I(vmx1a=25P6=hZ@RhopC=j;&Y4%$jK0SHn%{nvw1Z>u3N$Y!j-WgKaQnhGkq;V>y#PpmBj@!JZRW{=5`; z3q|R-vH_i2?hzfCLuAvw1uXP1IxIbYj|@H0hTipj8jH@~Z4F}0nwrdk#&_}$L)#pV%eG7H+p z5N0GS$@-aFSnkM2b3Q%{9hSwwBM;O?JS*AYo9|J%kopz`AG@;p%z`0i$odY^aDdL@ zR@Lvn?S{f8p0Q3aGB-0>q;9$!w48Ot7Ujx-i%x2r-tutl!+NeTskn(^bm|&R0y-EJ zT@+}bO10_C&&rs_Bl+kba1*BqoUB$kh)mR^eKh&?k2JIq37rAiw(9wFeTYs``U@!Z zM-6Bs3f+%hBFkpV7eO^K89?g5$Mm8LaGgd5YT{^;L4qV+QV!eg7m@a+I0 zQOpiHos3pxae^Re@vUD+)EW}KB3t>xLDN;Vig=WVqxGhZsb>F}CC2A=q44#vEh0*6 zZBx21@C@eknWrK9vB(x%p#p4}s!(SWll$>Iag#Oa`AO3OpAD7s1MpML{u7i1siQi2 zAJ*9T5uA!Xr%s(E&mLSZ>zX5X9ebuLSWc21nqn{kiG0h);mV<`z5_~q0qyEeDos`Of{D Nqpg8ZuT-^-{13t!nkfJP literal 0 HcmV?d00001 diff --git a/assets/ihl/textures/items/itemCellAmmonia.png b/assets/ihl/textures/items/itemCellAmmonia.png new file mode 100644 index 0000000000000000000000000000000000000000..e72842a711ab4bc373cf3a6f79493f08001a1a60 GIT binary patch literal 331 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}a)3{Wt3caHA;v5Ph9icChDJt4 z0RaKir%#_TW5$$40aMn;Oj{qba^=cZt5z-Ek+NiG+NMK!n-Aq3I9+z|bj8`rb!V^C z-@M&=^G@r{n>TOWy7l-`_v6Psub=n7elg+W>&ai=P5u0T&#zyRH7Ibf2IwC4x-EXo getRecipeOutputs(int currentSlot) List list = new ArrayList(); for(int i=0;i iconMap = new HashMap(); private static Map nameMap = new HashMap(); @@ -69,19 +68,6 @@ public void addInformation(ItemStack itemStack, EntityPlayer player, List info, info.add("Length " + itemStack.stackTagCompound.getInteger("length") +"m"); } } - - @Override - public String getTag() - { - return "length"; - } - - @Override - public String getTagSecondary() - { - return "fullLength"; - } - @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister register) @@ -118,11 +104,4 @@ public static enum Type public int damage; public String unLocalizedName; } - - - @Override - public boolean isSameWire(ItemStack stack1,ItemStack stack2) - { - return stack1.getItem()==stack2.getItem(); - } } diff --git a/ihl/items_blocks/IHLBucketHandler.java b/ihl/items_blocks/IHLBucketHandler.java index c0a23b6..9f3a7b8 100644 --- a/ihl/items_blocks/IHLBucketHandler.java +++ b/ihl/items_blocks/IHLBucketHandler.java @@ -1,8 +1,8 @@ package ihl.items_blocks; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; import net.minecraftforge.event.entity.player.FillBucketEvent; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class IHLBucketHandler { diff --git a/ihl/items_blocks/IHLFluidBlock.java b/ihl/items_blocks/IHLFluidBlock.java index 29d2d99..7ad7730 100644 --- a/ihl/items_blocks/IHLFluidBlock.java +++ b/ihl/items_blocks/IHLFluidBlock.java @@ -1,9 +1,9 @@ package ihl.items_blocks; -import ihl.IHLModInfo; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLModInfo; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/ihl/items_blocks/IHLTool.java b/ihl/items_blocks/IHLTool.java index 1479072..150d0ca 100644 --- a/ihl/items_blocks/IHLTool.java +++ b/ihl/items_blocks/IHLTool.java @@ -4,6 +4,17 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.api.reactor.IReactor; +import ihl.IHLCreativeTab; +import ihl.IHLModInfo; +import ihl.flexible_cable.SetOfDiesMiniGUI; +import ihl.interfaces.IHasTemperature; +import ihl.interfaces.IItemHasMiniGUI; +import ihl.interfaces.ItemMiniGUI; +import ihl.utils.IHLUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -29,17 +40,6 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import ic2.api.reactor.IReactor; -import ihl.IHLCreativeTab; -import ihl.IHLModInfo; -import ihl.flexible_cable.SetOfDiesMiniGUI; -import ihl.interfaces.IHasTemperature; -import ihl.interfaces.IItemHasMiniGUI; -import ihl.interfaces.ItemMiniGUI; -import ihl.utils.IHLUtils; public class IHLTool extends Item implements IItemHasMiniGUI{ private static Map iconMap = new HashMap(); diff --git a/ihl/items_blocks/ItemSubstance.java b/ihl/items_blocks/ItemSubstance.java index 9c55e36..507e65b 100644 --- a/ihl/items_blocks/ItemSubstance.java +++ b/ihl/items_blocks/ItemSubstance.java @@ -1,5 +1,12 @@ package ihl.items_blocks; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.item.IC2Items; import ic2.api.recipe.RecipeInputOreDict; import ic2.api.recipe.Recipes; @@ -10,11 +17,6 @@ import ihl.interfaces.ItemMiniGUI; import ihl.utils.IHLUtils; import ihl.worldgen.ores.IHLFluid.IHLFluidType; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -27,12 +29,9 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; +import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemSubstance extends Item implements IItemHasMiniGUI { diff --git a/ihl/items_blocks/MachineBaseBlock.java b/ihl/items_blocks/MachineBaseBlock.java index 6276e93..aef567c 100644 --- a/ihl/items_blocks/MachineBaseBlock.java +++ b/ihl/items_blocks/MachineBaseBlock.java @@ -1,5 +1,11 @@ package ihl.items_blocks; +import java.util.ArrayList; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.tile.IWrenchable; import ic2.core.IC2; import ic2.core.IHasGui; @@ -26,6 +32,7 @@ import ihl.processing.chemistry.LoomTileEntity; import ihl.processing.chemistry.PaperMachineTileEntity; import ihl.processing.chemistry.RefluxCondenserTileEntity; +import ihl.processing.chemistry.SolarEvaporatorTileEntity; import ihl.processing.metallurgy.AchesonFurnanceTileEntity; import ihl.processing.metallurgy.CoilerTileEntity; import ihl.processing.metallurgy.DetonationSprayingMachineTileEntity; @@ -42,10 +49,6 @@ import ihl.processing.metallurgy.WoodenRollingMachinePart1TileEntity; import ihl.processing.metallurgy.WoodenRollingMachinePart2TileEntity; import ihl.utils.IHLUtils; - -import java.util.ArrayList; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; @@ -64,13 +67,10 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class MachineBaseBlock extends Block implements ITileEntityProvider { - MachineType type; + public MachineType type; private static List instances = new ArrayList(); @SideOnly(Side.CLIENT) @@ -80,7 +80,7 @@ public class MachineBaseBlock extends Block implements ITileEntityProvider { textureLeftMachineCasing, textureTopMachineCasing, textureRightMachineCasing, textureFrontMachineCasing, textureFrontPaperMachine, textureBackMachineCasing, bronzeTubTop, bronzeTubSide, steel, redPaint, greenPaint, rubberInsulatedCase, powerPort, dosingPumpBack, dosingPumpLeftSide, dosingPumpRightSide, - dosingPumpTop, dosingPumpFront; + dosingPumpTop, dosingPumpFront, solarEvaporatorSide; public MachineBaseBlock(MachineType type1) { super(Material.iron); @@ -143,17 +143,20 @@ public void onBlockPreDestroy(World world, int x, int y, int z, int meta) { @Override public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list, Entity entity) { + float height = 1f; switch (this.type) { + case SolarEvaporator: + height = 0.5f; case BronzeTub: this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 1.0F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); - this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.1F, 1.0F, 1.0F); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.1F, height, 1.0F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.1F); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, height, 0.1F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); - this.setBlockBounds(0.9F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + this.setBlockBounds(0.9F, 0.0F, 0.0F, 1.0F, height, 1.0F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); - this.setBlockBounds(0.0F, 0.0F, 0.9F, 1.0F, 1.0F, 1.0F); + this.setBlockBounds(0.0F, 0.0F, 0.9F, 1.0F, height, 1.0F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); this.setBlockBoundsForItemRender(); break; @@ -165,7 +168,12 @@ public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAligne @Override public void setBlockBoundsForItemRender() { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + if(this.type.equals(MachineType.SolarEvaporator)){ + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5f, 1.0F); + } + else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } } public static void init() { @@ -239,6 +247,7 @@ public void registerBlockIcons(IIconRegister par1IconRegister) { this.dosingPumpRightSide = par1IconRegister.registerIcon(IHLModInfo.MODID + ":dosingPumpRight"); this.dosingPumpTop = par1IconRegister.registerIcon(IHLModInfo.MODID + ":dosingPumpTop"); this.dosingPumpFront = par1IconRegister.registerIcon(IHLModInfo.MODID + ":dosingPumpFront"); + this.solarEvaporatorSide = par1IconRegister.registerIcon(IHLModInfo.MODID + ":solarEvaporatorSide"); } @Override @@ -364,6 +373,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case AchesonFurnace: return this.blockIcon; case MuffleFurnace: @@ -391,6 +402,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case LeadOven: return this.textureSideGoldFurnace; case WireMill: @@ -415,6 +428,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case LeadOven: return this.textureSideGoldFurnace; case WireMill: @@ -437,6 +452,7 @@ public IIcon getIconFromFacing(int facing, int side) { case 3: switch (this.type) { case BronzeTub: + case SolarEvaporator: return this.bronzeTubTop; case AchesonFurnace: return this.textureTopAchesonFurnance; @@ -465,6 +481,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case LeadOven: return this.textureSideGoldFurnace; case WireMill: @@ -488,6 +506,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case LeadOven: return this.textureSideGoldFurnace; case CryogenicDistiller: @@ -528,6 +548,7 @@ public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int m } public enum MachineType { + SolarEvaporator("solarEvaporator", SolarEvaporatorTileEntity.class, false, true, null), DosingPump("dosingPump", DosingPumpTileEntity.class, true, null), IronWorkbench("ironWorkbench", IronWorkbenchTileEntity.class, false, true, null), ElectrolysisBath("electrolysisBath", ElectrolysisBathTileEntity.class, false, IHLUtils @@ -630,6 +651,8 @@ public boolean renderAsNormalBlock() { @SideOnly(Side.CLIENT) public IIcon getAdditionalIconsForBlockRenderer(int flag) { switch (this.type) { + case SolarEvaporator: + return this.solarEvaporatorSide; case BronzeTub: return this.bronzeTubSide; default: diff --git a/ihl/model/CableHolderSelectionBoxSpecialRenderer.java b/ihl/model/CableHolderSelectionBoxSpecialRenderer.java index d06f050..e878a78 100644 --- a/ihl/model/CableHolderSelectionBoxSpecialRenderer.java +++ b/ihl/model/CableHolderSelectionBoxSpecialRenderer.java @@ -1,5 +1,9 @@ package ihl.model; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.flexible_cable.AnchorTileEntity; import ihl.interfaces.ISelectionBoxSpecialRenderer; import ihl.utils.IHLUtils; @@ -11,11 +15,6 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MovingObjectPosition; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(value=Side.CLIENT) public class CableHolderSelectionBoxSpecialRenderer implements ISelectionBoxSpecialRenderer { diff --git a/ihl/model/FlexibleCableItemRender.java b/ihl/model/FlexibleCableItemRender.java index fab019c..e11a253 100644 --- a/ihl/model/FlexibleCableItemRender.java +++ b/ihl/model/FlexibleCableItemRender.java @@ -1,5 +1,9 @@ package ihl.model; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.items_blocks.FlexibleCableItem; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; @@ -11,11 +15,6 @@ import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.common.util.ForgeDirection; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(value=Side.CLIENT) public class FlexibleCableItemRender implements IItemRenderer { private ModelTube model; diff --git a/ihl/model/FluidRenderer.java b/ihl/model/FluidRenderer.java index 87b1abe..674e4ea 100644 --- a/ihl/model/FluidRenderer.java +++ b/ihl/model/FluidRenderer.java @@ -15,17 +15,17 @@ import java.util.HashMap; import java.util.Map; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GLAllocation; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.util.IIcon; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GLAllocation; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.init.Blocks; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; diff --git a/ihl/model/IHLBlockRenderer.java b/ihl/model/IHLBlockRenderer.java index 2244ab7..81efbd9 100644 --- a/ihl/model/IHLBlockRenderer.java +++ b/ihl/model/IHLBlockRenderer.java @@ -1,19 +1,18 @@ package ihl.model; -import ihl.handpump.BlockWithCoordinates; - import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import net.minecraft.client.renderer.GLAllocation; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.handpump.BlockWithCoordinates; +import net.minecraft.client.renderer.GLAllocation; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.ChunkCache; import net.minecraft.world.World; diff --git a/ihl/model/IHLToolRenderer.java b/ihl/model/IHLToolRenderer.java index dd64731..31758b2 100644 --- a/ihl/model/IHLToolRenderer.java +++ b/ihl/model/IHLToolRenderer.java @@ -1,6 +1,5 @@ package ihl.model; -import ihl.items_blocks.IHLTool; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; diff --git a/ihl/model/ImpregnatingMachineBlockRender.java b/ihl/model/ImpregnatingMachineBlockRender.java index b36f3bd..2602fd0 100644 --- a/ihl/model/ImpregnatingMachineBlockRender.java +++ b/ihl/model/ImpregnatingMachineBlockRender.java @@ -1,17 +1,18 @@ package ihl.model; -import ihl.items_blocks.MachineBaseBlock; import org.lwjgl.opengl.GL11; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ihl.items_blocks.MachineBaseBlock; +import ihl.items_blocks.MachineBaseBlock.MachineType; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value=Side.CLIENT) public class ImpregnatingMachineBlockRender implements ISimpleBlockRenderingHandler @@ -32,6 +33,7 @@ public int getRenderId() @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderblocks) { + MachineBaseBlock blockmb = (MachineBaseBlock) block; Tessellator tessellator = Tessellator.instance; block.setBlockBoundsForItemRender(); renderblocks.setRenderBoundsFromBlock(block); @@ -62,11 +64,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderblocks.getBlockIconFromSideAndMetadata(block, 5, metadata)); tessellator.draw(); float var11 = 0.0625F; - IIcon innerSideIcon = block.getBlockTextureFromSide(0); - if(block instanceof MachineBaseBlock) - { - innerSideIcon = ((MachineBaseBlock)block).getAdditionalIconsForBlockRenderer(0); - } + IIcon innerSideIcon = blockmb.getAdditionalIconsForBlockRenderer(0); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, -1.0F); renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 1.0F - var11, innerSideIcon); @@ -83,13 +81,11 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB tessellator.setNormal(1.0F, 0.0F, 0.0F); renderblocks.renderFaceXPos(block, var11-1.0F, 0.0D, 0.0D, innerSideIcon); tessellator.draw(); - IIcon innerBottomIcon = block.getBlockTextureFromSide(0); - if(block instanceof MachineBaseBlock) - { - innerBottomIcon = ((MachineBaseBlock)block).getAdditionalIconsForBlockRenderer(1); - } + IIcon innerBottomIcon = blockmb.getAdditionalIconsForBlockRenderer(1); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); + if(blockmb.type.equals(MachineType.SolarEvaporator)) + var11 = 0.5625f; renderblocks.renderFaceYPos(block, 0.0D, var11-1.0F, 0.0D, innerBottomIcon); tessellator.draw(); GL11.glTranslatef(0.5F, 0.5F, 0.5F); @@ -98,6 +94,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB @Override public boolean renderWorldBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int meta, RenderBlocks blockRenderer) { + MachineBaseBlock blockmb = (MachineBaseBlock) block; blockRenderer.renderStandardBlock(block, x, y, z); Tessellator var5 = Tessellator.instance; var5.setBrightness(block.getMixedBrightnessForBlock(blockAccess, x, y, z)); @@ -107,21 +104,16 @@ public boolean renderWorldBlock(IBlockAccess blockAccess, int x, int y, int z, B float var9 = (var6 & 255) / 255.0F; float var11; var5.setColorOpaque_F(var7, var8, var9); - IIcon innerSideIcon = block.getBlockTextureFromSide(0); - if(block instanceof MachineBaseBlock) - { - innerSideIcon = ((MachineBaseBlock)block).getAdditionalIconsForBlockRenderer(0); - } + IIcon innerSideIcon = blockmb.getAdditionalIconsForBlockRenderer(0); var11 = 0.0625F; + blockRenderer.renderFaceXPos(block, x - 1.0F + var11, y, z, innerSideIcon); blockRenderer.renderFaceXNeg(block, x + 1.0F - var11, y, z, innerSideIcon); blockRenderer.renderFaceZPos(block, x, y, z - 1.0F + var11, innerSideIcon); blockRenderer.renderFaceZNeg(block, x, y, z + 1.0F - var11, innerSideIcon); - IIcon innerBottomIcon = block.getBlockTextureFromSide(0); - if(block instanceof MachineBaseBlock) - { - innerBottomIcon = ((MachineBaseBlock)block).getAdditionalIconsForBlockRenderer(1); - } + IIcon innerBottomIcon = blockmb.getAdditionalIconsForBlockRenderer(1); + if(blockmb.type.equals(MachineType.SolarEvaporator)) + var11 = 0.5625f; blockRenderer.renderFaceYPos(block, x, y - 1.0F + var11, z, innerBottomIcon); return true; } diff --git a/ihl/model/IronWorkbenchBlockRender.java b/ihl/model/IronWorkbenchBlockRender.java index 7e986c9..1af81cf 100644 --- a/ihl/model/IronWorkbenchBlockRender.java +++ b/ihl/model/IronWorkbenchBlockRender.java @@ -2,14 +2,14 @@ import org.lwjgl.opengl.GL11; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.world.IBlockAccess; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.world.IBlockAccess; @SideOnly(value=Side.CLIENT) public class IronWorkbenchBlockRender implements ISimpleBlockRenderingHandler diff --git a/ihl/model/RectifierTransformerUnitBlockRender.java b/ihl/model/RectifierTransformerUnitBlockRender.java index 567745f..9f45ee4 100644 --- a/ihl/model/RectifierTransformerUnitBlockRender.java +++ b/ihl/model/RectifierTransformerUnitBlockRender.java @@ -1,10 +1,13 @@ package ihl.model; -import ic2.api.tile.IWrenchable; -import ihl.utils.IHLRenderUtils; - import org.lwjgl.opengl.GL11; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.api.tile.IWrenchable; +import ihl.utils.IHLRenderUtils; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; @@ -12,10 +15,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value=Side.CLIENT) public class RectifierTransformerUnitBlockRender implements ISimpleBlockRenderingHandler diff --git a/ihl/model/RectifierTransformerUnitSelectionBoxSpecialRenderer.java b/ihl/model/RectifierTransformerUnitSelectionBoxSpecialRenderer.java index f8a5340..4ce866b 100644 --- a/ihl/model/RectifierTransformerUnitSelectionBoxSpecialRenderer.java +++ b/ihl/model/RectifierTransformerUnitSelectionBoxSpecialRenderer.java @@ -1,5 +1,9 @@ package ihl.model; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.flexible_cable.RectifierTransformerUnitTileEntity; import ihl.interfaces.ISelectionBoxSpecialRenderer; import net.minecraft.client.Minecraft; @@ -9,11 +13,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(value=Side.CLIENT) public class RectifierTransformerUnitSelectionBoxSpecialRenderer implements ISelectionBoxSpecialRenderer { diff --git a/ihl/model/RefluxCondenserBlockRender.java b/ihl/model/RefluxCondenserBlockRender.java index ec70021..c9021b9 100644 --- a/ihl/model/RefluxCondenserBlockRender.java +++ b/ihl/model/RefluxCondenserBlockRender.java @@ -1,10 +1,13 @@ package ihl.model; -import ic2.api.tile.IWrenchable; -import ihl.utils.IHLRenderUtils; - import org.lwjgl.opengl.GL11; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.api.tile.IWrenchable; +import ihl.utils.IHLRenderUtils; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; @@ -12,10 +15,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value=Side.CLIENT) public class RefluxCondenserBlockRender implements ISimpleBlockRenderingHandler diff --git a/ihl/model/UniversalTileRender.java b/ihl/model/UniversalTileRender.java index 049d465..d3cb4c6 100644 --- a/ihl/model/UniversalTileRender.java +++ b/ihl/model/UniversalTileRender.java @@ -1,9 +1,4 @@ package ihl.model; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; @@ -11,6 +6,11 @@ import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; import ihl.flexible_cable.IronWorkbenchModel; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class UniversalTileRender extends TileEntitySpecialRenderer{ private ModelBase model = new IronWorkbenchModel(); diff --git a/ihl/nei_integration/AchesonFurnaceRecipeHandler.java b/ihl/nei_integration/AchesonFurnaceRecipeHandler.java index 959991e..2ffa450 100644 --- a/ihl/nei_integration/AchesonFurnaceRecipeHandler.java +++ b/ihl/nei_integration/AchesonFurnaceRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class AchesonFurnaceRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/CrucibleRecipeHandler.java b/ihl/nei_integration/CrucibleRecipeHandler.java index acd2849..87bd6a2 100644 --- a/ihl/nei_integration/CrucibleRecipeHandler.java +++ b/ihl/nei_integration/CrucibleRecipeHandler.java @@ -10,7 +10,6 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLUtils; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class CrucibleRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/DetonationSprayingMachineRecipeHandler.java b/ihl/nei_integration/DetonationSprayingMachineRecipeHandler.java index 5280d37..e821bef 100644 --- a/ihl/nei_integration/DetonationSprayingMachineRecipeHandler.java +++ b/ihl/nei_integration/DetonationSprayingMachineRecipeHandler.java @@ -9,7 +9,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class DetonationSprayingMachineRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/ElectricEvaporatorRecipeHandler.java b/ihl/nei_integration/ElectricEvaporatorRecipeHandler.java index 6006aa0..349601a 100644 --- a/ihl/nei_integration/ElectricEvaporatorRecipeHandler.java +++ b/ihl/nei_integration/ElectricEvaporatorRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class ElectricEvaporatorRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/ElectrolysisBathRecipeHandler.java b/ihl/nei_integration/ElectrolysisBathRecipeHandler.java index 381c141..bf91f03 100644 --- a/ihl/nei_integration/ElectrolysisBathRecipeHandler.java +++ b/ihl/nei_integration/ElectrolysisBathRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class ElectrolysisBathRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/EvaporatorRecipeHandler.java b/ihl/nei_integration/EvaporatorRecipeHandler.java index 8bf9431..54eb4e9 100644 --- a/ihl/nei_integration/EvaporatorRecipeHandler.java +++ b/ihl/nei_integration/EvaporatorRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class EvaporatorRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/ExtruderRecipeHandler.java b/ihl/nei_integration/ExtruderRecipeHandler.java index c00c471..64dd072 100644 --- a/ihl/nei_integration/ExtruderRecipeHandler.java +++ b/ihl/nei_integration/ExtruderRecipeHandler.java @@ -3,13 +3,11 @@ import java.awt.Rectangle; import java.util.Map; -import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect; import ihl.processing.metallurgy.ExtruderGui; import ihl.processing.metallurgy.ExtruderTileEntity; import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class ExtruderRecipeHandler extends MachineRecipeHandler { @Override diff --git a/ihl/nei_integration/FluidizedBedReactorRecipeHandler.java b/ihl/nei_integration/FluidizedBedReactorRecipeHandler.java index 00aef05..2f9c581 100644 --- a/ihl/nei_integration/FluidizedBedReactorRecipeHandler.java +++ b/ihl/nei_integration/FluidizedBedReactorRecipeHandler.java @@ -9,7 +9,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class FluidizedBedReactorRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/FractionationColumnRecipeHandler.java b/ihl/nei_integration/FractionationColumnRecipeHandler.java index 399adca..693dce2 100644 --- a/ihl/nei_integration/FractionationColumnRecipeHandler.java +++ b/ihl/nei_integration/FractionationColumnRecipeHandler.java @@ -6,7 +6,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class FractionationColumnRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/GasWeldingStationGasRecipeHandler.java b/ihl/nei_integration/GasWeldingStationGasRecipeHandler.java index 8d5a0c4..eef6b75 100644 --- a/ihl/nei_integration/GasWeldingStationGasRecipeHandler.java +++ b/ihl/nei_integration/GasWeldingStationGasRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class GasWeldingStationGasRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/IHLBlockHighlightHandler.java b/ihl/nei_integration/IHLBlockHighlightHandler.java index 4862a9b..1fc3666 100644 --- a/ihl/nei_integration/IHLBlockHighlightHandler.java +++ b/ihl/nei_integration/IHLBlockHighlightHandler.java @@ -1,16 +1,16 @@ package ihl.nei_integration; +import java.util.List; + import codechicken.nei.api.IHighlightHandler; import codechicken.nei.api.ItemInfo; +import ihl.flexible_cable.RectifierTransformerUnitTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import ihl.flexible_cable.RectifierTransformerUnitTileEntity; - -import java.util.List; public class IHLBlockHighlightHandler implements IHighlightHandler { diff --git a/ihl/nei_integration/IHLPositionedStack.java b/ihl/nei_integration/IHLPositionedStack.java index 5c81ba9..f818b17 100644 --- a/ihl/nei_integration/IHLPositionedStack.java +++ b/ihl/nei_integration/IHLPositionedStack.java @@ -1,7 +1,7 @@ package ihl.nei_integration; -import ihl.recipes.RecipeOutputItemStack; import codechicken.nei.PositionedStack; +import ihl.recipes.RecipeOutputItemStack; public class IHLPositionedStack extends PositionedStack { diff --git a/ihl/nei_integration/IHLRecipeHandler.java b/ihl/nei_integration/IHLRecipeHandler.java index a0d7f7f..a263ae8 100644 --- a/ihl/nei_integration/IHLRecipeHandler.java +++ b/ihl/nei_integration/IHLRecipeHandler.java @@ -1,5 +1,14 @@ package ihl.nei_integration; +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.lwjgl.opengl.GL11; + import codechicken.lib.gui.GuiDraw; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; @@ -7,14 +16,7 @@ import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeOutput; import ic2.core.util.StackUtil; -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; public abstract class IHLRecipeHandler extends TemplateRecipeHandler { diff --git a/ihl/nei_integration/ImpregnatingMachineRecipeHandler.java b/ihl/nei_integration/ImpregnatingMachineRecipeHandler.java index e749617..9abad4b 100644 --- a/ihl/nei_integration/ImpregnatingMachineRecipeHandler.java +++ b/ihl/nei_integration/ImpregnatingMachineRecipeHandler.java @@ -9,7 +9,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class ImpregnatingMachineRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/InjectionMoldRecipeHandler.java b/ihl/nei_integration/InjectionMoldRecipeHandler.java index 97d03d2..e125b54 100644 --- a/ihl/nei_integration/InjectionMoldRecipeHandler.java +++ b/ihl/nei_integration/InjectionMoldRecipeHandler.java @@ -7,7 +7,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class InjectionMoldRecipeHandler extends MachineRecipeHandler { @Override diff --git a/ihl/nei_integration/IronWorkbenchRecipeHandler.java b/ihl/nei_integration/IronWorkbenchRecipeHandler.java index f0de0c5..c060bb7 100644 --- a/ihl/nei_integration/IronWorkbenchRecipeHandler.java +++ b/ihl/nei_integration/IronWorkbenchRecipeHandler.java @@ -1,26 +1,25 @@ package ihl.nei_integration; -import codechicken.lib.gui.GuiDraw; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.TemplateRecipeHandler; -import ic2.api.recipe.IRecipeInput; -import ihl.recipes.IronWorkbenchRecipe; -import ihl.utils.IHLUtils; - import java.awt.Rectangle; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; +import ic2.api.recipe.IRecipeInput; import ihl.flexible_cable.IronWorkbenchGui; import ihl.flexible_cable.IronWorkbenchTileEntity; import ihl.interfaces.IWire; +import ihl.recipes.IronWorkbenchRecipe; +import ihl.utils.IHLUtils; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; public class IronWorkbenchRecipeHandler extends TemplateRecipeHandler { diff --git a/ihl/nei_integration/LabElectrolyzerRecipeHandler.java b/ihl/nei_integration/LabElectrolyzerRecipeHandler.java index ea705f6..a9df742 100644 --- a/ihl/nei_integration/LabElectrolyzerRecipeHandler.java +++ b/ihl/nei_integration/LabElectrolyzerRecipeHandler.java @@ -11,7 +11,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class LabElectrolyzerRecipeHandler extends MachineRecipeHandler { @Override diff --git a/ihl/nei_integration/LeadOvenRecipeHandler.java b/ihl/nei_integration/LeadOvenRecipeHandler.java index 98861a2..8a7f686 100644 --- a/ihl/nei_integration/LeadOvenRecipeHandler.java +++ b/ihl/nei_integration/LeadOvenRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class LeadOvenRecipeHandler extends MachineRecipeHandler { @Override diff --git a/ihl/nei_integration/MachineRecipeHandler.java b/ihl/nei_integration/MachineRecipeHandler.java index 9373738..f4f9412 100644 --- a/ihl/nei_integration/MachineRecipeHandler.java +++ b/ihl/nei_integration/MachineRecipeHandler.java @@ -1,5 +1,13 @@ package ihl.nei_integration; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.lwjgl.opengl.GL11; + import codechicken.lib.gui.GuiDraw; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; @@ -13,13 +21,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLUtils; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -30,8 +31,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import org.lwjgl.opengl.GL11; - public abstract class MachineRecipeHandler extends TemplateRecipeHandler { protected int ticks; diff --git a/ihl/nei_integration/NEIIHLConfig.java b/ihl/nei_integration/NEIIHLConfig.java index 8047b27..c1867a7 100644 --- a/ihl/nei_integration/NEIIHLConfig.java +++ b/ihl/nei_integration/NEIIHLConfig.java @@ -1,5 +1,8 @@ package ihl.nei_integration; +import codechicken.nei.api.API; +import codechicken.nei.api.IConfigureNEI; +import codechicken.nei.api.ItemInfo; import ihl.IHLModInfo; import ihl.processing.chemistry.ChemicalReactorGui; import ihl.processing.chemistry.CryogenicDistillerGui; @@ -19,9 +22,6 @@ import ihl.processing.metallurgy.RollingMachineGui; import ihl.processing.metallurgy.WireMillGui; import ihl.processing.metallurgy.WoodenRollingMachineGui; -import codechicken.nei.api.API; -import codechicken.nei.api.IConfigureNEI; -import codechicken.nei.api.ItemInfo; public class NEIIHLConfig implements IConfigureNEI { diff --git a/ihl/nei_integration/PaperMachineRecipeHandler.java b/ihl/nei_integration/PaperMachineRecipeHandler.java index 141872b..0a5fc90 100644 --- a/ihl/nei_integration/PaperMachineRecipeHandler.java +++ b/ihl/nei_integration/PaperMachineRecipeHandler.java @@ -3,7 +3,6 @@ import java.awt.Rectangle; import java.util.Map; -import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect; import ihl.processing.chemistry.PaperMachineGui; import ihl.processing.chemistry.PaperMachineTileEntity; import ihl.recipes.UniversalRecipeInput; diff --git a/ihl/nei_integration/WireMillRecipeHandler.java b/ihl/nei_integration/WireMillRecipeHandler.java index 6d4ca5f..aebf85e 100644 --- a/ihl/nei_integration/WireMillRecipeHandler.java +++ b/ihl/nei_integration/WireMillRecipeHandler.java @@ -6,7 +6,6 @@ import org.lwjgl.opengl.GL11; import codechicken.lib.gui.GuiDraw; - import ihl.processing.metallurgy.WireMillGui; import ihl.processing.metallurgy.WireMillTileEntity; import ihl.recipes.UniversalRecipeInput; diff --git a/ihl/processing/chemistry/ApparatusProcessableInvSlot.java b/ihl/processing/chemistry/ApparatusProcessableInvSlot.java index 84a931b..bfed5c9 100644 --- a/ihl/processing/chemistry/ApparatusProcessableInvSlot.java +++ b/ihl/processing/chemistry/ApparatusProcessableInvSlot.java @@ -1,11 +1,11 @@ package ihl.processing.chemistry; -import ic2.api.recipe.IRecipeInput; -import ic2.core.block.TileEntityInventory; -import ic2.core.block.invslot.InvSlot; import java.util.ArrayList; import java.util.List; +import ic2.api.recipe.IRecipeInput; +import ic2.core.block.TileEntityInventory; +import ic2.core.block.invslot.InvSlot; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -13,7 +13,7 @@ public class ApparatusProcessableInvSlot extends InvSlot { public ApparatusProcessableInvSlot(TileEntityInventory base1, String name1, int oldStartIndex1, Access access1, int count, int stackSizeLimit1) { - super(base1, name1, oldStartIndex1, access1, count); + super(base1, name1, oldStartIndex1, Access.I, count); this.setStackSizeLimit(stackSizeLimit1); } diff --git a/ihl/processing/chemistry/BatteryItem.java b/ihl/processing/chemistry/BatteryItem.java index 10cd7cd..b9c5435 100644 --- a/ihl/processing/chemistry/BatteryItem.java +++ b/ihl/processing/chemistry/BatteryItem.java @@ -8,7 +8,6 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; import ic2.api.item.IItemHudInfo; diff --git a/ihl/processing/chemistry/ChemicalReactorContainer.java b/ihl/processing/chemistry/ChemicalReactorContainer.java index a1cc0b4..a426765 100644 --- a/ihl/processing/chemistry/ChemicalReactorContainer.java +++ b/ihl/processing/chemistry/ChemicalReactorContainer.java @@ -2,12 +2,9 @@ import java.util.List; -import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraftforge.fluids.FluidStack; public class ChemicalReactorContainer extends BasicElectricMotorContainer { diff --git a/ihl/processing/chemistry/ChemicalReactorGui.java b/ihl/processing/chemistry/ChemicalReactorGui.java index 029281b..de22f76 100644 --- a/ihl/processing/chemistry/ChemicalReactorGui.java +++ b/ihl/processing/chemistry/ChemicalReactorGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class ChemicalReactorGui extends GuiContainer { diff --git a/ihl/processing/chemistry/ChemicalReactorTileEntity.java b/ihl/processing/chemistry/ChemicalReactorTileEntity.java index 2630ed2..a124265 100644 --- a/ihl/processing/chemistry/ChemicalReactorTileEntity.java +++ b/ihl/processing/chemistry/ChemicalReactorTileEntity.java @@ -3,26 +3,15 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.block.invslot.InvSlot; import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; -import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.invslots.IHLInvSlotOutput; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.processing.metallurgy.BasicElectricMotorTileEntity; @@ -31,6 +20,16 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class ChemicalReactorTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { @@ -49,7 +48,7 @@ public ChemicalReactorTileEntity() { this.drainInputSlot = new InvSlotConsumableLiquidIHL(this, "drainInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.TOP, InvSlotConsumableLiquid.OpType.Drain); this.fillInputSlot = new InvSlotConsumableLiquidIHL(this, "fillInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill); this.emptyFluidItemsSlot = new InvSlotOutput(this, "fluidCellsOutput", 2, 1); - this.input = new ApparatusProcessableInvSlot(this, "input", 3, Access.IO, 2, 64); + this.input = new ApparatusProcessableInvSlot(this, "input", 3, Access.I, 2, 64); } @Override diff --git a/ihl/processing/chemistry/CryogenicDistillerContainer.java b/ihl/processing/chemistry/CryogenicDistillerContainer.java index d04ec4e..988b844 100644 --- a/ihl/processing/chemistry/CryogenicDistillerContainer.java +++ b/ihl/processing/chemistry/CryogenicDistillerContainer.java @@ -2,12 +2,9 @@ import java.util.List; -import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraftforge.fluids.FluidStack; public class CryogenicDistillerContainer extends BasicElectricMotorContainer { diff --git a/ihl/processing/chemistry/CryogenicDistillerTileEntity.java b/ihl/processing/chemistry/CryogenicDistillerTileEntity.java index 9bd11a3..e197088 100644 --- a/ihl/processing/chemistry/CryogenicDistillerTileEntity.java +++ b/ihl/processing/chemistry/CryogenicDistillerTileEntity.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ic2.core.block.invslot.InvSlot; import ic2.core.block.invslot.InvSlotConsumableLiquid; @@ -25,8 +27,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class CryogenicDistillerTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { diff --git a/ihl/processing/chemistry/DosingPumpGui.java b/ihl/processing/chemistry/DosingPumpGui.java index 090bdec..dde4f13 100644 --- a/ihl/processing/chemistry/DosingPumpGui.java +++ b/ihl/processing/chemistry/DosingPumpGui.java @@ -1,29 +1,27 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; - -import cpw.mods.fml.relauncher.SideOnly; -import ic2.core.IC2; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - import java.awt.event.KeyEvent; import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.ClientProxy; import ihl.IHLMod; import ihl.utils.IHLRenderUtils; import ihl.utils.IHLUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; @SideOnly(Side.CLIENT) public class DosingPumpGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUIDosingPump.png"); private DosingPumpContainer container; private GuiTextField setpointTextField; + private int lastFluidAmountSetpoint = -1; private final static int TANK_HEIGHT = 58; public DosingPumpGui(DosingPumpContainer container1) { @@ -38,6 +36,10 @@ public DosingPumpGui(DosingPumpContainer container1) { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { + if(lastFluidAmountSetpoint!= this.container.tileEntity.fluidAmountSetpoint){ + setpointTextField.setText(Integer.toString(this.container.tileEntity.fluidAmountSetpoint)); + lastFluidAmountSetpoint= this.container.tileEntity.fluidAmountSetpoint; + } int xOffset = (this.width - xSize) / 2; int yOffset = (this.height - ySize) / 2; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/ihl/processing/chemistry/DosingPumpTileEntity.java b/ihl/processing/chemistry/DosingPumpTileEntity.java index d676bf9..e1e4996 100644 --- a/ihl/processing/chemistry/DosingPumpTileEntity.java +++ b/ihl/processing/chemistry/DosingPumpTileEntity.java @@ -1,9 +1,18 @@ package ihl.processing.chemistry; import java.util.List; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ic2.core.block.invslot.InvSlot; +import ic2.core.block.invslot.InvSlotConsumableLiquid; +import ic2.core.block.invslot.InvSlotOutput; +import ihl.processing.invslots.InvSlotConsumableLiquidIHL; +import ihl.processing.metallurgy.BasicElectricMotorTileEntity; +import ihl.utils.IHLFluidTank; +import ihl.utils.IHLUtils; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -14,15 +23,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import ic2.core.ContainerBase; -import ic2.core.IC2; -import ic2.core.block.invslot.InvSlot; -import ic2.core.block.invslot.InvSlotConsumableLiquid; -import ic2.core.block.invslot.InvSlotOutput; -import ihl.processing.invslots.InvSlotConsumableLiquidIHL; -import ihl.processing.metallurgy.BasicElectricMotorTileEntity; -import ihl.utils.IHLFluidTank; -import ihl.utils.IHLUtils; public class DosingPumpTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { public final InvSlotConsumableLiquidIHL drainInputSlot; diff --git a/ihl/processing/chemistry/ElectricEvaporatorGui.java b/ihl/processing/chemistry/ElectricEvaporatorGui.java index 016335f..4a36631 100644 --- a/ihl/processing/chemistry/ElectricEvaporatorGui.java +++ b/ihl/processing/chemistry/ElectricEvaporatorGui.java @@ -1,8 +1,11 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.util.DrawUtil; +import ic2.core.util.GuiTooltipHelper; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; @@ -11,10 +14,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.opengl.GL11; -import ic2.core.util.DrawUtil; -import ic2.core.util.GuiTooltipHelper; - @SideOnly(Side.CLIENT) public class ElectricEvaporatorGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUIElectricEvaporator.png"); diff --git a/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java b/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java index 1b5b647..cdf3524 100644 --- a/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java +++ b/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java @@ -6,15 +6,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -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.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; import ic2.api.energy.tile.IEnergySink; @@ -25,14 +16,22 @@ import ic2.core.IHasGui; import ic2.core.audio.AudioSource; import ic2.core.block.invslot.InvSlot; -import ic2.core.block.invslot.InvSlotUpgrade; import ic2.core.block.invslot.InvSlot.Access; +import ic2.core.block.invslot.InvSlotUpgrade; import ic2.core.upgrade.IUpgradableBlock; import ic2.core.upgrade.IUpgradeItem; import ic2.core.upgrade.UpgradableProperty; import ihl.IHLMod; import ihl.utils.IHLInvSlotDischarge; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +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.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implements IEnergySink, IUpgradableBlock, INetworkTileEntityEventListener { diff --git a/ihl/processing/chemistry/ElectrolysisBathGui.java b/ihl/processing/chemistry/ElectrolysisBathGui.java index 89b8ddb..404ef94 100644 --- a/ihl/processing/chemistry/ElectrolysisBathGui.java +++ b/ihl/processing/chemistry/ElectrolysisBathGui.java @@ -1,16 +1,15 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ic2.core.IC2; +import ihl.utils.GuiMultiTextureButton; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -import ihl.utils.GuiMultiTextureButton; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class ElectrolysisBathGui extends GuiContainer { diff --git a/ihl/processing/chemistry/ElectrolysisBathTileEntity.java b/ihl/processing/chemistry/ElectrolysisBathTileEntity.java index f8fae63..8a498b6 100644 --- a/ihl/processing/chemistry/ElectrolysisBathTileEntity.java +++ b/ihl/processing/chemistry/ElectrolysisBathTileEntity.java @@ -6,16 +6,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.network.INetworkClientTileEntityEventListener; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -25,13 +15,22 @@ import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; import ihl.flexible_cable.FlexibleCableHolderBaseTileEntity; -import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeManager; import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class ElectrolysisBathTileEntity extends FlexibleCableHolderBaseTileEntity implements IHasGui, INetworkClientTileEntityEventListener, IFluidHandler { diff --git a/ihl/processing/chemistry/EvaporatorGui.java b/ihl/processing/chemistry/EvaporatorGui.java index 12edba9..05f7c31 100644 --- a/ihl/processing/chemistry/EvaporatorGui.java +++ b/ihl/processing/chemistry/EvaporatorGui.java @@ -1,8 +1,11 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.util.DrawUtil; +import ic2.core.util.GuiTooltipHelper; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; @@ -11,10 +14,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.opengl.GL11; -import ic2.core.util.DrawUtil; -import ic2.core.util.GuiTooltipHelper; - @SideOnly(Side.CLIENT) public class EvaporatorGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUISolidFuelEvaporator.png"); diff --git a/ihl/processing/chemistry/EvaporatorTileEntity.java b/ihl/processing/chemistry/EvaporatorTileEntity.java index dbdf2e1..279fa17 100644 --- a/ihl/processing/chemistry/EvaporatorTileEntity.java +++ b/ihl/processing/chemistry/EvaporatorTileEntity.java @@ -5,16 +5,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; import ic2.api.item.IC2Items; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -31,6 +21,15 @@ import ihl.recipes.UniversalRecipeManager; import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; public class EvaporatorTileEntity extends TileEntityLiquidTankInventory implements IHasGui { @@ -142,7 +141,7 @@ public void updateEntityServer() { IHLUtils.handleFluidSlotsBehaviour(fillItemsSlot, fluidItemsSlot, emptyFluidItemsSlot, fluidTank); } - if (this.fuel <= 0 && this.canOperate()) + if (this.fuel <= 0 && this.canOperate() && this.fuelSlot instanceof InvSlotConsumableFuel) { this.fuel = this.maxFuel = ((InvSlotConsumableFuel) this.fuelSlot).consumeFuel(); } diff --git a/ihl/processing/chemistry/ExtruderModel.java b/ihl/processing/chemistry/ExtruderModel.java index 25e1263..4d4688a 100644 --- a/ihl/processing/chemistry/ExtruderModel.java +++ b/ihl/processing/chemistry/ExtruderModel.java @@ -1,8 +1,8 @@ package ihl.processing.chemistry; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class ExtruderModel extends ModelBase { diff --git a/ihl/processing/chemistry/FluidizedBedReactorContainer.java b/ihl/processing/chemistry/FluidizedBedReactorContainer.java index f8ea002..8b7aa47 100644 --- a/ihl/processing/chemistry/FluidizedBedReactorContainer.java +++ b/ihl/processing/chemistry/FluidizedBedReactorContainer.java @@ -2,12 +2,9 @@ import java.util.List; -import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraftforge.fluids.FluidStack; public class FluidizedBedReactorContainer extends BasicElectricMotorContainer { diff --git a/ihl/processing/chemistry/FluidizedBedReactorGui.java b/ihl/processing/chemistry/FluidizedBedReactorGui.java index d79a09d..95ba8f0 100644 --- a/ihl/processing/chemistry/FluidizedBedReactorGui.java +++ b/ihl/processing/chemistry/FluidizedBedReactorGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class FluidizedBedReactorGui extends GuiContainer { diff --git a/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java b/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java index bb6cf1e..4961fc6 100644 --- a/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java +++ b/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java @@ -3,25 +3,14 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.core.ContainerBase; import ic2.core.block.invslot.InvSlot; import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; -import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.invslots.IHLInvSlotOutput; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.processing.metallurgy.BasicElectricMotorTileEntity; @@ -31,6 +20,16 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { diff --git a/ihl/processing/chemistry/FractionatorBottomTileEntity.java b/ihl/processing/chemistry/FractionatorBottomTileEntity.java index 2f3b43f..288924e 100644 --- a/ihl/processing/chemistry/FractionatorBottomTileEntity.java +++ b/ihl/processing/chemistry/FractionatorBottomTileEntity.java @@ -6,14 +6,6 @@ import java.util.List; import java.util.Map; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.energy.tile.IHeatSource; import ic2.core.IC2; import ic2.core.block.TileEntityInventory; @@ -24,8 +16,17 @@ import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; import ihl.worldgen.ores.IHLFluid; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; -public class FractionatorBottomTileEntity extends TileEntityInventory +public class FractionatorBottomTileEntity extends TileEntityInventory implements IFluidHandler { private final static UniversalRecipeManager recipeManager = new UniversalRecipeManager("fractionator"); private static float kF = 24000F; @@ -385,4 +386,24 @@ public boolean shouldRenderInPass(int pass) { return pass==0; } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { + return this.fluidTank.drain(resource, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + return this.fluidTank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return true; + } } \ No newline at end of file diff --git a/ihl/processing/chemistry/FractionatorSectionTileEntity.java b/ihl/processing/chemistry/FractionatorSectionTileEntity.java index ddd3f31..e71c453 100644 --- a/ihl/processing/chemistry/FractionatorSectionTileEntity.java +++ b/ihl/processing/chemistry/FractionatorSectionTileEntity.java @@ -139,7 +139,10 @@ public int fill(ForgeDirection direction, FluidStack fluidStack, boolean doFill) @Override public FluidTankInfo[] getTankInfo(ForgeDirection arg0) { - return columnBottom.getTankInfo(arg0); + if(columnBottom!=null) + return columnBottom.getTankInfo(arg0); + else + return new FluidTankInfo[] {new FluidTankInfo(null, 8000)}; } } diff --git a/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java b/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java index 3227ab7..186b606 100644 --- a/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java +++ b/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java @@ -2,15 +2,15 @@ import java.util.List; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ihl.interfaces.IWorkspaceElement; import ihl.processing.metallurgy.BasicElectricMotorTileEntity; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class GaedesMercuryRotaryPumpTileEntity extends BasicElectricMotorTileEntity implements IWorkspaceElement{ diff --git a/ihl/processing/chemistry/LabElectrolyzerGui.java b/ihl/processing/chemistry/LabElectrolyzerGui.java index 8690257..3eb14a3 100644 --- a/ihl/processing/chemistry/LabElectrolyzerGui.java +++ b/ihl/processing/chemistry/LabElectrolyzerGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class LabElectrolyzerGui extends GuiContainer { diff --git a/ihl/processing/chemistry/LabElectrolyzerTileEntity.java b/ihl/processing/chemistry/LabElectrolyzerTileEntity.java index 11647d6..19348b6 100644 --- a/ihl/processing/chemistry/LabElectrolyzerTileEntity.java +++ b/ihl/processing/chemistry/LabElectrolyzerTileEntity.java @@ -3,18 +3,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.block.invslot.InvSlot; @@ -28,6 +19,15 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class LabElectrolyzerTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { private final static UniversalRecipeManager recipeManager = new UniversalRecipeManager("labelectrolyzer"); diff --git a/ihl/processing/chemistry/LeadOvenGui.java b/ihl/processing/chemistry/LeadOvenGui.java index 0c35a21..72fb107 100644 --- a/ihl/processing/chemistry/LeadOvenGui.java +++ b/ihl/processing/chemistry/LeadOvenGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class LeadOvenGui extends GuiContainer { diff --git a/ihl/processing/chemistry/LeadOvenTileEntity.java b/ihl/processing/chemistry/LeadOvenTileEntity.java index c2067d8..95636ad 100644 --- a/ihl/processing/chemistry/LeadOvenTileEntity.java +++ b/ihl/processing/chemistry/LeadOvenTileEntity.java @@ -6,26 +6,16 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.IHasGui; import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlot; +import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableFuel; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; -import ic2.core.block.invslot.InvSlot.Access; import ihl.processing.invslots.IHLInvSlotOutput; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.recipes.RecipeOutputItemStack; @@ -34,6 +24,15 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class LeadOvenTileEntity extends TileEntityInventory implements IHasGui, IFluidHandler { public final InvSlotConsumableFuel fuelSlot; diff --git a/ihl/processing/chemistry/LoomModel.java b/ihl/processing/chemistry/LoomModel.java index afef73d..31c2724 100644 --- a/ihl/processing/chemistry/LoomModel.java +++ b/ihl/processing/chemistry/LoomModel.java @@ -1,8 +1,8 @@ package ihl.processing.chemistry; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class LoomModel extends ModelBase { diff --git a/ihl/processing/chemistry/LoomTileEntity.java b/ihl/processing/chemistry/LoomTileEntity.java index 4ff9bc4..8432a2d 100644 --- a/ihl/processing/chemistry/LoomTileEntity.java +++ b/ihl/processing/chemistry/LoomTileEntity.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.network.INetworkClientTileEntityEventListener; import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase; @@ -11,7 +13,6 @@ import ic2.core.IHasGui; import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlot.Access; -import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.invslots.IHLInvSlotOutput; import ihl.recipes.RecipeInputWire; import ihl.recipes.UniversalRecipeInput; @@ -21,8 +22,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class LoomTileEntity extends TileEntityInventory implements IHasGui, INetworkClientTileEntityEventListener { diff --git a/ihl/processing/chemistry/PaperMachineContainer.java b/ihl/processing/chemistry/PaperMachineContainer.java index 0969649..01db6fd 100644 --- a/ihl/processing/chemistry/PaperMachineContainer.java +++ b/ihl/processing/chemistry/PaperMachineContainer.java @@ -2,12 +2,9 @@ import java.util.List; -import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraftforge.fluids.FluidStack; public class PaperMachineContainer extends BasicElectricMotorContainer { diff --git a/ihl/processing/chemistry/PaperMachineGui.java b/ihl/processing/chemistry/PaperMachineGui.java index b65f041..8fea247 100644 --- a/ihl/processing/chemistry/PaperMachineGui.java +++ b/ihl/processing/chemistry/PaperMachineGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class PaperMachineGui extends GuiContainer { diff --git a/ihl/processing/chemistry/PaperMachineTileEntity.java b/ihl/processing/chemistry/PaperMachineTileEntity.java index eb28314..dddd306 100644 --- a/ihl/processing/chemistry/PaperMachineTileEntity.java +++ b/ihl/processing/chemistry/PaperMachineTileEntity.java @@ -3,19 +3,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.block.invslot.InvSlot; @@ -29,6 +19,16 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class PaperMachineTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { diff --git a/ihl/processing/chemistry/RefluxCondenserTileEntity.java b/ihl/processing/chemistry/RefluxCondenserTileEntity.java index b6cbcb0..83eb108 100644 --- a/ihl/processing/chemistry/RefluxCondenserTileEntity.java +++ b/ihl/processing/chemistry/RefluxCondenserTileEntity.java @@ -139,7 +139,10 @@ public int fill(ForgeDirection direction, FluidStack fluidStack, boolean doFill) @Override public FluidTankInfo[] getTankInfo(ForgeDirection arg0) { - return columnBottom.getTankInfo(arg0); + if(columnBottom!=null) + return columnBottom.getTankInfo(arg0); + else + return new FluidTankInfo[] {new FluidTankInfo(null, 8000)}; } } diff --git a/ihl/processing/chemistry/SolarEvaporatorContainer.java b/ihl/processing/chemistry/SolarEvaporatorContainer.java new file mode 100644 index 0000000..4ecf44d --- /dev/null +++ b/ihl/processing/chemistry/SolarEvaporatorContainer.java @@ -0,0 +1,112 @@ +package ihl.processing.chemistry; + +import ic2.core.ContainerBase; +import ic2.core.slot.SlotInvSlot; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class SolarEvaporatorContainer extends ContainerBase { + + protected SolarEvaporatorTileEntity tileEntity; + public int lastFluidAmount = -1; + public int lastFuel = -1; + public short lastProgress = -1; + private final static int height = 166; + public int lastNumberOfFluids = -1; + public int lastVisibleFluidID = -1; + public int lastVisibleFluidAmount = -1; + + public SolarEvaporatorContainer(EntityPlayer entityPlayer, SolarEvaporatorTileEntity tileEntity1) { + super(tileEntity1); + this.tileEntity = tileEntity1; + int col; + + for (col = 0; col < 3; ++col) { + for (int col1 = 0; col1 < 9; ++col1) { + this.addSlotToContainer( + new Slot(entityPlayer.inventory, col1 + col * 9 + 9, 8 + col1 * 18, height + -82 + col * 18)); + } + } + + for (col = 0; col < 9; ++col) { + this.addSlotToContainer(new Slot(entityPlayer.inventory, col, 8 + col * 18, height + -24)); + } + this.addSlotToContainer(new SlotInvSlot(tileEntity1.fluidItemsSlot, 0, 44, 14)); + this.addSlotToContainer(new SlotInvSlot(tileEntity1.emptyFluidItemsSlot, 0, 44, 32)); + this.addSlotToContainer(new SlotInvSlot(tileEntity1.fillItemsSlot, 0, 44, 50)); + this.addSlotToContainer(new SlotInvSlot(tileEntity1.outputSlot, 0, 117, 32)); + + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + for (int i = 0; i < this.crafters.size(); ++i) { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + if (this.tileEntity.getFluidTank().getFluid() != null + && this.tileEntity.getFluidTank().getFluidAmount() != this.lastFluidAmount) { + icrafting.sendProgressBarUpdate(this, 0, this.tileEntity.getFluidTank().getFluid().getFluid().getID()); + icrafting.sendProgressBarUpdate(this, 1, this.tileEntity.getFluidTank().getFluidAmount()); + } + + if (this.tileEntity.fuel != this.lastFuel) { + icrafting.sendProgressBarUpdate(this, 2, this.tileEntity.fuel); + } + + if (this.tileEntity.progress != this.lastProgress) { + icrafting.sendProgressBarUpdate(this, 3, this.tileEntity.progress); + } + if (this.tileEntity.visibleFluidId != this.lastVisibleFluidID) + { + icrafting.sendProgressBarUpdate(this, 4, this.tileEntity.visibleFluidId); + } + if (this.tileEntity.visibleFluidAmount != this.lastVisibleFluidAmount) + { + icrafting.sendProgressBarUpdate(this, 5, this.tileEntity.visibleFluidAmount); + } + } + + this.lastFluidAmount = this.tileEntity.getFluidTank().getFluidAmount(); + this.lastFuel = this.tileEntity.fuel; + this.lastProgress = this.tileEntity.progress; + this.lastVisibleFluidID=this.tileEntity.visibleFluidId; + this.lastVisibleFluidAmount=this.tileEntity.visibleFluidAmount; + } + + @Override + public void updateProgressBar(int index, int value) { + super.updateProgressBar(index, value); + + switch (index) { + case 0: + this.tileEntity.getFluidTank().setFluid(new FluidStack(FluidRegistry.getFluid(value), 1000)); + break; + case 1: + this.tileEntity.getFluidTank() + .setFluid(new FluidStack(this.tileEntity.getFluidTank().getFluid().getFluid(), value)); + break; + case 2: + this.tileEntity.fuel = value; + break; + case 3: + this.tileEntity.progress = (short) value; + break; + case 4: + this.tileEntity.visibleFluidId=value; + break; + case 5: + this.tileEntity.visibleFluidAmount=value; + break; + + } + } + + @Override + public boolean canInteractWith(EntityPlayer var1) { + return tileEntity.isUseableByPlayer(var1); + } +} diff --git a/ihl/processing/chemistry/SolarEvaporatorGui.java b/ihl/processing/chemistry/SolarEvaporatorGui.java new file mode 100644 index 0000000..e97f9e0 --- /dev/null +++ b/ihl/processing/chemistry/SolarEvaporatorGui.java @@ -0,0 +1,78 @@ +package ihl.processing.chemistry; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.util.DrawUtil; +import ic2.core.util.GuiTooltipHelper; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +@SideOnly(Side.CLIENT) +public class SolarEvaporatorGui extends GuiContainer { + private static final ResourceLocation background = new ResourceLocation("ihl", + "textures/gui/GUISolarEvaporator.png"); + private SolarEvaporatorContainer container; + + public SolarEvaporatorGui(SolarEvaporatorContainer container1) { + // the container is instanciated and passed to the superclass for + // handling + super(container1); + this.container = container1; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + int xOffset = (this.width - xSize) / 2; + int yOffset = (this.height - ySize) / 2; + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.renderEngine.bindTexture(background); + int i1; + if (this.container.tileEntity.getActive()) { + this.drawTexturedModalRect(9, 16, 176, 0, 14, 14); + } + if (this.container.tileEntity.progress > 0) { + i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(18), 18); + this.drawTexturedModalRect(99, 34, 198, 0, i1 + 1, 13); + } + + if (this.container.tileEntity.getTankAmount() > 0) { + FluidStack fluidStack = this.container.tileEntity.getFluidTank().getFluid(); + if (fluidStack != null) { + Fluid fluid = fluidStack.getFluid(); + if (fluid != null) { + + IIcon fluidIcon = fluid.getIcon(); + + if (fluidIcon != null) { + this.mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture); + int liquidHeight = this.container.tileEntity.gaugeLiquidScaled(47); + DrawUtil.drawRepeated(fluidIcon, (82), 16 + 47 - liquidHeight, 12.0D, liquidHeight, + this.zLevel); + this.mc.renderEngine.bindTexture(background); + } + } + String tooltip = StatCollector.translateToLocal(fluidStack.getFluid().getUnlocalizedName()) + ": " + + fluidStack.amount + "mB"; + GuiTooltipHelper.drawAreaTooltip(par1 - 90, par2 - 32, tooltip, xOffset - 8, yOffset - 15, xOffset + 2, + yOffset + 30); + } + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + // draw your Gui here, only thing you need to change is the path + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.renderEngine.bindTexture(background); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} \ No newline at end of file diff --git a/ihl/processing/chemistry/SolarEvaporatorTileEntity.java b/ihl/processing/chemistry/SolarEvaporatorTileEntity.java new file mode 100644 index 0000000..947a88a --- /dev/null +++ b/ihl/processing/chemistry/SolarEvaporatorTileEntity.java @@ -0,0 +1,108 @@ +package ihl.processing.chemistry; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ihl.interfaces.IFluidTankVisual; +import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.EnumSkyBlock; + +public class SolarEvaporatorTileEntity extends EvaporatorTileEntity implements IFluidTankVisual { + public int visibleFluidId = -1; + public int visibleFluidAmount = 1; + + public SolarEvaporatorTileEntity(){ + super(); + this.fuelSlot = null; + this.maxProgress = 4500; + } + + @Override + public List getNetworkedFields() + { + List ret = super.getNetworkedFields(); + ret.add("visibleFluidId"); + ret.add("visibleFluidAmount"); + return ret; + } + + @Override + public void updateEntityServer() + { + super.updateEntityServer(); + if(this.fluidTank.getFluid()!=null && (visibleFluidId!=this.fluidTank.getFluid().getFluid().getID() || visibleFluidAmount!=this.fluidTank.getFluidAmount())) + { + visibleFluidId = this.fluidTank.getFluid().getFluid().getID(); + visibleFluidAmount = this.fluidTank.getFluidAmount(); + IC2.network.get().updateTileEntityField(this, "visibleFluidId"); + IC2.network.get().updateTileEntityField(this, "visibleFluidAmount"); + } + else if(this.fluidTank.getFluid()==null && visibleFluidId!=-1) + { + visibleFluidId=-1; + IC2.network.get().updateTileEntityField(this, "visibleFluidId"); + } + } + @Override + public boolean isBurning() + { + return this.worldObj.getSkyBlockTypeBrightness(EnumSkyBlock.Sky, xCoord, yCoord, zCoord)>=15; + } + + @Override + public ContainerBase getGuiContainer(EntityPlayer entityPlayer) + { + return new SolarEvaporatorContainer(entityPlayer, this); + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen getGui(EntityPlayer entityPlayer, boolean isAdmin) + { + return new SolarEvaporatorGui(new SolarEvaporatorContainer(entityPlayer, this)); + } + + @Override + public short getFacing() + { + return 3; + } + + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return IHLUtils.getThisModItemStack("solarEvaporator"); + } + + @Override + public int getVisibleFluidId() { + return this.visibleFluidId; + } + + @Override + public int getVisibleFluidAmount() { + return this.visibleFluidAmount; + } + + @Override + public float getRenderLiquidLevel() + { + return (float)this.visibleFluidAmount/(float)this.fluidTank.getCapacity()/2; + } + + @Override + public boolean shouldRenderInPass(int pass) + { + return pass==0; + } +} diff --git a/ihl/processing/invslots/IHLInvSlotOutput.java b/ihl/processing/invslots/IHLInvSlotOutput.java index d683221..d5186e2 100644 --- a/ihl/processing/invslots/IHLInvSlotOutput.java +++ b/ihl/processing/invslots/IHLInvSlotOutput.java @@ -6,15 +6,14 @@ import java.util.Map; import java.util.Map.Entry; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlotOutput; import ihl.recipes.RecipeOutputItemStack; import ihl.utils.IHLUtils; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; public class IHLInvSlotOutput extends InvSlotOutput { diff --git a/ihl/processing/invslots/InvSlotConsumableLiquidIHL.java b/ihl/processing/invslots/InvSlotConsumableLiquidIHL.java index 0a3b664..7bb6ecc 100644 --- a/ihl/processing/invslots/InvSlotConsumableLiquidIHL.java +++ b/ihl/processing/invslots/InvSlotConsumableLiquidIHL.java @@ -4,16 +4,16 @@ import org.apache.commons.lang3.mutable.MutableObject; +import ic2.core.block.TileEntityInventory; +import ic2.core.block.invslot.InvSlotConsumableLiquid; +import ic2.core.util.StackUtil; +import ihl.utils.IHLUtils; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import ic2.core.block.TileEntityInventory; -import ic2.core.block.invslot.InvSlotConsumableLiquid; -import ic2.core.util.StackUtil; -import ihl.utils.IHLUtils; public class InvSlotConsumableLiquidIHL extends InvSlotConsumableLiquid{ diff --git a/ihl/processing/invslots/SlotInvSlotIronWorkbench.java b/ihl/processing/invslots/SlotInvSlotIronWorkbench.java index 94354ea..7f00e06 100644 --- a/ihl/processing/invslots/SlotInvSlotIronWorkbench.java +++ b/ihl/processing/invslots/SlotInvSlotIronWorkbench.java @@ -1,8 +1,9 @@ package ihl.processing.invslots; -import net.minecraft.entity.player.EntityPlayer; import ic2.core.slot.SlotInvSlot; -import ihl.flexible_cable.*; +import ihl.flexible_cable.IronWorkbenchInvSlot; +import ihl.flexible_cable.IronWorkbenchTileEntity; +import net.minecraft.entity.player.EntityPlayer; public class SlotInvSlotIronWorkbench extends SlotInvSlot { diff --git a/ihl/processing/invslots/SlotInvSlotOutputInProgress.java b/ihl/processing/invslots/SlotInvSlotOutputInProgress.java index a1b3937..25c0673 100644 --- a/ihl/processing/invslots/SlotInvSlotOutputInProgress.java +++ b/ihl/processing/invslots/SlotInvSlotOutputInProgress.java @@ -1,8 +1,8 @@ package ihl.processing.invslots; -import net.minecraft.entity.player.EntityPlayer; import ic2.core.slot.SlotInvSlot; import ihl.flexible_cable.IronWorkbenchInvSlot; +import net.minecraft.entity.player.EntityPlayer; public class SlotInvSlotOutputInProgress extends SlotInvSlot { diff --git a/ihl/processing/metallurgy/AchesonFurnaceGui.java b/ihl/processing/metallurgy/AchesonFurnaceGui.java index 7665635..6f8238a 100644 --- a/ihl/processing/metallurgy/AchesonFurnaceGui.java +++ b/ihl/processing/metallurgy/AchesonFurnaceGui.java @@ -1,9 +1,10 @@ package ihl.processing.metallurgy; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import org.lwjgl.opengl.GL11; public class AchesonFurnaceGui extends GuiContainer { protected static final ResourceLocation achesonFurnaceBackground = new ResourceLocation("ihl", "textures/gui/GUIAchesonFurnace.png"); diff --git a/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java b/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java index 1692e62..75efd70 100644 --- a/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java +++ b/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java @@ -3,6 +3,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase; import ihl.IHLMod; @@ -15,8 +17,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class AchesonFurnanceTileEntity extends MachineBaseTileEntity { diff --git a/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java b/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java index 14a9e71..f02abea 100644 --- a/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java +++ b/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java @@ -38,8 +38,8 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa public BasicElectricMotorTileEntity() { super(); energyConsume = IHLMod.config.machineryEnergyConsume/100d; - dischargeSlot = new IHLInvSlotDischarge(this, 1, Access.IO, 4, InvSlot.InvSide.BOTTOM); - upgradeSlot = new InvSlotUpgradeIHL(this, 1, Access.IO, 4, InvSlot.InvSide.BOTTOM); + dischargeSlot = new IHLInvSlotDischarge(this, 1, Access.I, 4, InvSlot.InvSide.BOTTOM); + upgradeSlot = new InvSlotUpgradeIHL(this, 1, Access.I, 4, InvSlot.InvSide.BOTTOM); } @Override diff --git a/ihl/processing/metallurgy/CoilerRender.java b/ihl/processing/metallurgy/CoilerRender.java index f3da8fa..26ee32f 100644 --- a/ihl/processing/metallurgy/CoilerRender.java +++ b/ihl/processing/metallurgy/CoilerRender.java @@ -1,11 +1,11 @@ package ihl.processing.metallurgy; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class CoilerRender extends TileEntitySpecialRenderer{ private CoilerModel model = new CoilerModel(); diff --git a/ihl/processing/metallurgy/CoilerTileEntity.java b/ihl/processing/metallurgy/CoilerTileEntity.java index 5fdcf13..3853a0e 100644 --- a/ihl/processing/metallurgy/CoilerTileEntity.java +++ b/ihl/processing/metallurgy/CoilerTileEntity.java @@ -2,6 +2,8 @@ import java.util.List; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.block.invslot.InvSlotOutput; @@ -10,8 +12,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class CoilerTileEntity extends BasicElectricMotorTileEntity implements IProductionLine{ diff --git a/ihl/processing/metallurgy/Crucible.java b/ihl/processing/metallurgy/Crucible.java index 77f10a4..220b505 100644 --- a/ihl/processing/metallurgy/Crucible.java +++ b/ihl/processing/metallurgy/Crucible.java @@ -8,7 +8,19 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - +import ic2.api.item.IItemHudInfo; +import ic2.api.recipe.IRecipeInput; +import ic2.api.recipe.RecipeInputOreDict; +import ic2.core.IC2; +import ic2.core.IHasGui; +import ic2.core.item.IHandHeldInventory; +import ic2.core.util.LiquidUtil; +import ic2.core.util.StackUtil; +import ihl.IHLCreativeTab; +import ihl.IHLModInfo; +import ihl.recipes.UniversalRecipeInput; +import ihl.recipes.UniversalRecipeManager; +import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -25,19 +37,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; -import ic2.api.item.IItemHudInfo; -import ic2.api.recipe.IRecipeInput; -import ic2.api.recipe.RecipeInputOreDict; -import ic2.core.IC2; -import ic2.core.IHasGui; -import ic2.core.item.IHandHeldInventory; -import ic2.core.util.LiquidUtil; -import ic2.core.util.StackUtil; -import ihl.IHLCreativeTab; -import ihl.IHLModInfo; -import ihl.recipes.UniversalRecipeInput; -import ihl.recipes.UniversalRecipeManager; -import ihl.recipes.UniversalRecipeOutput; public class Crucible extends Item implements IHandHeldInventory, IFluidContainerItem, IItemHudInfo{ diff --git a/ihl/processing/metallurgy/CrucibleContainer.java b/ihl/processing/metallurgy/CrucibleContainer.java index 647c277..20ec65e 100644 --- a/ihl/processing/metallurgy/CrucibleContainer.java +++ b/ihl/processing/metallurgy/CrucibleContainer.java @@ -1,12 +1,12 @@ package ihl.processing.metallurgy; +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ic2.core.util.StackUtil; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import ic2.core.ContainerBase; -import ic2.core.IC2; -import ic2.core.util.StackUtil; public class CrucibleContainer extends ContainerBase { diff --git a/ihl/processing/metallurgy/CrucibleGui.java b/ihl/processing/metallurgy/CrucibleGui.java index e92347c..f05e7bb 100644 --- a/ihl/processing/metallurgy/CrucibleGui.java +++ b/ihl/processing/metallurgy/CrucibleGui.java @@ -2,6 +2,8 @@ import org.lwjgl.opengl.GL11; +import ic2.core.util.DrawUtil; +import ic2.core.util.GuiTooltipHelper; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.item.ItemStack; @@ -10,8 +12,6 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import ic2.core.util.DrawUtil; -import ic2.core.util.GuiTooltipHelper; public class CrucibleGui extends GuiContainer { diff --git a/ihl/processing/metallurgy/CrucibleInventory.java b/ihl/processing/metallurgy/CrucibleInventory.java index cc5707a..253483f 100644 --- a/ihl/processing/metallurgy/CrucibleInventory.java +++ b/ihl/processing/metallurgy/CrucibleInventory.java @@ -2,6 +2,10 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ic2.core.item.tool.HandHeldInventory; +import ic2.core.util.StackUtil; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -9,10 +13,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import ic2.core.ContainerBase; -import ic2.core.IC2; -import ic2.core.item.tool.HandHeldInventory; -import ic2.core.util.StackUtil; public class CrucibleInventory extends HandHeldInventory { diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineGui.java b/ihl/processing/metallurgy/DetonationSprayingMachineGui.java index 66d9acb..8cd29d0 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineGui.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineGui.java @@ -5,15 +5,12 @@ import org.lwjgl.opengl.GL11; import codechicken.lib.gui.GuiDraw; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import cpw.mods.fml.relauncher.Side; - -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class DetonationSprayingMachineGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUIDetonationSprayingMachine.png"); diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineRender.java b/ihl/processing/metallurgy/DetonationSprayingMachineRender.java index ee64b65..b68f8b3 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineRender.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineRender.java @@ -1,13 +1,13 @@ package ihl.processing.metallurgy; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; import ihl.utils.IHLItemRenderer; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class DetonationSprayingMachineRender extends TileEntitySpecialRenderer{ private DetonationSprayingMachineModel model = new DetonationSprayingMachineModel(); diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java b/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java index ce594ed..411b8db 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java @@ -2,13 +2,9 @@ import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import ic2.api.network.INetworkTileEntityEventListener; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; @@ -27,6 +23,10 @@ import ihl.recipes.UniversalRecipeManager; import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; public class DetonationSprayingMachineTileEntity extends TileEntityInventory implements IHasGui, INetworkTileEntityEventListener { diff --git a/ihl/processing/metallurgy/ElectricEngineItem.java b/ihl/processing/metallurgy/ElectricEngineItem.java index 59d6d07..c1e0003 100644 --- a/ihl/processing/metallurgy/ElectricEngineItem.java +++ b/ihl/processing/metallurgy/ElectricEngineItem.java @@ -6,14 +6,14 @@ import java.util.List; import java.util.Map; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.Item; -import net.minecraft.util.IIcon; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ihl.IHLCreativeTab; import ihl.IHLModInfo; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.Item; +import net.minecraft.util.IIcon; public class ElectricEngineItem extends Item{ diff --git a/ihl/processing/metallurgy/ExtruderModel.java b/ihl/processing/metallurgy/ExtruderModel.java index fb28d50..fcff405 100644 --- a/ihl/processing/metallurgy/ExtruderModel.java +++ b/ihl/processing/metallurgy/ExtruderModel.java @@ -1,8 +1,8 @@ package ihl.processing.metallurgy; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class ExtruderModel extends ModelBase { diff --git a/ihl/processing/metallurgy/ExtruderTileEntity.java b/ihl/processing/metallurgy/ExtruderTileEntity.java index 53447b4..a46ae62 100644 --- a/ihl/processing/metallurgy/ExtruderTileEntity.java +++ b/ihl/processing/metallurgy/ExtruderTileEntity.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ic2.core.block.invslot.InvSlot.Access; import ihl.processing.chemistry.ApparatusProcessableInvSlot; @@ -21,8 +23,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.IFluidHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ diff --git a/ihl/processing/metallurgy/GasWeldingStationGui.java b/ihl/processing/metallurgy/GasWeldingStationGui.java index 6248159..79becd5 100644 --- a/ihl/processing/metallurgy/GasWeldingStationGui.java +++ b/ihl/processing/metallurgy/GasWeldingStationGui.java @@ -1,14 +1,14 @@ package ihl.processing.metallurgy; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ic2.core.IC2; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.inventory.Slot; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class GasWeldingStationGui extends GuiContainer { diff --git a/ihl/processing/metallurgy/GasWeldingStationTileEntity.java b/ihl/processing/metallurgy/GasWeldingStationTileEntity.java index 54f4177..b7172c2 100644 --- a/ihl/processing/metallurgy/GasWeldingStationTileEntity.java +++ b/ihl/processing/metallurgy/GasWeldingStationTileEntity.java @@ -3,18 +3,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.network.INetworkClientTileEntityEventListener; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -32,6 +23,15 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class GasWeldingStationTileEntity extends TileEntityInventory implements IHasGui, INetworkClientTileEntityEventListener, IFluidHandler, IWorkspaceElement { diff --git a/ihl/processing/metallurgy/ImpregnatingMachineGui.java b/ihl/processing/metallurgy/ImpregnatingMachineGui.java index c6a8b0f..29ba298 100644 --- a/ihl/processing/metallurgy/ImpregnatingMachineGui.java +++ b/ihl/processing/metallurgy/ImpregnatingMachineGui.java @@ -1,12 +1,12 @@ package ihl.processing.metallurgy; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class ImpregnatingMachineGui extends GuiContainer { diff --git a/ihl/processing/metallurgy/ImpregnatingMachineRender.java b/ihl/processing/metallurgy/ImpregnatingMachineRender.java index 3231b71..9529186 100644 --- a/ihl/processing/metallurgy/ImpregnatingMachineRender.java +++ b/ihl/processing/metallurgy/ImpregnatingMachineRender.java @@ -1,53 +1,55 @@ package ihl.processing.metallurgy; + +import org.lwjgl.opengl.GL11; + +import ihl.interfaces.IFluidTankVisual; +import ihl.model.FluidRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.opengl.GL11; - -import ihl.model.FluidRenderer; +public class ImpregnatingMachineRender extends TileEntitySpecialRenderer { -public class ImpregnatingMachineRender extends TileEntitySpecialRenderer{ + private float cap; + public ImpregnatingMachineRender(float capIn) { + cap = capIn; + } - -public ImpregnatingMachineRender(){} + public void renderAModelAt(IFluidTankVisual tile, double x, double y, double z, float f) { + GL11.glPushMatrix(); + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + float rotation = 0F; + GL11.glRotatef(-rotation, 0F, 1F, 0F); + GL11.glScalef(1F, -1F, -1F); + GL11.glTranslatef(0F, -1.0F, 0F); + GL11.glPopMatrix(); + if (tile.getVisibleFluidId() == -1 || tile.getVisibleFluidAmount() <= 0) { + return; + } + FluidStack fluidStack = new FluidStack(FluidRegistry.getFluid(tile.getVisibleFluidId()), + tile.getVisibleFluidAmount()); + GL11.glPushMatrix(); + GL11.glPushAttrib(GL11.GL_ENABLE_BIT); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glTranslatef((float) x, (float) y + 0.1F, (float) z); + GL11.glScalef(0.99F, 0.8F * tile.getRenderLiquidLevel(), 0.99F); + int[] displayLists = FluidRenderer.getLiquidDisplayLists(fluidStack); + if (displayLists != null) { + float level = Math.min(fluidStack.amount, cap) / cap; + bindTexture(FluidRenderer.getFluidSheet(fluidStack)); + GL11.glCallList(displayLists[(int) (level * (FluidRenderer.DISPLAY_STAGES - 1))]); + } + GL11.glDisable(GL11.GL_BLEND); + GL11.glPopAttrib(); + GL11.glPopMatrix(); -public void renderAModelAt(ImpregnatingMachineTileEntity tile, double x, double y, double z, float f) { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y+0.5F, (float)z + 0.5F); - float rotation=0F; - GL11.glRotatef(-rotation, 0F, 1F, 0F); - GL11.glScalef(1F, -1F, -1F); - GL11.glTranslatef(0F, -1.0F, 0F); - GL11.glPopMatrix(); - if (tile.visibleFluidId == -1 || tile.visibleFluidAmount <= 0) { - return; } - FluidStack fluidStack = new FluidStack(FluidRegistry.getFluid(tile.visibleFluidId),tile.visibleFluidAmount); - GL11.glPushMatrix(); - GL11.glPushAttrib(GL11.GL_ENABLE_BIT); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glTranslatef((float) x, (float) y + 0.1F, (float) z); - GL11.glScalef(0.99F, 0.8F*tile.getRenderLiquidLevel(), 0.99F); - int[] displayLists = FluidRenderer.getLiquidDisplayLists(fluidStack); - if (displayLists != null) { - float cap = 900F; - float level = Math.min(fluidStack.amount, cap) / cap; - bindTexture(FluidRenderer.getFluidSheet(fluidStack)); - GL11.glCallList(displayLists[(int) (level * (FluidRenderer.DISPLAY_STAGES - 1))]); - } - GL11.glDisable(GL11.GL_BLEND); - GL11.glPopAttrib(); - GL11.glPopMatrix(); - -} @Override - public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8) - { - this.renderAModelAt((ImpregnatingMachineTileEntity)par1TileEntity, par2, par4, par6, par8); + public void renderTileEntityAt(TileEntity tile, double par2, double par4, double par6, float par8) { + this.renderAModelAt((IFluidTankVisual) tile, par2, par4, par6, par8); } } \ No newline at end of file diff --git a/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java b/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java index 1a15f06..a0ed60d 100644 --- a/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java +++ b/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java @@ -3,19 +3,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.network.INetworkTileEntityEventListener; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -25,6 +15,7 @@ import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; +import ihl.interfaces.IFluidTankVisual; import ihl.interfaces.IHasTemperature; import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.chemistry.ChemicalReactorTileEntity; @@ -35,8 +26,18 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; -public class ImpregnatingMachineTileEntity extends TileEntityInventory implements IHasGui,INetworkTileEntityEventListener, IFluidHandler, IHasTemperature +public class ImpregnatingMachineTileEntity extends TileEntityInventory implements IHasGui,IFluidTankVisual,INetworkTileEntityEventListener, IFluidHandler, IHasTemperature { private final static UniversalRecipeManager recipeManager = new UniversalRecipeManager("tub"); public final ApparatusProcessableInvSlot input; @@ -337,4 +338,14 @@ public int getTemperature() { return this.fluidTank.getTemperature(); } + + @Override + public int getVisibleFluidId() { + return this.visibleFluidId; + } + + @Override + public int getVisibleFluidAmount() { + return this.visibleFluidAmount; + } } \ No newline at end of file diff --git a/ihl/processing/metallurgy/InjectionMoldBlock.java b/ihl/processing/metallurgy/InjectionMoldBlock.java index 1cd18d3..bbea1cb 100644 --- a/ihl/processing/metallurgy/InjectionMoldBlock.java +++ b/ihl/processing/metallurgy/InjectionMoldBlock.java @@ -1,14 +1,17 @@ package ihl.processing.metallurgy; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.IHLCreativeTab; import ihl.IHLModInfo; import ihl.items_blocks.IHLItemBlock; import ihl.metallurgy.constants.Details; import ihl.utils.IHLUtils; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; @@ -24,9 +27,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class InjectionMoldBlock extends Block implements ITileEntityProvider{ diff --git a/ihl/processing/metallurgy/InjectionMoldTileEntity.java b/ihl/processing/metallurgy/InjectionMoldTileEntity.java index 33689ba..e5fee82 100644 --- a/ihl/processing/metallurgy/InjectionMoldTileEntity.java +++ b/ihl/processing/metallurgy/InjectionMoldTileEntity.java @@ -5,6 +5,12 @@ import java.util.List; import java.util.Map; +import ic2.core.IC2; +import ihl.metallurgy.constants.Details; +import ihl.recipes.UniversalRecipeInput; +import ihl.recipes.UniversalRecipeManager; +import ihl.recipes.UniversalRecipeOutput; +import ihl.utils.IHLUtils; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -16,12 +22,6 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.oredict.OreDictionary; -import ic2.core.IC2; -import ihl.metallurgy.constants.Details; -import ihl.recipes.UniversalRecipeInput; -import ihl.recipes.UniversalRecipeManager; -import ihl.recipes.UniversalRecipeOutput; -import ihl.utils.IHLUtils; public class InjectionMoldTileEntity extends TileEntity implements IFluidHandler diff --git a/ihl/processing/metallurgy/LathePart1TileEntity.java b/ihl/processing/metallurgy/LathePart1TileEntity.java index ddf834b..788bfd4 100644 --- a/ihl/processing/metallurgy/LathePart1TileEntity.java +++ b/ihl/processing/metallurgy/LathePart1TileEntity.java @@ -1,6 +1,9 @@ package ihl.processing.metallurgy; import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ihl.interfaces.IWorkspaceElement; import ihl.utils.IHLUtils; @@ -9,8 +12,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class LathePart1TileEntity extends BasicElectricMotorTileEntity implements IWorkspaceElement{ diff --git a/ihl/processing/metallurgy/MachineBaseContainer.java b/ihl/processing/metallurgy/MachineBaseContainer.java index 19985fe..d7e3ac7 100644 --- a/ihl/processing/metallurgy/MachineBaseContainer.java +++ b/ihl/processing/metallurgy/MachineBaseContainer.java @@ -5,7 +5,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; -public class MachineBaseContainer extends ContainerBase { +public class MachineBaseContainer extends ContainerBase { protected MachineBaseTileEntity tileEntity; public int lastProgress = -1; diff --git a/ihl/processing/metallurgy/MachineBaseTileEntity.java b/ihl/processing/metallurgy/MachineBaseTileEntity.java index de20f5a..79763b5 100644 --- a/ihl/processing/metallurgy/MachineBaseTileEntity.java +++ b/ihl/processing/metallurgy/MachineBaseTileEntity.java @@ -1,5 +1,9 @@ package ihl.processing.metallurgy; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; import ic2.api.energy.tile.IEnergySink; @@ -10,15 +14,12 @@ import ic2.core.block.invslot.InvSlot.Access; import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.recipes.UniversalRecipeOutput; -import java.util.List; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public abstract class MachineBaseTileEntity extends TileEntityInventory implements IHasGui, IEnergySink { diff --git a/ihl/processing/metallurgy/MuffleFurnaceGui.java b/ihl/processing/metallurgy/MuffleFurnaceGui.java index bf0df24..9c83401 100644 --- a/ihl/processing/metallurgy/MuffleFurnaceGui.java +++ b/ihl/processing/metallurgy/MuffleFurnaceGui.java @@ -1,9 +1,10 @@ package ihl.processing.metallurgy; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import org.lwjgl.opengl.GL11; public class MuffleFurnaceGui extends GuiContainer { protected static final ResourceLocation muffleFurnaceBackground = new ResourceLocation("ihl", "textures/gui/GUIAchesonFurnace.png"); diff --git a/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java b/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java index 3994bd7..6f811cb 100644 --- a/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java +++ b/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java @@ -3,8 +3,9 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; -import ic2.api.recipe.RecipeInputOreDict; import ic2.core.ContainerBase; import ihl.IHLMod; import ihl.processing.invslots.IHLInvSlotOutput; @@ -16,8 +17,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class MuffleFurnanceTileEntity extends MachineBaseTileEntity { diff --git a/ihl/processing/metallurgy/RollingMachinePart1Model.java b/ihl/processing/metallurgy/RollingMachinePart1Model.java index 460ff62..fe062f8 100644 --- a/ihl/processing/metallurgy/RollingMachinePart1Model.java +++ b/ihl/processing/metallurgy/RollingMachinePart1Model.java @@ -1,9 +1,9 @@ package ihl.processing.metallurgy; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class RollingMachinePart1Model extends ModelBase diff --git a/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java b/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java index dc2d293..da60877 100644 --- a/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java +++ b/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -20,8 +22,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ diff --git a/ihl/processing/metallurgy/RollingMachinePart2Model.java b/ihl/processing/metallurgy/RollingMachinePart2Model.java index b4bda67..39fd1f5 100644 --- a/ihl/processing/metallurgy/RollingMachinePart2Model.java +++ b/ihl/processing/metallurgy/RollingMachinePart2Model.java @@ -1,8 +1,8 @@ package ihl.processing.metallurgy; -import net.minecraft.client.model.ModelBase; import ihl.model.IHLModelRenderer; +import net.minecraft.client.model.ModelBase; public class RollingMachinePart2Model extends ModelBase { diff --git a/ihl/processing/metallurgy/RollingMachineRender.java b/ihl/processing/metallurgy/RollingMachineRender.java index 1990769..f347a73 100644 --- a/ihl/processing/metallurgy/RollingMachineRender.java +++ b/ihl/processing/metallurgy/RollingMachineRender.java @@ -1,11 +1,11 @@ package ihl.processing.metallurgy; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class RollingMachineRender extends TileEntitySpecialRenderer{ private RollingMachinePart1Model model = new RollingMachinePart1Model(); diff --git a/ihl/processing/metallurgy/VulcanizationExtrudingMoldModel.java b/ihl/processing/metallurgy/VulcanizationExtrudingMoldModel.java index e3ab6c7..9ce0f01 100644 --- a/ihl/processing/metallurgy/VulcanizationExtrudingMoldModel.java +++ b/ihl/processing/metallurgy/VulcanizationExtrudingMoldModel.java @@ -1,8 +1,8 @@ package ihl.processing.metallurgy; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class VulcanizationExtrudingMoldModel extends ModelBase { diff --git a/ihl/processing/metallurgy/WireMillTileEntity.java b/ihl/processing/metallurgy/WireMillTileEntity.java index f69ea9a..d93eb4f 100644 --- a/ihl/processing/metallurgy/WireMillTileEntity.java +++ b/ihl/processing/metallurgy/WireMillTileEntity.java @@ -4,13 +4,15 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputOreDict; import ic2.core.ContainerBase; import ic2.core.block.invslot.InvSlot; +import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; -import ic2.core.block.invslot.InvSlot.Access; import ihl.IHLMod; import ihl.items_blocks.IHLTool; import ihl.processing.chemistry.ApparatusProcessableInvSlot; @@ -34,8 +36,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class WireMillTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler{ diff --git a/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java b/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java index 4dd1f1c..857575a 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java +++ b/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java @@ -3,6 +3,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; @@ -21,8 +23,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ diff --git a/ihl/processing/metallurgy/WoodenRollingMachinePart2Model.java b/ihl/processing/metallurgy/WoodenRollingMachinePart2Model.java index 2673124..6ebc58e 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachinePart2Model.java +++ b/ihl/processing/metallurgy/WoodenRollingMachinePart2Model.java @@ -6,9 +6,9 @@ package ihl.processing.metallurgy; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class WoodenRollingMachinePart2Model extends ModelBase { diff --git a/ihl/processing/metallurgy/WoodenRollingMachineRender.java b/ihl/processing/metallurgy/WoodenRollingMachineRender.java index f5fd12a..f180f75 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachineRender.java +++ b/ihl/processing/metallurgy/WoodenRollingMachineRender.java @@ -1,11 +1,11 @@ package ihl.processing.metallurgy; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class WoodenRollingMachineRender extends TileEntitySpecialRenderer{ private WoodenRollingMachinePart1Model model = new WoodenRollingMachinePart1Model(); diff --git a/ihl/recipes/IRecipeInputFluid.java b/ihl/recipes/IRecipeInputFluid.java index 823c0ae..774973c 100644 --- a/ihl/recipes/IRecipeInputFluid.java +++ b/ihl/recipes/IRecipeInputFluid.java @@ -1,6 +1,7 @@ package ihl.recipes; import java.util.List; + import net.minecraftforge.fluids.FluidStack; public interface IRecipeInputFluid { diff --git a/ihl/recipes/IronWorkbenchRecipe.java b/ihl/recipes/IronWorkbenchRecipe.java index f0bd81f..e471811 100644 --- a/ihl/recipes/IronWorkbenchRecipe.java +++ b/ihl/recipes/IronWorkbenchRecipe.java @@ -3,12 +3,13 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.minecraft.item.ItemStack; + import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; import ihl.interfaces.IWire; import ihl.utils.IHLUtils; +import net.minecraft.item.ItemStack; public class IronWorkbenchRecipe { public List workspaceElements=new ArrayList(); @@ -70,7 +71,14 @@ else if(!oreDictName.isEmpty() && oreDictName.length()>3) } } - this.outputs.addAll(output1_1); + Iterator iOutput = output1_1.iterator(); + while(iOutput.hasNext()) + { + ItemStack outputStack = iOutput.next(); + if(outputStack==null) + throw new NullPointerException("Output shall not contain null."); + this.outputs.add(outputStack); + } if(tools.size()>8 || materials.size()>12) { throw new IllegalArgumentException("Iron workbench recipe cannot contain more than 8 tools or more than 12 materials!"); diff --git a/ihl/recipes/RecipeInputDetonator.java b/ihl/recipes/RecipeInputDetonator.java index efef075..15030fd 100644 --- a/ihl/recipes/RecipeInputDetonator.java +++ b/ihl/recipes/RecipeInputDetonator.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.List; -import ic2.api.recipe.IRecipeInput; +import ic2.api.recipe.IRecipeInput; import ihl.utils.IHLUtils; import net.minecraft.item.ItemStack; diff --git a/ihl/recipes/RecipeInputFluidDictionary.java b/ihl/recipes/RecipeInputFluidDictionary.java index e1581c3..eb5b057 100644 --- a/ihl/recipes/RecipeInputFluidDictionary.java +++ b/ihl/recipes/RecipeInputFluidDictionary.java @@ -2,8 +2,8 @@ import java.util.List; -import net.minecraftforge.fluids.FluidStack; import ihl.IHLMod; +import net.minecraftforge.fluids.FluidStack; public class RecipeInputFluidDictionary implements IRecipeInputFluid { diff --git a/ihl/recipes/RecipeInputObjectInstance.java b/ihl/recipes/RecipeInputObjectInstance.java index 8648e72..42fdc26 100644 --- a/ihl/recipes/RecipeInputObjectInstance.java +++ b/ihl/recipes/RecipeInputObjectInstance.java @@ -3,9 +3,9 @@ import java.util.Arrays; import java.util.List; -import net.minecraft.item.ItemStack; import ic2.api.recipe.IRecipeInput; import ihl.utils.IHLUtils; +import net.minecraft.item.ItemStack; public class RecipeInputObjectInstance implements IRecipeInput { diff --git a/ihl/recipes/UniversalRecipeInput.java b/ihl/recipes/UniversalRecipeInput.java index d2c25b6..2ed546a 100644 --- a/ihl/recipes/UniversalRecipeInput.java +++ b/ihl/recipes/UniversalRecipeInput.java @@ -1,15 +1,14 @@ package ihl.recipes; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; import ihl.interfaces.IWire; import ihl.utils.IHLUtils; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -106,7 +105,7 @@ public boolean matches(List fluidInputs1, List itemInputs ItemStack is1 = getMatchedItemStack(is, itemInputs1); if (is1 == null || !is.matches(is1)) { return false; - } else if (doCheckAmounts && is1.stackSize < is.getAmount()) { + } else if (doCheckAmounts && IHLUtils.getAmountOf(is1) < is.getAmount()) { return false; } } diff --git a/ihl/recipes/UniversalRecipeManager.java b/ihl/recipes/UniversalRecipeManager.java index 6c09bb1..cddc252 100644 --- a/ihl/recipes/UniversalRecipeManager.java +++ b/ihl/recipes/UniversalRecipeManager.java @@ -7,9 +7,9 @@ import java.util.Map.Entry; import ic2.api.recipe.IRecipeInput; +import ihl.utils.IHLUtils; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import ihl.utils.IHLUtils; public class UniversalRecipeManager { diff --git a/ihl/servitor/BoneBlock.java b/ihl/servitor/BoneBlock.java index d8e9c32..549a92b 100644 --- a/ihl/servitor/BoneBlock.java +++ b/ihl/servitor/BoneBlock.java @@ -2,9 +2,9 @@ import java.util.List; -import ihl.IHLModInfo; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLModInfo; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/ihl/servitor/FlameRenderFX.java b/ihl/servitor/FlameRenderFX.java index 21729de..f90e378 100644 --- a/ihl/servitor/FlameRenderFX.java +++ b/ihl/servitor/FlameRenderFX.java @@ -1,12 +1,13 @@ package ihl.servitor; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class FlameRenderFX extends Render{ private ResourceLocation tex; diff --git a/ihl/servitor/LostHeadEntity.java b/ihl/servitor/LostHeadEntity.java index 8a20a42..704743b 100644 --- a/ihl/servitor/LostHeadEntity.java +++ b/ihl/servitor/LostHeadEntity.java @@ -1,11 +1,10 @@ package ihl.servitor; +import java.util.List; + import ic2.api.item.IC2Items; import ihl.IHLMod; import ihl.IHLModInfo; - -import java.util.List; - import net.minecraft.entity.Entity; import net.minecraft.entity.EntityFlying; import net.minecraft.entity.EntityLivingBase; diff --git a/ihl/servitor/LostHeadRender.java b/ihl/servitor/LostHeadRender.java index 5f8ee96..f4e7cb9 100644 --- a/ihl/servitor/LostHeadRender.java +++ b/ihl/servitor/LostHeadRender.java @@ -1,10 +1,11 @@ package ihl.servitor; +import org.lwjgl.opengl.GL11; + import ihl.IHLModInfo; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class LostHeadRender extends Render{ private SkullModel model = new SkullModel(); diff --git a/ihl/servitor/SkullItemRender.java b/ihl/servitor/SkullItemRender.java index 3d00df1..8b9e2b7 100644 --- a/ihl/servitor/SkullItemRender.java +++ b/ihl/servitor/SkullItemRender.java @@ -1,11 +1,12 @@ package ihl.servitor; +import org.lwjgl.opengl.GL11; + import ihl.IHLModInfo; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import org.lwjgl.opengl.GL11; public class SkullItemRender implements IItemRenderer{ private SkullModel model = new SkullModel(); diff --git a/ihl/trans_dimensional_item_teleporter/TDITFrequencyTransmitter.java b/ihl/trans_dimensional_item_teleporter/TDITFrequencyTransmitter.java index 43701eb..633b824 100644 --- a/ihl/trans_dimensional_item_teleporter/TDITFrequencyTransmitter.java +++ b/ihl/trans_dimensional_item_teleporter/TDITFrequencyTransmitter.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import ic2.api.item.IItemHudInfo; import ic2.core.IC2; import ic2.core.util.StackUtil; diff --git a/ihl/trans_dimensional_item_teleporter/TDITGui.java b/ihl/trans_dimensional_item_teleporter/TDITGui.java index ab17b17..5966e5e 100644 --- a/ihl/trans_dimensional_item_teleporter/TDITGui.java +++ b/ihl/trans_dimensional_item_teleporter/TDITGui.java @@ -1,14 +1,13 @@ package ihl.trans_dimensional_item_teleporter; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import org.lwjgl.opengl.GL11; - @SideOnly(Side.CLIENT) public class TDITGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUITDIT.png"); diff --git a/ihl/trans_dimensional_item_teleporter/TDITTileEntity.java b/ihl/trans_dimensional_item_teleporter/TDITTileEntity.java index 6c6f268..d54a705 100644 --- a/ihl/trans_dimensional_item_teleporter/TDITTileEntity.java +++ b/ihl/trans_dimensional_item_teleporter/TDITTileEntity.java @@ -7,17 +7,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -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.server.MinecraftServer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; import ic2.api.energy.tile.IEnergySink; @@ -30,14 +19,24 @@ import ic2.core.audio.PositionSpec; import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlot; +import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotOutput; import ic2.core.block.invslot.InvSlotUpgrade; -import ic2.core.block.invslot.InvSlot.Access; import ic2.core.upgrade.IUpgradableBlock; import ic2.core.upgrade.IUpgradeItem; import ic2.core.upgrade.UpgradableProperty; import ihl.IHLMod; import ihl.utils.IHLInvSlotDischarge; +import net.minecraft.client.gui.GuiScreen; +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.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; public class TDITTileEntity extends TileEntityInventory implements IEnergySink, IHasGui, IUpgradableBlock { diff --git a/ihl/utils/BlockItemRender.java b/ihl/utils/BlockItemRender.java index 870ab21..34d1499 100644 --- a/ihl/utils/BlockItemRender.java +++ b/ihl/utils/BlockItemRender.java @@ -1,5 +1,9 @@ package ihl.utils; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.block.RenderBlockDefault; import ihl.items_blocks.IHLItemBlock; import ihl.model.IHLModelRenderer; @@ -14,10 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value = Side.CLIENT) public class BlockItemRender implements IItemRenderer{ diff --git a/ihl/utils/EntityDropEventHandler.java b/ihl/utils/EntityDropEventHandler.java index f4021ef..c8edf47 100644 --- a/ihl/utils/EntityDropEventHandler.java +++ b/ihl/utils/EntityDropEventHandler.java @@ -1,7 +1,7 @@ package ihl.utils; -import net.minecraft.entity.passive.EntitySheep; import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.entity.passive.EntitySheep; public class EntityDropEventHandler { diff --git a/ihl/utils/IHLInvSlotDischarge.java b/ihl/utils/IHLInvSlotDischarge.java index 4ebb488..ffa4216 100644 --- a/ihl/utils/IHLInvSlotDischarge.java +++ b/ihl/utils/IHLInvSlotDischarge.java @@ -1,11 +1,11 @@ package ihl.utils; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; import ic2.api.info.Info; import ic2.api.item.ElectricItem; import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlot; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; public class IHLInvSlotDischarge extends InvSlot { diff --git a/ihl/utils/IHLItemRenderer.java b/ihl/utils/IHLItemRenderer.java index 2ebbdb1..0191edb 100644 --- a/ihl/utils/IHLItemRenderer.java +++ b/ihl/utils/IHLItemRenderer.java @@ -22,8 +22,8 @@ import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.MinecraftForgeClient; @SideOnly(value = Side.CLIENT) public class IHLItemRenderer { diff --git a/ihl/utils/IHLUtils.java b/ihl/utils/IHLUtils.java index 519f265..c37e11e 100644 --- a/ihl/utils/IHLUtils.java +++ b/ihl/utils/IHLUtils.java @@ -1,5 +1,16 @@ package ihl.utils; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +import org.apache.commons.lang3.mutable.MutableObject; + +import cpw.mods.fml.common.registry.GameRegistry; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; @@ -11,21 +22,10 @@ import ihl.interfaces.IEnergyNetNode; import ihl.interfaces.IMultiPowerCableHolder; import ihl.interfaces.IWire; -import ihl.metallurgy.constants.*; +import ihl.metallurgy.constants.ElectricConductor; +import ihl.metallurgy.constants.Insulation; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.recipes.IRecipeInputFluid; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; - -import org.apache.commons.lang3.mutable.MutableObject; - -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; diff --git a/ihl/worldgen/IHLWorldGenerator.java b/ihl/worldgen/IHLWorldGenerator.java index 1c65b78..a6f3b6b 100644 --- a/ihl/worldgen/IHLWorldGenerator.java +++ b/ihl/worldgen/IHLWorldGenerator.java @@ -1,17 +1,17 @@ package ihl.worldgen; -import ihl.IHLMod; -import ihl.utils.IHLUtils; -import ihl.worldgen.ores.IHLFluid; - import java.util.HashSet; import java.util.Random; import java.util.Set; + +import cpw.mods.fml.common.IWorldGenerator; +import ihl.IHLMod; +import ihl.utils.IHLUtils; +import ihl.worldgen.ores.IHLFluid; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; -import cpw.mods.fml.common.IWorldGenerator; public class IHLWorldGenerator implements IWorldGenerator { diff --git a/ihl/worldgen/ores/BlockOre.java b/ihl/worldgen/ores/BlockOre.java index 4b0c7a7..00a8bcc 100644 --- a/ihl/worldgen/ores/BlockOre.java +++ b/ihl/worldgen/ores/BlockOre.java @@ -7,11 +7,11 @@ import java.util.List; import java.util.Map; -import ihl.IHLCreativeTab; -import ihl.IHLModInfo; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLCreativeTab; +import ihl.IHLModInfo; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/ihl/worldgen/ores/DebugScannerGui.java b/ihl/worldgen/ores/DebugScannerGui.java index 2d79300..56be263 100644 --- a/ihl/worldgen/ores/DebugScannerGui.java +++ b/ihl/worldgen/ores/DebugScannerGui.java @@ -2,12 +2,12 @@ import java.util.List; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class DebugScannerGui extends GuiContainer { diff --git a/ihl/worldgen/ores/DebugScannerTileEntity.java b/ihl/worldgen/ores/DebugScannerTileEntity.java index df027d5..b32f3e8 100644 --- a/ihl/worldgen/ores/DebugScannerTileEntity.java +++ b/ihl/worldgen/ores/DebugScannerTileEntity.java @@ -6,6 +6,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ic2.core.IHasGui; +import ic2.core.block.TileEntityInventory; +import ic2.core.block.invslot.InvSlot; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -15,11 +20,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.oredict.OreDictionary; -import ic2.core.ContainerBase; -import ic2.core.IC2; -import ic2.core.IHasGui; -import ic2.core.block.TileEntityInventory; -import ic2.core.block.invslot.InvSlot; public class DebugScannerTileEntity extends TileEntityInventory implements IHasGui { public final InvSlot itemsSlot; diff --git a/ihl/worldgen/ores/IHLFluid.java b/ihl/worldgen/ores/IHLFluid.java index 51e0999..d35dc73 100644 --- a/ihl/worldgen/ores/IHLFluid.java +++ b/ihl/worldgen/ores/IHLFluid.java @@ -7,11 +7,11 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.common.registry.GameRegistry; import ic2.core.Ic2Items; import ihl.IHLCreativeTab; import ihl.IHLModInfo; import ihl.items_blocks.IHLFluidBlock; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; @@ -47,7 +47,7 @@ public IHLFluid(IHLFluidType type1) { if (!FluidRegistry.registerFluid(instance)) { instance = FluidRegistry.getFluid(type.fluidRegistryName); } - if (instance.getBlock() == null && !type.noBlock) { + if (instance.getBlock() == null) { instance.setBlock(new IHLFluidBlock(instance, type.blockMaterial, type.textureName, "fluid" + type.fluidName.replaceFirst("fluid", "")).setFlammable(type.flammable) .setBlockName("block" + type.fluidName).setCreativeTab(IHLCreativeTab.tab)); @@ -136,7 +136,7 @@ public enum IHLFluidType { // "methane", Material.water, false, false, false, false), NitroGlyceryl("NitroGlycerin", 10052, 293, 291, 583, 1595, "nitroglycerin", Material.water, true, false, true), Ammonia("Ammonia", 10051, 273, 273 - 78, 273 - - 33, 0.772F, "ammonia", new MaterialLiquid(MapColor.airColor), false, false, true), + - 33, 0.772F, "ammonia", new MaterialLiquid(MapColor.airColor), true, false, true), Acetaldehyde("Acetaldehyde", 10050, 273, 273 - 123, 294, 784, "acetaldehyde", Material.water, false, false, false), Formaldehyde("Formaldehyde", 10049, 254, 273 @@ -160,13 +160,13 @@ public enum IHLFluidType { Fuel("Fuel", 10035, 293, 268, 633, 840, "fuel", Material.water, true, false, true), MineralOil("MineralOil", 10034, 293, 238, 704, 845, "mineraloil", Material.water, true, false, true), FuelOil("FuelOil", 10033, 293, 293, 693, 991, "fueloil", Material.water, true, false, true), - Oil("Oil", "fluidOil", 10032, 293, 284, 773, 850f, "oil", Material.water, true, false, true, false), + Oil("Oil", "fluidOil", 10032, 293, 284, 773, 850f, "oil", Material.water, true, false, true), Mercury("Mercury", 10031, 293, 234, 630, 13546), VapourMercury("VapourMercury", 10030, 630, 234, 630, 9.229F, "vapour.mercury", new MaterialLiquid( MapColor.cyanColor), false, false, false), Hydrogen("Hydrogen", 10029, 293, 14, 20, 0.046F, "hydrogen", new MaterialLiquid( MapColor.blueColor), true, false, true), - SaltWater("SaltWater", "fluidSaltWater", 10028, 293, 253, 373, 1360f, "saltwater", Material.water, true, false, false, false), + SaltWater("SaltWater", "fluidSaltWater", 10028, 293, 253, 373, 1360f, "saltwater", Material.water, true, false, false), HydrogenChloride("HydrogenChloride", 10027, 293, 159, 188, 1.477F, "hydrogenchloride", new MaterialLiquid( MapColor.yellowColor), true, false, true), NatriumTungstate("NatriumTungstateDissolvedInWater", 10026, 293, 249, 373, 1730, "solution.natriumtungstate", Material.water, true, false, false), @@ -178,8 +178,8 @@ public enum IHLFluidType { Oxygen("Oxygen", 10022, 93, 55, 93, 1.429F, "oxygen", new MaterialLiquid(MapColor.airColor), true, false, true), NatriumHydroxide("NatriumHydroxideDissolvedInWater", 10021, 293, 249, 373, 1525, "solution.natriumhydroxide", Material.water, true, false, false), LiquidGlass("LiquidGlass", 10020, 293, 253, 373, 2400), - fluidRubberTreeSap("fluidRubberTreeSap", "fluidRubberTreeSap", 10019, 293, 273, 393, 1200f, "fluidrubbertreesap", Material.water, true, true, false, false), - SpruceResin("SpruceResin","fluidSpruceResin", 10018, 293, 273, 533, 1080, "spruceresin", Material.water, true, true, true, false), + fluidRubberTreeSap("fluidRubberTreeSap", "fluidRubberTreeSap", 10019, 293, 273, 393, 1200f, "fluidrubbertreesap", Material.water, true, true, false), + SpruceResin("SpruceResin","fluidSpruceResin", 10018, 293, 273, 533, 1080, "spruceresin", Material.water, true, true, true), CablingColophony("CablingColophony", 10017, 363, 363, 533, 1070, "cablingcolophony", Material.water, true, false, true), Glycerol("Glycerol", 10016, 293, 291, 583, 1261, "glycerol", Material.water, true, false, true), SeedOil("SeedOil", 10015, 293, 256, 583, 920, "seedoil", Material.water, true, false, true), @@ -191,12 +191,12 @@ public enum IHLFluidType { NickelSulfateDissolvedInWater("NickelSulfateDissolvedInWater", 10009, 293, 253, 373, 1220, "solution.nickelsulfate", Material.water, true, false, false), BlueVitriolDissolvedInWater("BlueVitriolDissolvedInWater", 10008, 293, 253, 373, 1180, "solution.bluevitriol", Material.water, true, false, false), MoltenRubberWithSulfur("MoltenRubberWithSulfur", 10007, 600, 600, 1000, 1200, "molten.rubber", Material.lava, false, false, true), - MoltenPotassium("MoltenPotassium", "fluidMolten", 10042, 336, 336, 1047, 856, "molten.potassium", Material.lava, false, false, false, true), + MoltenPotassium("MoltenPotassium", "fluidMolten", 10042, 336, 336, 1047, 856, "molten.potassium", Material.lava, false, false, false), MoltenLithium("MoltenLithium", "fluidMolten", 10042, 454, 454, 1613, 512, "molten.lithium", Material.lava, false, false, false), MoltenPotassiumChloride("MoltenPotassiumChloride", "fluidMolten", 10006, 776 + 273, 776 + 273, 1407 - + 273, 1556, "molten.potassiumchloride", Material.lava, false, false, false, true), + + 273, 1556, "molten.potassiumchloride", Material.lava, false, false, false), MoltenSodiumChloride("MoltenSodiumChloride", "fluidMolten", 10006, 1273, 1273, 1740, 1556, "molten.sodiumchloride", Material.lava, false, false, false), - MoltenGlass("MoltenGlass", "fluidMolten", 10048, 600, 600, 1950, 2270, "molten.glass", Material.lava, false, false, false, true), + MoltenGlass("MoltenGlass", "fluidMolten", 10048, 600, 600, 1950, 2270, "molten.glass", Material.lava, false, false, false), MoltenMagnesium("MoltenMagnesium", "fluidMolten", 10006, 923, 923, 1623, 1584, "molten.magnesium", Material.lava, false, false, false), MoltenSteel("MoltenSteel", "fluidMolten", 10006, 1800, 1800, 3134, 6980, "molten.steel", Material.lava, false, false, false), MoltenCopper("MoltenCopper", "fluidMolten", 10048, 1356, 1356, 2840, 8920, "molten.copper", Material.lava, false, false, false), @@ -275,26 +275,6 @@ public enum IHLFluidType { damage = celldamage; } - IHLFluidType(String fluidName1, String textureName1, int celldamage, int temperature1, int meltingPoint1, - int boilingPoint1, float density1, String fluidRegistryName1, Material blockMaterial1, boolean hasCell1, - boolean haveBucket1, boolean flammable1, boolean noBlock1) { - noBlock = noBlock1; - fluidName = fluidName1; - fluidRegistryName = fluidRegistryName1; - textureName = textureName1; - temperature = temperature1; - density = density1; - cellName = "itemCell" + fluidName; - haveBucket = haveBucket1; - flammable = flammable1; - isGaseous = density1 < maxGaseousStateVapoursDensity; - blockMaterial = blockMaterial1; - boilingPoint = boilingPoint1; - meltingPoint = meltingPoint1; - hasCell = hasCell1; - damage = celldamage; - } - public String fluidName; public String fluidRegistryName; public String cellName; @@ -303,7 +283,6 @@ public enum IHLFluidType { float density; boolean isGaseous; boolean flammable = false; - boolean noBlock = true; boolean haveBucket; Material blockMaterial = Material.water; int meltingPoint;