diff options
Diffstat (limited to 'src/Java')
7 files changed, 718 insertions, 61 deletions
diff --git a/src/Java/miscutil/core/common/CommonProxy.java b/src/Java/miscutil/core/common/CommonProxy.java index 2a1baa705a..547f15d8b5 100644 --- a/src/Java/miscutil/core/common/CommonProxy.java +++ b/src/Java/miscutil/core/common/CommonProxy.java @@ -49,6 +49,17 @@ public class CommonProxy { Utils.LOG_INFO("Doing some house cleaning."); LoadedMods.checkLoaded(); Utils.LOG_INFO("Making sure we're ready to party!"); + + if (LoadedMods.Gregtech){ + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + Utils.LOG_INFO("We're using Gregtech 5.09 Experimental."); + } + else { + Utils.LOG_INFO("We're using Gregtech 5.08 or an equivalent fork."); + } + } + + if (!DEBUG){ Utils.LOG_WARNING("Development mode not enabled."); } diff --git a/src/Java/miscutil/core/lib/CORE.java b/src/Java/miscutil/core/lib/CORE.java index 464edee3c5..a034542c70 100644 --- a/src/Java/miscutil/core/lib/CORE.java +++ b/src/Java/miscutil/core/lib/CORE.java @@ -7,6 +7,7 @@ import java.util.Map; import miscutil.core.creative.AddToCreativeTab; import miscutil.core.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; import miscutil.core.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder; +import miscutil.core.xmod.gregtech.common.Meta_GT_Proxy; import net.minecraft.client.renderer.texture.IIconRegister; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -21,6 +22,7 @@ public class CORE { public static final int GREG_FIRST_ID = 760; public static Map PlayerCache; public static final String[] VOLTAGES = {"ULV","LV","MV","HV","EV","IV","LuV","ZPM","UV","MAX"}; + public static final boolean MAIN_GREGTECH_5U_EXPERIMENTAL_FORK = Meta_GT_Proxy.areWeUsingGregtech5uExperimental(); public static IGregtech_RecipeAdder RA; @Deprecated public static IGregtech_RecipeAdder sRecipeAdder; diff --git a/src/Java/miscutil/core/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/miscutil/core/xmod/gregtech/common/Meta_GT_Proxy.java index 99aaec4e33..45930a3977 100644 --- a/src/Java/miscutil/core/xmod/gregtech/common/Meta_GT_Proxy.java +++ b/src/Java/miscutil/core/xmod/gregtech/common/Meta_GT_Proxy.java @@ -382,5 +382,18 @@ public class Meta_GT_Proxy { this.mModID = ((aModID == null) || (aModID.equals("UNKNOWN")) ? null : aModID); } } + + public static boolean areWeUsingGregtech5uExperimental(){ + int version = GregTech_API.VERSION; + if (version == 508){ + return false; + } + else if (version == 509){ + return true; + } + else { + return false; + } + } } diff --git a/src/Java/miscutil/core/xmod/gregtech/common/blocks/CasingTextureHandler.java b/src/Java/miscutil/core/xmod/gregtech/common/blocks/CasingTextureHandler.java new file mode 100644 index 0000000000..eb424dbe29 --- /dev/null +++ b/src/Java/miscutil/core/xmod/gregtech/common/blocks/CasingTextureHandler.java @@ -0,0 +1,481 @@ +package miscutil.core.xmod.gregtech.common.blocks; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import miscutil.core.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntityIndustrialCentrifuge; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class CasingTextureHandler { + + private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE1"); + private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE1"); + private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE2"); + private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE2"); + private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE3"); + private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE3"); + private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE4"); + private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE4.png"); + private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE5"); + private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE5"); + private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE6"); + private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE6"); + private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE7"); + private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE7"); + private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE8"); + private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE8"); + private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE9"); + private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE9"); + + private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1); + private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2); + private static Textures.BlockIcons.CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static Textures.BlockIcons.CustomIcon frontFace_2 = (GT8_3); + private static Textures.BlockIcons.CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static Textures.BlockIcons.CustomIcon frontFace_3 = (GT8_4); + private static Textures.BlockIcons.CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static Textures.BlockIcons.CustomIcon frontFace_4 = (GT8_5); + private static Textures.BlockIcons.CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static Textures.BlockIcons.CustomIcon frontFace_5 = (GT8_6); + private static Textures.BlockIcons.CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static Textures.BlockIcons.CustomIcon frontFace_6 = (GT8_7); + private static Textures.BlockIcons.CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static Textures.BlockIcons.CustomIcon frontFace_7 = (GT8_8); + private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9); + private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active); + + Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{ + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; + + Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{ + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; + + public IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + //Centrifuge + case 0: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + //Coke Oven Frame + case 1: + return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); + //Coke Oven Casing Tier 1 + case 2: + return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon(); + //Coke Oven Casing Tier 2 + case 3: + return Textures.BlockIcons.MACHINE_CASING_FIREBOX_STEEL.getIcon(); + //Material Press Casings + case 4: + return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + //Electrolyzer Casings + case 5: + return Textures.BlockIcons.MACHINE_CASING_FUSION_2.getIcon(); + //Broken Blue Fusion Casings + case 6: + return Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon(); + //Maceration Stack Casings + case 7: + return Textures.BlockIcons.MACHINE_LuV_BOTTOM.getIcon(); + //Broken Pink Fusion Casings + case 8: + return Textures.BlockIcons.MACHINE_CASING_FUSION_2.getIcon(); + //Matter Fabricator Casings + case 9: + return Textures.BlockIcons.MACHINE_CASING_DRAGONEGG.getIcon(); + //Iron Blast Fuance Textures + case 10: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + + default: + return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon(); + + } + } + return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon(); + } + + +public IIcon handleCasings(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) { + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { + return getIcon(aSide, tMeta); + } + int tStartIndex = tMeta == 6 ? 1 : 13; + if (tMeta == 0) { + if ((aSide == 2) || (aSide == 3)) { + TileEntity tTileEntity; + IMetaTileEntity tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[0].getIcon(); + } + return TURBINE[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[3].getIcon(); + } + return TURBINE[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[6].getIcon(); + } + return TURBINE[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[1].getIcon(); + } + return TURBINE[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[7].getIcon(); + } + return TURBINE[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[8].getIcon(); + } + return TURBINE[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[5].getIcon(); + } + return TURBINE[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[2].getIcon(); + } + return TURBINE[2].getIcon(); + } + } else if ((aSide == 4) || (aSide == 5)) { + TileEntity tTileEntity; + Object tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[0].getIcon(); + } + return TURBINE[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[3].getIcon(); + } + return TURBINE[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[6].getIcon(); + } + return TURBINE[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[1].getIcon(); + } + return TURBINE[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[7].getIcon(); + } + return TURBINE[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[8].getIcon(); + } + return TURBINE[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[5].getIcon(); + } + return TURBINE[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return TURBINE_ACTIVE[2].getIcon(); + } + return TURBINE[2].getIcon(); + } + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)}; + switch (aSide) { + case 0: + if (tConnectedSides[0]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[2])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[5]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 1: + if (tConnectedSides[1]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 2: + if (tConnectedSides[5]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 3: + if (tConnectedSides[3]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[2]) && (!tConnectedSides[4])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + case 4: + if (tConnectedSides[4]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + case 5: + if (tConnectedSides[2]) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon(); + } + if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon(); + } + if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon(); + } + if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); + } + if ((!tConnectedSides[0]) && (!tConnectedSides[1])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon(); + } + if ((!tConnectedSides[3]) && (!tConnectedSides[5])) { + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon(); + } + break; + } + return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon(); +} + + +} diff --git a/src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java index e55ec34814..46a881cd32 100644 --- a/src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java +++ b/src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java @@ -6,6 +6,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_CopiedBlockTexture; import gregtech.api.util.GT_LanguageManager; import gregtech.common.blocks.GT_Material_Casings; +import miscutil.core.lib.CORE; import miscutil.core.xmod.gregtech.api.enums.GregtechItemList; import miscutil.core.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntityIndustrialCentrifuge; import net.minecraft.item.ItemStack; @@ -19,6 +20,90 @@ public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract { public final static int GTID = 57; + + CasingTextureHandler TextureHandler = new CasingTextureHandler(); + + private static Textures.BlockIcons.CustomIcon frontFace_0; + private static Textures.BlockIcons.CustomIcon frontFace_1; + private static Textures.BlockIcons.CustomIcon frontFace_2; + private static Textures.BlockIcons.CustomIcon frontFace_3; + private static Textures.BlockIcons.CustomIcon frontFace_4; + private static Textures.BlockIcons.CustomIcon frontFace_5; + private static Textures.BlockIcons.CustomIcon frontFace_6; + private static Textures.BlockIcons.CustomIcon frontFace_7; + private static Textures.BlockIcons.CustomIcon frontFace_8; + private static Textures.BlockIcons.CustomIcon frontFaceActive_0; + private static Textures.BlockIcons.CustomIcon frontFaceActive_1; + private static Textures.BlockIcons.CustomIcon frontFaceActive_2; + private static Textures.BlockIcons.CustomIcon frontFaceActive_3; + private static Textures.BlockIcons.CustomIcon frontFaceActive_4; + private static Textures.BlockIcons.CustomIcon frontFaceActive_5; + private static Textures.BlockIcons.CustomIcon frontFaceActive_6; + private static Textures.BlockIcons.CustomIcon frontFaceActive_7; + private static Textures.BlockIcons.CustomIcon frontFaceActive_8; + + Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{ + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; + Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{ + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; + + private static Textures.BlockIcons.CustomIcon GT9_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE1"); + private static Textures.BlockIcons.CustomIcon GT9_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST1"); + private static Textures.BlockIcons.CustomIcon GT9_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE2"); + private static Textures.BlockIcons.CustomIcon GT9_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST2"); + private static Textures.BlockIcons.CustomIcon GT9_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE3"); + private static Textures.BlockIcons.CustomIcon GT9_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST3"); + private static Textures.BlockIcons.CustomIcon GT9_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE4"); + private static Textures.BlockIcons.CustomIcon GT9_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST4"); + private static Textures.BlockIcons.CustomIcon GT9_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE5"); + private static Textures.BlockIcons.CustomIcon GT9_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST5"); + private static Textures.BlockIcons.CustomIcon GT9_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE6"); + private static Textures.BlockIcons.CustomIcon GT9_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST6"); + private static Textures.BlockIcons.CustomIcon GT9_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE7"); + private static Textures.BlockIcons.CustomIcon GT9_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST7"); + private static Textures.BlockIcons.CustomIcon GT9_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE8"); + private static Textures.BlockIcons.CustomIcon GT9_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST8"); + private static Textures.BlockIcons.CustomIcon GT9_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE9"); + private static Textures.BlockIcons.CustomIcon GT9_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST9"); + + private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE1"); + private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE1"); + private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE2"); + private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE2"); + private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE3"); + private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE3"); + private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE4"); + private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE4.png"); + private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE5"); + private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE5"); + private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE6"); + private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE6"); + private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE7"); + private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE7"); + private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE8"); + private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE8"); + private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE9"); + private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE9"); + + public GregtechMetaCasingBlocks() { super(GregtechMetaCasingItems.class, "miscutils.blockcasings", GT_Material_Casings.INSTANCE); @@ -57,6 +142,49 @@ extends GregtechMetaCasingBlocksAbstract { GregtechItemList.Casing_Coil_U2.set(new ItemStack(this, 1, 13)); GregtechItemList.Casing_Coil_U3.set(new ItemStack(this, 1, 14)); GregtechItemList.Casing_Coil_U4.set(new ItemStack(this, 1, 15)); + + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + frontFace_0 = GT9_1; + frontFaceActive_0 = (GT9_1_Active); + frontFace_1 = (GT9_2); + frontFaceActive_1 = (GT9_2_Active); + frontFace_2 = (GT9_3); + frontFaceActive_2 = (GT9_3_Active); + frontFace_3 = (GT9_4); + frontFaceActive_3 = (GT9_4_Active); + frontFace_4 = (GT9_5); + frontFaceActive_4 = (GT9_5_Active); + frontFace_5 = (GT9_6); + frontFaceActive_5 = (GT9_6_Active); + frontFace_6 = (GT9_7); + frontFaceActive_6 = (GT9_7_Active); + frontFace_7 = (GT9_8); + frontFaceActive_7 = (GT9_8_Active); + frontFace_8 = (GT9_9); + frontFaceActive_8 = (GT9_9_Active); + } + else{ + frontFace_0 = (GT8_1); + frontFaceActive_0 = (GT8_1_Active); + frontFace_1 = (GT8_2); + frontFaceActive_1 = (GT8_2_Active); + frontFace_2 = (GT8_3); + frontFaceActive_2 = (GT8_3_Active); + frontFace_3 = (GT8_4); + frontFaceActive_3 = (GT8_4_Active); + frontFace_4 = (GT8_5); + frontFaceActive_4 = (GT8_5_Active); + frontFace_5 = (GT8_6); + frontFaceActive_5 = (GT8_6_Active); + frontFace_6 = (GT8_7); + frontFaceActive_6 = (GT8_7_Active); + frontFace_7 = (GT8_8); + frontFaceActive_7 = (GT8_8_Active); + frontFace_8 = (GT8_9); + frontFaceActive_8 = (GT8_9_Active); + } + + } @Override @@ -114,8 +242,11 @@ extends GregtechMetaCasingBlocksAbstract { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { + + GregtechMetaCasingBlocks i = this; + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))/* || (!mConnectedMachineTextures)*/) { + if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { return getIcon(aSide, tMeta); } int tStartIndex = tMeta == 6 ? 1 : 13; @@ -125,102 +256,102 @@ extends GregtechMetaCasingBlocksAbstract { IMetaTileEntity tMetaTileEntity; if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[0].getIcon(); + return TURBINE_ACTIVE[0].getIcon(); } - return Textures.BlockIcons.TURBINE[0].getIcon(); + return TURBINE[0].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[3].getIcon(); + return TURBINE_ACTIVE[3].getIcon(); } - return Textures.BlockIcons.TURBINE[3].getIcon(); + return TURBINE[3].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[6].getIcon(); + return TURBINE_ACTIVE[6].getIcon(); } - return Textures.BlockIcons.TURBINE[6].getIcon(); + return TURBINE[6].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[1].getIcon(); + return TURBINE_ACTIVE[1].getIcon(); } - return Textures.BlockIcons.TURBINE[1].getIcon(); + return TURBINE[1].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[7].getIcon(); + return TURBINE_ACTIVE[7].getIcon(); } - return Textures.BlockIcons.TURBINE[7].getIcon(); + return TURBINE[7].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[8].getIcon(); + return TURBINE_ACTIVE[8].getIcon(); } - return Textures.BlockIcons.TURBINE[8].getIcon(); + return TURBINE[8].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[5].getIcon(); + return TURBINE_ACTIVE[5].getIcon(); } - return Textures.BlockIcons.TURBINE[5].getIcon(); + return TURBINE[5].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[2].getIcon(); + return TURBINE_ACTIVE[2].getIcon(); } - return Textures.BlockIcons.TURBINE[2].getIcon(); + return TURBINE[2].getIcon(); } } else if ((aSide == 4) || (aSide == 5)) { TileEntity tTileEntity; Object tMetaTileEntity; if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[0].getIcon(); + return TURBINE_ACTIVE[0].getIcon(); } - return Textures.BlockIcons.TURBINE[0].getIcon(); + return TURBINE[0].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[3].getIcon(); + return TURBINE_ACTIVE[3].getIcon(); } - return Textures.BlockIcons.TURBINE[3].getIcon(); + return TURBINE[3].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[6].getIcon(); + return TURBINE_ACTIVE[6].getIcon(); } - return Textures.BlockIcons.TURBINE[6].getIcon(); + return TURBINE[6].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[1].getIcon(); + return TURBINE_ACTIVE[1].getIcon(); } - return Textures.BlockIcons.TURBINE[1].getIcon(); + return TURBINE[1].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[7].getIcon(); + return TURBINE_ACTIVE[7].getIcon(); } - return Textures.BlockIcons.TURBINE[7].getIcon(); + return TURBINE[7].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[8].getIcon(); + return TURBINE_ACTIVE[8].getIcon(); } - return Textures.BlockIcons.TURBINE[8].getIcon(); + return TURBINE[8].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[5].getIcon(); + return TURBINE_ACTIVE[5].getIcon(); } - return Textures.BlockIcons.TURBINE[5].getIcon(); + return TURBINE[5].getIcon(); } if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntityIndustrialCentrifuge))) { if (((IGregTechTileEntity) tTileEntity).isActive()) { - return Textures.BlockIcons.TURBINE_ACTIVE[2].getIcon(); + return TURBINE_ACTIVE[2].getIcon(); } - return Textures.BlockIcons.TURBINE[2].getIcon(); + return TURBINE[2].getIcon(); } } return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); diff --git a/src/Java/miscutil/core/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java b/src/Java/miscutil/core/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java index 1ae9296da0..a703da3c54 100644 --- a/src/Java/miscutil/core/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java +++ b/src/Java/miscutil/core/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.objects.GT_RenderedTexture; +import miscutil.core.util.Utils; import miscutil.core.xmod.gregtech.api.gui.CONTAINER_SolarGenerator; import miscutil.core.xmod.gregtech.api.gui.GUI_SolarGenerator; import miscutil.core.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaSolarGenerator; @@ -29,16 +30,16 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener public boolean isOutputFacing(byte aSide) { return aSide == getBaseMetaTileEntity().getFrontFacing(); } - + @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new CONTAINER_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, 16000); - } + return new CONTAINER_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, 16000); + } - @Override + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GUI_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000); - } + return new GUI_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000); + } @Override public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @@ -56,33 +57,41 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener && aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) { if (this.mSolarCharge <= 20) { + //Utils.LOG_WARNING("1."); this.mSolarCharge = 20; this.mLossTimer = 0; } if (++this.mLossTimer > 45) { + //Utils.LOG_WARNING("2."); this.mSolarCharge -= 1; this.mLossTimer = 0; } - if (aTick % 25L == 0L) { - if (this.mSolarCharge > 100) { - if ((this.mProcessingEnergy > 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering() && aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUOutput() * 20 + getMinimumStoredEU()))) { - getBaseMetaTileEntity().increaseStoredEnergyUnits(sEnergyPerTick * getEfficiency() / 10, false); - } + if (aTick % 10L == 0L) { + + Utils.LOG_WARNING("getUniversalEnergyStored: "+aBaseMetaTileEntity.getUniversalEnergyStored() + " maxEUOutput * 20 + getMinimumStoredEU: " + (maxEUOutput() * 20 + getMinimumStoredEU())); + + if ((this.mSolarCharge > 100) && (aBaseMetaTileEntity.isAllowedToWork()) && + (!aBaseMetaTileEntity.getWorld().isThundering()) && + aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUStore() - getMinimumStoredEU())) { + getBaseMetaTileEntity().increaseStoredEnergyUnits(sEnergyPerTick * getEfficiency(), true); } } - if ((this.mSolarCharge < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) { + if ((this.mSolarCharge < 500) && (this.mProcessingEnergy != 0) && (aTick % 32L == 0L)) { + Utils.LOG_WARNING("Adding Solar Charge. Currently "+mSolarCharge); this.mProcessingEnergy -= 1; this.mSolarCharge += 1; } - if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { + if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 64L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { + Utils.LOG_WARNING("Adding Processing Energy. Currently "+mProcessingEnergy); boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F; mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; } if (aBaseMetaTileEntity.isServerSide()){ + //Utils.LOG_WARNING("6."); aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU()); } } @@ -103,13 +112,13 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener return Math.max(getEUVar(), V[mTier] * 16000 + getMinimumStoredEU()); } - + ITexture SolarArray[] = {new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV), - new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)}; - - + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV), + new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)}; + + @Override public ITexture[] getFront(byte aColor) { return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT), @@ -161,5 +170,5 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener public ITexture[] getSidesActive(byte aColor) { return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)}; } - + }
\ No newline at end of file diff --git a/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialCentrifuge.java b/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialCentrifuge.java index 3ec28d9d4e..f3194c3742 100644 --- a/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialCentrifuge.java +++ b/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialCentrifuge.java @@ -16,6 +16,7 @@ import java.util.Arrays; import java.util.List; import miscutil.core.block.ModBlocks; +import miscutil.core.lib.CORE; import miscutil.core.util.Utils; import miscutil.core.xmod.gregtech.api.gui.GUI_MultiMachine; import miscutil.core.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; @@ -30,10 +31,24 @@ import org.apache.commons.lang3.ArrayUtils; public class GregtechMetaTileEntityIndustrialCentrifuge extends GregtechMeta_MultiBlockBase { private static boolean controller; + private static ITexture frontFace; + private static ITexture frontFaceActive; + private static Textures.BlockIcons.CustomIcon GT9_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE5"); + private static Textures.BlockIcons.CustomIcon GT9_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST5"); + private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ACTIVE5"); + private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE5"); //public static double recipesComplete = 0; public GregtechMetaTileEntityIndustrialCentrifuge(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + frontFaceActive = new GT_RenderedTexture(GT9_5_Active); + frontFace = new GT_RenderedTexture(GT9_5); + } + else{ + frontFaceActive = new GT_RenderedTexture(GT8_5_Active); + frontFace = new GT_RenderedTexture(GT8_5); + } } public GregtechMetaTileEntityIndustrialCentrifuge(String aName) { @@ -62,19 +77,14 @@ extends GregtechMeta_MultiBlockBase { "Centrifuge Casings for the rest (16 at least)",}; } - /*@Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - if (aSide == aFacing) { - return new ITexture[]{GregtechTextures.BlockIcons.GT_CASING_BLOCKS[0], new GT_RenderedTexture(aActive ? Textures.BlockIcons.LARGETURBINE_ACTIVE5 : Textures.BlockIcons.LARGETURBINE5)}; - } - return new ITexture[]{GregtechTextures.BlockIcons.GT_CASING_BLOCKS[0]}; - }*/ + @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? frontFaceActive : frontFace : Textures.BlockIcons.CASING_BLOCKS[57]}; } - + + @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "IndustrialCentrifuge.png"); |