diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
7 files changed, 548 insertions, 156 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java index 52c21dc4b0..503b36e157 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java @@ -8,42 +8,43 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.gui.GT_Slot_Output; import gregtech.api.gui.GT_Slot_Render; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.core.slots.SlotLockedInput; import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest; import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large; public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine { + public int mContent = 0; + private ItemStack mLockedSlotStack = null; public CONTAINER_SuperChest(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } public void addSlots(InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17)); + this.addSlotToContainer(new SlotLockedInput(this.mTileEntity, 0, 80, 17, mLockedSlotStack)); this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 59, 42)); } public void detectAndSendChanges() { super.detectAndSendChanges(); - if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) { - + if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) { if (this.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_TieredChest) { this.mContent = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemCount; - } - - else if (ReflectionUtils.getField(this.mTileEntity, "mItemCount") != null) { - this.mContent = ReflectionUtils.getField(this.mTileEntity, "mItemCount"); + mLockedSlotStack = ((GT_MetaTileEntity_TieredChest) this.mTileEntity.getMetaTileEntity()).mItemStack; } - else if (this.mTileEntity.getMetaTileEntity() instanceof GT4Entity_Shelf_Large) { + if (this.mTileEntity.getMetaTileEntity() instanceof GT4Entity_Shelf_Large) { this.mContent = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemCount; + mLockedSlotStack = ((GT4Entity_Shelf_Large) this.mTileEntity.getMetaTileEntity()).mItemStack; } else { this.mContent = 0; @@ -56,8 +57,7 @@ public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine { var1.sendProgressBarUpdate(this, 100, this.mContent & 65535); var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16); } - - } + } } @SideOnly(Side.CLIENT) diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java index aaf4f9f1a6..d192d89af5 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java @@ -6,20 +6,27 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; import gregtech.api.objects.GT_CopiedBlockTexture; import gregtech.api.util.GT_LanguageManager; import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import java.util.List; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract { + public static boolean mConnectedMachineTextures = false; CasingTextureHandler3 TextureHandler = new CasingTextureHandler3(); public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems { @@ -57,8 +64,8 @@ extends GregtechMetaCasingBlocksAbstract { GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Supply Depot Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Advanced Cryogenic Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Volcanus Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Placeholder"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Placeholder"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Fusion Casing MK III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Advanced Fusion Coil"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Placeholder"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder"); GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0)); @@ -83,4 +90,304 @@ extends GregtechMetaCasingBlocksAbstract { public IIcon getIcon(final int aSide, final int aMeta) { return CasingTextureHandler3.getIcon(aSide, aMeta); } + + @SideOnly(Side.CLIENT) + @Override + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, + final int aSide) { + final Block thisBlock = aWorld.getBlock(xCoord, yCoord, zCoord); + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if ((tMeta != 12 && tMeta != 13)|| !GregtechMetaCasingBlocks3.mConnectedMachineTextures) { + return getIcon(aSide, tMeta); + } + final int tStartIndex = 0; + if (tMeta == 12 || tMeta == 13) { + final 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 TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[2]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[5] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + } + case 1 : { + if (tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[4] && tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[4] && tConnectedSides[5] && tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[4] && !tConnectedSides[5] && !tConnectedSides[2] && !tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + } + case 2 : { + if (tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + } + case 3 : { + if (tConnectedSides[3]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[2] && tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[2] && tConnectedSides[0] && tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[0] && !tConnectedSides[4] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[2] && !tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + } + case 4 : { + if (tConnectedSides[4]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + } + case 5 : { + if (tConnectedSides[2]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 6].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 5].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 2].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 3].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 4].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 11].getIcon(); + } + if (tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 8].getIcon(); + } + if (tConnectedSides[0] && tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 9].getIcon(); + } + if (!tConnectedSides[0] && tConnectedSides[3] && tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 10].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[3] && !tConnectedSides[1] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + if (!tConnectedSides[0] && !tConnectedSides[1]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 0].getIcon(); + } + if (!tConnectedSides[3] && !tConnectedSides[5]) { + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 1].getIcon(); + } + break; + } + } + return TexturesGtBlock.CONNECTED_FUSION_HULLS[tStartIndex + 7].getIcon(); + } + + if (aSide == 2 || aSide == 3) { + + } else if (aSide == 4 || aSide == 5) { + + } + switch (tMeta) { + case 9 : { + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + case 10 : { + return Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); + } + case 11 : { + return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + } + case 12 : { + return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + } + default : { + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + } + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java index 85654523fe..86c3f7138b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java @@ -1,6 +1,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; import net.minecraft.util.IIcon; +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3; public class CasingTextureHandler3 { @@ -44,14 +45,9 @@ public class CasingTextureHandler3 { //Adv. EBF return TexturesGtBlock.TEXTURE_CASING_ADVANCED_VOLCNUS.getIcon(); case 12: - return TexturesGtBlock._PlaceHolder.getIcon(); + return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II.getIcon(); case 13: - if (aSide <2) { - return TexturesGtBlock._PlaceHolder.getIcon(); - } - else { - return TexturesGtBlock._PlaceHolder.getIcon(); - } + return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II_INNER.getIcon(); case 14: return TexturesGtBlock._PlaceHolder.getIcon(); case 15: @@ -65,4 +61,8 @@ public class CasingTextureHandler3 { return TexturesGtBlock._PlaceHolder.getIcon(); } + static { + GregtechMetaCasingBlocks3.mConnectedMachineTextures = true; + } + }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 30af8908df..7acefa104c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -149,120 +149,6 @@ public class TexturesGtBlock { public static final CustomIcon OVERLAY_COMPARTMENT_15 = new CustomIcon("TileEntities/Compartment/30"); public static final CustomIcon OVERLAY_COMPARTMENT_16 = new CustomIcon("TileEntities/Compartment/31"); - - //Overlay Arrays - public static ITexture[] OVERLAYS_ENERGY_OUT_BUFFER = new ITexture[]{ - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{220, 220, 220, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{220, 220, 220, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{255, 100, 0, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{255, 255, 30, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{128, 128, 128, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, - new short[]{240, 240, 245, 0})}; - - public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI_BUFFER = new ITexture[]{ - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{220, 220, 220, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{220, 220, 220, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{255, 100, 0, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{255, 255, 30, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{128, 128, 128, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, - new short[]{240, 240, 245, 0})}; - - public static ITexture[] OVERLAYS_CABINET_FRONT = new ITexture[]{ - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_1, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_2, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_3, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_4, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_5, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_6, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_7, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_8, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_9, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_10, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_11, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_12, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_13, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_14, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_15, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_16, - new short[]{255, 255, 255, 0}),}; - - public static ITexture[] OVERLAYS_COMPARTMENT_FRONT = new ITexture[]{ - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_1, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_2, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_3, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_4, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_5, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_6, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_7, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_8, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_9, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_10, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_11, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_12, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_13, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_14, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_15, - new short[]{255, 255, 255, 0}), - new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_16, - new short[]{255, 255, 255, 0}),}; - //Controllers private static final CustomIcon Internal_Casing_Fusion_Simple_Front = new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT"); public static final CustomIcon Casing_Fusion_Simple_Front = Internal_Casing_Fusion_Simple_Front; @@ -340,8 +226,8 @@ public class TexturesGtBlock { public static final CustomIcon Casing_Redox_4 = new CustomIcon("redox/redox4"); public static final CustomIcon Casing_Redox_5 = new CustomIcon("redox/redox5"); public static final CustomIcon Casing_Redox_6 = new CustomIcon("redox/redox6"); - public static final CustomIcon Casing_Redox_7 = new CustomIcon("redox/redox7"); - public static final CustomIcon Casing_Redox_8 = new CustomIcon("redox/redox8"); + //public static final CustomIcon Casing_Redox_7 = new CustomIcon("redox/redox7"); + //public static final CustomIcon Casing_Redox_8 = new CustomIcon("redox/redox8"); //Centrifuge Casing private static final CustomIcon Internal_Casing_Centrifuge = new CustomIcon("TileEntities/MACHINE_CASING_CENTRIFUGE"); @@ -381,6 +267,23 @@ public class TexturesGtBlock { public static final CustomIcon TEXTURE_CASING_ADVANCED_CRYOGENIC = new CustomIcon("TileEntities/MACHINE_CASING_ADVANCED_CRYOGENIC"); public static final CustomIcon TEXTURE_CASING_ADVANCED_VOLCNUS = new CustomIcon("TileEntities/MACHINE_CASING_ADVANCED_VOLCANUS"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II = new CustomIcon("iconsets/MACHINE_CASING_FUSION_3"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_INNER = new CustomIcon("iconsets/MACHINE_CASING_FUSION_COIL_II"); + public static final CustomIcon TEXTURE_CASING_FUSION_CASING_ULTRA = new CustomIcon("iconsets/MACHINE_CASING_FUSION_GLASS_ULTRA"); + // + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_1 = new CustomIcon("iconsets/FUSIONIII_1"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_2 = new CustomIcon("iconsets/FUSIONIII_2"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_3 = new CustomIcon("iconsets/FUSIONIII_3"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_4 = new CustomIcon("iconsets/FUSIONIII_4"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_5 = new CustomIcon("iconsets/FUSIONIII_5"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_6 = new CustomIcon("iconsets/FUSIONIII_6"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_7 = new CustomIcon("iconsets/FUSIONIII_7"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_8 = new CustomIcon("iconsets/FUSIONIII_8"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_9 = new CustomIcon("iconsets/FUSIONIII_9"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_10 = new CustomIcon("iconsets/FUSIONIII_10"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_11 = new CustomIcon("iconsets/FUSIONIII_11"); + public static final CustomIcon TEXTURE_CASING_FUSION_COIL_II_12 = new CustomIcon("iconsets/FUSIONIII_12"); + //Overlays //Fan Textures private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon("TileEntities/machine_top_vent_rotating"); @@ -471,4 +374,125 @@ public class TexturesGtBlock { public static final CustomIcon TEXTURE_TECH_C = new CustomIcon("metro/TEXTURE_TECH_C"); public static final CustomIcon TEXTURE_TECH_PANEL_A = new CustomIcon("metro/TEXTURE_TECH_PANEL_A"); + + //Overlay Arrays + public static ITexture[] OVERLAYS_ENERGY_OUT_BUFFER = new ITexture[]{ + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{220, 220, 220, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{220, 220, 220, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{255, 100, 0, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{255, 255, 30, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{128, 128, 128, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_BUFFER, + new short[]{240, 240, 245, 0})}; + + public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI_BUFFER = new ITexture[]{ + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{220, 220, 220, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{220, 220, 220, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{255, 100, 0, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{255, 255, 30, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{128, 128, 128, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_ENERGY_OUT_MULTI_BUFFER, + new short[]{240, 240, 245, 0})}; + + public static ITexture[] OVERLAYS_CABINET_FRONT = new ITexture[]{ + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_1, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_2, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_3, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_4, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_5, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_6, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_7, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_8, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_9, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_10, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_11, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_12, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_13, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_14, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_15, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_CABINET_16, + new short[]{255, 255, 255, 0}),}; + + public static ITexture[] OVERLAYS_COMPARTMENT_FRONT = new ITexture[]{ + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_1, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_2, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_3, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_4, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_5, + new short[]{255, 255, 255, 0}), + new GT_RenderedTexture((IIconContainer) OVERLAY_COMPARTMENT_6, + |
