diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/blocks')
28 files changed, 4897 insertions, 4470 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java index 01f655c355..83cbc0065c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Block_Machines.java @@ -1,29 +1,24 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import java.util.ArrayList; -import java.util.List; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.IDebugableBlock; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_Generic_Block; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; import gregtech.api.metatileentity.BaseTileEntity; -import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; -import gregtech.common.blocks.GT_Item_Machines; import gregtech.common.blocks.GT_Material_Machines; -import gregtech.common.render.GT_Renderer_Block; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.random.XSTR; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock; +import java.util.ArrayList; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.client.renderer.texture.IIconRegister; @@ -47,488 +42,497 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class GTPP_Block_Machines extends GT_Generic_Block implements IDebugableBlock, ITileEntityProvider { - public static ThreadLocal<IGregTechTileEntity> mTemporaryTileEntity = new ThreadLocal<IGregTechTileEntity>(); - - public GTPP_Block_Machines() { - super(GTPP_Item_Machines.class, "gtpp.blockmachines", new GT_Material_Machines()); - GregTech_API.registerMachineBlock(this, -1); - this.setHardness(1.0F); - this.setResistance(10.0F); - this.setStepSound(soundTypeMetal); - this.setCreativeTab(GregTech_API.TAB_GREGTECH); - this.isBlockContainer = true; - } - - public String getHarvestTool(int aMeta) { - switch (aMeta / 4) { - case 0 : - return "wrench"; - case 1 : - return "wrench"; - case 2 : - return "cutter"; - case 3 : - return "axe"; - default : - return "wrench"; - } - } - - public int getHarvestLevel(int aMeta) { - return aMeta % 4; - } - - protected boolean canSilkHarvest() { - return false; - } - - public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof BaseTileEntity) { - ((BaseTileEntity) tTileEntity).onAdjacentBlockChange(aTileX, aTileY, aTileZ); - } - - } - - public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { - super.onBlockAdded(aWorld, aX, aY, aZ); - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - - } - - public String getUnlocalizedName() { - int tDamage = 0; - String aUnlocalName = (tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length) - ? (GregTech_API.METATILEENTITIES[tDamage] != null - ? ("gtpp.blockmachines.name" + "." + GregTech_API.METATILEENTITIES[tDamage].getMetaName()) - : ("gtpp.blockmachines.name")) : ""; - - Logger.INFO("Unlocal Name: "+aUnlocalName); - return aUnlocalName; - } - - public String getLocalizedName() { - String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name");; - if (aName.toLowerCase().contains(".name")) { - aName = StatCollector.translateToLocal(getUnlocalizedName() + ".name"); - } - if (aName.toLowerCase().contains(".name")) { - aName = StatCollector.translateToLocal("gt.blockmachines" + ".name"); - } - if (aName.toLowerCase().contains(".name")) { - aName = "BAD"; - } - Logger.INFO("Name: "+aName); - return aName; - } - - public int getFlammability(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { - return 0; - } - - public int getFireSpreadSpeed(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { - return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 100 : 0; - } - - public int getRenderType() { - return GTPP_Render_MachineBlock.INSTANCE == null ? super.getRenderType() : GTPP_Render_MachineBlock.INSTANCE.mRenderID; - } - - public boolean isFireSource(World aWorld, int aX, int aY, int aZ, ForgeDirection side) { - return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0; - } - - public boolean isFlammable(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { - return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0; - } - - public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess aWorld, int aX, int aY, int aZ) { - return false; - } - - public boolean canConnectRedstone(IBlockAccess var1, int var2, int var3, int var4, int var5) { - return true; - } - - public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { - return false; - } - - public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { - return false; - } - - public boolean hasTileEntity(int aMeta) { - return true; - } - - public boolean hasComparatorInputOverride() { - return true; - } - - public boolean renderAsNormalBlock() { - return false; - } - - public boolean canProvidePower() { - return true; - } - - public boolean isOpaqueCube() { - return false; - } - - public TileEntity createNewTileEntity(World aWorld, int aMeta) { - return this.createTileEntity(aWorld, aMeta); - } - - public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { - return BlockIcons.MACHINE_LV_SIDE.getIcon(); - } - - public IIcon getIcon(int aSide, int aMeta) { - return BlockIcons.MACHINE_LV_SIDE.getIcon(); - } - - public boolean onBlockEventReceived(World aWorld, int aX, int aY, int aZ, int aData1, int aData2) { - super.onBlockEventReceived(aWorld, aX, aY, aZ, aData1, aData2); - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false; - } - - public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, - Entity collider) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { - ((IGregTechTileEntity) tTileEntity).addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, - collider); - } else { - super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); - } - } - - public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null - ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) - : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); - } - - @SideOnly(Side.CLIENT) - public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null - ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) - : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); - } - - public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { - TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { - AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity) - .getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0); - this.minX = bbb.minX; - this.minY = bbb.minY; - this.minZ = bbb.minZ; - this.maxX = bbb.maxX; - this.maxY = bbb.maxY; - this.maxZ = bbb.maxZ; - } else { - super.setBlockBoundsBasedOnState(blockAccess, aX, aY, aZ); - } - } - - public void setBlockBoundsForItemRender() { - super.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - } - - public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity - && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { - ((IGregTechTileEntity) tTileEntity).onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); - } else { - super.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); - } - } - - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - - } - - public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { - return super.getBlockHardness(aWorld, aX, aY, aZ); - } - - public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof BaseMetaTileEntity && ((BaseMetaTileEntity) tTileEntity).privateAccess() - && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) - ? -1.0F - : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); - } - - public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, - float par2, float par3) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity == null) { - return false; - } else { - if (aPlayer.isSneaking()) { - ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); - if (tCurrentItem == null) { - return false; - } - - if (!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) - && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) { - return false; - } - } - - return tTileEntity instanceof IGregTechTileEntity - ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L - ? false - : (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer) - ? true - : ((IGregTechTileEntity) tTileEntity).onRightclick(aPlayer, (byte) aSide, par1, - par2, par3))) - : false; - } - } - - public void onBlockClicked(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity) { - ((IGregTechTileEntity) tTileEntity).onLeftclick(aPlayer); - } - - } - - public int getDamageValue(World aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileID() : 0; - } - - public void onBlockExploded(World aWorld, int aX, int aY, int aZ, Explosion aExplosion) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof BaseMetaTileEntity) { - ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); - } - - super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); - } - - public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity) { - IGregTechTileEntity tGregTechTileEntity = (IGregTechTileEntity) tTileEntity; - XSTR tRandom = new XSTR(); - mTemporaryTileEntity.set(tGregTechTileEntity); - - for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); ++i) { - ItemStack tItem = tGregTechTileEntity.getStackInSlot(i); - if (tItem != null && tItem.stackSize > 0 && tGregTechTileEntity.isValidSlot(i)) { - EntityItem tItemEntity = new EntityItem(aWorld, - (double) ((float) aX + tRandom.nextFloat() * 0.8F + 0.1F), - (double) ((float) aY + tRandom.nextFloat() * 0.8F + 0.1F), - (double) ((float) aZ + tRandom.nextFloat() * 0.8F + 0.1F), - new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); - if (tItem.hasTagCompound()) { - tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) tItem.getTagCompound().copy()); - } - - tItemEntity.motionX = tRandom.nextGaussian() * 0.0500000007450581D; - tItemEntity.motionY = tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D; - tItemEntity.motionZ = tRandom.nextGaussian() * 0.0500000007450581D; - aWorld.spawnEntityInWorld(tItemEntity); - tItem.stackSize = 0; - tGregTechTileEntity.setInventorySlotContents(i, (ItemStack) null); - } - } - } - - super.breakBlock(aWorld, aX, aY, aZ, par5, par6); - aWorld.removeTileEntity(aX, aY, aZ); - } - - public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getDrops() - : (mTemporaryTileEntity.get() == null - ? new ArrayList() - : ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops()); - } - - public int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int aSide) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getComparatorValue((byte) aSide) - : 0; - } - - public int isProvidingWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - if (aSide >= 0 && aSide <= 5) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)) - : 0; - } else { - return 0; - } - } - - public int isProvidingStrongPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - if (aSide >= 0 && aSide <= 5) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity) - .getStrongOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)) - : 0; - } else { - return 0; - } - } - - public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int par5, float chance, int par7) { - if (!aWorld.isRemote) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null && chance < 1.0F) { - if (tTileEntity instanceof BaseMetaTileEntity && GregTech_API.sMachineNonWrenchExplosions) { - ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); - } - } else { - super.dropBlockAsItemWithChance(aWorld, aX, aY, aZ, par5, chance, par7); - } - } - - } - - public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) { - if (aWorld.getBlockMetadata(aX, aY, aZ) == 0) { - return true; - } else { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null) { - if (tTileEntity instanceof BaseMetaTileEntity) { - return true; - } - - if (tTileEntity instanceof BaseMetaPipeEntity - && (((BaseMetaPipeEntity) tTileEntity).mConnections & -64) != 0) { - return true; - } - - if (tTileEntity instanceof ICoverable - && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0) { - return true; - } - } - - return false; - } - } - - public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity == null - ? 0 - : (tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getLightOpacity() - : (aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 255 : 0)); - } - - public int getLightValue(IBlockAccess aWorld, int aX, int aY, int aZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof BaseMetaTileEntity ? ((BaseMetaTileEntity) tTileEntity).getLightValue() : 0; - } - - public TileEntity createTileEntity(World aWorld, int aMeta) { - return (TileEntity) (aMeta >= 4 ? Meta_GT_Proxy.constructBaseMetaTileEntity() : Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower()); - } - - public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, - double explosionY, double explosionZ) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof IGregTechTileEntity - ? ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6) - : 10.0F; - } - - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { - for (int i = 0; i < 100; ++i) { - if (GregTech_API.METATILEENTITIES[(30400 + i)] != null) { - par3List.add(new ItemStack(par1, 1, i)); - } - } - - } - - public void onBlockPlacedBy(World aWorld, int aX, int aY, int aZ, EntityLivingBase aPlayer, ItemStack aStack) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null) { - if (tTileEntity instanceof IGregTechTileEntity) { - IGregTechTileEntity var6 = (IGregTechTileEntity) tTileEntity; - if (aPlayer == null) { - var6.setFrontFacing((byte) 1); - } else { - int var7 = MathHelper.floor_double((double) (aPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; - int var8 = Math.round(aPlayer.rotationPitch); - if (var8 >= 65 && var6.isValidFacing((byte) 1)) { - var6.setFrontFacing((byte) 1); - } else if (var8 <= -65 && var6.isValidFacing((byte) 0)) { - var6.setFrontFacing((byte) 0); - } else { - switch (var7) { - case 0 : - var6.setFrontFacing((byte) 2); - break; - case 1 : - var6.setFrontFacing((byte) 5); - break; - case 2 : - var6.setFrontFacing((byte) 3); - break; - case 3 : - var6.setFrontFacing((byte) 4); - } - } - } - } - - } - } - - public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel) { - TileEntity tTileEntity = aPlayer.worldObj.getTileEntity(aX, aY, aZ); - return tTileEntity instanceof BaseMetaTileEntity - ? ((BaseMetaTileEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel) - : (tTileEntity instanceof BaseMetaPipeEntity - ? ((BaseMetaPipeEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel) - : null); - } - - public boolean recolourBlock(World aWorld, int aX, int aY, int aZ, ForgeDirection aSide, int aColor) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity instanceof IGregTechTileEntity) { - if (((IGregTechTileEntity) tTileEntity).getColorization() == (byte) (~aColor & 15)) { - return false; - } else { - ((IGregTechTileEntity) tTileEntity).setColorization((byte) (~aColor & 15)); - return true; - } - } else { - return false; - } - } -}
\ No newline at end of file + public static ThreadLocal<IGregTechTileEntity> mTemporaryTileEntity = new ThreadLocal<IGregTechTileEntity>(); + + public GTPP_Block_Machines() { + super(GTPP_Item_Machines.class, "gtpp.blockmachines", new GT_Material_Machines()); + GregTech_API.registerMachineBlock(this, -1); + this.setHardness(1.0F); + this.setResistance(10.0F); + this.setStepSound(soundTypeMetal); + this.setCreativeTab(GregTech_API.TAB_GREGTECH); + this.isBlockContainer = true; + } + + public String getHarvestTool(int aMeta) { + switch (aMeta / 4) { + case 0: + return "wrench"; + case 1: + return "wrench"; + case 2: + return "cutter"; + case 3: + return "axe"; + default: + return "wrench"; + } + } + + public int getHarvestLevel(int aMeta) { + return aMeta % 4; + } + + protected boolean canSilkHarvest() { + return false; + } + + public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof BaseTileEntity) { + ((BaseTileEntity) tTileEntity).onAdjacentBlockChange(aTileX, aTileY, aTileZ); + } + } + + public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { + super.onBlockAdded(aWorld, aX, aY, aZ); + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + } + + public String getUnlocalizedName() { + int tDamage = 0; + String aUnlocalName = (tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length) + ? (GregTech_API.METATILEENTITIES[tDamage] != null + ? ("gtpp.blockmachines.name" + "." + GregTech_API.METATILEENTITIES[tDamage].getMetaName()) + : ("gtpp.blockmachines.name")) + : ""; + + Logger.INFO("Unlocal Name: " + aUnlocalName); + return aUnlocalName; + } + + public String getLocalizedName() { + String aName = StatCollector.translateToLocal(this.getUnlocalizedName() + ".name"); + ; + if (aName.toLowerCase().contains(".name")) { + aName = StatCollector.translateToLocal(getUnlocalizedName() + ".name"); + } + if (aName.toLowerCase().contains(".name")) { + aName = StatCollector.translateToLocal("gt.blockmachines" + ".name"); + } + if (aName.toLowerCase().contains(".name")) { + aName = "BAD"; + } + Logger.INFO("Name: " + aName); + return aName; + } + + public int getFlammability(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { + return 0; + } + + public int getFireSpreadSpeed(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { + return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 100 : 0; + } + + public int getRenderType() { + return GTPP_Render_MachineBlock.INSTANCE == null + ? super.getRenderType() + : GTPP_Render_MachineBlock.INSTANCE.mRenderID; + } + + public boolean isFireSource(World aWorld, int aX, int aY, int aZ, ForgeDirection side) { + return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0; + } + + public boolean isFlammable(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection face) { + return GregTech_API.sMachineFlammable && aWorld.getBlockMetadata(aX, aY, aZ) == 0; + } + + public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } + + public boolean canConnectRedstone(IBlockAccess var1, int var2, int var3, int var4, int var5) { + return true; + } + + public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } + + public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) { + return false; + } + + public boolean hasTileEntity(int aMeta) { + return true; + } + + public boolean hasComparatorInputOverride() { + return true; + } + + public boolean renderAsNormalBlock() { + return false; + } + + public boolean canProvidePower() { + return true; + } + + public boolean isOpaqueCube() { + return false; + } + + public TileEntity createNewTileEntity(World aWorld, int aMeta) { + return this.createTileEntity(aWorld, aMeta); + } + + public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { + return BlockIcons.MACHINE_LV_SIDE.getIcon(); + } + + public IIcon getIcon(int aSide, int aMeta) { + return BlockIcons.MACHINE_LV_SIDE.getIcon(); + } + + public boolean onBlockEventReceived(World aWorld, int aX, int aY, int aZ, int aData1, int aData2) { + super.onBlockEventReceived(aWorld, aX, aY, aZ, aData1, aData2); + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false; + } + + public void addCollisionBoxesToList( + World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + ((IGregTechTileEntity) tTileEntity) + .addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + } else { + super.addCollisionBoxesToList(aWorld, aX, aY, aZ, inputAABB, outputAABB, collider); + } + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null + ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) + : super.getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null + ? ((IGregTechTileEntity) tTileEntity).getCollisionBoundingBoxFromPool(aWorld, aX, aY, aZ) + : super.getSelectedBoundingBoxFromPool(aWorld, aX, aY, aZ); + } + + public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) { + TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + AxisAlignedBB bbb = ((IGregTechTileEntity) tTileEntity) + .getCollisionBoundingBoxFromPool(((IGregTechTileEntity) tTileEntity).getWorld(), 0, 0, 0); + this.minX = bbb.minX; + this.minY = bbb.minY; + this.minZ = bbb.minZ; + this.maxX = bbb.maxX; + this.maxY = bbb.maxY; + this.maxZ = bbb.maxZ; + } else { + super.setBlockBoundsBasedOnState(blockAccess, aX, aY, aZ); + } + } + + public void setBlockBoundsForItemRender() { + super.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + + public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity + && ((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null) { + ((IGregTechTileEntity) tTileEntity).onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); + } else { + super.onEntityCollidedWithBlock(aWorld, aX, aY, aZ, collider); + } + } + + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister aIconRegister) {} + + public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { + return super.getBlockHardness(aWorld, aX, aY, aZ); + } + + public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof BaseMetaTileEntity + && ((BaseMetaTileEntity) tTileEntity).privateAccess() + && !((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true) + ? -1.0F + : super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ); + } + + public boolean onBlockActivated( + World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, float par2, float par3) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity == null) { + return false; + } else { + if (aPlayer.isSneaking()) { + ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); + if (tCurrentItem == null) { + return false; + } + + if (!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList) + && !GT_Utility.isStackInList(tCurrentItem, GregTech_API.sWrenchList)) { + return false; + } + } + + return tTileEntity instanceof IGregTechTileEntity + ? (((IGregTechTileEntity) tTileEntity).getTimer() < 50L + ? false + : (!aWorld.isRemote && !((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer) + ? true + : ((IGregTechTileEntity) tTileEntity) + .onRightclick(aPlayer, (byte) aSide, par1, par2, par3))) + : false; + } + } + + public void onBlockClicked(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity) { + ((IGregTechTileEntity) tTileEntity).onLeftclick(aPlayer); + } + } + + public int getDamageValue(World aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity ? ((IGregTechTileEntity) tTileEntity).getMetaTileID() : 0; + } + + public void onBlockExploded(World aWorld, int aX, int aY, int aZ, Explosion aExplosion) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof BaseMetaTileEntity) { + ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); + } + + super.onBlockExploded(aWorld, aX, aY, aZ, aExplosion); + } + + public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity) { + IGregTechTileEntity tGregTechTileEntity = (IGregTechTileEntity) tTileEntity; + XSTR tRandom = new XSTR(); + mTemporaryTileEntity.set(tGregTechTileEntity); + + for (int i = 0; i < tGregTechTileEntity.getSizeInventory(); ++i) { + ItemStack tItem = tGregTechTileEntity.getStackInSlot(i); + if (tItem != null && tItem.stackSize > 0 && tGregTechTileEntity.isValidSlot(i)) { + EntityItem tItemEntity = new EntityItem( + aWorld, + (double) ((float) aX + tRandom.nextFloat() * 0.8F + 0.1F), + (double) ((float) aY + tRandom.nextFloat() * 0.8F + 0.1F), + (double) ((float) aZ + tRandom.nextFloat() * 0.8F + 0.1F), + new ItemStack(tItem.getItem(), tItem.stackSize, tItem.getItemDamage())); + if (tItem.hasTagCompound()) { + tItemEntity.getEntityItem().setTagCompound((NBTTagCompound) + tItem.getTagCompound().copy()); + } + + tItemEntity.motionX = tRandom.nextGaussian() * 0.0500000007450581D; + tItemEntity.motionY = tRandom.nextGaussian() * 0.0500000007450581D + 0.2000000029802322D; + tItemEntity.motionZ = tRandom.nextGaussian() * 0.0500000007450581D; + aWorld.spawnEntityInWorld(tItemEntity); + tItem.stackSize = 0; + tGregTechTileEntity.setInventorySlotContents(i, (ItemStack) null); + } + } + } + + super.breakBlock(aWorld, aX, aY, aZ, par5, par6); + aWorld.removeTileEntity(aX, aY, aZ); + } + + public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getDrops() + : (mTemporaryTileEntity.get() == null + ? new ArrayList() + : ((IGregTechTileEntity) mTemporaryTileEntity.get()).getDrops()); + } + + public int getComparatorInputOverride(World aWorld, int aX, int aY, int aZ, int aSide) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getComparatorValue((byte) aSide) + : 0; + } + + public int isProvidingWeakPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + if (aSide >= 0 && aSide <= 5) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)) + : 0; + } else { + return 0; + } + } + + public int isProvidingStrongPower(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + if (aSide >= 0 && aSide <= 5) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity) + .getStrongOutputRedstoneSignal(GT_Utility.getOppositeSide(aSide)) + : 0; + } else { + return 0; + } + } + + public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int par5, float chance, int par7) { + if (!aWorld.isRemote) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null && chance < 1.0F) { + if (tTileEntity instanceof BaseMetaTileEntity && GregTech_API.sMachineNonWrenchExplosions) { + ((BaseMetaTileEntity) tTileEntity).doEnergyExplosion(); + } + } else { + super.dropBlockAsItemWithChance(aWorld, aX, aY, aZ, par5, chance, par7); + } + } + } + + public boolean isSideSolid(IBlockAccess aWorld, int aX, int aY, int aZ, ForgeDirection aSide) { + if (aWorld.getBlockMetadata(aX, aY, aZ) == 0) { + return true; + } else { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null) { + if (tTileEntity instanceof BaseMetaTileEntity) { + return true; + } + + if (tTileEntity instanceof BaseMetaPipeEntity + && (((BaseMetaPipeEntity) tTileEntity).mConnections & -64) != 0) { + return true; + } + + if (tTileEntity instanceof ICoverable + && ((ICoverable) tTileEntity).getCoverIDAtSide((byte) aSide.ordinal()) != 0) { + return true; + } + } + + return false; + } + } + + public int getLightOpacity(IBlockAccess aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity == null + ? 0 + : (tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getLightOpacity() + : (aWorld.getBlockMetadata(aX, aY, aZ) == 0 ? 255 : 0)); + } + + public int getLightValue(IBlockAccess aWorld, int aX, int aY, int aZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof BaseMetaTileEntity ? ((BaseMetaTileEntity) tTileEntity).getLightValue() : 0; + } + + public TileEntity createTileEntity(World aWorld, int aMeta) { + return (TileEntity) + (aMeta >= 4 + ? Meta_GT_Proxy.constructBaseMetaTileEntity() + : Meta_GT_Proxy.constructBaseMetaTileEntityCustomPower()); + } + + public float getExplosionResistance( + Entity par1Entity, + World aWorld, + int aX, + int aY, + int aZ, + double explosionX, + double explosionY, + double explosionZ) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof IGregTechTileEntity + ? ((IGregTechTileEntity) tTileEntity).getBlastResistance((byte) 6) + : 10.0F; + } + + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { + for (int i = 0; i < 100; ++i) { + if (GregTech_API.METATILEENTITIES[(30400 + i)] != null) { + par3List.add(new ItemStack(par1, 1, i)); + } + } + } + + public void onBlockPlacedBy(World aWorld, int aX, int aY, int aZ, EntityLivingBase aPlayer, ItemStack aStack) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null) { + if (tTileEntity instanceof IGregTechTileEntity) { + IGregTechTileEntity var6 = (IGregTechTileEntity) tTileEntity; + if (aPlayer == null) { + var6.setFrontFacing((byte) 1); + } else { + int var7 = MathHelper.floor_double((double) (aPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int var8 = Math.round(aPlayer.rotationPitch); + if (var8 >= 65 && var6.isValidFacing((byte) 1)) { + var6.setFrontFacing((byte) 1); + } else if (var8 <= -65 && var6.isValidFacing((byte) 0)) { + var6.setFrontFacing((byte) 0); + } else { + switch (var7) { + case 0: + var6.setFrontFacing((byte) 2); + break; + case 1: + var6.setFrontFacing((byte) 5); + break; + case 2: + var6.setFrontFacing((byte) 3); + break; + case 3: + var6.setFrontFacing((byte) 4); + } + } + } + } + } + } + + public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel) { + TileEntity tTileEntity = aPlayer.worldObj.getTileEntity(aX, aY, aZ); + return tTileEntity instanceof BaseMetaTileEntity + ? ((BaseMetaTileEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel) + : (tTileEntity instanceof BaseMetaPipeEntity + ? ((BaseMetaPipeEntity) tTileEntity).getDebugInfo(aPlayer, aLogLevel) + : null); + } + + public boolean recolourBlock(World aWorld, int aX, int aY, int aZ, ForgeDirection aSide, int aColor) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity instanceof IGregTechTileEntity) { + if (((IGregTechTileEntity) tTileEntity).getColorization() == (byte) (~aColor & 15)) { + return false; + } else { + ((IGregTechTileEntity) tTileEntity).setColorization((byte) (~aColor & 15)); + return true; + } + } else { + return false; + } + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java index ba3b05ff8e..9e732d2443 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GTPP_Item_Machines.java @@ -8,8 +8,6 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.lib.CORE; - import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; @@ -20,210 +18,251 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; public class GTPP_Item_Machines extends ItemBlock { - public GTPP_Item_Machines(Block par1) { - super(par1); - this.setMaxDamage(0); - this.setHasSubtypes(true); - this.setCreativeTab(GregTech_API.TAB_GREGTECH); - } - - @SuppressWarnings("unchecked") - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) { - try { - int e = this.getDamage(aStack) + 30400; //Add Offset - if (e <= 0 || e >= GregTech_API.METATILEENTITIES.length) { - return; - } - - if (GregTech_API.METATILEENTITIES[e] != null) { - - IGregTechTileEntity aNBT = GregTech_API.METATILEENTITIES[e].getBaseMetaTileEntity(); - - final long tVoltage = aNBT.getInputVoltage(); - byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage))); - - /*if (aNBT.getDescription() != null) { - int tAmount = 0; - String[] arg7 = aNBT.getDescription(); - int arg8 = arg7.length-1; - - if (arg7 != null && arg7.length > 0) { - for (String t : arg7) { - aList.add(t); - } - - } - else { - aList.add("ERROR"); - } - - for (int y = 0; y < arg8; y++) { - String tDescription = arg7[y]; - - if (tDescription != null) { - aList.add(tDescription+"|"+arg8); - continue; - } - else { - continue; - } - } - }*/ - - if (aNBT.getEUCapacity() > 0L) { - - //Custom handling - if ((e - 30400) <= 100) { - - - if ((e - 30400) <= 10) { - tTier -= 2; - aList.add(EnumChatFormatting.BOLD+"16"+" Fuse Slots"+EnumChatFormatting.GRAY); - aList.add("Per each fuse, you may insert "+EnumChatFormatting.YELLOW+(GT_Values.V[tTier])+EnumChatFormatting.GRAY+" EU/t"); - aList.add("However this "+EnumChatFormatting.ITALIC+EnumChatFormatting.RED+"MUST"+EnumChatFormatting.GRAY+" be in a single Amp"); - aList.add("This machine can accept upto a single amp of "+GT_Values.VN[Math.min(tTier+2, 12)]+" as a result"); - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Breaker_Loss", "Breaker Loss: "+EnumChatFormatting.RED+""+(GT_Values.V[Math.max(tTier-1, 0)]/10)+EnumChatFormatting.GRAY+" EU/t", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - } - - - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Special_Power_1", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - //aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_3", EnumChatFormatting.RED+"Special Power Handling, please read manual", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - } - - - if (aNBT.getInputVoltage() > 0L) { - String inA = "0"; - if (aNBT.getInputAmperage() >= 1L) { - inA = " at " + EnumChatFormatting.YELLOW + aNBT.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - else { - inA = " at " + EnumChatFormatting.WHITE + aNBT.getInputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - String a1 = "Voltage IN: "+EnumChatFormatting.GREEN + aNBT.getInputVoltage() - + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getInputVoltage())] + ")" - + EnumChatFormatting.GRAY + inA; - aList.add(a1); - } - - if (aNBT.getOutputVoltage() > 0L) { - String outA = "0"; - if (aNBT.getOutputAmperage() >= 1L) { - outA = " at " + EnumChatFormatting.YELLOW + aNBT.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - else { - outA = " at " + EnumChatFormatting.WHITE + aNBT.getOutputAmperage() + EnumChatFormatting.GRAY +" Amps"; - } - String a1 = "Voltage OUT: "+EnumChatFormatting.GREEN + aNBT.getOutputVoltage() - + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getOutputVoltage())] + ")" - + EnumChatFormatting.GRAY + outA; - aList.add(a1); - } - - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_Lossess_EU", "Transmission Loss: "+EnumChatFormatting.DARK_BLUE+"0", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); - - aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE2", "Internal Capacity: ", - !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + aNBT.getEUCapacity() - + EnumChatFormatting.GRAY + " EU"); - } - } - - NBTTagCompound arg16 = aStack.getTagCompound(); - if (arg16 != null) { - if (arg16.getBoolean("mMuffler")) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_MUFFLER", "has Muffler Upgrade", - !GregTech_API.sPostloadFinished)); - } - - if (arg16.getBoolean("mSteamConverter")) { - aList.add(GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMCONVERTER", - "has Steam Upgrade", !GregTech_API.sPostloadFinished)); - } - - boolean arg17 = false; - byte arg18; - if ((arg18 = arg16.getByte("mSteamTanks")) > 0) { - aList.add(arg18 + " " + GT_LanguageManager.addStringLocalization("GT_TileEntity_STEAMTANKS", - "Steam Tank Upgrades", !GregTech_API.sPostloadFinished)); - } - } - - - aList.add(EnumChatFormatting.UNDERLINE+"Special GT++ Machine"); - - } catch (Throwable arg15) { - arg15.printStackTrace(GT_Log.err); - } - - } - - public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, - float hitX, float hitY, float hitZ) { - return false; - } - - public String getUnlocalizedName(ItemStack aStack) { - short tDamage = (short) (this.getDamage(aStack) + 30400); //Add Offset; - return tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length - ? (GregTech_API.METATILEENTITIES[tDamage] != null - ? "gtpp.blockmachines" + "." + GregTech_API.METATILEENTITIES[tDamage].getMetaName() - : "") - : ""; - } - - public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { - super.onCreated(aStack, aWorld, aPlayer); - short tDamage = (short) ((short) this.getDamage(aStack) + 30400); //Add Offset; - if (tDamage < 0 - || tDamage >= GregTech_API.METATILEENTITIES.length && GregTech_API.METATILEENTITIES[tDamage] != null) { - GregTech_API.METATILEENTITIES[tDamage].onCreated(aStack, aWorld, aPlayer); - } - - } - - public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, - float hitX, float hitY, float hitZ, int aMeta) { - short tDamage = (short) ((short) this.getDamage(aStack) + 30400); //Add Offset; - if (tDamage > 0) { - if (GregTech_API.METATILEENTITIES[tDamage] == null) { - return false; - } - - byte tMetaData = 32; - //byte tMetaData = GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType(); - Logger.INFO("Using Meta: "+tMetaData+" for ID "+tDamage+" | "+GregTech_API.METATILEENTITIES[tDamage].getInventoryName()); - if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tMetaData, 3)) { - return false; - } - - if (aWorld.getBlock(aX, aY, aZ) != this.field_150939_a) { - throw new GT_ItsNotMyFaultException( - "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don\'t report this Bug to me, I don\'t know how to fix it."); - } - - if (aWorld.getBlockMetadata(aX, aY, aZ) != tMetaData) { - throw new GT_ItsNotMyFaultException( - "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don\'t report this Bug to me, I don\'t know how to fix it."); - } - - IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aWorld.getTileEntity(aX, aY, aZ); - if (tTileEntity != null) { - tTileEntity.setInitialValuesAsNBT(tTileEntity.isServerSide() ? aStack.getTagCompound() : null, tDamage); - if (aPlayer != null) { - tTileEntity.setOwnerName(aPlayer.getDisplayName()); - } - - tTileEntity.getMetaTileEntity().initDefaultModes(aStack.getTagCompound()); - } - } else if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tDamage, 3)) { - return false; - } - - if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) { - this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack); - this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, tDamage); - } - - return true; - } -}
\ No newline at end of file + public GTPP_Item_Machines(Block par1) { + super(par1); + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setCreativeTab(GregTech_API.TAB_GREGTECH); + } + + @SuppressWarnings("unchecked") + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean par4) { + try { + int e = this.getDamage(aStack) + 30400; // Add Offset + if (e <= 0 || e >= GregTech_API.METATILEENTITIES.length) { + return; + } + + if (GregTech_API.METATILEENTITIES[e] != null) { + + IGregTechTileEntity aNBT = GregTech_API.METATILEENTITIES[e].getBaseMetaTileEntity(); + + final long tVoltage = aNBT.getInputVoltage(); + byte tTier = (byte) ((byte) Math.max(1, GT_Utility.getTier(tVoltage))); + + /*if (aNBT.getDescription() != null) { + int tAmount = 0; + String[] arg7 = aNBT.getDescription(); + int arg8 = arg7.length-1; + + if (arg7 != null && arg7.length > 0) { + for (String t : arg7) { + aList.add(t); + } + + } + else { + aList.add("ERROR"); + } + + for (int y = 0; y < arg8; y++) { + String tDescription = arg7[y]; + + if (tDescription != null) { + aList.add(tDescription+"|"+arg8); + continue; + } + else { + continue; + } + } + }*/ + + if (aNBT.getEUCapacity() > 0L) { + + // Custom handling + if ((e - 30400) <= 100) { + + if ((e - 30400) <= 10) { + tTier -= 2; + aList.add(EnumChatFormatting.BOLD + "16" + " Fuse Slots" + EnumChatFormatting.GRAY); + aList.add("Per each fuse, you may insert " + EnumChatFormatting.YELLOW + + (GT_Values.V[tTier]) + EnumChatFormatting.GRAY + " EU/t"); + aList.add("However this " + EnumChatFormatting.ITALIC + EnumChatFormatting.RED + "MUST" + + EnumChatFormatting.GRAY + " be in a single Amp"); + aList.add("This machine can accept upto a single amp of " + + GT_Values.VN[Math.min(tTier + 2, 12)] + " as a result"); + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_Breaker_Loss", + "Breaker Loss: " + EnumChatFormatting.RED + "" + + (GT_Values.V[Math.max(tTier - 1, 0)] / 10) + + EnumChatFormatting.GRAY + " EU/t", + !GregTech_API.sPostloadFinished) + + EnumChatFormatting.GRAY); + } + + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_Special_Power_1", + EnumChatFormatting.RED + "Special Power Handling, please read manual", + !GregTech_API.sPostloadFinished) + + EnumChatFormatting.GRAY); + // aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_2", + // EnumChatFormatting.RED+"Special Power Handling, please read manual", + // !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + // aList.add(GT_LanguageManager.addStringLocalization("TileEntity_BreakerBox_3", + // EnumChatFormatting.RED+"Special Power Handling, please read manual", + // !GregTech_API.sPostloadFinished) + EnumChatFormatting.GRAY); + } + + if (aNBT.getInputVoltage() > 0L) { + String inA = "0"; + if (aNBT.getInputAmperage() >= 1L) { + inA = " at " + EnumChatFormatting.YELLOW + aNBT.getInputAmperage() + EnumChatFormatting.GRAY + + " Amps"; + } else { + inA = " at " + EnumChatFormatting.WHITE + aNBT.getInputAmperage() + EnumChatFormatting.GRAY + + " Amps"; + } + String a1 = "Voltage IN: " + EnumChatFormatting.GREEN + aNBT.getInputVoltage() + + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getInputVoltage())] + ")" + + EnumChatFormatting.GRAY + inA; + aList.add(a1); + } + + if (aNBT.getOutputVoltage() > 0L) { + String outA = "0"; + if (aNBT.getOutputAmperage() >= 1L) { + outA = " at " + EnumChatFormatting.YELLOW + aNBT.getOutputAmperage() + + EnumChatFormatting.GRAY + " Amps"; + } else { + outA = " at " + EnumChatFormatting.WHITE + aNBT.getOutputAmperage() + + EnumChatFormatting.GRAY + " Amps"; + } + String a1 = "Voltage OUT: " + EnumChatFormatting.GREEN + aNBT.getOutputVoltage() + + " (" + GT_Values.VN[GT_Utility.getTier(aNBT.getOutputVoltage())] + ")" + + EnumChatFormatting.GRAY + outA; + aList.add(a1); + } + + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_Lossess_EU", + "Transmission Loss: " + EnumChatFormatting.DARK_BLUE + "0", + !GregTech_API.sPostloadFinished) + + EnumChatFormatting.GRAY); + + aList.add(GT_LanguageManager.addStringLocalization( + "TileEntity_EUp_STORE2", "Internal Capacity: ", !GregTech_API.sPostloadFinished) + + EnumChatFormatting.BLUE + aNBT.getEUCapacity() + + EnumChatFormatting.GRAY + " EU"); + } + } + + NBTTagCompound arg16 = aStack.getTagCompound(); + if (arg16 != null) { + if (arg16.getBoolean("mMuffler")) { + aList.add(GT_LanguageManager.addStringLocalization( + "GT_TileEntity_MUFFLER", "has Muffler Upgrade", !GregTech_API.sPostloadFinished)); + } + + if (arg16.getBoolean("mSteamConverter")) { + aList.add(GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMCONVERTER", "has Steam Upgrade", !GregTech_API.sPostloadFinished)); + } + + boolean arg17 = false; + byte arg18; + if ((arg18 = arg16.getByte("mSteamTanks")) > 0) { + aList.add(arg18 + " " + + GT_LanguageManager.addStringLocalization( + "GT_TileEntity_STEAMTANKS", + "Steam Tank Upgrades", + !GregTech_API.sPostloadFinished)); + } + } + + aList.add(EnumChatFormatting.UNDERLINE + "Special GT++ Machine"); + + } catch (Throwable arg15) { + arg15.printStackTrace(GT_Log.err); + } + } + + public boolean onItemUseFirst( + ItemStack stack, + EntityPlayer player, + World world, + int x, + int y, + int z, + int side, + float hitX, + float hitY, + float hitZ) { + return false; + } + + public String getUnlocalizedName(ItemStack aStack) { + short tDamage = (short) (this.getDamage(aStack) + 30400); // Add Offset; + return tDamage >= 0 && tDamage < GregTech_API.METATILEENTITIES.length + ? (GregTech_API.METATILEENTITIES[tDamage] != null + ? "gtpp.blockmachines" + "." + GregTech_API.METATILEENTITIES[tDamage].getMetaName() + : "") + : ""; + } + + public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + super.onCreated(aStack, aWorld, aPlayer); + short tDamage = (short) ((short) this.getDamage(aStack) + 30400); // Add Offset; + if (tDamage < 0 + || tDamage >= GregTech_API.METATILEENTITIES.length && GregTech_API.METATILEENTITIES[tDamage] != null) { + GregTech_API.METATILEENTITIES[tDamage].onCreated(aStack, aWorld, aPlayer); + } + } + + public boolean placeBlockAt( + ItemStack aStack, + EntityPlayer aPlayer, + World aWorld, + int aX, + int aY, + int aZ, + int side, + float hitX, + float hitY, + float hitZ, + int aMeta) { + short tDamage = (short) ((short) this.getDamage(aStack) + 30400); // Add Offset; + if (tDamage > 0) { + if (GregTech_API.METATILEENTITIES[tDamage] == null) { + return false; + } + + byte tMetaData = 32; + // byte tMetaData = GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType(); + Logger.INFO("Using Meta: " + tMetaData + " for ID " + tDamage + " | " + + GregTech_API.METATILEENTITIES[tDamage].getInventoryName()); + if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tMetaData, 3)) { + return false; + } + + if (aWorld.getBlock(aX, aY, aZ) != this.field_150939_a) { + throw new GT_ItsNotMyFaultException( + "Failed to place Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don\'t report this Bug to me, I don\'t know how to fix it."); + } + + if (aWorld.getBlockMetadata(aX, aY, aZ) != tMetaData) { + throw new GT_ItsNotMyFaultException( + "Failed to set the MetaValue of the Block even though World.setBlock returned true. It COULD be MCPC/Bukkit causing that. In case you really have that installed, don\'t report this Bug to me, I don\'t know how to fix it."); + } + + IGregTechTileEntity tTileEntity = (IGregTechTileEntity) aWorld.getTileEntity(aX, aY, aZ); + if (tTileEntity != null) { + tTileEntity.setInitialValuesAsNBT(tTileEntity.isServerSide() ? aStack.getTagCompound() : null, tDamage); + if (aPlayer != null) { + tTileEntity.setOwnerName(aPlayer.getDisplayName()); + } + + tTileEntity.getMetaTileEntity().initDefaultModes(aStack.getTagCompound()); + } + } else if (!aWorld.setBlock(aX, aY, aZ, this.field_150939_a, tDamage, 3)) { + return false; + } + + if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) { + this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack); + this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, tDamage); + } + + return true; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java index daeebe2fe6..026d3d471f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java @@ -12,64 +12,66 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -public class GregtechMetaCasingBlocks -extends GregtechMetaCasingBlocksAbstract { +public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract { - CasingTextureHandler TextureHandler = new CasingTextureHandler(); + CasingTextureHandler TextureHandler = new CasingTextureHandler(); - public GregtechMetaCasingBlocks() { - super(GregtechMetaCasingItems.class, "miscutils.blockcasings", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - if (i == 2 || i == 3 || i == 4) { - continue; - } - TAE.registerTexture(0, i, new GTPP_CopiedBlockTexture(this, 6, i)); - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); //60 - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Electrolyzer Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Wire Factory Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Maceration Stack Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Matter Generation Coil"); //65 - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Matter Fabricator Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Iron Plated Bricks"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Multitank Exterior Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil "); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block"); - GregtechItemList.Casing_Centrifuge1.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_CokeOven.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_CokeOven_Coil1.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_CokeOven_Coil2.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_MaterialPress.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_Electrolyzer.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_WireFactory.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_MacerationStack.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_MatterGen.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_MatterFab.set(new ItemStack(this, 1, 9)); - GregtechItemList.Casing_IronPlatedBricks.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_MultitankExterior.set(new ItemStack(this, 1, 11)); - GregtechItemList.Casing_Reactor_I.set(new ItemStack(this, 1, 12)); - GregtechItemList.Casing_Reactor_II.set(new ItemStack(this, 1, 13)); - GregtechItemList.Casing_Coil_BlastSmelter.set(new ItemStack(this, 1, 14)); - GregtechItemList.Casing_BlastSmelter.set(new ItemStack(this, 1, 15)); - } - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] - return CasingTextureHandler.getIcon(aSide, aMeta); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - final GregtechMetaCasingBlocks i = this; - return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); - } + public GregtechMetaCasingBlocks() { + super(GregtechMetaCasingItems.class, "miscutils.blockcasings", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + if (i == 2 || i == 3 || i == 4) { + continue; + } + TAE.registerTexture(0, i, new GTPP_CopiedBlockTexture(this, 6, i)); + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); // 60 + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Electrolyzer Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Wire Factory Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Maceration Stack Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Matter Generation Coil"); // 65 + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Matter Fabricator Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Iron Plated Bricks"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Multitank Exterior Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil "); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block"); + GregtechItemList.Casing_Centrifuge1.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_CokeOven.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_CokeOven_Coil1.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_CokeOven_Coil2.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_MaterialPress.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_Electrolyzer.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_WireFactory.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_MacerationStack.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_MatterGen.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_MatterFab.set(new ItemStack(this, 1, 9)); + GregtechItemList.Casing_IronPlatedBricks.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_MultitankExterior.set(new ItemStack(this, 1, 11)); + GregtechItemList.Casing_Reactor_I.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_Reactor_II.set(new ItemStack(this, 1, 13)); + GregtechItemList.Casing_Coil_BlastSmelter.set(new ItemStack(this, 1, 14)); + GregtechItemList.Casing_BlastSmelter.set(new ItemStack(this, 1, 15)); + } + @Override + public IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57] + return CasingTextureHandler.getIcon(aSide, aMeta); + } + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon( + final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + final GregtechMetaCasingBlocks i = this; + return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java index 171339b08b..f71805784b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import java.util.List; - import gregtech.api.enums.TAE; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; @@ -10,78 +8,81 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; -public class GregtechMetaCasingBlocks2 -extends GregtechMetaCasingBlocksAbstract { +public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract { - CasingTextureHandler2 TextureHandler = new CasingTextureHandler2(); + CasingTextureHandler2 TextureHandler = new CasingTextureHandler2(); - public static class GregtechMetaCasingItemBlocks2 extends GregtechMetaCasingItems { + public static class GregtechMetaCasingItemBlocks2 extends GregtechMetaCasingItems { - public GregtechMetaCasingItemBlocks2(Block par1) { - super(par1); - } + public GregtechMetaCasingItemBlocks2(Block par1) { + super(par1); + } - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int meta = aStack.getItemDamage(); - int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); - if (meta == 7 && tier > 0) { - long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); - aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int meta = aStack.getItemDamage(); + int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); + if (meta == 7 && tier > 0) { + long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); + aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } - public GregtechMetaCasingBlocks2() { - super(GregtechMetaCasingItemBlocks2.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - if (i == 4 || i == 10 || i == 11 || i == 12 || i == 14) { - continue; - } - TAE.registerTexture(1, i, new GTPP_CopiedBlockTexture(this, 6, i)); - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Thermal Processing Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Hastelloy-X Structural Block"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Wash Plant Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Industrial Sieve Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Large Sieve Grate"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Sub-Station External Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Thermal Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Autocrafter Frame"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); //Tree Farmer Textures - GregtechItemList.Casing_ThermalCentrifuge.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Refinery_Structural.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_Refinery_Internal.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_Sifter.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_SifterGrate.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_Vanadium_Redox.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_Power_SubStation.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_Cyclotron_Coil.set(new ItemStack(this, 1, 9)); - GregtechItemList.Casing_Cyclotron_External.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11)); - GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12)); - GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13)); - //GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14)); - GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15)); //Tree Farmer Textures - } + public GregtechMetaCasingBlocks2() { + super(GregtechMetaCasingItemBlocks2.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + if (i == 4 || i == 10 || i == 11 || i == 12 || i == 14) { + continue; + } + TAE.registerTexture(1, i, new GTPP_CopiedBlockTexture(this, 6, i)); + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Thermal Processing Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Hastelloy-X Structural Block"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Wash Plant Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Industrial Sieve Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Large Sieve Grate"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (EV)"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Sub-Station External Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Thermal Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Autocrafter Frame"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); // Tree Farmer Textures + GregtechItemList.Casing_ThermalCentrifuge.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Refinery_Structural.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Refinery_Internal.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_Sifter.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_SifterGrate.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_Vanadium_Redox.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_Power_SubStation.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_Cyclotron_Coil.set(new ItemStack(this, 1, 9)); + GregtechItemList.Casing_Cyclotron_External.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11)); + GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13)); + // GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14)); + GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15)); // Tree Farmer Textures + } - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return CasingTextureHandler2.getIcon(aSide, aMeta); - } + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return CasingTextureHandler2.getIcon(aSide, aMeta); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java index e9251d908e..59bcfa5347 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import java.util.List; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; @@ -13,358 +11,367 @@ import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; +import java.util.List; 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; -public class GregtechMetaCasingBlocks3 -extends GregtechMetaCasingBlocksAbstract { +public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract { - public static boolean mConnectedMachineTextures = false; - CasingTextureHandler3 TextureHandler = new CasingTextureHandler3(); + public static boolean mConnectedMachineTextures = false; + CasingTextureHandler3 TextureHandler = new CasingTextureHandler3(); - public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems { + public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems { - public GregtechMetaCasingItemBlocks3(Block par1) { - super(par1); - } + public GregtechMetaCasingItemBlocks3(Block par1) { + super(par1); + } - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int meta = aStack.getItemDamage(); - int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); - if (tier > 0) { - long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); - aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int meta = aStack.getItemDamage(); + int tier = GregtechMetaTileEntity_PowerSubStationController.getCellTier(field_150939_a, meta); + if (tier > 0) { + long capacity = GregtechMetaTileEntity_PowerSubStationController.getCapacityFromCellTier(tier); + aList.add("Energy Storage: " + GT_Utility.formatNumbers(capacity)); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } - public GregtechMetaCasingBlocks3() { - super(GregtechMetaCasingItemBlocks3.class, "gtplusplus.blockcasings.3", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - // Free up Redox casing in TAE - if (i >= 4 && i <= 8) { - continue; - } - TAE.registerTexture(2, i, new GTPP_CopiedBlockTexture(this, 6, i)); - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Aquatic Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Multi-Use Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Trinium Plated Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)"); - 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", "Fusion Machine Casing MK III"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Advanced Fusion Coil"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Unnamed"); // Can Use, don't change texture (Used for Fusion MK4) - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Containment Casing"); - GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Multi_Use.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_BedrockMiner.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_Vanadium_Redox_IV.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_Vanadium_Redox_LuV.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_Vanadium_Redox_ZPM.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_Vanadium_Redox_UV.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_Vanadium_Redox_MAX.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_AmazonWarehouse.set(new ItemStack(this, 1, 9)); - GregtechItemList.Casing_AdvancedVacuum.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_Adv_BlastFurnace.set(new ItemStack(this, 1, 11)); - GregtechItemList.Casing_Fusion_External.set(new ItemStack(this, 1, 12)); - GregtechItemList.Casing_Fusion_Internal.set(new ItemStack(this, 1, 13)); - GregtechItemList.Casing_Containment.set(new ItemStack(this, 1, 15)); - } + public GregtechMetaCasingBlocks3() { + super(GregtechMetaCasingItemBlocks3.class, "gtplusplus.blockcasings.3", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + // Free up Redox casing in TAE + if (i >= 4 && i <= 8) { + continue; + } + TAE.registerTexture(2, i, new GTPP_CopiedBlockTexture(this, 6, i)); + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Aquatic Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Multi-Use Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Trinium Plated Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".4.name", "Vanadium Redox Power Cell (IV)"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".5.name", "Vanadium Redox Power Cell (LuV)"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".6.name", "Vanadium Redox Power Cell (ZPM)"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell (UV)"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".8.name", "Vanadium Redox Power Cell (MAX)"); + 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", "Fusion Machine Casing MK III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Advanced Fusion Coil"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".14.name", + "Unnamed"); // Can Use, don't change texture (Used for Fusion MK4) + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Containment Casing"); + GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Multi_Use.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_BedrockMiner.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Vanadium_Redox_IV.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_Vanadium_Redox_LuV.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_Vanadium_Redox_ZPM.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_Vanadium_Redox_UV.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_Vanadium_Redox_MAX.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_AmazonWarehouse.set(new ItemStack(this, 1, 9)); + GregtechItemList.Casing_AdvancedVacuum.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_Adv_BlastFurnace.set(new ItemStack(this, 1, 11)); + GregtechItemList.Casing_Fusion_External.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_Fusion_Internal.set(new ItemStack(this, 1, 13)); + GregtechItemList.Casing_Containment.set(new ItemStack(this, 1, 15)); + } - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return CasingTextureHandler3.getIcon(aSide, aMeta); - } + @Override + 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)|| !GregtechMetaCasingBlocks3.mConnectedMachineTextures) { - return getIcon(aSide, tMeta); - } - final int tStartIndex = 0; - if (tMeta == 12) { - 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(); - } - return CasingTextureHandler3.getIcon(aSide, tMeta); - } + @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) || !GregtechMetaCasingBlocks3.mConnectedMachineTextures) { + return getIcon(aSide, tMeta); + } + final int tStartIndex = 0; + if (tMeta == 12) { + 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(); + } + return CasingTextureHandler3.getIcon(aSide, tMeta); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index 93ec53baba..5456aa27a2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -10,102 +10,98 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract { -public class GregtechMetaCasingBlocks4 -extends GregtechMetaCasingBlocksAbstract { + public GregtechMetaCasingBlocks4() { + super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.4", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + if (i == 2 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 12 || i == 13 || i == 14 || i == 15) { + continue; + } + TAE.registerTexture(3, i, new GTPP_CopiedBlockTexture(this, 6, i)); + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base"); // 48 + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused + GregtechItemList.Casing_Naq_Reactor_A.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Naq_Reactor_B.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Naq_Reactor_C.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Industrial_Arc_Furnace.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Vacuum_Furnace.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_RocketEngine.set(new ItemStack(this, 1, 11)); + } - public GregtechMetaCasingBlocks4() { - super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.4", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - if (i == 2 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 12 || i == 13 || i == 14 || i == 15) { - continue; - } - TAE.registerTexture(3, i, new GTPP_CopiedBlockTexture(this, 6, i)); - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base"); //48 - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - GregtechItemList.Casing_Naq_Reactor_A.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Naq_Reactor_B.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Naq_Reactor_C.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_Industrial_Arc_Furnace.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_Vacuum_Furnace.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_RocketEngine.set(new ItemStack(this, 1, 11)); - } + // private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); - //private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); - - /*@Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - final GregtechMetaCasingBlocks4 i = this; - return mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); - }*/ - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return getStaticIcon((byte) aSide, (byte) aMeta); - } - - public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { - //Texture ID's. case 0 == ID[57] - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0: - return TexturesGtBlock.Casing_Trinium_Titanium.getIcon(); - case 1: - return TexturesGtBlock.TEXTURE_TECH_C.getIcon(); - case 2: - return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); - case 3: - return TexturesGtBlock.TEXTURE_METAL_PANEL_A.getIcon(); - case 4: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 5: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 6: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 7: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 8: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 9: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); - case 10: - if (aSide <2) { - return TexturesGtBlock.TEXTURE_STONE_RED_B.getIcon(); - } - else { - return TexturesGtBlock.TEXTURE_STONE_RED_A.getIcon(); - } - case 11: - return TexturesGtBlock.TEXTURE_CASING_ROCKETDYNE.getIcon(); - case 12: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 13: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 14: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 15: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - default: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + /*@Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + final GregtechMetaCasingBlocks4 i = this; + return mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); + }*/ - } - } - return TexturesGtBlock._PlaceHolder.getIcon(); - } + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return getStaticIcon((byte) aSide, (byte) aMeta); + } + + public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + // Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + return TexturesGtBlock.Casing_Trinium_Titanium.getIcon(); + case 1: + return TexturesGtBlock.TEXTURE_TECH_C.getIcon(); + case 2: + return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); + case 3: + return TexturesGtBlock.TEXTURE_METAL_PANEL_A.getIcon(); + case 4: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 5: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 6: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 7: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 8: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 9: + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + case 10: + if (aSide < 2) { + return TexturesGtBlock.TEXTURE_STONE_RED_B.getIcon(); + } else { + return TexturesGtBlock.TEXTURE_STONE_RED_A.getIcon(); + } + case 11: + return TexturesGtBlock.TEXTURE_CASING_ROCKETDYNE.getIcon(); + case 12: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 13: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 14: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 15: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + default: + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + } + } + return TexturesGtBlock._PlaceHolder.getIcon(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java index 27fa7349ca..834fb2c186 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java @@ -14,79 +14,85 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; +public class GregtechMetaCasingBlocks5 extends GregtechMetaCasingBlocksAbstract { -public class GregtechMetaCasingBlocks5 -extends GregtechMetaCasingBlocksAbstract { + // Free Indexes within TAE: 91, 92, 94, 100, 101, 102, 103, 104, 114, 116, 117, 118, 119, 120, 121, 124, 125, 126, + // 127 + // 19 Free Indexes + private static final TexturesGrinderMultiblock mGrinderOverlayHandler = new TexturesGrinderMultiblock(); - // Free Indexes within TAE: 91, 92, 94, 100, 101, 102, 103, 104, 114, 116, 117, 118, 119, 120, 121, 124, 125, 126, 127 - // 19 Free Indexes - private static final TexturesGrinderMultiblock mGrinderOverlayHandler = new TexturesGrinderMultiblock(); - - public GregtechMetaCasingBlocks5() { - super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.5", GT_Material_Casings.INSTANCE); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill Casing - TAE.registerTexture(0, 2, new GTPP_CopiedBlockTexture(this, 6, 0)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill Pipe - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill Gearbox - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator Casing - TAE.registerTexture(0, 3, new GTPP_CopiedBlockTexture(this, 6, 3)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge Tower Casing - TAE.registerTexture(0, 4, new GTPP_CopiedBlockTexture(this, 6, 4)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Sturdy Printer Casing"); // Unused - TAE.registerTexture(1, 10, new GTPP_CopiedBlockTexture(this, 6, 5)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Forge Casing"); // Forge Hammer Casing - TAE.registerTexture(1, 11, new GTPP_CopiedBlockTexture(this, 6, 6)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - - GregtechItemList.Casing_IsaMill_Casing.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_IsaMill_Pipe.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_IsaMill_Gearbox.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_ElementalDuplicator.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_Sparge_Tower_Exterior.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_IndustrialAutoChisel.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_IndustrialForgeHammer.set(new ItemStack(this, 1, 6)); - } - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return getStaticIcon(aSide, aMeta); - } - + public GregtechMetaCasingBlocks5() { + super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.5", GT_Material_Casings.INSTANCE); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill Casing + TAE.registerTexture(0, 2, new GTPP_CopiedBlockTexture(this, 6, 0)); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill Pipe + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill Gearbox + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator Casing + TAE.registerTexture(0, 3, new GTPP_CopiedBlockTexture(this, 6, 3)); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge Tower Casing + TAE.registerTexture(0, 4, new GTPP_CopiedBlockTexture(this, 6, 4)); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".5.name", "Sturdy Printer Casing"); // Unused + TAE.registerTexture(1, 10, new GTPP_CopiedBlockTexture(this, 6, 5)); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".6.name", "Forge Casing"); // Forge Hammer Casing + TAE.registerTexture(1, 11, new GTPP_CopiedBlockTexture(this, 6, 6)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - public static IIcon getStaticIcon(final int aSide, final int aMeta) { - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0: - return TexturesGtBlock.TEXTURE_PIPE_GRINDING_MILL.getIcon(); - case 1: - return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon(); - case 2: - return TexturesGtBlock.TEXTURE_GEARBOX_GRINDING_MILL.getIcon(); - case 3: - return TexturesGtBlock.TEXTURE_TECH_PANEL_D.getIcon(); - case 4: - return TexturesGtBlock.Casing_Machine_Metal_Sheet_H.getIcon(); - case 5: - return TexturesGtBlock.Casing_Machine_Metal_Sheet_I.getIcon(); - case 6: - return TexturesGtBlock.TEXTURE_TECH_PANEL_H.getIcon(); - } - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } + GregtechItemList.Casing_IsaMill_Casing.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_IsaMill_Pipe.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_IsaMill_Gearbox.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_ElementalDuplicator.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Sparge_Tower_Exterior.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_IndustrialAutoChisel.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_IndustrialForgeHammer.set(new ItemStack(this, 1, 6)); + } - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - final GregtechMetaCasingBlocks5 i = this; - return mGrinderOverlayHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); - } + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return getStaticIcon(aSide, aMeta); + } + + public static IIcon getStaticIcon(final int aSide, final int aMeta) { + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + return TexturesGtBlock.TEXTURE_PIPE_GRINDING_MILL.getIcon(); + case 1: + return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon(); + case 2: + return TexturesGtBlock.TEXTURE_GEARBOX_GRINDING_MILL.getIcon(); + case 3: + return TexturesGtBlock.TEXTURE_TECH_PANEL_D.getIcon(); + case 4: + return TexturesGtBlock.Casing_Machine_Metal_Sheet_H.getIcon(); + case 5: + return TexturesGtBlock.Casing_Machine_Metal_Sheet_I.getIcon(); + case 6: + return TexturesGtBlock.TEXTURE_TECH_PANEL_H.getIcon(); + } + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon( + final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + final GregtechMetaCasingBlocks5 i = this; + return mGrinderOverlayHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java index ea59eb50ba..683159de98 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java @@ -1,11 +1,13 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import java.util.List; -import java.util.Random; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - +import gregtech.api.GregTech_API; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Block_Casings_Abstract; +import gtPlusPlus.core.creative.AddToCreativeTab; +import java.util.List; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; @@ -20,131 +22,127 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Block_Casings_Abstract; - -import gtPlusPlus.core.creative.AddToCreativeTab; - -public abstract class GregtechMetaCasingBlocksAbstract -extends GT_Block_Casings_Abstract { - public GregtechMetaCasingBlocksAbstract(final Class<? extends ItemBlock> aItemClass, final String aName, final Material aMaterial) { - super(aItemClass, aName, aMaterial); - this.setStepSound(soundTypeMetal); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GregTech_API.registerMachineBlock(this, -1); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); - } - - @Override - public String getHarvestTool(final int aMeta) { - return "wrench"; - } - - @Override - public int getHarvestLevel(final int aMeta) { - return 2; - } - - @Override - public float getBlockHardness(final World aWorld, final int aX, final int aY, final int aZ) { - return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ); - } - - @Override - public float getExplosionResistance(final Entity aTNT) { - return Blocks.iron_block.getExplosionResistance(aTNT); - } - - @Override - protected boolean canSilkHarvest() { - return false; - } - - @Override - public void onBlockAdded(final World aWorld, final int aX, final int aY, final int aZ) { - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - } - - @Override - public String getUnlocalizedName() { - return this.mUnlocalizedName; - } - - @Override - public String getLocalizedName() { - return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); - } - - @Override - public boolean canBeReplacedByLeaves(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) { - return false; - } - - @Override - public boolean isNormalCube(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) { - return true; - } - - @Override - public boolean renderAsNormalBlock() { - return true; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public int getRenderBlockPass() { - return 0; - } - - @Override - public void breakBlock(final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock, final int aMetaData) { - if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { - GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); - } - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { - return false; - } - - @Override - public int damageDropped(final int par1) { - return par1; - } - - @Override - public int getDamageValue(final World par1World, final int par2, final int par3, final int par4) { - return par1World.getBlockMetadata(par2, par3, par4); - } - - @Override - public int quantityDropped(final Random par1Random) { - return 1; - } - - @Override - public Item getItemDropped(final int par1, final Random par2Random, final int par3) { - return Item.getItemFromBlock(this); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister aIconRegister) { - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(final Item aItem, final CreativeTabs par2CreativeTabs, final List aList) { - for (int i = 0; i < 16; i++) { - aList.add(new ItemStack(aItem, 1, i)); - } - } +public abstract class GregtechMetaCasingBlocksAbstract extends GT_Block_Casings_Abstract { + public GregtechMetaCasingBlocksAbstract( + final Class<? extends ItemBlock> aItemClass, final String aName, final Material aMaterial) { + super(aItemClass, aName, aMaterial); + this.setStepSound(soundTypeMetal); + this.setCreativeTab(AddToCreativeTab.tabMachines); + GregTech_API.registerMachineBlock(this, -1); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this"); + } + + @Override + public String getHarvestTool(final int aMeta) { + return "wrench"; + } + + @Override + public int getHarvestLevel(final int aMeta) { + return 2; + } + + @Override + public float getBlockHardness(final World aWorld, final int aX, final int aY, final int aZ) { + return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ); + } + + @Override + public float getExplosionResistance(final Entity aTNT) { + return Blocks.iron_block.getExplosionResistance(aTNT); + } + + @Override + protected boolean canSilkHarvest() { + return false; + } + + @Override + public void onBlockAdded(final World aWorld, final int aX, final int aY, final int aZ) { + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + } + + @Override + public String getUnlocalizedName() { + return this.mUnlocalizedName; + } + + @Override + public String getLocalizedName() { + return StatCollector.translateToLocal(this.mUnlocalizedName + ".name"); + } + + @Override + public boolean canBeReplacedByLeaves(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) { + return false; + } + + @Override + public boolean isNormalCube(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) { + return true; + } + + @Override + public boolean renderAsNormalBlock() { + return true; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public int getRenderBlockPass() { + return 0; + } + + @Override + public void breakBlock( + final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock, final int aMetaData) { + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + } + + @Override + public boolean canCreatureSpawn( + final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { + return false; + } + + @Override + public int damageDropped(final int par1) { + return par1; + } + + @Override + public int getDamageValue(final World par1World, final int par2, final int par3, final int par4) { + return par1World.getBlockMetadata(par2, par3, par4); + } + + @Override + public int quantityDropped(final Random par1Random) { + return 1; + } + + @Override + public Item getItemDropped(final int par1, final Random par2Random, final int par3) { + return Item.getItemFromBlock(this); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(final IIconRegister aIconRegister) {} + + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(final Item aItem, final CreativeTabs par2CreativeTabs, final List aList) { + for (int i = 0; i < 16; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java index 10c1a4e80f..22c1d87b4e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksPipeGearbox.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import java.util.HashMap; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -9,95 +7,95 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import java.util.HashMap; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; public class GregtechMetaCasingBlocksPipeGearbox extends GregtechMetaCasingBlocksAbstract { - private static HashMap<Integer, Integer> sMaterialMapping = new HashMap<Integer, Integer>(); - - public GregtechMetaCasingBlocksPipeGearbox() { - super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.pipesgears", GT_Material_Casings.INSTANCE); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Eglin Steel Gear Box Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel-792 Gear Box Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Incoloy MA956 Gear Box Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Nitinol-60 Gear Box Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Zeron-100 Gear Box Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Pikyonium Gear Box Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Titansteel Gear Box Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Abyssal Gear Box Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Babbit Alloy Pipe Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Inconel-690 Pipe Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Stellite Pipe Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Nitinol-60 Pipe Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Lafium Pipe Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cinobite Pipe Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Titansteel Pipe Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Abyssal Pipe Casing"); + private static HashMap<Integer, Integer> sMaterialMapping = new HashMap<Integer, Integer>(); - int aMappingID = 0; - sMaterialMapping.put(aMappingID++, ALLOY.EGLIN_STEEL.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.INCONEL_792.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.INCOLOY_MA956.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.NITINOL_60.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.ZERON_100.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.PIKYONIUM.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.TITANSTEEL.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.ABYSSAL.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.BABBIT_ALLOY.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.INCONEL_690.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.STELLITE.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.NITINOL_60.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.LAFIUM.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.CINOBITE.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.TITANSTEEL.getRgbAsHex()); - sMaterialMapping.put(aMappingID++, ALLOY.ABYSSAL.getRgbAsHex()); + public GregtechMetaCasingBlocksPipeGearbox() { + super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.pipesgears", GT_Material_Casings.INSTANCE); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Eglin Steel Gear Box Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel-792 Gear Box Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".2.name", "Incoloy MA956 Gear Box Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Nitinol-60 Gear Box Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Zeron-100 Gear Box Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Pikyonium Gear Box Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Titansteel Gear Box Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Abyssal Gear Box Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Babbit Alloy Pipe Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Inconel-690 Pipe Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Stellite Pipe Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Nitinol-60 Pipe Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Lafium Pipe Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cinobite Pipe Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Titansteel Pipe Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Abyssal Pipe Casing"); - } + int aMappingID = 0; + sMaterialMapping.put(aMappingID++, ALLOY.EGLIN_STEEL.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.INCONEL_792.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.INCOLOY_MA956.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.NITINOL_60.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.ZERON_100.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.PIKYONIUM.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.TITANSTEEL.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.ABYSSAL.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.BABBIT_ALLOY.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.INCONEL_690.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.STELLITE.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.NITINOL_60.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.LAFIUM.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.CINOBITE.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.TITANSTEEL.getRgbAsHex()); + sMaterialMapping.put(aMappingID++, ALLOY.ABYSSAL.getRgbAsHex()); + } - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0 : - case 1 : - case 2 : - case 3 : - case 4 : - case 5 : - case 6 : - case 7 : - return TexturesGtBlock.TEXTURE_GEARBOX_GENERIC.getIcon(); - case 8 : - case 9 : - case 10 : - case 11 : - case 12 : - case 13 : - case 14 : - case 15 : - return TexturesGtBlock.TEXTURE_PIPE_GENERIC.getIcon(); - } - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + return TexturesGtBlock.TEXTURE_GEARBOX_GENERIC.getIcon(); + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + return TexturesGtBlock.TEXTURE_PIPE_GENERIC.getIcon(); + } + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } @SideOnly(Side.CLIENT) - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4) { - return sMaterialMapping.get(par1IBlockAccess.getBlockMetadata(par2, par3, par4)); - } + @Override + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4) { + return sMaterialMapping.get(par1IBlockAccess.getBlockMetadata(par2, par3, par4)); + } @SideOnly(Side.CLIENT) - @Override - public int getRenderColor(final int aMeta) { - return sMaterialMapping.get(aMeta); - } + @Override + public int getRenderColor(final int aMeta) { + return sMaterialMapping.get(aMeta); + } @SideOnly(Side.CLIENT) - @Override - public int getBlockColor() { - return super.getBlockColor(); - } - + @Override + public int getBlockColor() { + return super.getBlockColor(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java index de51cb164b..9927060164 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java @@ -2,9 +2,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks; import net.minecraft.block.Block; -public class GregtechMetaCasingItems -extends GregtechMetaItemCasingsAbstract { - public GregtechMetaCasingItems(final Block par1) { - super(par1); - } +public class GregtechMetaCasingItems extends GregtechMetaItemCasingsAbstract { + public GregtechMetaCasingItems(final Block par1) { + super(par1); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java index 7fb344a4ec..ba4929c011 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java @@ -1,36 +1,35 @@ package gtPlusPlus.xmod.gregtech.common.blocks; import java.util.List; - import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -public class GregtechMetaItemCasings1 -extends GregtechMetaItemCasingsAbstract { - public GregtechMetaItemCasings1(final Block par1) { - super(par1); - } +public class GregtechMetaItemCasings1 extends GregtechMetaItemCasingsAbstract { + public GregtechMetaItemCasings1(final Block par1) { + super(par1); + } - @Override - public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { - super.addInformation(aStack, aPlayer, aList, aF3_H); - switch (this.getDamage(aStack)) { - case 0: - aList.add(this.mCasing_Centrifuge); - break; - case 1: - aList.add(this.mCasing_CokeOven); - break; - case 2: - aList.add(this.mCasing_CokeCoil1); - break; - case 3: - aList.add(this.mCasing_CokeCoil2); - break; - default: - aList.add(this.mCasing_CokeCoil2); - break; - } - } + @Override + public void addInformation( + final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + switch (this.getDamage(aStack)) { + case 0: + aList.add(this.mCasing_Centrifuge); + break; + case 1: + aList.add(this.mCasing_CokeOven); + break; + case 2: + aList.add(this.mCasing_CokeCoil1); + break; + case 3: + aList.add(this.mCasing_CokeCoil2); + break; + default: + aList.add(this.mCasing_CokeCoil2); + break; + } + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java index 62e0f0acdf..d9102f0994 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java @@ -1,61 +1,65 @@ package gtPlusPlus.xmod.gregtech.common.blocks; +import gregtech.api.util.GT_LanguageManager; import java.util.List; - import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import gregtech.api.util.GT_LanguageManager; - -public abstract class GregtechMetaItemCasingsAbstract -extends ItemBlock { +public abstract class GregtechMetaItemCasingsAbstract extends ItemBlock { - protected final String mCasing_Centrifuge = GT_LanguageManager.addStringLocalization("mu.centrifugecasing", "Warning! Standing in the Centrifuge not recommended"); - protected final String mCasing_CokeOven = GT_LanguageManager.addStringLocalization("mu.cokeoven", "Sturdy and Strong"); - protected final String mCasing_CokeCoil1 = GT_LanguageManager.addStringLocalization("mu.coil01tooltip", "Base Heating Capacity = 1350 Kelvin"); - protected final String mCasing_CokeCoil2 = GT_LanguageManager.addStringLocalization("mu.coil02tooltip", "Base Heating Capacity = 2275 Kelvin"); - protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); - protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); + protected final String mCasing_Centrifuge = GT_LanguageManager.addStringLocalization( + "mu.centrifugecasing", "Warning! Standing in the Centrifuge not recommended"); + protected final String mCasing_CokeOven = + GT_LanguageManager.addStringLocalization("mu.cokeoven", "Sturdy and Strong"); + protected final String mCasing_CokeCoil1 = + GT_LanguageManager.addStringLocalization("mu.coil01tooltip", "Base Heating Capacity = 1350 Kelvin"); + protected final String mCasing_CokeCoil2 = + GT_LanguageManager.addStringLocalization("mu.coil02tooltip", "Base Heating Capacity = 2275 Kelvin"); + protected final String mNoMobsToolTip = + GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block"); + protected final String mNoTileEntityToolTip = + GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!"); - public GregtechMetaItemCasingsAbstract(final Block par1) { - super(par1); - this.setMaxDamage(0); - this.setHasSubtypes(true); - //setCreativeTab(AddToCreativeTab.tabMachines); - } + public GregtechMetaItemCasingsAbstract(final Block par1) { + super(par1); + this.setMaxDamage(0); + this.setHasSubtypes(true); + // setCreativeTab(AddToCreativeTab.tabMachines); + } - @Override - public int getMetadata(final int aMeta) { - return aMeta; - } + @Override + public int getMetadata(final int aMeta) { + return aMeta; + } - @Override - public String getUnlocalizedName(final ItemStack aStack) { - return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack); - } + @Override + public String getUnlocalizedName(final ItemStack aStack) { + return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack); + } - @Override - public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { - super.addInformation(aStack, aPlayer, aList, aF3_H); - switch (this.getDamage(aStack)) { - case 0: - //aList.add(this.mCasing_Centrifuge); - break; - case 1: - //aList.add(this.mCasing_CokeOven); - break; - case 2: - //aList.add(this.mCasing_CokeCoil1); - break; - case 3: - //aList.add(this.mCasing_CokeCoil2); - break; - default: - break; - } - aList.add(this.mNoMobsToolTip); - aList.add(this.mNoTileEntityToolTip); - } + @Override + public void addInformation( + final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { + super.addInformation(aStack, aPlayer, aList, aF3_H); + switch (this.getDamage(aStack)) { + case 0: + // aList.add(this.mCasing_Centrifuge); + break; + case 1: + // aList.add(this.mCasing_CokeOven); + break; + case 2: + // aList.add(this.mCasing_CokeCoil1); + break; + case 3: + // aList.add(this.mCasing_CokeCoil2); + break; + default: + break; + } + aList.add(this.mNoMobsToolTip); + aList.add(this.mNoTileEntityToolTip); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java index b46e9d7464..f0a69e49d3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import java.util.List; - import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; @@ -9,73 +7,74 @@ import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; - public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksAbstract { + public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { - public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { + public SpecialCasingItemBlock(Block par1) { + super(par1); + } - public SpecialCasingItemBlock(Block par1) { - super(par1); - } + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 10) { + // aList.add("Tier: "+GT_Values.VN[aMeta]); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int aMeta = aStack.getItemDamage(); - if (aMeta < 10) { - //aList.add("Tier: "+GT_Values.VN[aMeta]); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaSpecialMachineCasings() { - super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.2", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); - // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Strong Bronze Machine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Sturdy Aluminium Machine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Vigorous Laurenium Machine Casing"); - TAE.registerTexture(84, new GTPP_CopiedBlockTexture(this, 6, 2)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Rugged Botmium Machine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - - GregtechItemList.Casing_Machine_Custom_1.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Machine_Custom_2.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Machine_Custom_3.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_Machine_Custom_4.set(new ItemStack(this, 1, 3)); - } + public GregtechMetaSpecialMachineCasings() { + super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.2", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + // TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Strong Bronze Machine Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".1.name", "Sturdy Aluminium Machine Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".2.name", "Vigorous Laurenium Machine Casing"); + TAE.registerTexture(84, new GTPP_CopiedBlockTexture(this, 6, 2)); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".3.name", "Rugged Botmium Machine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - public IIcon getIcon(int aSide, int aMeta) { - switch (aMeta) { - case 0: - return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); - case 1: - return Textures.BlockIcons.MACHINE_CASING_FROST_PROOF.getIcon(); - case 2: - return TexturesGtBlock.Casing_Material_Laurenium.getIcon(); - case 3: - return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon(); - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } + GregtechItemList.Casing_Machine_Custom_1.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Machine_Custom_2.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Machine_Custom_3.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Machine_Custom_4.set(new ItemStack(this, 1, 3)); + } + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + return Textures.BlockIcons.MACHINE_BRONZEPLATEDBRICKS.getIcon(); + case 1: + return Textures.BlockIcons.MACHINE_CASING_FROST_PROOF.getIcon(); + case 2: + return TexturesGtBlock.Casing_Material_Laurenium.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon(); + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java index 8b8955df43..96a4e6da82 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import java.util.List; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; @@ -12,114 +10,120 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; +import java.util.List; 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; - public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbstract { - - public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { - public SpecialCasingItemBlock(Block par1) { - super(par1); - } + public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { + + public SpecialCasingItemBlock(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 10) { + // aList.add("Tier: "+GT_Values.VN[aMeta]); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaSpecialMultiCasings() { + super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.1", GT_Material_Casings.INSTANCE); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Turbine Shaft"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".1.name", "Reinforced Steam Turbine Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".2.name", "Reinforced HP Steam Turbine Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".3.name", "Reinforced Gas Turbine Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".4.name", "Reinforced Plasma Turbine Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Tesla Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Structural Solar Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Salt Containment Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Thermally Insulated Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Flotation Cell Casings"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Reinforced Engine Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".11.name", "Molecular Containment Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".12.name", "High Voltage Current Capacitor"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Particle Containment Casing"); + GT_LanguageManager.addStringLocalization( + this.getUnlocalizedName() + ".14.name", "Reinforced Heat Exchanger Casing"); + TAE.registerTexture(1, 12, new GTPP_CopiedBlockTexture(this, 6, 14)); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int aMeta = aStack.getItemDamage(); - if (aMeta < 10) { - //aList.add("Tier: "+GT_Values.VN[aMeta]); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaSpecialMultiCasings() { - super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.1", GT_Material_Casings.INSTANCE); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Turbine Shaft"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reinforced Steam Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Reinforced HP Steam Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Reinforced Gas Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Reinforced Plasma Turbine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Tesla Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Structural Solar Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Salt Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Thermally Insulated Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Flotation Cell Casings"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Reinforced Engine Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Molecular Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "High Voltage Current Capacitor"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Particle Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Reinforced Heat Exchanger Casing"); - TAE.registerTexture(1, 12, new GTPP_CopiedBlockTexture(this, 6, 14)); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused + GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0)); + GregtechItemList.Casing_Turbine_LP.set(new ItemStack(this, 1, 1)); + GregtechItemList.Casing_Turbine_HP.set(new ItemStack(this, 1, 2)); + GregtechItemList.Casing_Turbine_Gas.set(new ItemStack(this, 1, 3)); + GregtechItemList.Casing_Turbine_Plasma.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 5)); + GregtechItemList.Casing_SolarTower_Structural.set(new ItemStack(this, 1, 6)); + GregtechItemList.Casing_SolarTower_SaltContainment.set(new ItemStack(this, 1, 7)); + GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 8)); + GregtechItemList.Casing_Flotation_Cell.set(new ItemStack(this, 1, 9)); + GregtechItemList.Casing_Reinforced_Engine_Casing.set(new ItemStack(this, 1, 10)); + GregtechItemList.Casing_Molecular_Transformer_1.set(new ItemStack(this, 1, 11)); + GregtechItemList.Casing_Molecular_Transformer_2.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_Molecular_Transformer_3.set(new ItemStack(this, 1, 13)); + GregtechItemList.Casing_XL_HeatExchanger.set(new ItemStack(this, 1, 14)); + } - GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0)); - GregtechItemList.Casing_Turbine_LP.set(new ItemStack(this, 1, 1)); - GregtechItemList.Casing_Turbine_HP.set(new ItemStack(this, 1, 2)); - GregtechItemList.Casing_Turbine_Gas.set(new ItemStack(this, 1, 3)); - GregtechItemList.Casing_Turbine_Plasma.set(new ItemStack(this, 1, 4)); - GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 5)); - GregtechItemList.Casing_SolarTower_Structural.set(new ItemStack(this, 1, 6)); - GregtechItemList.Casing_SolarTower_SaltContainment.set(new ItemStack(this, 1, 7)); - GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 8)); - GregtechItemList.Casing_Flotation_Cell.set(new ItemStack(this, 1, 9)); - GregtechItemList.Casing_Reinforced_Engine_Casing.set(new ItemStack(this, 1, 10)); - GregtechItemList.Casing_Molecular_Transformer_1.set(new ItemStack(this, 1, 11)); - GregtechItemList.Casing_Molecular_Transformer_2.set(new ItemStack(this, 1, 12)); - GregtechItemList.Casing_Molecular_Transformer_3.set(new ItemStack(this, 1, 13)); - GregtechItemList.Casing_XL_HeatExchanger.set(new ItemStack(this, 1, 14)); - - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - return LargeTurbineTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, this); - } - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return getStaticIcon((byte) aSide, (byte) aMeta); - } - - public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { - switch (aMeta) { - case 0: - return TexturesGtBlock.Casing_Redox_1.getIcon(); - case 1: - return Textures.BlockIcons.MACHINE_CASING_TURBINE.getIcon(); - case 2: - return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); - case 3: - return Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); - case 4: - return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); - case 5: - return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); - case 6: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); - case 7: - return TexturesGtBlock.Casing_Material_Stellite.getIcon(); - case 8: - return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - case 9: - return TexturesGtBlock.TEXTURE_CASING_FLOTATION.getIcon(); - case 10: - return TexturesGtBlock.Casing_Material_Talonite.getIcon(); - case 11: - return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); - case 12: - return TexturesGtBlock.Casing_Redox_5.getIcon(); - case 13: - return TexturesGtBlock.TEXTURE_MAGIC_PANEL_B.getIcon(); - case 14: - return TexturesGtBlock.Casing_Material_Talonite.getIcon(); + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon( + final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + return LargeTurbineTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, this); + } - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return getStaticIcon((byte) aSide, (byte) aMeta); + } + public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + switch (aMeta) { + case 0: + return TexturesGtBlock.Casing_Redox_1.getIcon(); + case 1: + return Textures.BlockIcons.MACHINE_CASING_TURBINE.getIcon(); + case 2: + return Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + case 3: + return Textures.BlockIcons.MACHINE_CASING_CLEAN_STAINLESSSTEEL.getIcon(); + case 4: + return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + case 5: + return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); + case 6: + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + case 7: + return TexturesGtBlock.Casing_Material_Stellite.getIcon(); + case 8: + return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); + case 9: + return TexturesGtBlock.TEXTURE_CASING_FLOTATION.getIcon(); + case 10: + return TexturesGtBlock.Casing_Material_Talonite.getIcon(); + case 11: + return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); + case 12: + return TexturesGtBlock.Casing_Redox_5.getIcon(); + case 13: + return TexturesGtBlock.TEXTURE_MAGIC_PANEL_B.getIcon(); + case 14: + return TexturesGtBlock.Casing_Material_Talonite.getIcon(); + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java index a80b788aa1..664f949b30 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java @@ -1,7 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -import java.util.List; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -9,99 +7,98 @@ 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.TexturesGtBlock; +import java.util.List; 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; - public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAbstract { - - public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { - public SpecialCasingItemBlock(Block par1) { - super(par1); - } + public static class SpecialCasingItemBlock extends GregtechMetaCasingItems { + + public SpecialCasingItemBlock(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 4) { + aList.add("Provides quantum stability"); + } + if (aMeta >= 4 && aMeta < 8) { + aList.add("Provides quantum modulation"); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } + + public GregtechMetaSpecialMultiCasings2() { + super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.3", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + // TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) + } + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Resonance Chamber I"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Resonance Chamber II"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Resonance Chamber III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Resonance Chamber IV"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Modulator I"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Modulator II"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Modulator III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Modulator IV"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int aMeta = aStack.getItemDamage(); - if (aMeta < 4) { - aList.add("Provides quantum stability"); - } - if (aMeta >= 4 && aMeta < 8) { - aList.add("Provides quantum modulation"); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaSpecialMultiCasings2() { - super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.3", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); - // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08) - } - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Resonance Chamber I"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Resonance Chamber II"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Resonance Chamber III"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Resonance Chamber IV"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Modulator I"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Modulator II"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Modulator III"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Modulator IV"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused + GregtechItemList.ResonanceChamber_I.set(new ItemStack(this, 1, 0)); + GregtechItemList.ResonanceChamber_II.set(new ItemStack(this, 1, 1)); + GregtechItemList.ResonanceChamber_III.set(new ItemStack(this, 1, 2)); + GregtechItemList.ResonanceChamber_IV.set(new ItemStack(this, 1, 3)); + GregtechItemList.Modulator_I.set(new ItemStack(this, 1, 4)); + GregtechItemList.Modulator_II.set(new ItemStack(this, 1, 5)); + GregtechItemList.Modulator_III.set(new ItemStack(this, 1, 6)); + GregtechItemList.Modulator_IV.set(new ItemStack(this, 1, 7)); + } - GregtechItemList.ResonanceChamber_I.set(new ItemStack(this, 1, 0)); - GregtechItemList.ResonanceChamber_II.set(new ItemStack(this, 1, 1)); - GregtechItemList.ResonanceChamber_III.set(new ItemStack(this, 1, 2)); - GregtechItemList.ResonanceChamber_IV.set(new ItemStack(this, 1, 3)); - GregtechItemList.Modulator_I.set(new ItemStack(this, 1, 4)); - GregtechItemList.Modulator_II.set(new ItemStack(this, 1, 5)); - GregtechItemList.Modulator_III.set(new ItemStack(this, 1, 6)); - GregtechItemList.Modulator_IV.set(new ItemStack(this, 1, 7)); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { - return getStaticIcon((byte) aSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord)); - } - - @Override - public IIcon getIcon(final int aSide, final int aMeta) { - return getStaticIcon((byte) aSide, (byte) aMeta); - } - - public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { - switch (aMeta) { - case 0: - return TexturesGtBlock.Casing_Resonance_1.getIcon(); - case 1: - return TexturesGtBlock.Casing_Resonance_2.getIcon(); - case 2: - return TexturesGtBlock.Casing_Resonance_3.getIcon(); - case 3: - return TexturesGtBlock.Casing_Resonance_4.getIcon(); - case 4: - return TexturesGtBlock.Casing_Modulator_1.getIcon(); - case 5: - return TexturesGtBlock.Casing_Modulator_2.getIcon(); - case 6: - return TexturesGtBlock.Casing_Modulator_3.getIcon(); - case 7: - return TexturesGtBlock.Casing_Modulator_4.getIcon(); + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon( + final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + return getStaticIcon((byte) aSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord)); + } - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } + @Override + public IIcon getIcon(final int aSide, final int aMeta) { + return getStaticIcon((byte) aSide, (byte) aMeta); + } + public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + switch (aMeta) { + case 0: + return TexturesGtBlock.Casing_Resonance_1.getIcon(); + case 1: + return TexturesGtBlock.Casing_Resonance_2.getIcon(); + case 2: + return TexturesGtBlock.Casing_Resonance_3.getIcon(); + case 3: + return TexturesGtBlock.Casing_Resonance_4.getIcon(); + case 4: + return TexturesGtBlock.Casing_Modulator_1.getIcon(); + case 5: + return TexturesGtBlock.Casing_Modulator_2.getIcon(); + case 6: + return TexturesGtBlock.Casing_Modulator_3.getIcon(); + case 7: + return TexturesGtBlock.Casing_Modulator_4.getIcon(); + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java index cbd585e50d..b511926137 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java @@ -1,110 +1,96 @@ package gtPlusPlus.xmod.gregtech.common.blocks; -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 java.util.List; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.GT_Values; -import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; -import gregtech.api.objects.GT_CopiedBlockTexture; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Material_Casings; - import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; - +import java.util.List; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbstract { + public static class TieredCasingItemBlock extends GregtechMetaCasingItems { + + public TieredCasingItemBlock(Block par1) { + super(par1); + } - public static class TieredCasingItemBlock extends GregtechMetaCasingItems { + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + int aMeta = aStack.getItemDamage(); + if (aMeta < 10) { + aList.add("Tier: " + GT_Values.VN[aMeta]); + } + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + } - public TieredCasingItemBlock(Block par1) { - super(par1); - } + public GregtechMetaTieredCasingBlocks1() { + super(TieredCasingItemBlock.class, "gtplusplus.blocktieredcasings.1", GT_Material_Casings.INSTANCE); + for (byte i = 0; i < 16; i = (byte) (i + 1)) { + // TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); + // Don't register these Textures, Hatches should never need to use their Textures. + } + int aIndex = 0; + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Integral Encasement I"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Integral Encasement II"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Integral Encasement III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Integral Encasement IV"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Integral Encasement V"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Integral Framework I"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Integral Framework II"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Integral Framework III"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Integral Framework IV"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Integral Framework V"); + // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); + // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); + // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); + // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); + // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder Block"); - @Override - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - int aMeta = aStack.getItemDamage(); - if (aMeta < 10) { - aList.add("Tier: "+GT_Values.VN[aMeta]); - } - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - } - - public GregtechMetaTieredCasingBlocks1() { - super(TieredCasingItemBlock.class, "gtplusplus.blocktieredcasings.1", GT_Material_Casings.INSTANCE); - for (byte i = 0; i < 16; i = (byte) (i + 1)) { - //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i)); - // Don't register these Textures, Hatches should never need to use their Textures. - } - int aIndex = 0; - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Integral Encasement I"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Integral Encasement II"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Integral Encasement III"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Integral Encasement IV"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Integral Encasement V"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Integral Framework I"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Integral Framework II"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Integral Framework III"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Integral Framework IV"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Integral Framework V"); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing"); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing"); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); - //GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder Block"); - - GregtechItemList.GTPP_Casing_ULV.set(new ItemStack(this, 1, 0)); - GregtechItemList.GTPP_Casing_LV.set(new ItemStack(this, 1, 1)); - GregtechItemList.GTPP_Casing_MV.set(new ItemStack(this, 1, 2)); - GregtechItemList.GTPP_Casing_HV.set(new ItemStack(this, 1, 3)); - GregtechItemList.GTPP_Casing_EV.set(new ItemStack(this, 1, 4)); - GregtechItemList.GTPP_Casing_IV.set(new ItemStack(this, 1, 5)); - GregtechItemList.GTPP_Casing_LuV.set(new ItemStack(this, 1, 6)); - GregtechItemList.GTPP_Casing_ZPM.set(new ItemStack(this, 1, 7)); - GregtechItemList.GTPP_Casing_UV.set(new ItemStack(this, 1, 8)); - GregtechItemList.GTPP_Casing_MAX.set(new ItemStack(this, 1, 9)); - - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 10)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 11)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 12)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 13)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 14)); - //GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 15)); - } + GregtechItemList.GTPP_Casing_ULV.set(new ItemStack(this, 1, 0)); + GregtechItemList.GTPP_Casing_LV.set(new ItemStack(this, 1, 1)); + GregtechItemList.GTPP_Casing_MV.set(new ItemStack(this, 1, 2)); + GregtechItemList.GTPP_Casing_HV.set(new ItemStack(this, 1, 3)); + GregtechItemList.GTPP_Casing_EV.set(new ItemStack(this, 1, 4)); + GregtechItemList.GTPP_Casing_IV.set(new ItemStack(this, 1, 5)); + GregtechItemList.GTPP_Casing_LuV.set(new ItemStack(this, 1, 6)); + GregtechItemList.GTPP_Casing_ZPM.set(new ItemStack(this, 1, 7)); + GregtechItemList.GTPP_Casing_UV.set(new ItemStack(this, 1, 8)); + GregtechItemList.GTPP_Casing_MAX.set(new ItemStack(this, 1, 9)); - public IIcon getIcon(int aSide, int aMeta) { - if (aMeta < 10) { - return TexturesGtBlock.TIERED_MACHINE_HULLS[aMeta].getIcon(); - } - switch (aMeta) { - case 10: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 11: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 12: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 13: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 14: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 15: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - } + // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 10)); + // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 11)); + // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 12)); + // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 13)); + // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 14)); + // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 15)); + } + public IIcon getIcon(int aSide, int aMeta) { + if (aMeta < 10) { + return TexturesGtBlock.TIERED_MACHINE_HULLS[aMeta].getIcon(); + } + switch (aMeta) { + case 10: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 11: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 12: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 13: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 14: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 15: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java index 3e4b9a3fee..7ffa95c081 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java @@ -1,111 +1,183 @@ package gtPlusPlus.xmod.gregtech.common.blocks.fluid; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; - import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; public class GregtechFluidHandler { - protected static int cellID = 0; - - public static void run(){ - start(); - } - - private static void start(){ - - /* Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239", Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemUtils.getEmptyCell(), 1000); - Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemUtils.getEmptyCell(), 1000); - */ - - if (!LoadedMods.ThermalFoundation){ - - Logger.INFO("Adding in our own GT versions of Thermal Foundation Fluids if they do not already exist."); - if (!FluidRegistry.isFluidRegistered("cryotheum")) { - FluidUtils.addGtFluid("cryotheum", "Gelid Cryotheum", GT_Materials.Cryotheum, 4, -1200, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), ItemUtils.getEmptyCell(), 1000); - } - if (!FluidRegistry.isFluidRegistered("pyrotheum")) { - FluidUtils.addGtFluid("pyrotheum", "Blazing Pyrotheum", GT_Materials.Pyrotheum, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L), ItemUtils.getEmptyCell(), 1000); - } - if (!FluidRegistry.isFluidRegistered("ender")) { - FluidUtils.addGtFluid("ender", "Resonant Ender", GT_Materials.Ender, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Ender, 1L), ItemUtils.getEmptyCell(), 1000); - } - - } - - if (LoadedMods.IndustrialCraft2){ - Logger.INFO("Adding in GT Fluids for various nuclear related content."); - - FluidUtils.addGtFluid("hydrofluoricAcid", "Industrial Strength Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("HydrofluoricAcid"); - - FluidUtils.generateFluidNoPrefix("SulfurDioxide", "High Quality Sulfur Dioxide", 263, GT_Materials.SulfurDioxide.mRGBa); - - FluidUtils.addGtFluid("sulfurousAcid", "Sulfurous Acid", GT_Materials.SulfurousAcid, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfurousAcid, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("SulfurousAcid"); - - FluidUtils.addGtFluid("sulfuricApatite", "Sulfuric Apatite Mix", GT_Materials.SulfuricApatite, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("SulfuricApatite"); - - - //Check for IHL Hydrogen Chloride - if (!LoadedMods.IHL || (ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null)){ - if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null){ - if (LoadedMods.IHL){ - Logger.INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own."); - } - else { - Logger.INFO("No Suitable versions of Hydrogen Chloride available, adding our own."); - } - FluidUtils.addGtFluid("hydrogenChloride", "Industrial Strength Hydrogen Chloride", GT_Materials.HydrogenChloride, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrogenChloride, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("HydrogenChloride"); - } - } - - - FluidUtils.addGtFluid("sulfuricLithium", "Sulfuric Lithium Mix", GT_Materials.SulfuricLithium, 4, 280, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricLithium, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("SulfuricLithium"); - - FluidUtils.addGtFluid("lithiumHydroxide", "Lithium Hydroxide", GT_Materials.LithiumHydroxide, 4, 500, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.LithiumHydroxide, 1L), ItemUtils.getEmptyCell(), 1000, false); - generateIC2FluidCell("LithiumHydroxide"); - - - } - } - - private static ItemStack generateIC2FluidCell(final String fluidNameWithCaps){ - Logger.INFO("Adding a Cell for "+fluidNameWithCaps); - if (LoadedMods.IndustrialCraft2 && !LoadedMods.IndustrialCraft2Classic){ - return Utils.createInternalNameAndFluidCell(fluidNameWithCaps); - } - return null; - } - - private static ItemStack generateIC2FluidCellNoOreDict(final String fluidNameWithCaps){ - Logger.INFO("Adding a Cell for "+fluidNameWithCaps); - if (LoadedMods.IndustrialCraft2 && !LoadedMods.IndustrialCraft2Classic){ - return Utils.createInternalNameAndFluidCellNoOreDict(fluidNameWithCaps); - } - return null; - } - + protected static int cellID = 0; + + public static void run() { + start(); + } + + private static void start() { + + /* Meta_GT_Proxy.addFluid("lubricant", "Lubricant", Materials.Lubricant, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("creosote", "Creosote Oil", Materials.Creosote, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Creosote, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("seedoil", "Seed Oil", Materials.SeedOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SeedOil, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("fishoil", "Fish Oil", Materials.FishOil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FishOil, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("oil", "Oil", Materials.Oil, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("fuel", "Diesel", Materials.Fuel, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("for.honey", "Honey", Materials.Honey, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Honey, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("biomass", "Biomass", Materials.Biomass, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Biomass, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("bioethanol", "Bio Ethanol", Materials.Ethanol, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ethanol, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("sulfuricacid", "Sulfuric Acid", Materials.SulfuricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("milk", "Milk", Materials.Milk, 1, 290, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Milk, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("mcguffium", "Mc Guffium 239", Materials.McGuffium239, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.McGuffium239, 1L), ItemUtils.getEmptyCell(), 1000); + Meta_GT_Proxy.addFluid("glue", "Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemUtils.getEmptyCell(), 1000); + */ + + if (!LoadedMods.ThermalFoundation) { + + Logger.INFO("Adding in our own GT versions of Thermal Foundation Fluids if they do not already exist."); + if (!FluidRegistry.isFluidRegistered("cryotheum")) { + FluidUtils.addGtFluid( + "cryotheum", + "Gelid Cryotheum", + GT_Materials.Cryotheum, + 4, + -1200, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), + ItemUtils.getEmptyCell(), + 1000); + } + if (!FluidRegistry.isFluidRegistered("pyrotheum")) { + FluidUtils.addGtFluid( + "pyrotheum", + "Blazing Pyrotheum", + GT_Materials.Pyrotheum, + 4, + 4000, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L), + ItemUtils.getEmptyCell(), + 1000); + } + if (!FluidRegistry.isFluidRegistered("ender")) { + FluidUtils.addGtFluid( + "ender", + "Resonant Ender", + GT_Materials.Ender, + 4, + 4000, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Ender, 1L), + ItemUtils.getEmptyCell(), + 1000); + } + } + + if (LoadedMods.IndustrialCraft2) { + Logger.INFO("Adding in GT Fluids for various nuclear related content."); + + FluidUtils.addGtFluid( + "hydrofluoricAcid", + "Industrial Strength Hydrofluoric Acid", + GT_Materials.HydrofluoricAcid, + 1, + 120, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), + ItemUtils.getEmptyCell(), + 1000, + false); + generateIC2FluidCell("HydrofluoricAcid"); + + FluidUtils.generateFluidNoPrefix( + "SulfurDioxide", "High Quality Sulfur Dioxide", 263, GT_Materials.SulfurDioxide.mRGBa); + + FluidUtils.addGtFluid( + "sulfurousAcid", + "Sulfurous Acid", + GT_Materials.SulfurousAcid, + 4, + 75, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfurousAcid, 1L), + ItemUtils.getEmptyCell(), + 1000, + false); + generateIC2FluidCell("SulfurousAcid"); + + FluidUtils.addGtFluid( + "sulfuricApatite", + "Sulfuric Apatite Mix", + GT_Materials.SulfuricApatite, + 4, + 500, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricApatite, 1L), + ItemUtils.getEmptyCell(), + 1000, + false); + generateIC2FluidCell("SulfuricApatite"); + + // Check for IHL Hydrogen Chloride + if (!LoadedMods.IHL || (ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null)) { + if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null) { + if (LoadedMods.IHL) { + Logger.INFO( + "IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own."); + } else { + Logger.INFO("No Suitable versions of Hydrogen Chloride available, adding our own."); + } + FluidUtils.addGtFluid( + "hydrogenChloride", + "Industrial Strength Hydrogen Chloride", + GT_Materials.HydrogenChloride, + 4, + 75, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrogenChloride, 1L), + ItemUtils.getEmptyCell(), + 1000, + false); + generateIC2FluidCell("HydrogenChloride"); + } + } + + FluidUtils.addGtFluid( + "sulfuricLithium", + "Sulfuric Lithium Mix", + GT_Materials.SulfuricLithium, + 4, + 280, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricLithium, 1L), + ItemUtils.getEmptyCell(), + 1000, + false); + generateIC2FluidCell("SulfuricLithium"); + + FluidUtils.addGtFluid( + "lithiumHydroxide", + "Lithium Hydroxide", + GT_Materials.LithiumHydroxide, + 4, + 500, + GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.LithiumHydroxide, 1L), + ItemUtils.getEmptyCell(), + 1000, + false); + generateIC2FluidCell("LithiumHydroxide"); + } + } + + private static ItemStack generateIC2FluidCell(final String fluidNameWithCaps) { + Logger.INFO("Adding a Cell for " + fluidNameWithCaps); + if (LoadedMods.IndustrialCraft2 && !LoadedMods.IndustrialCraft2Classic) { + return Utils.createInternalNameAndFluidCell(fluidNameWithCaps); + } + return null; + } + + private static ItemStack generateIC2FluidCellNoOreDict(final String fluidNameWithCaps) { + Logger.INFO("Adding a Cell for " + fluidNameWithCaps); + if (LoadedMods.IndustrialCraft2 && !LoadedMods.IndustrialCraft2Classic) { + return Utils.createInternalNameAndFluidCellNoOreDict(fluidNameWithCaps); + } + return null; + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java index 123df8fe0f..467602ce04 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java @@ -1,82 +1,84 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - import gregtech.api.enums.Textures; - import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; public class CasingTextureHandler { - //private static final TexturesGregtech59 gregtech59 = new TexturesGregtech59(); - //private static final TexturesGregtech58 gregtech58 = new TexturesGregtech58(); - private static final TexturesCentrifugeMultiblock gregtechX = new TexturesCentrifugeMultiblock(); - - public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - //Centrifuge - case 0: - return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); - //Coke Oven Frame - case 1: - return TexturesGtBlock.Casing_Material_Tantalloy61.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 TexturesGtBlock.Casing_Material_Potin.getIcon(); - //Broken Blue Fusion Casings - case 6: - return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); - //Maceration Stack Casings - case 7: - return TexturesGtBlock.Casing_Material_Tumbaga.getIcon(); - //Broken Pink Fusion Casings - case 8: - return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); - //Matter Fabricator Casings - case 9: - return TexturesGtBlock.TEXTURE_METAL_PANEL_F.getIcon(); - //Iron Blast Fuance Textures - case 10: - return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - //Multitank Exterior Casing - case 11: - return TexturesGtBlock.Casing_Material_Grisium.getIcon(); - //Reactor Casing I - case 12: - return TexturesGtBlock.Casing_Material_Stellite.getIcon(); - //Reactor Casing II - case 13: - return TexturesGtBlock.Casing_Material_Zeron100.getIcon(); - case 14: - return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon(); - case 15: - return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon(); - - default: - return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon(); + // private static final TexturesGregtech59 gregtech59 = new TexturesGregtech59(); + // private static final TexturesGregtech58 gregtech58 = new TexturesGregtech58(); + private static final TexturesCentrifugeMultiblock gregtechX = new TexturesCentrifugeMultiblock(); - } - } - return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon(); - } + public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + // Centrifuge + case 0: + return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); + // Coke Oven Frame + case 1: + return TexturesGtBlock.Casing_Material_Tantalloy61.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 TexturesGtBlock.Casing_Material_Potin.getIcon(); + // Broken Blue Fusion Casings + case 6: + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + // Maceration Stack Casings + case 7: + return TexturesGtBlock.Casing_Material_Tumbaga.getIcon(); + // Broken Pink Fusion Casings + case 8: + return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); + // Matter Fabricator Casings + case 9: + return TexturesGtBlock.TEXTURE_METAL_PANEL_F.getIcon(); + // Iron Blast Fuance Textures + case 10: + return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); + // Multitank Exterior Casing + case 11: + return TexturesGtBlock.Casing_Material_Grisium.getIcon(); + // Reactor Casing I + case 12: + return TexturesGtBlock.Casing_Material_Stellite.getIcon(); + // Reactor Casing II + case 13: + return TexturesGtBlock.Casing_Material_Zeron100.getIcon(); + case 14: + return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon(); + case 15: + return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon(); + default: + return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon(); + } + } + return Textures.BlockIcons.MACHINE_CASING_GEARBOX_TUNGSTENSTEEL.getIcon(); + } - public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - /*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ - return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } - return gregtech58.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);*/ - return gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } -}
\ No newline at end of file + public static IIcon handleCasingsGT( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaCasingBlocks thisBlock) { + /*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } + return gregtech58.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);*/ + return gregtechX.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java index c980997c64..20519c0bb1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java @@ -1,57 +1,53 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import net.minecraft.util.IIcon; - import gregtech.api.enums.Textures; +import net.minecraft.util.IIcon; public class CasingTextureHandler2 { - public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0: - return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); - case 1: - return TexturesGtBlock.Casing_Material_HastelloyX.getIcon(); - case 2: - return TexturesGtBlock.Casing_Material_HastelloyN.getIcon(); - case 3: - return TexturesGtBlock.Casing_Material_Fluid_IncoloyDS.getIcon(); - case 4: - return TexturesGtBlock.Casing_Material_Grisium.getIcon(); - case 5: - return TexturesGtBlock.Casing_Machine_Metal_Panel_A.getIcon(); - case 6: - return TexturesGtBlock.Casing_Machine_Metal_Grate_A.getIcon(); - case 7: - return TexturesGtBlock.Casing_Redox_1.getIcon(); - case 8: - return TexturesGtBlock.Casing_Machine_Metal_Sheet_A.getIcon(); - case 9: - return TexturesGtBlock.Overlay_Machine_Cyber_A.getIcon(); - case 10: - return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); - case 11: - return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon(); - case 12: - return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); - case 13: - if (aSide <2) { - return TexturesGtBlock.TEXTURE_TECH_A.getIcon(); - } - else { - return TexturesGtBlock.TEXTURE_TECH_B.getIcon(); - } - case 14: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); - case 15: - return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon(); - default: - return TexturesGtBlock.Overlay_UU_Matter.getIcon(); - - } - } - return TexturesGtBlock._PlaceHolder.getIcon(); - } - -}
\ No newline at end of file + public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); + case 1: + return TexturesGtBlock.Casing_Material_HastelloyX.getIcon(); + case 2: + return TexturesGtBlock.Casing_Material_HastelloyN.getIcon(); + case 3: + return TexturesGtBlock.Casing_Material_Fluid_IncoloyDS.getIcon(); + case 4: + return TexturesGtBlock.Casing_Material_Grisium.getIcon(); + case 5: + return TexturesGtBlock.Casing_Machine_Metal_Panel_A.getIcon(); + case 6: + return TexturesGtBlock.Casing_Machine_Metal_Grate_A.getIcon(); + case 7: + return TexturesGtBlock.Casing_Redox_1.getIcon(); + case 8: + return TexturesGtBlock.Casing_Machine_Metal_Sheet_A.getIcon(); + case 9: + return TexturesGtBlock.Overlay_Machine_Cyber_A.getIcon(); + case 10: + return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); + case 11: + return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon(); + case 12: + return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); + case 13: + if (aSide < 2) { + return TexturesGtBlock.TEXTURE_TECH_A.getIcon(); + } else { + return TexturesGtBlock.TEXTURE_TECH_B.getIcon(); + } + case 14: + return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + case 15: + return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon(); + default: + return TexturesGtBlock.Overlay_UU_Matter.getIcon(); + } + } + return TexturesGtBlock._PlaceHolder.getIcon(); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java index 019a432013..da2a09c7d2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java @@ -1,68 +1,66 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import net.minecraft.util.IIcon; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3; +import net.minecraft.util.IIcon; public class CasingTextureHandler3 { - public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] - if ((aMeta >= 0) && (aMeta < 16)) { - switch (aMeta) { - case 0: - //Aquatic Casing - return TexturesGtBlock.TEXTURE_METAL_PANEL_B.getIcon(); - case 1: - //Inconel Reinforced Casing - return TexturesGtBlock.TEXTURE_METAL_PANEL_D.getIcon(); - case 2: - //Multi-Use Casing - return TexturesGtBlock.TEXTURE_METAL_PANEL_C.getIcon(); - case 3: - //Trinium Plated Mining Platform Casing - return TexturesGtBlock.Casing_Trinium_Naquadah_Vent.getIcon(); - case 4: - //Vanadium Redox IV - return TexturesGtBlock.Casing_Redox_2.getIcon(); - case 5: - //Vanadium Redox LuV - return TexturesGtBlock.Casing_Redox_3.getIcon(); - case 6: - //Vanadium Redox ZPM - return TexturesGtBlock.Casing_Redox_4.getIcon(); - case 7: - //Vanadium Redox UV - return TexturesGtBlock.Casing_Redox_5.getIcon(); - case 8: - //Vanadium Redox MAX - return TexturesGtBlock.Casing_Redox_6.getIcon(); - case 9: - //Amazon Warehouse Casing - return TexturesGtBlock.TEXTURE_CASING_AMAZON.getIcon(); - case 10: - //Adv. Vac. Freezer - return TexturesGtBlock.TEXTURE_CASING_ADVANCED_CRYOGENIC.getIcon(); - case 11: - //Adv. EBF - return TexturesGtBlock.TEXTURE_CASING_ADVANCED_VOLCNUS.getIcon(); - case 12: - return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II.getIcon(); - case 13: - return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II_INNER.getIcon(); - case 14: - return TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA.getIcon(); - case 15: - return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon(); - - default: - return TexturesGtBlock._PlaceHolder.getIcon(); - - } - } - return TexturesGtBlock._PlaceHolder.getIcon(); - } + public static IIcon getIcon(final int aSide, final int aMeta) { // Texture ID's. case 0 == ID[57] + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + // Aquatic Casing + return TexturesGtBlock.TEXTURE_METAL_PANEL_B.getIcon(); + case 1: + // Inconel Reinforced Casing + return TexturesGtBlock.TEXTURE_METAL_PANEL_D.getIcon(); + case 2: + // Multi-Use Casing + return TexturesGtBlock.TEXTURE_METAL_PANEL_C.getIcon(); + case 3: + // Trinium Plated Mining Platform Casing + return TexturesGtBlock.Casing_Trinium_Naquadah_Vent.getIcon(); + case 4: + // Vanadium Redox IV + return TexturesGtBlock.Casing_Redox_2.getIcon(); + case 5: + // Vanadium Redox LuV + return TexturesGtBlock.Casing_Redox_3.getIcon(); + case 6: + // Vanadium Redox ZPM + return TexturesGtBlock.Casing_Redox_4.getIcon(); + case 7: + // Vanadium Redox UV + return TexturesGtBlock.Casing_Redox_5.getIcon(); + case 8: + // Vanadium Redox MAX + return TexturesGtBlock.Casing_Redox_6.getIcon(); + case 9: + // Amazon Warehouse Casing + return TexturesGtBlock.TEXTURE_CASING_AMAZON.getIcon(); + case 10: + // Adv. Vac. Freezer + return TexturesGtBlock.TEXTURE_CASING_ADVANCED_CRYOGENIC.getIcon(); + case 11: + // Adv. EBF + return TexturesGtBlock.TEXTURE_CASING_ADVANCED_VOLCNUS.getIcon(); + case 12: + return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II.getIcon(); + case 13: + return TexturesGtBlock.TEXTURE_CASING_FUSION_COIL_II_INNER.getIcon(); + case 14: + return TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA.getIcon(); + case 15: + return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon(); - static { - GregtechMetaCasingBlocks3.mConnectedMachineTextures = true; - } + default: + return TexturesGtBlock._PlaceHolder.getIcon(); + } + } + return TexturesGtBlock._PlaceHolder.getIcon(); + } -}
\ No newline at end of file + static { + GregtechMetaCasingBlocks3.mConnectedMachineTextures = true; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java index 6326dd2c29..2eef9d37f0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java @@ -1,6 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; @@ -12,155 +11,166 @@ import net.minecraft.world.IBlockAccess; public class TexturesCentrifugeMultiblock { - private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1"); - private static CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1"); - private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2"); - private static CustomIcon GT8_2 = new CustomIcon("iconsets/LARGECENTRIFUGE2"); - private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE3"); - private static CustomIcon GT8_3 = new CustomIcon("iconsets/LARGECENTRIFUGE3"); - private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE4"); - private static CustomIcon GT8_4 = new CustomIcon("iconsets/LARGECENTRIFUGE4"); - private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); - private static CustomIcon GT8_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5"); - private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE6"); - private static CustomIcon GT8_6 = new CustomIcon("iconsets/LARGECENTRIFUGE6"); - private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE7"); - private static CustomIcon GT8_7 = new CustomIcon("iconsets/LARGECENTRIFUGE7"); - private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE8"); - private static CustomIcon GT8_8 = new CustomIcon("iconsets/LARGECENTRIFUGE8"); - private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE9"); - private static CustomIcon GT8_9 = new CustomIcon("iconsets/LARGECENTRIFUGE9"); + private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1"); + private static CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1"); + private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2"); + private static CustomIcon GT8_2 = new CustomIcon("iconsets/LARGECENTRIFUGE2"); + private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE3"); + private static CustomIcon GT8_3 = new CustomIcon("iconsets/LARGECENTRIFUGE3"); + private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE4"); + private static CustomIcon GT8_4 = new CustomIcon("iconsets/LARGECENTRIFUGE4"); + private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE5"); + private static CustomIcon GT8_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5"); + private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE6"); + private static CustomIcon GT8_6 = new CustomIcon("iconsets/LARGECENTRIFUGE6"); + private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE7"); + private static CustomIcon GT8_7 = new CustomIcon("iconsets/LARGECENTRIFUGE7"); + private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE8"); + private static CustomIcon GT8_8 = new CustomIcon("iconsets/LARGECENTRIFUGE8"); + private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE9"); + private static CustomIcon GT8_9 = new CustomIcon("iconsets/LARGECENTRIFUGE9"); - private static CustomIcon frontFace_0 = (GT8_1); - private static CustomIcon frontFaceActive_0 = (GT8_1_Active); - private static CustomIcon frontFace_1 = (GT8_2); - private static CustomIcon frontFaceActive_1 = (GT8_2_Active); - private static CustomIcon frontFace_2 = (GT8_3); - private static CustomIcon frontFaceActive_2 = (GT8_3_Active); - private static CustomIcon frontFace_3 = (GT8_4); - private static CustomIcon frontFaceActive_3 = (GT8_4_Active); - private static CustomIcon frontFace_4 = (GT8_5); - private static CustomIcon frontFaceActive_4 = (GT8_5_Active); - private static CustomIcon frontFace_5 = (GT8_6); - private static CustomIcon frontFaceActive_5 = (GT8_6_Active); - private static CustomIcon frontFace_6 = (GT8_7); - private static CustomIcon frontFaceActive_6 = (GT8_7_Active); - private static CustomIcon frontFace_7 = (GT8_8); - private static CustomIcon frontFaceActive_7 = (GT8_8_Active); - private static CustomIcon frontFace_8 = (GT8_9); - private static CustomIcon frontFaceActive_8 = (GT8_9_Active); + private static CustomIcon frontFace_0 = (GT8_1); + private static CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static CustomIcon frontFace_1 = (GT8_2); + private static CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static CustomIcon frontFace_2 = (GT8_3); + private static CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static CustomIcon frontFace_3 = (GT8_4); + private static CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static CustomIcon frontFace_4 = (GT8_5); + private static CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static CustomIcon frontFace_5 = (GT8_6); + private static CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static CustomIcon frontFace_6 = (GT8_7); + private static CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static CustomIcon frontFace_7 = (GT8_8); + private static CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static CustomIcon frontFace_8 = (GT8_9); + private static CustomIcon frontFaceActive_8 = (GT8_9_Active); - CustomIcon[] CENTRIFUGE = new CustomIcon[]{ - frontFace_0, - frontFace_1, - frontFace_2, - frontFace_3, - frontFace_4, - frontFace_5, - frontFace_6, - frontFace_7, - frontFace_8 - }; + CustomIcon[] CENTRIFUGE = new CustomIcon[] { + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; - CustomIcon[] CENTRIFUGE_ACTIVE = new CustomIcon[]{ - frontFaceActive_0, - frontFaceActive_1, - frontFaceActive_2, - frontFaceActive_3, - frontFaceActive_4, - frontFaceActive_5, - frontFaceActive_6, - frontFaceActive_7, - frontFaceActive_8 - }; + CustomIcon[] CENTRIFUGE_ACTIVE = new CustomIcon[] { + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } + public IIcon handleCasingsGT( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaCasingBlocks thisBlock) { + return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } - private static int isCentrifugeControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (!(tTileEntity instanceof IGregTechTileEntity)) return 0; - IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity; - if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialCentrifuge && tTile.getFrontFacing() == aSide) - return tTile.isActive() ? 1 : 2; - return 0; - } + private static int isCentrifugeControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (!(tTileEntity instanceof IGregTechTileEntity)) return 0; + IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity; + if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialCentrifuge + && tTile.getFrontFacing() == aSide) return tTile.isActive() ? 1 : 2; + return 0; + } - public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (tMeta != 0) { - return CasingTextureHandler.getIcon(aSide, tMeta); - } - int tInvertLeftRightMod = aSide % 2 * 2 - 1; - switch (aSide / 2) { - case 0: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j); - } - } - } - break; - case 1: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod); - } - } - } - break; - case 2: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isCentrifugeControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod); - } - } - } - break; - } - return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); - } - - public boolean isCentrifugeRunning(IMetaTileEntity aTile) { - if (aTile == null) { - return false; - } - else { - return aTile.getBaseMetaTileEntity().isActive(); - } - - - } - - public boolean isUsingAnimatedTexture(IMetaTileEntity aMetaTileEntity) { - if (aMetaTileEntity != null) { - if (aMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) { - return ((GregtechMetaTileEntity_IndustrialCentrifuge) aMetaTileEntity).usingAnimations(); - } - } - return false; - } + public IIcon handleCasingsGT58( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaCasingBlocks thisBlock) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (tMeta != 0) { + return CasingTextureHandler.getIcon(aSide, tMeta); + } + int tInvertLeftRightMod = aSide % 2 * 2 - 1; + switch (aSide / 2) { + case 0: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) + aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i)) + .getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j); + } + } + } + break; + case 1: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + if (isCentrifugeControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) + aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord)) + .getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod); + } + } + } + break; + case 2: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + if (isCentrifugeControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) + aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j)) + .getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod); + } + } + } + break; + } + return TexturesGtBlock.Casing_Material_Centrifuge.getIcon(); + } - public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { - if (isUsingAnimatedTexture(aMetaTileEntity)) { - if (isCentrifugeRunning(aMetaTileEntity)) { - return this.CENTRIFUGE_ACTIVE[aIndex].getIcon(); - } - } - return this.CENTRIFUGE[aIndex].getIcon(); - } - + public boolean isCentrifugeRunning(IMetaTileEntity aTile) { + if (aTile == null) { + return false; + } else { + return aTile.getBaseMetaTileEntity().isActive(); + } + } + + public boolean isUsingAnimatedTexture(IMetaTileEntity aMetaTileEntity) { + if (aMetaTileEntity != null) { + if (aMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge) { + return ((GregtechMetaTileEntity_IndustrialCentrifuge) aMetaTileEntity).usingAnimations(); + } + } + return false; + } + + public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { + if (isUsingAnimatedTexture(aMetaTileEntity)) { + if (isCentrifugeRunning(aMetaTileEntity)) { + return this.CENTRIFUGE_ACTIVE[aIndex].getIcon(); + } + } + return this.CENTRIFUGE[aIndex].getIcon(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java index e772f0f48c..2298e0731e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java @@ -1,443 +1,536 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - import gregtech.api.enums.Textures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; public class TexturesGregtech58 { - 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"); - 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 - }; + 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"); + 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); - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } + 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 handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { - return CasingTextureHandler.getIcon(aSide, tMeta); - } - final 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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[0].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[3].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[6].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[1].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[7].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[8].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[5].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[2].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[0].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[3].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[6].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[1].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[7].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[8].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[5].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[2].getIcon(); - } - return this.TURBINE[2].getIcon(); - } - } - return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); - } - 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 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(); - } + public IIcon handleCasingsGT( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaCasingBlocks thisBlock) { + return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } + public IIcon handleCasingsGT58( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaCasingBlocks thisBlock) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { + return CasingTextureHandler.getIcon(aSide, tMeta); + } + final 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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[0].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[3].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[6].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[1].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[7].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[8].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[5].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[2].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[0].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[3].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[6].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[1].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[7].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[8].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[5].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[2].getIcon(); + } + return this.TURBINE[2].getIcon(); + } + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + 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 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/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java index ac721d81c3..990db20285 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java @@ -1,444 +1,545 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; - import gregtech.api.enums.Textures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialCentrifuge; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; public class TexturesGregtech59 { - private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE1"); - private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST1"); - private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE2"); - private static Textures.BlockIcons.CustomIcon GT8_2 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST2"); - private static Textures.BlockIcons.CustomIcon GT8_3_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE3"); - private static Textures.BlockIcons.CustomIcon GT8_3 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST3"); - private static Textures.BlockIcons.CustomIcon GT8_4_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE4"); - private static Textures.BlockIcons.CustomIcon GT8_4 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST4"); - private static Textures.BlockIcons.CustomIcon GT8_5_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE5"); - private static Textures.BlockIcons.CustomIcon GT8_5 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST5"); - private static Textures.BlockIcons.CustomIcon GT8_6_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE6"); - private static Textures.BlockIcons.CustomIcon GT8_6 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST6"); - private static Textures.BlockIcons.CustomIcon GT8_7_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE7"); - private static Textures.BlockIcons.CustomIcon GT8_7 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST7"); - private static Textures.BlockIcons.CustomIcon GT8_8_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE8"); - private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST8"); - private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE9"); - private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST9"); - - 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 - }; - + private static Textures.BlockIcons.CustomIcon GT8_1_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE1"); + private static Textures.BlockIcons.CustomIcon GT8_1 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST1"); + private static Textures.BlockIcons.CustomIcon GT8_2_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE2"); + private static Textures.BlockIcons.CustomIcon GT8_2 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST2"); + private static Textures.BlockIcons.CustomIcon GT8_3_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE3"); + private static Textures.BlockIcons.CustomIcon GT8_3 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST3"); + private static Textures.BlockIcons.CustomIcon GT8_4_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE4"); + private static Textures.BlockIcons.CustomIcon GT8_4 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST4"); + private static Textures.BlockIcons.CustomIcon GT8_5_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE5"); + private static Textures.BlockIcons.CustomIcon GT8_5 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST5"); + private static Textures.BlockIcons.CustomIcon GT8_6_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE6"); + private static Textures.BlockIcons.CustomIcon GT8_6 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST6"); + private static Textures.BlockIcons.CustomIcon GT8_7_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE7"); + private static Textures.BlockIcons.CustomIcon GT8_7 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST7"); + private static Textures.BlockIcons.CustomIcon GT8_8_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE8"); + private static Textures.BlockIcons.CustomIcon GT8_8 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST8"); + private static Textures.BlockIcons.CustomIcon GT8_9_Active = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE9"); + private static Textures.BlockIcons.CustomIcon GT8_9 = + new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST9"); - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); - } + 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 + }; - public IIcon handleCasingsGT59(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { - return CasingTextureHandler.getIcon(aSide, tMeta); - } - final 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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[0].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[3].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[6].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[1].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[7].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[8].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[5].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[2].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[0].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[3].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[6].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[1].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[7].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[8].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[5].getIcon(); - } - return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { - if (((IGregTechTileEntity) tTileEntity).isActive()) { - return this.TURBINE_ACTIVE[2].getIcon(); - } - return this.TURBINE[2].getIcon(); - } - } - return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); - } - 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 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(); - } + 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 handleCasingsGT( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaCasingBlocks thisBlock) { + return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock); + } + public IIcon handleCasingsGT59( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaCasingBlocks thisBlock) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) { + return CasingTextureHandler.getIcon(aSide, tMeta); + } + final 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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[0].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[3].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[6].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[1].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[7].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[8].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[5].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[2].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[0].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[3].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[6].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[1].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[7].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[8].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[5].getIcon(); + } + return this.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 GregtechMetaTileEntity_IndustrialCentrifuge))) { + if (((IGregTechTileEntity) tTileEntity).isActive()) { + return this.TURBINE_ACTIVE[2].getIcon(); + } + return this.TURBINE[2].getIcon(); + } + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + 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 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/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java index b254fdbc1e..e2d304572a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGrinderMultiblock.java @@ -1,6 +1,5 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks5; @@ -12,139 +11,146 @@ import net.minecraft.world.IBlockAccess; public class TexturesGrinderMultiblock { - private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE1"); - private static CustomIcon GT8_1 = new CustomIcon("iconsets/Grinder/GRINDER1"); - private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE2"); - private static CustomIcon GT8_2 = new CustomIcon("iconsets/Grinder/GRINDER2"); - private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE3"); - private static CustomIcon GT8_3 = new CustomIcon("iconsets/Grinder/GRINDER3"); - private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE4"); - private static CustomIcon GT8_4 = new CustomIcon("iconsets/Grinder/GRINDER4"); - private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5"); - private static CustomIcon GT8_5 = new CustomIcon("iconsets/Grinder/GRINDER5"); - private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE6"); - private static CustomIcon GT8_6 = new CustomIcon("iconsets/Grinder/GRINDER6"); - private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE7"); - private static CustomIcon GT8_7 = new CustomIcon("iconsets/Grinder/GRINDER7"); - private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE8"); - private static CustomIcon GT8_8 = new CustomIcon("iconsets/Grinder/GRINDER8"); - private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE9"); - private static CustomIcon GT8_9 = new CustomIcon("iconsets/Grinder/GRINDER9"); + private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE1"); + private static CustomIcon GT8_1 = new CustomIcon("iconsets/Grinder/GRINDER1"); + private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE2"); + private static CustomIcon GT8_2 = new CustomIcon("iconsets/Grinder/GRINDER2"); + private static CustomIcon GT8_3_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE3"); + private static CustomIcon GT8_3 = new CustomIcon("iconsets/Grinder/GRINDER3"); + private static CustomIcon GT8_4_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE4"); + private static CustomIcon GT8_4 = new CustomIcon("iconsets/Grinder/GRINDER4"); + private static CustomIcon GT8_5_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE5"); + private static CustomIcon GT8_5 = new CustomIcon("iconsets/Grinder/GRINDER5"); + private static CustomIcon GT8_6_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE6"); + private static CustomIcon GT8_6 = new CustomIcon("iconsets/Grinder/GRINDER6"); + private static CustomIcon GT8_7_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE7"); + private static CustomIcon GT8_7 = new CustomIcon("iconsets/Grinder/GRINDER7"); + private static CustomIcon GT8_8_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE8"); + private static CustomIcon GT8_8 = new CustomIcon("iconsets/Grinder/GRINDER8"); + private static CustomIcon GT8_9_Active = new CustomIcon("iconsets/Grinder/GRINDER_ACTIVE9"); + private static CustomIcon GT8_9 = new CustomIcon("iconsets/Grinder/GRINDER9"); - private static CustomIcon frontFace_0 = (GT8_1); - private static CustomIcon frontFaceActive_0 = (GT8_1_Active); - private static CustomIcon frontFace_1 = (GT8_2); - private static CustomIcon frontFaceActive_1 = (GT8_2_Active); - private static CustomIcon frontFace_2 = (GT8_3); - private static CustomIcon frontFaceActive_2 = (GT8_3_Active); - private static CustomIcon frontFace_3 = (GT8_4); - private static CustomIcon frontFaceActive_3 = (GT8_4_Active); - private static CustomIcon frontFace_4 = (GT8_5); - private static CustomIcon frontFaceActive_4 = (GT8_5_Active); - private static CustomIcon frontFace_5 = (GT8_6); - private static CustomIcon frontFaceActive_5 = (GT8_6_Active); - private static CustomIcon frontFace_6 = (GT8_7); - private static CustomIcon frontFaceActive_6 = (GT8_7_Active); - private static CustomIcon frontFace_7 = (GT8_8); - private static CustomIcon frontFaceActive_7 = (GT8_8_Active); - private static CustomIcon frontFace_8 = (GT8_9); - private static CustomIcon frontFaceActive_8 = (GT8_9_Active); + private static CustomIcon frontFace_0 = (GT8_1); + private static CustomIcon frontFaceActive_0 = (GT8_1_Active); + private static CustomIcon frontFace_1 = (GT8_2); + private static CustomIcon frontFaceActive_1 = (GT8_2_Active); + private static CustomIcon frontFace_2 = (GT8_3); + private static CustomIcon frontFaceActive_2 = (GT8_3_Active); + private static CustomIcon frontFace_3 = (GT8_4); + private static CustomIcon frontFaceActive_3 = (GT8_4_Active); + private static CustomIcon frontFace_4 = (GT8_5); + private static CustomIcon frontFaceActive_4 = (GT8_5_Active); + private static CustomIcon frontFace_5 = (GT8_6); + private static CustomIcon frontFaceActive_5 = (GT8_6_Active); + private static CustomIcon frontFace_6 = (GT8_7); + private static CustomIcon frontFaceActive_6 = (GT8_7_Active); + private static CustomIcon frontFace_7 = (GT8_8); + private static CustomIcon frontFaceActive_7 = (GT8_8_Active); + private static CustomIcon frontFace_8 = (GT8_9); + private static CustomIcon frontFaceActive_8 = (GT8_9_Active); - CustomIcon[] GRINDER = new CustomIcon[]{ - frontFace_0, - frontFace_1, - frontFace_2, - frontFace_3, - frontFace_4, - frontFace_5, - frontFace_6, - frontFace_7, - frontFace_8 - }; + CustomIcon[] GRINDER = new CustomIcon[] { + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; - CustomIcon[] GRINDER_ACTIVE = new CustomIcon[]{ - frontFaceActive_0, - frontFaceActive_1, - frontFaceActive_2, - frontFaceActive_3, - frontFaceActive_4, - frontFaceActive_5, - frontFaceActive_6, - frontFaceActive_7, - frontFaceActive_8 - }; + CustomIcon[] GRINDER_ACTIVE = new CustomIcon[] { + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; - private static int isIsaControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { - TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); - if (!(tTileEntity instanceof IGregTechTileEntity)) return 0; - IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity; - if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IsaMill && tTile.getFrontFacing() == aSide) - return tTile.isActive() ? 1 : 2; - return 0; - } + private static int isIsaControllerWithSide(IBlockAccess aWorld, int aX, int aY, int aZ, int aSide) { + TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); + if (!(tTileEntity instanceof IGregTechTileEntity)) return 0; + IGregTechTileEntity tTile = (IGregTechTileEntity) tTileEntity; + if (tTile.getMetaTileEntity() instanceof GregtechMetaTileEntity_IsaMill && tTile.getFrontFacing() == aSide) + return tTile.isActive() ? 1 : 2; + return 0; + } - public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks5 ii) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - if (tMeta != 1) { - return GregtechMetaCasingBlocks5.getStaticIcon(aSide, tMeta); - } - int tInvertLeftRightMod = aSide % 2 * 2 - 1; - switch (aSide / 2) { - case 0: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j); - } - } - } - break; - case 1: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod); - } - } - } - break; - case 2: - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) - continue; - if (isIsaControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) { - IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j)).getMetaTileEntity(); - return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod); - } - } - } - break; - } - return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon(); - } - - public boolean isCentrifugeRunning(IMetaTileEntity aTile) { - if (aTile == null) { - return false; - } - else { - return aTile.getBaseMetaTileEntity().isActive(); - } - } + public IIcon handleCasingsGT( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaCasingBlocks5 ii) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (tMeta != 1) { + return GregtechMetaCasingBlocks5.getStaticIcon(aSide, tMeta); + } + int tInvertLeftRightMod = aSide % 2 * 2 - 1; + switch (aSide / 2) { + case 0: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) + aWorld.getTileEntity(xCoord + j, yCoord, zCoord + i)) + .getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 - i * 3 - j); + } + } + } + break; + case 1: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + if (isIsaControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) + aWorld.getTileEntity(xCoord + j, yCoord + i, zCoord)) + .getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 + i * 3 - j * tInvertLeftRightMod); + } + } + } + break; + case 2: + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + if (isIsaControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, aSide) != 0) { + IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) + aWorld.getTileEntity(xCoord, yCoord + i, zCoord + j)) + .getMetaTileEntity(); + return getIconByIndex(tMetaTileEntity, 4 + i * 3 + j * tInvertLeftRightMod); + } + } + } + break; + } + return TexturesGtBlock.TEXTURE_CASING_GRINDING_MILL.getIcon(); + } - public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { - if (isCentrifugeRunning(aMetaTileEntity)) { - return this.GRINDER_ACTIVE[aIndex].getIcon(); - } - - return this.GRINDER[aIndex].getIcon(); - } - + public boolean isCentrifugeRunning(IMetaTileEntity aTile) { + if (aTile == null) { + return false; + } else { + return aTile.getBaseMetaTileEntity().isActive(); + } + } + + public IIcon getIconByIndex(IMetaTileEntity aMetaTileEntity, int aIndex) { + if (isCentrifugeRunning(aMetaTileEntity)) { + return this.GRINDER_ACTIVE[aIndex].getIcon(); + } + + return this.GRINDER[aIndex].getIcon(); + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 27c33e53b6..a0e7fd0875 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -1,773 +1,831 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - import gregtech.api.GregTech_API; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.objects.GT_RenderedTexture; - import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; public class TexturesGtBlock { - private static AutoMap<Runnable> mCustomiconMap = new AutoMap<Runnable>(); - - static { - - } - - //public static ITexture[] CASING_BLOCKS_GTPP = new ITexture[256]; - - /* - * Handles Custom Textures. - */ - - public static class CustomIcon implements IIconContainer, Runnable { - protected IIcon mIcon; - protected String mIconName; - protected String mModID; - - public CustomIcon(final String aIconName) { - this(CORE.MODID, aIconName); - } - - public CustomIcon(final String aModID, final String aIconName) { - this.mIconName = aIconName; - this.mModID = aModID; - mCustomiconMap.put(this); - Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); - GregTech_API.sGTBlockIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return null; - } - - @Override - public void run() { - this.mIcon = GregTech_API.sBlockIcons.registerIcon(this.mModID + ":" + this.mIconName); - Logger.WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath()); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; - } - } - - - public static class VanillaIcon implements IIconContainer, Runnable { - protected IIcon mIcon; - protected String mIconName; - - public VanillaIcon(final String aIconName) { - this.mIconName = aIconName; - mCustomiconMap.put(this); - Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); - GregTech_API.sGTBlockIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return null; - } - - @Override - public void run() { - this.mIcon = GregTech_API.sBlockIcons.registerIcon("minecraft" + ":" + this.mIconName); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationBlocksTexture; - } - } - - public static GT_RenderedTexture getTextureFromIcon(CustomIcon aIcon, short[] aRGB) { - return new GT_RenderedTexture(aIcon, aRGB); - } - - /* - * Add Some Custom Textures below. - * I am not sure whether or not I need to declare them as such, but better to be safe than sorry. - * Right? - */ - - //Vanilla Textures - public static final VanillaIcon VanillaIcon_OakPlanks = new VanillaIcon("planks_oak"); - - - - //PlaceHolder Texture - private static final CustomIcon Internal_PlaceHolder = new CustomIcon("TileEntities/_PlaceHolder"); - public static final CustomIcon _PlaceHolder = Internal_PlaceHolder; - - //Energy overlays - public static final CustomIcon OVERLAY_ENERGY_OUT_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_BUFFER"); - public static final CustomIcon OVERLAY_ENERGY_OUT_MULTI_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER"); - - //Wooden Shelf and Compartment Overlays - public static final CustomIcon OVERLAY_WOODEN_SHELF_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf"); - public static final CustomIcon OVERLAY_WOODEN_SHELF_CANS_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf_cans"); - public static final CustomIcon OVERLAY_WOODEN_SHELF_PAPER_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf_paper"); - public static final CustomIcon OVERLAY_CABINET_1 = new CustomIcon("TileEntities/Compartment/0"); - public static final CustomIcon OVERLAY_CABINET_2 = new CustomIcon("TileEntities/Compartment/1"); - public static final CustomIcon OVERLAY_CABINET_3 = new CustomIcon("TileEntities/Compartment/2"); - public static final CustomIcon OVERLAY_CABINET_4 = new CustomIcon("TileEntities/Compartment/3"); - public static final CustomIcon OVERLAY_CABINET_5 = new CustomIcon("TileEntities/Compartment/4"); - public static final CustomIcon OVERLAY_CABINET_6 = new CustomIcon("TileEntities/Compartment/5"); - public static final CustomIcon OVERLAY_CABINET_7 = new CustomIcon("TileEntities/Compartment/6"); - public static final CustomIcon OVERLAY_CABINET_8 = new CustomIcon("TileEntities/Compartment/7"); - public static final CustomIcon OVERLAY_CABINET_9 = new CustomIcon("TileEntities/Compartment/8"); - public static final CustomIcon OVERLAY_CABINET_10 = new CustomIcon("TileEntities/Compartment/9"); - public static final CustomIcon OVERLAY_CABINET_11 = new CustomIcon("TileEntities/Compartment/10"); - public static final CustomIcon OVERLAY_CABINET_12 = new CustomIcon("TileEntities/Compartment/11"); - public static final CustomIcon OVERLAY_CABINET_13 = new CustomIcon("TileEntities/Compartment/12"); - public static final CustomIcon OVERLAY_CABINET_14 = new CustomIcon("TileEntities/Compartment/13"); - public static final CustomIcon OVERLAY_CABINET_15 = new CustomIcon("TileEntities/Compartment/14"); - public static final CustomIcon OVERLAY_CABINET_16 = new CustomIcon("TileEntities/Compartment/15"); - public static final CustomIcon OVERLAY_COMPARTMENT_1 = new CustomIcon("TileEntities/Compartment/16"); - public static final CustomIcon OVERLAY_COMPARTMENT_2 = new CustomIcon("TileEntities/Compartment/17"); - public static final CustomIcon OVERLAY_COMPARTMENT_3 = new CustomIcon("TileEntities/Compartment/18"); - public static final CustomIcon OVERLAY_COMPARTMENT_4 = new CustomIcon("TileEntities/Compartment/19"); - public static final CustomIcon OVERLAY_COMPARTMENT_5 = new CustomIcon("TileEntities/Compartment/20"); - public static final CustomIcon OVERLAY_COMPARTMENT_6 = new CustomIcon("TileEntities/Compartment/21"); - public static final CustomIcon OVERLAY_COMPARTMENT_7 = new CustomIcon("TileEntities/Compartment/22"); - public static final CustomIcon OVERLAY_COMPARTMENT_8 = new CustomIcon("TileEntities/Compartment/23"); - public static final CustomIcon OVERLAY_COMPARTMENT_9 = new CustomIcon("TileEntities/Compartment/24"); - public static final CustomIcon OVERLAY_COMPARTMENT_10 = new CustomIcon("TileEntities/Compartment/25"); - public static final CustomIcon OVERLAY_COMPARTMENT_11 = new CustomIcon("TileEntities/Compartment/26"); - public static final CustomIcon OVERLAY_COMPARTMENT_12 = new CustomIcon("TileEntities/Compartment/27"); - public static final CustomIcon OVERLAY_COMPARTMENT_13 = new CustomIcon("TileEntities/Compartment/28"); - public static final CustomIcon OVERLAY_COMPARTMENT_14 = new CustomIcon("TileEntities/Compartment/29"); - public static final CustomIcon OVERLAY_COMPARTMENT_15 = new CustomIcon("TileEntities/Compartment/30"); - public static final CustomIcon OVERLAY_COMPARTMENT_16 = new CustomIcon("TileEntities/Compartment/31"); - - //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; - private static final CustomIcon Internal_Casing_Fusion_Simple_Front_Active = new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE"); - public static final CustomIcon Casing_Fusion_Simple_Front_Active = Internal_Casing_Fusion_Simple_Front_Active; - - //Machine Casings - //Simple - private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon("TileEntities/machine_top"); - public static final CustomIcon Casing_Machine_Simple_Top = Internal_Casing_Machine_Simple_Top; - private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = new CustomIcon("TileEntities/machine_bottom"); - public static final CustomIcon Casing_Machine_Simple_Bottom = Internal_Casing_Machine_Simple_Bottom; - //Advanced and Ultra - private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon("TileEntities/high_adv_machine"); - public static final CustomIcon Casing_Machine_Advanced = Internal_Casing_Machine_Advanced; - private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon("TileEntities/adv_machine_lesu"); - public static final CustomIcon Casing_Machine_Ultra = Internal_Casing_Machine_Ultra; - //Dimensional - Non Overlay - private static final CustomIcon Internal_Casing_Machine_Dimensional = new CustomIcon("TileEntities/adv_machine_dimensional"); - public static final CustomIcon Casing_Machine_Dimensional = Internal_Casing_Machine_Dimensional; - private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = new CustomIcon("TileEntities/high_adv_machine_dimensional"); - public static final CustomIcon Casing_Machine_Dimensional_Adv = Internal_Casing_Machine_Dimensional_Adv; - - //Material Casings - private static final CustomIcon Internal_Casing_Tantalloy61 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TANTALLOY61"); - public static final CustomIcon Casing_Material_Tantalloy61 = Internal_Casing_Tantalloy61; - private static final CustomIcon Internal_Casing_MaragingSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL"); - public static final CustomIcon Casing_Material_MaragingSteel = Internal_Casing_MaragingSteel; - private static final CustomIcon Internal_Casing_Stellite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_STELLITE"); - public static final CustomIcon Casing_Material_Stellite = Internal_Casing_Stellite; - private static final CustomIcon Internal_Casing_Talonite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TALONITE"); - public static final CustomIcon Casing_Material_Talonite = Internal_Casing_Talonite; - private static final CustomIcon Internal_Casing_Tumbaga = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TUMBAGA"); - public static final CustomIcon Casing_Material_Tumbaga = Internal_Casing_Tumbaga; - private static final CustomIcon Internal_Casing_Zeron100 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZERON100"); - public static final CustomIcon Casing_Material_Zeron100 = Internal_Casing_Zeron100; - private static final CustomIcon Internal_Casing_Potin = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_POTIN"); - public static final CustomIcon Casing_Material_Potin = Internal_Casing_Potin; - - private static final CustomIcon Internal_Casing_Grisium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_GRISIUM"); - public static final CustomIcon Casing_Material_Grisium = Internal_Casing_Grisium; - private static final CustomIcon Internal_Casing_RedSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_RED_STEEL"); - public static final CustomIcon Casing_Material_RedSteel = Internal_Casing_RedSteel; - private static final CustomIcon Internal_Casing_Incoloy020 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_020"); - public static final CustomIcon Casing_Material_Incoloy020 = Internal_Casing_Incoloy020; - private static final CustomIcon Internal_Casing_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS"); - public static final CustomIcon Casing_Material_IncoloyDS = Internal_Casing_IncoloyDS; - private static final CustomIcon Internal_Casing_IncoloyMA956 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956"); - public static final CustomIcon Casing_Material_IncoloyMA956 = Internal_Casing_IncoloyMA956; - private static final CustomIcon Internal_Casing_ZirconiumCarbide = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE"); - public static final CustomIcon Casing_Material_ZirconiumCarbide = Internal_Casing_ZirconiumCarbide; - - - private static final CustomIcon Internal_Casing_HastelloyX = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X"); - public static final CustomIcon Casing_Material_HastelloyX = Internal_Casing_HastelloyX; - private static final CustomIcon Internal_Casing_HastelloyN = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N"); - public static final CustomIcon Casing_Material_HastelloyN = Internal_Casing_HastelloyN; - private static final CustomIcon Internal_Casing_Fluid_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS"); - public static final CustomIcon Casing_Material_Fluid_IncoloyDS = Internal_Casing_Fluid_IncoloyDS; - - private static final CustomIcon Internal_Casing_Laurenium = new CustomIcon("TileEntities/MACHINE_CASING_LAURENIUM"); - public static final CustomIcon Casing_Material_Laurenium = Internal_Casing_Laurenium; - - //Trinium Alloys - public static final CustomIcon Casing_Trinium_Titanium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM"); - public static final CustomIcon Casing_Trinium_Naquadah = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH"); - public static final CustomIcon Casing_Trinium_Naquadah_Vent = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT"); - public static final CustomIcon Casing_Trinium_Naquadah_Carbon = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON"); - - //Material Machine/Firebox Casings - private static final CustomIcon Internal_Casing_Staballoy_Firebox = new CustomIcon("TileEntities/MACHINE_CASING_FIREBOX_STABALLOY"); - public static final CustomIcon Casing_Staballoy_Firebox = Internal_Casing_Staballoy_Firebox; - - //Misc Casings - private static final CustomIcon Internal_Casing_Machine_Redstone_Off = new CustomIcon("TileEntities/cover_redstone_conductor"); - public static final CustomIcon Casing_Machine_Redstone_Off = Internal_Casing_Machine_Redstone_Off; - private static final CustomIcon Internal_Casing_Machine_Redstone_On = new CustomIcon("TileEntities/cover_redstone_emitter"); - public static final CustomIcon Casing_Machine_Redstone_On = Internal_Casing_Machine_Redstone_On; - - //Redox Cells - public static final CustomIcon Casing_Redox_1 = new CustomIcon("redox/redox1"); - public static final CustomIcon Casing_Redox_2 = new CustomIcon("redox/redox2"); - public static final CustomIcon Casing_Redox_3 = new CustomIcon("redox/redox3"); - 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"); - - // Special Block 2 - public static final CustomIcon Casing_Resonance_1 = new CustomIcon("special/block_1"); - public static final CustomIcon Casing_Resonance_2 = new CustomIcon("special/block_2"); - public static final CustomIcon Casing_Resonance_3 = new CustomIcon("special/block_3"); - public static final CustomIcon Casing_Resonance_4 = new CustomIcon("special/block_4"); - public static final CustomIcon Casing_Modulator_1 = new CustomIcon("special/block_5"); - public static final CustomIcon Casing_Modulator_2 = new CustomIcon("special/block_6"); - public static final CustomIcon Casing_Modulator_3 = new CustomIcon("special/block_7"); - public static final CustomIcon Casing_Modulator_4 = new CustomIcon("special/block_8"); - - //Centrifuge Casing - private static final CustomIcon Internal_Casing_Centrifuge = new CustomIcon("TileEntities/MACHINE_CASING_CENTRIFUGE"); - public static final CustomIcon Casing_Material_Centrifuge = Internal_Casing_Centrifuge; - - //MACHINE_CASING_FARM_MANAGER_STRUCTURAL - //Farm Manager Casings - private static final CustomIcon Internal_Casing_Machine_Farm_Manager = new CustomIcon("TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); - public static final CustomIcon Casing_Machine_Farm_Manager = Internal_Casing_Machine_Farm_Manager; - //Acacia_Log - private static final CustomIcon Internal_Casing_Machine_Acacia_Log = new CustomIcon("TileEntities/log_acacia_top"); - public static final CustomIcon Casing_Machine_Acacia_Log = Internal_Casing_Machine_Acacia_Log; - //Podzol Top - private static final CustomIcon Internal_Casing_Machine_Podzol = new CustomIcon("TileEntities/dirt_podzol_top"); - public static final CustomIcon Casing_Machine_Podzol = Internal_Casing_Machine_Podzol; - - //Structural Blocks - private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A = new CustomIcon("chrono/MetalGrate"); - public static final CustomIcon Casing_Machine_Metal_Grate_A = Internal_Casing_Machine_Metal_Grate_A; - private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A_Solid = new CustomIcon("chrono/MetalGrateA_Solid"); - public static final CustomIcon Casing_Machine_Metal_Grate_A_Solid = Internal_Casing_Machine_Metal_Grate_A_Solid; - private static final CustomIcon Internal_Casing_Machine_Metal_Grate_B = new CustomIcon("chrono/MetalGrate2"); - public static final CustomIcon Casing_Machine_Metal_Grate_B = Internal_Casing_Machine_Metal_Grate_B; - private static final CustomIcon Internal_Casing_Machine_Metal_Panel_A = new CustomIcon("chrono/MetalPanel"); - public static final CustomIcon Casing_Machine_Metal_Panel_A = Internal_Casing_Machine_Metal_Panel_A; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_A = new CustomIcon("chrono/MetalSheet"); - public static final CustomIcon Casing_Machine_Metal_Sheet_A = Internal_Casing_Machine_Metal_Sheet_A; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_B = new CustomIcon("chrono/MetalSheet2"); - public static final CustomIcon Casing_Machine_Metal_Sheet_B = Internal_Casing_Machine_Metal_Sheet_B; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_C = new CustomIcon("chrono/MetalSheet3"); - public static final CustomIcon Casing_Machine_Metal_Sheet_C = Internal_Casing_Machine_Metal_Sheet_C; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_D = new CustomIcon("chrono/MetalSheet4"); - public static final CustomIcon Casing_Machine_Metal_Sheet_D = Internal_Casing_Machine_Metal_Sheet_D; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_E = new CustomIcon("chrono/MetalSheet5"); - public static final CustomIcon Casing_Machine_Metal_Sheet_E = Internal_Casing_Machine_Metal_Sheet_E; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_F = new CustomIcon("chrono/MetalSheet6"); - public static final CustomIcon Casing_Machine_Metal_Sheet_F = Internal_Casing_Machine_Metal_Sheet_F; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_G = new CustomIcon("chrono/MetalSheet7"); - public static final CustomIcon Casing_Machine_Metal_Sheet_G = Internal_Casing_Machine_Metal_Sheet_G; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_H = new CustomIcon("chrono/MetalSheet8"); - public static final CustomIcon Casing_Machine_Metal_Sheet_H = Internal_Casing_Machine_Metal_Sheet_H; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_I = new CustomIcon("chrono/MetalSheet9"); - public static final CustomIcon Casing_Machine_Metal_Sheet_I = Internal_Casing_Machine_Metal_Sheet_I; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_J = new CustomIcon("chrono/MetalSheet10"); - public static final CustomIcon Casing_Machine_Metal_Sheet_J = Internal_Casing_Machine_Metal_Sheet_J; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_K = new CustomIcon("chrono/MetalSheet11"); - public static final CustomIcon Casing_Machine_Metal_Sheet_K = Internal_Casing_Machine_Metal_Sheet_K; - private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_L = new CustomIcon("chrono/MetalSheet12"); - public static final CustomIcon Casing_Machine_Metal_Sheet_L = Internal_Casing_Machine_Metal_Sheet_L; - private static final CustomIcon Internal_Overlay_Machine_Cyber_A = new CustomIcon("chrono/CyberPanel"); - public static final CustomIcon Overlay_Machine_Cyber_A = Internal_Overlay_Machine_Cyber_A; - private static final CustomIcon Internal_Overlay_Machine_Cyber_B = new CustomIcon("chrono/CyberPanel2"); - public static final CustomIcon Overlay_Machine_Cyber_B = Internal_Overlay_Machine_Cyber_B; - - - public static final CustomIcon TEXTURE_CASING_AMAZON = new CustomIcon("TileEntities/CASING_AMAZON"); - 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_ROCKETDYNE = new CustomIcon("TileEntities/MACHINE_CASING_ROCKETDYNE"); - public static final CustomIcon TEXTURE_CASING_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_GRINDING_FACTORY"); - public static final CustomIcon TEXTURE_CASING_FLOTATION = new CustomIcon("TileEntities/MACHINE_CASING_FLOTATION"); - - // Custom Pipes - public static final CustomIcon TEXTURE_PIPE_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_PIPE_T1"); - public static final CustomIcon TEXTURE_PIPE_GENERIC = new CustomIcon("iconsets/MACHINE_CASING_PIPE_GENERIC"); - - public static final CustomIcon TEXTURE_PIPE_T1_BABBIT_ALLOY = new CustomIcon("iconsets/MACHINE_CASING_PIPE_BABBIT_ALLOY"); - public static final CustomIcon TEXTURE_PIPE_T2_INCONEL_690 = new CustomIcon("iconsets/MACHINE_CASING_PIPE_INCONEL_690"); - public static final CustomIcon TEXTURE_PIPE_T3_STELLITE = new CustomIcon("iconsets/MACHINE_CASING_PIPE_STELLITE"); - public static final CustomIcon TEXTURE_PIPE_T4_NITINOL_60 = new CustomIcon("iconsets/MACHINE_CASING_PIPE_NITINOL_60"); - public static final CustomIcon TEXTURE_PIPE_T5_LAFIUM = new CustomIcon("iconsets/MACHINE_CASING_PIPE_LAFIUM"); - public static final CustomIcon TEXTURE_PIPE_T6_CINOBITE = new CustomIcon("iconsets/MACHINE_CASING_PIPE_CINOBITE"); - public static final CustomIcon TEXTURE_PIPE_T7_TITANSTEEL = new CustomIcon("iconsets/MACHINE_CASING_PIPE_TITANSTEEL"); - public static final CustomIcon TEXTURE_PIPE_T8_ABYSSAL = new CustomIcon("iconsets/MACHINE_CASING_PIPE_ABYSSAL"); - - // Custom Gearboxes - public static final CustomIcon TEXTURE_GEARBOX_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_GEARBOX_T1"); - public static final CustomIcon TEXTURE_GEARBOX_GENERIC = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_GENERIC"); - - public static final CustomIcon TEXTURE_GEARBOX_T1_EGLIN_STEEL = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_EGLIN_STEEL"); - public static final CustomIcon TEXTURE_GEARBOX_T2_INCONEL_792 = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_INCONEL_792"); - public static final CustomIcon TEXTURE_GEARBOX_T3_INCOLOY_MA956 = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_INCOLOY_MA956"); - public static final CustomIcon TEXTURE_GEARBOX_T4_NITINOL_60 = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_NITINOL_60"); - public static final CustomIcon TEXTURE_GEARBOX_T5_ZERON_100 = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_ZERON_100"); - public static final CustomIcon TEXTURE_GEARBOX_T6_PIKYONIUM = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_PIKYONIUM"); - public static final CustomIcon TEXTURE_GEARBOX_T7_TITANSTEEL = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_TITANSTEEL"); - public static final CustomIcon TEXTURE_GEARBOX_T8_ABYSSAL = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_ABYSSAL"); - - 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"); - public static final CustomIcon Overlay_Machine_Vent = Internal_Overlay_Machine_Vent; - private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = new CustomIcon("TileEntities/machine_top_vent_rotating_fast"); - public static final CustomIcon Overlay_Machine_Vent_Fast = Internal_Overlay_Machine_Vent_Fast; - private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = new CustomIcon("TileEntities/adv_machine_vent_rotating"); - public static final CustomIcon Overlay_Machine_Vent_Adv = Internal_Overlay_Machine_Vent_Adv; - private static final CustomIcon Internal_Overlay_Machine_Turbine_Active = new CustomIcon("TileEntities/STEAM_TURBINE_SIDE_ACTIVE"); - public static final CustomIcon Overlay_Machine_Turbine_Active = Internal_Overlay_Machine_Turbine_Active; - //Grate Texture - public static final CustomIcon OVERLAY_GRATE_A = new CustomIcon("metro/OVERLAY_GRATE_A"); - //Speaker Texture - private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon("TileEntities/audio_out"); - public static final CustomIcon Overlay_Machine_Sound = Internal_Overlay_Machine_Sound; - private static final CustomIcon Internal_Overlay_Machine_Sound_Active = new CustomIcon("TileEntities/audio_out_active"); - public static final CustomIcon Overlay_Machine_Sound_Active = Internal_Overlay_Machine_Sound_Active; - //Diesel Engines - private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = new CustomIcon("TileEntities/machine_top_dieselmotor"); - public static final CustomIcon Overlay_Machine_Diesel_Vertical = Internal_Overlay_Machine_Diesel_Vertical; - private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = new CustomIcon("TileEntities/machine_top_dieselmotor2"); - public static final CustomIcon Overlay_Machine_Diesel_Horizontal = Internal_Overlay_Machine_Diesel_Horizontal; - private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = new CustomIcon("TileEntities/machine_top_dieselmotor_active"); - public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active = Internal_Overlay_Machine_Diesel_Vertical_Active; - private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = new CustomIcon("TileEntities/machine_top_dieselmotor2_active"); - public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active = Internal_Overlay_Machine_Diesel_Horizontal_Active; - //Computer Screens - private static final CustomIcon Internal_Casing_Machine_Screen_1 = new CustomIcon("TileEntities/adv_machine_screen_random1"); - public static final CustomIcon Casing_Machine_Screen_1 = Internal_Casing_Machine_Screen_1; - private static final CustomIcon Internal_Casing_Machine_Screen_2 = new CustomIcon("TileEntities/adv_machine_screen_random2"); - public static final CustomIcon Casing_Machine_Screen_2 = Internal_Casing_Machine_Screen_2; - private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon("TileEntities/adv_machine_screen_random3"); - public static final CustomIcon Casing_Machine_Screen_3 = Internal_Casing_Machine_Screen_3; - private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon("TileEntities/adv_machine_screen_frequency"); - public static final CustomIcon Casing_Machine_Screen_Frequency = Internal_Casing_Machine_Screen_Frequency; - private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = new CustomIcon("TileEntities/adv_machine_screen_logo"); - public static final CustomIcon Overlay_Machine_Screen_Logo = Internal_Overlay_Machine_Screen_Logo; - private static final CustomIcon Internal_Overlay_Machine_Cyber_Interface = new CustomIcon("chrono/Overlay_Cyber"); - public static final CustomIcon Overlay_Machine_Cyber_Interface = Internal_Overlay_Machine_Cyber_Interface; - - //Machine Controller Overlays - private static final CustomIcon Internal_Overlay_Machine_Controller_Default = new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED"); - public static final CustomIcon Overlay_Machine_Controller_Default = Internal_Overlay_Machine_Controller_Default; - private static final CustomIcon Internal_Overlay_Machine_Controller_Default_Active = new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE"); - public static final CustomIcon Overlay_Machine_Controller_Default_Active = Internal_Overlay_Machine_Controller_Default_Active; - - private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced = new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED"); - public static final CustomIcon Overlay_Machine_Controller_Advanced = Internal_Overlay_Machine_Controller_Advanced; - private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced_Active = new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE"); - public static final CustomIcon Overlay_Machine_Controller_Advanced_Active = Internal_Overlay_Machine_Controller_Advanced_Active; - - //Fluid Reactor Overlays - public static final CustomIcon Overlay_FluidReactor_Front = new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT"); - public static final CustomIcon Overlay_FluidReactor_Side = new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE"); - public static final CustomIcon Overlay_FluidReactor_Top = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP"); - public static final CustomIcon Overlay_FluidReactor_Front_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE"); - public static final CustomIcon Overlay_FluidReactor_Side_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE"); - public static final CustomIcon Overlay_FluidReactor_Top_Active = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE"); - - //Crafting Overlays - public static final CustomIcon Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting"); - public static final CustomIcon Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting"); - - public static final CustomIcon Casing_Workbench_Crafting_Overlay = new CustomIcon("TileEntities/gt4/bronze_top_crafting"); - public static final CustomIcon Casing_Workbench_Top = new CustomIcon("TileEntities/gt4/bronze_top"); - public static final CustomIcon Casing_Workbench_Side = new CustomIcon("TileEntities/gt4/bronze_side"); - public static final CustomIcon Casing_Workbench_Bottom = new CustomIcon("TileEntities/gt4/bronze_bottom"); - public static final CustomIcon Casing_Adv_Workbench_Crafting_Overlay = new CustomIcon("TileEntities/gt4/machine_top_crafting"); - public static final CustomIcon Casing_Adv_Workbench_Top = new CustomIcon("TileEntities/gt4/machine_top"); - public static final CustomIcon Casing_Adv_Workbench_Side = new CustomIcon("TileEntities/gt4/machine_side"); - public static final CustomIcon Casing_Adv_Workbench_Bottom = new CustomIcon("TileEntities/gt4/machine_bottom"); - - - public static final CustomIcon Casing_Redstone_Top_Off = new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_off"); - public static final CustomIcon Casing_Redstone_Top_Main_Off = new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_main_off"); - public static final CustomIcon Casing_Redstone_Top_On = new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_on"); - public static final CustomIcon Casing_Redstone_Top_Main_On = new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_main_on"); - - public static final CustomIcon Casing_Redstone_Side_Off = new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_off"); - public static final CustomIcon Casing_Redstone_Side_Main_Off = new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_main_off"); - public static final CustomIcon Casing_Redstone_Side_On = new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_on"); - public static final CustomIcon Casing_Redstone_Side_Main_On = new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_main_on"); - - public static final CustomIcon Casing_Redstone_Bottom_Off = new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_off"); - public static final CustomIcon Casing_Redstone_Bottom_Main_Off = new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_main_off"); - public static final CustomIcon Casing_Redstone_Bottom_On = new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_on"); - public static final CustomIcon Casing_Redstone_Bottom_Main_On = new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_main_on"); - - - public static final CustomIcon Casing_Electric_Auto_Workbench_Side = new CustomIcon("TileEntities/gt4/OVERLAY_SIDE_CABINET"); - public static final CustomIcon Casing_Computer_Cube = new CustomIcon("TileEntities/gt4/computer"); - - public static final CustomIcon Casing_CropHarvester_Cutter = new CustomIcon("TileEntities/gt4/OVERLAY_CROP"); - public static final CustomIcon Casing_CropHarvester_Boxes = new CustomIcon("TileEntities/gt4/OVERLAY_BOXES"); - - public static final CustomIcon Casing_InventoryManagaer_Cyan = new CustomIcon("TileEntities/gt4/OVERLAY_CYAN"); - public static final CustomIcon Casing_InventoryManagaer_Green = new CustomIcon("TileEntities/gt4/OVERLAY_GREEN"); - public static final CustomIcon Casing_InventoryManagaer_Purple = new CustomIcon("TileEntities/gt4/OVERLAY_PURPLE"); - public static final CustomIcon Casing_InventoryManagaer_Red = new CustomIcon("TileEntities/gt4/OVERLAY_RED"); - public static final CustomIcon Casing_InventoryManagaer_Yellow = new CustomIcon("TileEntities/gt4/OVERLAY_YELLOW"); - public static final CustomIcon Casing_InventoryManagaer_Blue = new CustomIcon("TileEntities/gt4/OVERLAY_BLUE"); - - public static final CustomIcon Casing_InventoryManagaer_Cyan_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_CYAN_REDSTONE"); - public static final CustomIcon Casing_InventoryManagaer_Green_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_GREEN_REDSTONE"); - public static final CustomIcon Casing_InventoryManagaer_Purple_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_PURPLE_REDSTONE"); - public static final CustomIcon Casing_InventoryManagaer_Red_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_RED_REDSTONE"); - public static final CustomIcon Casing_InventoryManagaer_Yellow_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_YELLOW_REDSTONE"); - public static final CustomIcon Casing_InventoryManagaer_Blue_Redstone = new CustomIcon("TileEntities/gt4/OVERLAY_BLUE_REDSTONE"); - - private static final CustomIcon Casing_Test_1 = new CustomIcon("number/1"); - private static final CustomIcon Casing_Test_2 = new CustomIcon("number/2"); - private static final CustomIcon Casing_Test_3 = new CustomIcon("number/3"); - private static final CustomIcon Casing_Test_4 = new CustomIcon("number/4"); - private static final CustomIcon Casing_Test_5 = new CustomIcon("number/5"); - private static final CustomIcon Casing_Test_6 = new CustomIcon("number/6"); - private static final CustomIcon Casing_Test_7 = new CustomIcon("number/7"); - private static final CustomIcon Casing_Test_8 = new CustomIcon("number/8"); - private static final CustomIcon Casing_Test_9 = new CustomIcon("number/9"); - private static final CustomIcon Casing_Test_10 = new CustomIcon("number/10"); - private static final CustomIcon Casing_Test_11 = new CustomIcon("number/11"); - private static final CustomIcon Casing_Test_12 = new CustomIcon("number/12"); - private static final CustomIcon Casing_Test_13 = new CustomIcon("number/13"); - private static final CustomIcon Casing_Test_14 = new CustomIcon("number/14"); - private static final CustomIcon Casing_Test_15 = new CustomIcon("number/15"); - private static final CustomIcon Casing_Test_16 = new CustomIcon("number/16"); - - public static final CustomIcon[] TEST_NUMBER = new CustomIcon[] { - Casing_Test_1, Casing_Test_2, Casing_Test_3, Casing_Test_4, - Casing_Test_5, Casing_Test_6, Casing_Test_7, Casing_Test_8, - Casing_Test_9, Casing_Test_10, Casing_Test_11, Casing_Test_12, - Casing_Test_13, Casing_Test_14, Casing_Test_15, Casing_Test_16 - - }; - - //Covers - private static final CustomIcon Internal_Overlay_Overflow_Valve = new CustomIcon("iconsets/OVERLAY_OVERFLOW_VALVE"); - public static final CustomIcon Overlay_Overflow_Valve = Internal_Overlay_Overflow_Valve; - - - //Hatch Overlays - //Charger Texture - private static final CustomIcon Internal_Overlay_Hatch_Charger = new CustomIcon("TileEntities/cover_charger"); - public static final CustomIcon Overlay_Hatch_Charger = Internal_Overlay_Hatch_Charger; - //Discharger Texture - private static final CustomIcon Internal_Overlay_Hatch_Discharger = new CustomIcon("TileEntities/cover_discharge"); - public static final CustomIcon Overlay_Hatch_Discharger = Internal_Overlay_Hatch_Discharger; - //Advanced Muffler - private static final CustomIcon Internal_Overlay_Hatch_Muffler_Adv = new CustomIcon("iconsets/OVERLAY_MUFFLER_ADV"); - public static final CustomIcon Overlay_Hatch_Muffler_Adv = Internal_Overlay_Hatch_Muffler_Adv; - //Control Core Bus - private static final CustomIcon Internal_Overlay_Hatch_Control_Core = new CustomIcon("iconsets/OVERLAY_CONTROL_CORE_BUS"); - public static final CustomIcon Overlay_Hatch_Control_Core = Internal_Overlay_Hatch_Control_Core; - // Milling Ball Bus - private static final CustomIcon Internal_Overlay_Bus_Milling_Balls = new CustomIcon("iconsets/OVERLAY_MILLING_BALL_BUS"); - public static final CustomIcon Overlay_Bus_Milling_Balls = Internal_Overlay_Bus_Milling_Balls; - // Catalyst Bus - private static final CustomIcon Internal_Overlay_Bus_Catalyst = new CustomIcon("iconsets/OVERLAY_CATALYSTS"); - public static final CustomIcon Overlay_Bus_Catalyst = Internal_Overlay_Bus_Catalyst; - - - public static final CustomIcon Overlay_Cobble = new CustomIcon("iconsets/OVERLAY_COBBLE"); - public static final CustomIcon Overlay_Connector = new CustomIcon("iconsets/OVERLAY_CONNECTOR"); - public static final CustomIcon Overlay_Fire = new CustomIcon("iconsets/OVERLAY_FIRE"); - public static final CustomIcon Overlay_Grinder = new CustomIcon("iconsets/OVERLAY_GRINDER"); - public static final CustomIcon Overlay_GT_Logo = new CustomIcon("iconsets/OVERLAY_GT"); - public static final CustomIcon Overlay_Ice = new CustomIcon("iconsets/OVERLAY_ICE"); - public static final CustomIcon Overlay_Implosion = new CustomIcon("iconsets/OVERLAY_IMPLOSION"); - // Lapo Orb Hatch - public static final CustomIcon Overlay_Hatch_Lapo_Orb = new CustomIcon("iconsets/OVERLAY_LAPO"); - // Data Orb Hatch - public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERLAY_DATA_ORB"); - - // RTG Hatch - private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); - public static final CustomIcon Overlay_Hatch_RTG_Off = Internal_Overlay_Hatch_RTG_Off; - private static final CustomIcon Internal_Overlay_Hatch_RTG_On = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_ON"); - public static final CustomIcon Overlay_Hatch_RTG_On = Internal_Overlay_Hatch_RTG_On; - - //Dimensional - private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue"); - public static final CustomIcon Overlay_Machine_Dimensional_Blue = Internal_Overlay_Machine_Dimensional_Blue; - private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = new CustomIcon("TileEntities/adv_machine_dimensional_cover_orange"); - public static final CustomIcon Overlay_Machine_Dimensional_Orange = Internal_Overlay_Machine_Dimensional_Orange; - //Icons - private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab"); - public static final CustomIcon Overlay_MatterFab = Internal_Overlay_MatterFab; - private static final CustomIcon Internal_Overlay_MatterFab_Active = new CustomIcon("TileEntities/adv_machine_matterfab_active"); - public static final CustomIcon Overlay_MatterFab_Active = Internal_Overlay_MatterFab_Active; - - private static final CustomIcon Internal_Overlay_MatterFab_Animated = new CustomIcon("TileEntities/adv_machine_matterfab_animated"); - public static final CustomIcon Overlay_MatterFab_Animated = Internal_Overlay_MatterFab_Animated; - private static final CustomIcon Internal_Overlay_MatterFab_Active_Animated = new CustomIcon("TileEntities/adv_machine_matterfab_active_animated"); - public static final CustomIcon Overlay_MatterFab_Active_Animated = Internal_Overlay_MatterFab_Active_Animated; - - private static final CustomIcon Internal_Overlay_Oil = new CustomIcon("TileEntities/adv_machine_oil"); - public static final CustomIcon Overlay_Oil = Internal_Overlay_Oil; - private static final CustomIcon Internal_Overlay_Water = new CustomIcon("TileEntities/adv_machine_water"); - public static final CustomIcon Overlay_Water = Internal_Overlay_Water; - private static final CustomIcon Internal_Overlay_UU_Matter = new CustomIcon("TileEntities/adv_machine_uum"); - public static final CustomIcon Overlay_UU_Matter = Internal_Overlay_UU_Matter; - - // GT++ Tiered Hulls - public static final CustomIcon TEXTURE_CASING_TIERED_ULV = new CustomIcon("iconsets/TieredHulls/CASING_ULV"); - public static final CustomIcon TEXTURE_CASING_TIERED_LV = new CustomIcon("iconsets/TieredHulls/CASING_LV"); - public static final CustomIcon TEXTURE_CASING_TIERED_MV = new CustomIcon("iconsets/TieredHulls/CASING_MV"); - public static final CustomIcon TEXTURE_CASING_TIERED_HV = new CustomIcon("iconsets/TieredHulls/CASING_HV"); - public static final CustomIcon TEXTURE_CASING_TIERED_EV = new CustomIcon("iconsets/TieredHulls/CASING_EV"); - public static final CustomIcon TEXTURE_CASING_TIERED_IV = new CustomIcon("iconsets/TieredHulls/CASING_IV"); - public static final CustomIcon TEXTURE_CASING_TIERED_LuV = new CustomIcon("iconsets/TieredHulls/CASING_LuV"); - public static final CustomIcon TEXTURE_CASING_TIERED_ZPM = new CustomIcon("iconsets/TieredHulls/CASING_ZPM"); - public static final CustomIcon TEXTURE_CASING_TIERED_UV = new CustomIcon("iconsets/TieredHulls/CASING_UV"); - public static final CustomIcon TEXTURE_CASING_TIERED_MAX = new CustomIcon("iconsets/TieredHulls/CASING_MAX"); - - //Metroid related - public static final CustomIcon TEXTURE_METAL_PANEL_A = new CustomIcon("metro/TEXTURE_METAL_PANEL_A"); - public static final CustomIcon TEXTURE_METAL_PANEL_B = new CustomIcon("metro/TEXTURE_METAL_PANEL_B"); - public static final CustomIcon TEXTURE_METAL_PANEL_C = new CustomIcon("metro/TEXTURE_METAL_PANEL_C"); - public static final CustomIcon TEXTURE_METAL_PANEL_D = new CustomIcon("metro/TEXTURE_METAL_PANEL_D"); - public static final CustomIcon TEXTURE_METAL_PANEL_E = new CustomIcon("metro/TEXTURE_METAL_PANEL_E"); - public static final CustomIcon TEXTURE_METAL_PANEL_F = new CustomIcon("metro/TEXTURE_METAL_PANEL_F"); - public static final CustomIcon TEXTURE_METAL_PANEL_G = new CustomIcon("metro/TEXTURE_METAL_PANEL_G"); - public static final CustomIcon TEXTURE_METAL_PANEL_H = new CustomIcon("metro/TEXTURE_METAL_PANEL_H"); - public static final CustomIcon TEXTURE_METAL_PANEL_I = new CustomIcon("metro/TEXTURE_METAL_PANEL_I"); - - public static final CustomIcon TEXTURE_MAGIC_PANEL_A = new CustomIcon("metro/TEXTURE_MAGIC_A"); - public static final CustomIcon TEXTURE_MAGIC_PANEL_B = new CustomIcon("metro/TEXTURE_MAGIC_B"); - - public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A"); - public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A_GLOWING"); - - public static final CustomIcon TEXTURE_STONE_BIRD_A = new CustomIcon("metro/TEXTURE_STONE_BIRD_A"); - public static final CustomIcon TEXTURE_STONE_BIRD_A_LEFT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_LEFT"); - public static final CustomIcon TEXTURE_STONE_BIRD_A_RIGHT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_RIGHT"); - public static final CustomIcon TEXTURE_STONE_RED_A = new CustomIcon("metro/TEXTURE_STONE_RED_A"); - public static final CustomIcon TEXTURE_STONE_RED_B = new CustomIcon("metro/TEXTURE_STONE_RED_B"); - public static final CustomIcon TEXTURE_STONE_BLUE_A = new CustomIcon("metro/TEXTURE_STONE_BLUE_A"); - public static final CustomIcon TEXTURE_STONE_GREEN_A = new CustomIcon("metro/TEXTURE_STONE_GREEN_A"); - public static final CustomIcon TEXTURE_STONE_TABLET_A = new CustomIcon("metro/TEXTURE_STONE_TABLET_A"); - public static final CustomIcon TEXTURE_STONE_TABLET_B = new CustomIcon("metro/TEXTURE_STONE_TABLET_B"); - - public static final CustomIcon TEXTURE_TECH_A = new CustomIcon("metro/TEXTURE_TECH_A"); - public static final CustomIcon TEXTURE_TECH_B = new CustomIcon("metro/TEXTURE_TECH_B"); - 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"); - public static final CustomIcon TEXTURE_TECH_PANEL_B = new CustomIcon("metro/TEXTURE_TECH_PANEL_B"); - public static final CustomIcon TEXTURE_TECH_PANEL_C = new CustomIcon("metro/TEXTURE_TECH_PANEL_C"); - public static final CustomIcon TEXTURE_TECH_PANEL_D = new CustomIcon("metro/TEXTURE_TECH_PANEL_D"); - public static final CustomIcon TEXTURE_TECH_PANEL_E = new CustomIcon("metro/TEXTURE_TECH_PANEL_E"); - public static final CustomIcon TEXTURE_TECH_PANEL_F = new CustomIcon("metro/TEXTURE_TECH_PANEL_F"); - public static final CustomIcon TEXTURE_TECH_PANEL_G = new CustomIcon("metro/TEXTURE_TECH_PANEL_G"); - public static final CustomIcon TEXTURE_TECH_PANEL_H = new CustomIcon("metro/TEXTURE_TECH_PANEL_H"); - public static final CustomIcon TEXTURE_TECH_PANEL_I = new CustomIcon("metro/TEXTURE_TECH_PANEL_I"); - - public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE = new CustomIcon("TileEntities/DecayablesChest_bottom"); - public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE_ALT = new CustomIcon("TileEntities/DecayablesChest_top"); - - // LFTR Single blocks - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP"); - public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE"); - - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP"); - public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE"); - - - //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}),}; - - public static IIconContainer[] CONNECTED_FUSION_HULLS = new IIconContainer[]{ - TEXTURE_CASING_FUSION_COIL_II_1, TEXTURE_CASING_FUSION_COIL_II_2, TEXTURE_CASING_FUSION_COIL_II_3, - TEXTURE_CASING_FUSION_COIL_II_4, TEXTURE_CASING_FUSION_COIL_II_5, TEXTURE_CASING_FUSION_COIL_II_6, - TEXTURE_CASING_FUSION_COIL_II_7, TEXTURE_CASING_FUSION_COIL_II_8, TEXTURE_CASING_FUSION_COIL_II_9, - TEXTURE_CASING_FUSION_COIL_II_10, TEXTURE_CASING_FUSION_COIL_II_11, TEXTURE_CASING_FUSION_COIL_II_12}; - - public static IIconContainer[] TIERED_MACHINE_HULLS = new IIconContainer[]{ - TEXTURE_CASING_TIERED_ULV, - TEXTURE_CASING_TIERED_LV, - TEXTURE_CASING_TIERED_MV, - TEXTURE_CASING_TIERED_HV, - TEXTURE_CASING_TIERED_EV, - TEXTURE_CASING_TIERED_IV, - TEXTURE_CASING_TIERED_LuV, - TEXTURE_CASING_TIERED_ZPM, - TEXTURE_CASING_TIERED_UV, - TEXTURE_CASING_TIERED_MAX}; - - - public static Object Casing_Material_Turbine; - - + private static AutoMap<Runnable> mCustomiconMap = new AutoMap<Runnable>(); + + static { + } + + // public static ITexture[] CASING_BLOCKS_GTPP = new ITexture[256]; + + /* + * Handles Custom Textures. + */ + + public static class CustomIcon implements IIconContainer, Runnable { + protected IIcon mIcon; + protected String mIconName; + protected String mModID; + + public CustomIcon(final String aIconName) { + this(CORE.MODID, aIconName); + } + + public CustomIcon(final String aModID, final String aIconName) { + this.mIconName = aIconName; + this.mModID = aModID; + mCustomiconMap.put(this); + Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); + GregTech_API.sGTBlockIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return null; + } + + @Override + public void run() { + this.mIcon = GregTech_API.sBlockIcons.registerIcon(this.mModID + ":" + this.mIconName); + Logger.WARNING( + "FIND ME _ Processing texture: " + this.getTextureFile().getResourcePath()); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; + } + } + + public static class VanillaIcon implements IIconContainer, Runnable { + protected IIcon mIcon; + protected String mIconName; + + public VanillaIcon(final String aIconName) { + this.mIconName = aIconName; + mCustomiconMap.put(this); + Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); + GregTech_API.sGTBlockIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return null; + } + + @Override + public void run() { + this.mIcon = GregTech_API.sBlockIcons.registerIcon("minecraft" + ":" + this.mIconName); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationBlocksTexture; + } + } + + public static GT_RenderedTexture getTextureFromIcon(CustomIcon aIcon, short[] aRGB) { + return new GT_RenderedTexture(aIcon, aRGB); + } + + /* + * Add Some Custom Textures below. + * I am not sure whether or not I need to declare them as such, but better to be safe than sorry. + * Right? + */ + + // Vanilla Textures + public static final VanillaIcon VanillaIcon_OakPlanks = new VanillaIcon("planks_oak"); + + // PlaceHolder Texture + private static final CustomIcon Internal_PlaceHolder = new CustomIcon("TileEntities/_PlaceHolder"); + public static final CustomIcon _PlaceHolder = Internal_PlaceHolder; + + // Energy overlays + public static final CustomIcon OVERLAY_ENERGY_OUT_BUFFER = new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_BUFFER"); + public static final CustomIcon OVERLAY_ENERGY_OUT_MULTI_BUFFER = + new CustomIcon("iconsets/OVERLAY_ENERGY_OUT_MULTI_BUFFER"); + + // Wooden Shelf and Compartment Overlays + public static final CustomIcon OVERLAY_WOODEN_SHELF_FRONT = new CustomIcon("TileEntities/Compartment/wood_shelf"); + public static final CustomIcon OVERLAY_WOODEN_SHELF_CANS_FRONT = + new CustomIcon("TileEntities/Compartment/wood_shelf_cans"); + public static final CustomIcon OVERLAY_WOODEN_SHELF_PAPER_FRONT = + new CustomIcon("TileEntities/Compartment/wood_shelf_paper"); + public static final CustomIcon OVERLAY_CABINET_1 = new CustomIcon("TileEntities/Compartment/0"); + public static final CustomIcon OVERLAY_CABINET_2 = new CustomIcon("TileEntities/Compartment/1"); + public static final CustomIcon OVERLAY_CABINET_3 = new CustomIcon("TileEntities/Compartment/2"); + public static final CustomIcon OVERLAY_CABINET_4 = new CustomIcon("TileEntities/Compartment/3"); + public static final CustomIcon OVERLAY_CABINET_5 = new CustomIcon("TileEntities/Compartment/4"); + public static final CustomIcon OVERLAY_CABINET_6 = new CustomIcon("TileEntities/Compartment/5"); + public static final CustomIcon OVERLAY_CABINET_7 = new CustomIcon("TileEntities/Compartment/6"); + public static final CustomIcon OVERLAY_CABINET_8 = new CustomIcon("TileEntities/Compartment/7"); + public static final CustomIcon OVERLAY_CABINET_9 = new CustomIcon("TileEntities/Compartment/8"); + public static final CustomIcon OVERLAY_CABINET_10 = new CustomIcon("TileEntities/Compartment/9"); + public static final CustomIcon OVERLAY_CABINET_11 = new CustomIcon("TileEntities/Compartment/10"); + public static final CustomIcon OVERLAY_CABINET_12 = new CustomIcon("TileEntities/Compartment/11"); + public static final CustomIcon OVERLAY_CABINET_13 = new CustomIcon("TileEntities/Compartment/12"); + public static final CustomIcon OVERLAY_CABINET_14 = new CustomIcon("TileEntities/Compartment/13"); + public static final CustomIcon OVERLAY_CABINET_15 = new CustomIcon("TileEntities/Compartment/14"); + public static final CustomIcon OVERLAY_CABINET_16 = new CustomIcon("TileEntities/Compartment/15"); + public static final CustomIcon OVERLAY_COMPARTMENT_1 = new CustomIcon("TileEntities/Compartment/16"); + public static final CustomIcon OVERLAY_COMPARTMENT_2 = new CustomIcon("TileEntities/Compartment/17"); + public static final CustomIcon OVERLAY_COMPARTMENT_3 = new CustomIcon("TileEntities/Compartment/18"); + public static final CustomIcon OVERLAY_COMPARTMENT_4 = new CustomIcon("TileEntities/Compartment/19"); + public static final CustomIcon OVERLAY_COMPARTMENT_5 = new CustomIcon("TileEntities/Compartment/20"); + public static final CustomIcon OVERLAY_COMPARTMENT_6 = new CustomIcon("TileEntities/Compartment/21"); + public static final CustomIcon OVERLAY_COMPARTMENT_7 = new CustomIcon("TileEntities/Compartment/22"); + public static final CustomIcon OVERLAY_COMPARTMENT_8 = new CustomIcon("TileEntities/Compartment/23"); + public static final CustomIcon OVERLAY_COMPARTMENT_9 = new CustomIcon("TileEntities/Compartment/24"); + public static final CustomIcon OVERLAY_COMPARTMENT_10 = new CustomIcon("TileEntities/Compartment/25"); + public static final CustomIcon OVERLAY_COMPARTMENT_11 = new CustomIcon("TileEntities/Compartment/26"); + public static final CustomIcon OVERLAY_COMPARTMENT_12 = new CustomIcon("TileEntities/Compartment/27"); + public static final CustomIcon OVERLAY_COMPARTMENT_13 = new CustomIcon("TileEntities/Compartment/28"); + public static final CustomIcon OVERLAY_COMPARTMENT_14 = new CustomIcon("TileEntities/Compartment/29"); + public static final CustomIcon OVERLAY_COMPARTMENT_15 = new CustomIcon("TileEntities/Compartment/30"); + public static final CustomIcon OVERLAY_COMPARTMENT_16 = new CustomIcon("TileEntities/Compartment/31"); + + // 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; + private static final CustomIcon Internal_Casing_Fusion_Simple_Front_Active = + new CustomIcon("TileEntities/MACHINE_CASING_FUSION_FRONT_ACTIVE"); + public static final CustomIcon Casing_Fusion_Simple_Front_Active = Internal_Casing_Fusion_Simple_Front_Active; + + // Machine Casings + // Simple + private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon("TileEntities/machine_top"); + public static final CustomIcon Casing_Machine_Simple_Top = Internal_Casing_Machine_Simple_Top; + private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = + new CustomIcon("TileEntities/machine_bottom"); + public static final CustomIcon Casing_Machine_Simple_Bottom = Internal_Casing_Machine_Simple_Bottom; + // Advanced and Ultra + private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon("TileEntities/high_adv_machine"); + public static final CustomIcon Casing_Machine_Advanced = Internal_Casing_Machine_Advanced; + private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon("TileEntities/adv_machine_lesu"); + public static final CustomIcon Casing_Machine_Ultra = Internal_Casing_Machine_Ultra; + // Dimensional - Non Overlay + private static final CustomIcon Internal_Casing_Machine_Dimensional = + new CustomIcon("TileEntities/adv_machine_dimensional"); + public static final CustomIcon Casing_Machine_Dimensional = Internal_Casing_Machine_Dimensional; + private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = + new CustomIcon("TileEntities/high_adv_machine_dimensional"); + public static final CustomIcon Casing_Machine_Dimensional_Adv = Internal_Casing_Machine_Dimensional_Adv; + + // Material Casings + private static final CustomIcon Internal_Casing_Tantalloy61 = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TANTALLOY61"); + public static final CustomIcon Casing_Material_Tantalloy61 = Internal_Casing_Tantalloy61; + private static final CustomIcon Internal_Casing_MaragingSteel = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL"); + public static final CustomIcon Casing_Material_MaragingSteel = Internal_Casing_MaragingSteel; + private static final CustomIcon Internal_Casing_Stellite = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_STELLITE"); + public static final CustomIcon Casing_Material_Stellite = Internal_Casing_Stellite; + private static final CustomIcon Internal_Casing_Talonite = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TALONITE"); + public static final CustomIcon Casing_Material_Talonite = Internal_Casing_Talonite; + private static final CustomIcon Internal_Casing_Tumbaga = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TUMBAGA"); + public static final CustomIcon Casing_Material_Tumbaga = Internal_Casing_Tumbaga; + private static final CustomIcon Internal_Casing_Zeron100 = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZERON100"); + public static final CustomIcon Casing_Material_Zeron100 = Internal_Casing_Zeron100; + private static final CustomIcon Internal_Casing_Potin = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_POTIN"); + public static final CustomIcon Casing_Material_Potin = Internal_Casing_Potin; + + private static final CustomIcon Internal_Casing_Grisium = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_GRISIUM"); + public static final CustomIcon Casing_Material_Grisium = Internal_Casing_Grisium; + private static final CustomIcon Internal_Casing_RedSteel = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_RED_STEEL"); + public static final CustomIcon Casing_Material_RedSteel = Internal_Casing_RedSteel; + private static final CustomIcon Internal_Casing_Incoloy020 = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_020"); + public static final CustomIcon Casing_Material_Incoloy020 = Internal_Casing_Incoloy020; + private static final CustomIcon Internal_Casing_IncoloyDS = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS"); + public static final CustomIcon Casing_Material_IncoloyDS = Internal_Casing_IncoloyDS; + private static final CustomIcon Internal_Casing_IncoloyMA956 = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956"); + public static final CustomIcon Casing_Material_IncoloyMA956 = Internal_Casing_IncoloyMA956; + private static final CustomIcon Internal_Casing_ZirconiumCarbide = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE"); + public static final CustomIcon Casing_Material_ZirconiumCarbide = Internal_Casing_ZirconiumCarbide; + + private static final CustomIcon Internal_Casing_HastelloyX = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X"); + public static final CustomIcon Casing_Material_HastelloyX = Internal_Casing_HastelloyX; + private static final CustomIcon Internal_Casing_HastelloyN = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N"); + public static final CustomIcon Casing_Material_HastelloyN = Internal_Casing_HastelloyN; + private static final CustomIcon Internal_Casing_Fluid_IncoloyDS = + new CustomIcon("TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS"); + public static final CustomIcon Casing_Material_Fluid_IncoloyDS = Internal_Casing_Fluid_IncoloyDS; + + private static final CustomIcon Internal_Casing_Laurenium = new CustomIcon("TileEntities/MACHINE_CASING_LAURENIUM"); + public static final CustomIcon Casing_Material_Laurenium = Internal_Casing_Laurenium; + + // Trinium Alloys + public static final CustomIcon Casing_Trinium_Titanium = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_TITANIUM"); + public static final CustomIcon Casing_Trinium_Naquadah = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH"); + public static final CustomIcon Casing_Trinium_Naquadah_Vent = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_VENT"); + public static final CustomIcon Casing_Trinium_Naquadah_Carbon = + new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TRINIUM_NAQUADAH_CARBON"); + + // Material Machine/Firebox Casings + private static final CustomIcon Internal_Casing_Staballoy_Firebox = + new CustomIcon("TileEntities/MACHINE_CASING_FIREBOX_STABALLOY"); + public static final CustomIcon Casing_Staballoy_Firebox = Internal_Casing_Staballoy_Firebox; + + // Misc Casings + private static final CustomIcon Internal_Casing_Machine_Redstone_Off = + new CustomIcon("TileEntities/cover_redstone_conductor"); + public static final CustomIcon Casing_Machine_Redstone_Off = Internal_Casing_Machine_Redstone_Off; + private static final CustomIcon Internal_Casing_Machine_Redstone_On = + new CustomIcon("TileEntities/cover_redstone_emitter"); + public static final CustomIcon Casing_Machine_Redstone_On = Internal_Casing_Machine_Redstone_On; + + // Redox Cells + public static final CustomIcon Casing_Redox_1 = new CustomIcon("redox/redox1"); + public static final CustomIcon Casing_Redox_2 = new CustomIcon("redox/redox2"); + public static final CustomIcon Casing_Redox_3 = new CustomIcon("redox/redox3"); + 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"); + + // Special Block 2 + public static final CustomIcon Casing_Resonance_1 = new CustomIcon("special/block_1"); + public static final CustomIcon Casing_Resonance_2 = new CustomIcon("special/block_2"); + public static final CustomIcon Casing_Resonance_3 = new CustomIcon("special/block_3"); + public static final CustomIcon Casing_Resonance_4 = new CustomIcon("special/block_4"); + public static final CustomIcon Casing_Modulator_1 = new CustomIcon("special/block_5"); + public static final CustomIcon Casing_Modulator_2 = new CustomIcon("special/block_6"); + public static final CustomIcon Casing_Modulator_3 = new CustomIcon("special/block_7"); + public static final CustomIcon Casing_Modulator_4 = new CustomIcon("special/block_8"); + + // Centrifuge Casing + private static final CustomIcon Internal_Casing_Centrifuge = + new CustomIcon("TileEntities/MACHINE_CASING_CENTRIFUGE"); + public static final CustomIcon Casing_Material_Centrifuge = Internal_Casing_Centrifuge; + + // MACHINE_CASING_FARM_MANAGER_STRUCTURAL + // Farm Manager Casings + private static final CustomIcon Internal_Casing_Machine_Farm_Manager = + new CustomIcon("TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL"); + public static final CustomIcon Casing_Machine_Farm_Manager = Internal_Casing_Machine_Farm_Manager; + // Acacia_Log + private static final CustomIcon Internal_Casing_Machine_Acacia_Log = new CustomIcon("TileEntities/log_acacia_top"); + public static final CustomIcon Casing_Machine_Acacia_Log = Internal_Casing_Machine_Acacia_Log; + // Podzol Top + private static final CustomIcon Internal_Casing_Machine_Podzol = new CustomIcon("TileEntities/dirt_podzol_top"); + public static final CustomIcon Casing_Machine_Podzol = Internal_Casing_Machine_Podzol; + + // Structural Blocks + private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A = new CustomIcon("chrono/MetalGrate"); + public static final CustomIcon Casing_Machine_Metal_Grate_A = Internal_Casing_Machine_Metal_Grate_A; + private static final CustomIcon Internal_Casing_Machine_Metal_Grate_A_Solid = + new CustomIcon("chrono/MetalGrateA_Solid"); + public static final CustomIcon Casing_Machine_Metal_Grate_A_Solid = Internal_Casing_Machine_Metal_Grate_A_Solid; + private static final CustomIcon Internal_Casing_Machine_Metal_Grate_B = new CustomIcon("chrono/MetalGrate2"); + public static final CustomIcon Casing_Machine_Metal_Grate_B = Internal_Casing_Machine_Metal_Grate_B; + private static final CustomIcon Internal_Casing_Machine_Metal_Panel_A = new CustomIcon("chrono/MetalPanel"); + public static final CustomIcon Casing_Machine_Metal_Panel_A = Internal_Casing_Machine_Metal_Panel_A; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_A = new CustomIcon("chrono/MetalSheet"); + public static final CustomIcon Casing_Machine_Metal_Sheet_A = Internal_Casing_Machine_Metal_Sheet_A; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_B = new CustomIcon("chrono/MetalSheet2"); + public static final CustomIcon Casing_Machine_Metal_Sheet_B = Internal_Casing_Machine_Metal_Sheet_B; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_C = new CustomIcon("chrono/MetalSheet3"); + public static final CustomIcon Casing_Machine_Metal_Sheet_C = Internal_Casing_Machine_Metal_Sheet_C; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_D = new CustomIcon("chrono/MetalSheet4"); + public static final CustomIcon Casing_Machine_Metal_Sheet_D = Internal_Casing_Machine_Metal_Sheet_D; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_E = new CustomIcon("chrono/MetalSheet5"); + public static final CustomIcon Casing_Machine_Metal_Sheet_E = Internal_Casing_Machine_Metal_Sheet_E; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_F = new CustomIcon("chrono/MetalSheet6"); + public static final CustomIcon Casing_Machine_Metal_Sheet_F = Internal_Casing_Machine_Metal_Sheet_F; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_G = new CustomIcon("chrono/MetalSheet7"); + public static final CustomIcon Casing_Machine_Metal_Sheet_G = Internal_Casing_Machine_Metal_Sheet_G; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_H = new CustomIcon("chrono/MetalSheet8"); + public static final CustomIcon Casing_Machine_Metal_Sheet_H = Internal_Casing_Machine_Metal_Sheet_H; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_I = new CustomIcon("chrono/MetalSheet9"); + public static final CustomIcon Casing_Machine_Metal_Sheet_I = Internal_Casing_Machine_Metal_Sheet_I; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_J = new CustomIcon("chrono/MetalSheet10"); + public static final CustomIcon Casing_Machine_Metal_Sheet_J = Internal_Casing_Machine_Metal_Sheet_J; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_K = new CustomIcon("chrono/MetalSheet11"); + public static final CustomIcon Casing_Machine_Metal_Sheet_K = Internal_Casing_Machine_Metal_Sheet_K; + private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_L = new CustomIcon("chrono/MetalSheet12"); + public static final CustomIcon Casing_Machine_Metal_Sheet_L = Internal_Casing_Machine_Metal_Sheet_L; + private static final CustomIcon Internal_Overlay_Machine_Cyber_A = new CustomIcon("chrono/CyberPanel"); + public static final CustomIcon Overlay_Machine_Cyber_A = Internal_Overlay_Machine_Cyber_A; + private static final CustomIcon Internal_Overlay_Machine_Cyber_B = new CustomIcon("chrono/CyberPanel2"); + public static final CustomIcon Overlay_Machine_Cyber_B = Internal_Overlay_Machine_Cyber_B; + + public static final CustomIcon TEXTURE_CASING_AMAZON = new CustomIcon("TileEntities/CASING_AMAZON"); + 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_ROCKETDYNE = new CustomIcon("TileEntities/MACHINE_CASING_ROCKETDYNE"); + public static final CustomIcon TEXTURE_CASING_GRINDING_MILL = + new CustomIcon("TileEntities/MACHINE_CASING_GRINDING_FACTORY"); + public static final CustomIcon TEXTURE_CASING_FLOTATION = new CustomIcon("TileEntities/MACHINE_CASING_FLOTATION"); + + // Custom Pipes + public static final CustomIcon TEXTURE_PIPE_GRINDING_MILL = new CustomIcon("TileEntities/MACHINE_CASING_PIPE_T1"); + public static final CustomIcon TEXTURE_PIPE_GENERIC = new CustomIcon("iconsets/MACHINE_CASING_PIPE_GENERIC"); + + public static final CustomIcon TEXTURE_PIPE_T1_BABBIT_ALLOY = + new CustomIcon("iconsets/MACHINE_CASING_PIPE_BABBIT_ALLOY"); + public static final CustomIcon TEXTURE_PIPE_T2_INCONEL_690 = + new CustomIcon("iconsets/MACHINE_CASING_PIPE_INCONEL_690"); + public static final CustomIcon TEXTURE_PIPE_T3_STELLITE = new CustomIcon("iconsets/MACHINE_CASING_PIPE_STELLITE"); + public static final CustomIcon TEXTURE_PIPE_T4_NITINOL_60 = + new CustomIcon("iconsets/MACHINE_CASING_PIPE_NITINOL_60"); + public static final CustomIcon TEXTURE_PIPE_T5_LAFIUM = new CustomIcon("iconsets/MACHINE_CASING_PIPE_LAFIUM"); + public static final CustomIcon TEXTURE_PIPE_T6_CINOBITE = new CustomIcon("iconsets/MACHINE_CASING_PIPE_CINOBITE"); + public static final CustomIcon TEXTURE_PIPE_T7_TITANSTEEL = + new CustomIcon("iconsets/MACHINE_CASING_PIPE_TITANSTEEL"); + public static final CustomIcon TEXTURE_PIPE_T8_ABYSSAL = new CustomIcon("iconsets/MACHINE_CASING_PIPE_ABYSSAL"); + + // Custom Gearboxes + public static final CustomIcon TEXTURE_GEARBOX_GRINDING_MILL = + new CustomIcon("TileEntities/MACHINE_CASING_GEARBOX_T1"); + public static final CustomIcon TEXTURE_GEARBOX_GENERIC = new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_GENERIC"); + + public static final CustomIcon TEXTURE_GEARBOX_T1_EGLIN_STEEL = + new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_EGLIN_STEEL"); + public static final CustomIcon TEXTURE_GEARBOX_T2_INCONEL_792 = + new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_INCONEL_792"); + public static final CustomIcon TEXTURE_GEARBOX_T3_INCOLOY_MA956 = + new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_INCOLOY_MA956"); + public static final CustomIcon TEXTURE_GEARBOX_T4_NITINOL_60 = + new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_NITINOL_60"); + public static final CustomIcon TEXTURE_GEARBOX_T5_ZERON_100 = + new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_ZERON_100"); + public static final CustomIcon TEXTURE_GEARBOX_T6_PIKYONIUM = + new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_PIKYONIUM"); + public static final CustomIcon TEXTURE_GEARBOX_T7_TITANSTEEL = + new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_TITANSTEEL"); + public static final CustomIcon TEXTURE_GEARBOX_T8_ABYSSAL = + new CustomIcon("iconsets/MACHINE_CASING_GEARBOX_ABYSSAL"); + + 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"); + public static final CustomIcon Overlay_Machine_Vent = Internal_Overlay_Machine_Vent; + private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = + new CustomIcon("TileEntities/machine_top_vent_rotating_fast"); + public static final CustomIcon Overlay_Machine_Vent_Fast = Internal_Overlay_Machine_Vent_Fast; + private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = + new CustomIcon("TileEntities/adv_machine_vent_rotating"); + public static final CustomIcon Overlay_Machine_Vent_Adv = Internal_Overlay_Machine_Vent_Adv; + private static final CustomIcon Internal_Overlay_Machine_Turbine_Active = + new CustomIcon("TileEntities/STEAM_TURBINE_SIDE_ACTIVE"); + public static final CustomIcon Overlay_Machine_Turbine_Active = Internal_Overlay_Machine_Turbine_Active; + // Grate Texture + public static final CustomIcon OVERLAY_GRATE_A = new CustomIcon("metro/OVERLAY_GRATE_A"); + // Speaker Texture + private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon("TileEntities/audio_out"); + public static final CustomIcon Overlay_Machine_Sound = Internal_Overlay_Machine_Sound; + private static final CustomIcon Internal_Overlay_Machine_Sound_Active = + new CustomIcon("TileEntities/audio_out_active"); + public static final CustomIcon Overlay_Machine_Sound_Active = Internal_Overlay_Machine_Sound_Active; + // Diesel Engines + private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = + new CustomIcon("TileEntities/machine_top_dieselmotor"); + public static final CustomIcon Overlay_Machine_Diesel_Vertical = Internal_Overlay_Machine_Diesel_Vertical; + private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = + new CustomIcon("TileEntities/machine_top_dieselmotor2"); + public static final CustomIcon Overlay_Machine_Diesel_Horizontal = Internal_Overlay_Machine_Diesel_Horizontal; + private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = + new CustomIcon("TileEntities/machine_top_dieselmotor_active"); + public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active = + Internal_Overlay_Machine_Diesel_Vertical_Active; + private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = + new CustomIcon("TileEntities/machine_top_dieselmotor2_active"); + public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active = + Internal_Overlay_Machine_Diesel_Horizontal_Active; + // Computer Screens + private static final CustomIcon Internal_Casing_Machine_Screen_1 = + new CustomIcon("TileEntities/adv_machine_screen_random1"); + public static final CustomIcon Casing_Machine_Screen_1 = Internal_Casing_Machine_Screen_1; + private static final CustomIcon Internal_Casing_Machine_Screen_2 = + new CustomIcon("TileEntities/adv_machine_screen_random2"); + public static final CustomIcon Casing_Machine_Screen_2 = Internal_Casing_Machine_Screen_2; + private static final CustomIcon Internal_Casing_Machine_Screen_3 = + new CustomIcon("TileEntities/adv_machine_screen_random3"); + public static final CustomIcon Casing_Machine_Screen_3 = Internal_Casing_Machine_Screen_3; + private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = + new CustomIcon("TileEntities/adv_machine_screen_frequency"); + public static final CustomIcon Casing_Machine_Screen_Frequency = Internal_Casing_Machine_Screen_Frequency; + private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = + new CustomIcon("TileEntities/adv_machine_screen_logo"); + public static final CustomIcon Overlay_Machine_Screen_Logo = Internal_Overlay_Machine_Screen_Logo; + private static final CustomIcon Internal_Overlay_Machine_Cyber_Interface = new CustomIcon("chrono/Overlay_Cyber"); + public static final CustomIcon Overlay_Machine_Cyber_Interface = Internal_Overlay_Machine_Cyber_Interface; + + // Machine Controller Overlays + private static final CustomIcon Internal_Overlay_Machine_Controller_Default = + new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED"); + public static final CustomIcon Overlay_Machine_Controller_Default = Internal_Overlay_Machine_Controller_Default; + private static final CustomIcon Internal_Overlay_Machine_Controller_Default_Active = + new CustomIcon("iconsets/OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ANIMATED_ACTIVE"); + public static final CustomIcon Overlay_Machine_Controller_Default_Active = + Internal_Overlay_Machine_Controller_Default_Active; + + private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced = + new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED"); + public static final CustomIcon Overlay_Machine_Controller_Advanced = Internal_Overlay_Machine_Controller_Advanced; + private static final CustomIcon Internal_Overlay_Machine_Controller_Advanced_Active = + new CustomIcon("iconsets/OVERLAY_FRONT_ADVANCED_MULTIBLOCK_ANIMATED_ACTIVE"); + public static final CustomIcon Overlay_Machine_Controller_Advanced_Active = + Internal_Overlay_Machine_Controller_Advanced_Active; + + // Fluid Reactor Overlays + public static final CustomIcon Overlay_FluidReactor_Front = + new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT"); + public static final CustomIcon Overlay_FluidReactor_Side = new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE"); + public static final CustomIcon Overlay_FluidReactor_Top = new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP"); + public static final CustomIcon Overlay_FluidReactor_Front_Active = + new CustomIcon("TileEntities/FluidReactor/OVERLAY_FRONT_ACTIVE"); + public static final CustomIcon Overlay_FluidReactor_Side_Active = + new CustomIcon("TileEntities/FluidReactor/OVERLAY_SIDE_ACTIVE"); + public static final CustomIcon Overlay_FluidReactor_Top_Active = + new CustomIcon("TileEntities/FluidReactor/OVERLAY_TOP_ACTIVE"); + + // Crafting Overlays + public static final CustomIcon Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting"); + public static final CustomIcon Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting"); + + public static final CustomIcon Casing_Workbench_Crafting_Overlay = + new CustomIcon("TileEntities/gt4/bronze_top_crafting"); + public static final CustomIcon Casing_Workbench_Top = new CustomIcon("TileEntities/gt4/bronze_top"); + public static final CustomIcon Casing_Workbench_Side = new CustomIcon("TileEntities/gt4/bronze_side"); + public static final CustomIcon Casing_Workbench_Bottom = new CustomIcon("TileEntities/gt4/bronze_bottom"); + public static final CustomIcon Casing_Adv_Workbench_Crafting_Overlay = + new CustomIcon("TileEntities/gt4/machine_top_crafting"); + public static final CustomIcon Casing_Adv_Workbench_Top = new CustomIcon("TileEntities/gt4/machine_top"); + public static final CustomIcon Casing_Adv_Workbench_Side = new CustomIcon("TileEntities/gt4/machine_side"); + public static final CustomIcon Casing_Adv_Workbench_Bottom = new CustomIcon("TileEntities/gt4/machine_bottom"); + + public static final CustomIcon Casing_Redstone_Top_Off = + new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_off"); + public static final CustomIcon Casing_Redstone_Top_Main_Off = + new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_main_off"); + public static final CustomIcon Casing_Redstone_Top_On = + new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_on"); + public static final CustomIcon Casing_Redstone_Top_Main_On = + new CustomIcon("TileEntities/gt4/redstone/machine_top_redstone_main_on"); + + public static final CustomIcon Casing_Redstone_Side_Off = + new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_off"); + public static final CustomIcon Casing_Redstone_Side_Main_Off = + new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_main_off"); + public static final CustomIcon Casing_Redstone_Side_On = + new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_on"); + public static final CustomIcon Casing_Redstone_Side_Main_On = + new CustomIcon("TileEntities/gt4/redstone/machine_side_redstone_main_on"); + + public static final CustomIcon Casing_Redstone_Bottom_Off = + new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_off"); + public static final CustomIcon Casing_Redstone_Bottom_Main_Off = + new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_main_off"); + public static final CustomIcon Casing_Redstone_Bottom_On = + new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_on"); + public static final CustomIcon Casing_Redstone_Bottom_Main_On = + new CustomIcon("TileEntities/gt4/redstone/machine_bottom_redstone_main_on"); + + public static final CustomIcon Casing_Electric_Auto_Workbench_Side = + new CustomIcon("TileEntities/gt4/OVERLAY_SIDE_CABINET"); + public static final CustomIcon Casing_Computer_Cube = new CustomIcon("TileEntities/gt4/computer"); + + public static final CustomIcon Casing_CropHarvester_Cutter = new CustomIcon("TileEntities/gt4/OVERLAY_CROP"); + public static final CustomIcon Casing_CropHarvester_Boxes = new CustomIcon("TileEntities/gt4/OVERLAY_BOXES"); + + public static final CustomIcon Casing_InventoryManagaer_Cyan = new CustomIcon("TileEntities/gt4/OVERLAY_CYAN"); + public static final CustomIcon Casing_InventoryManagaer_Green = new CustomIcon("TileEntities/gt4/OVERLAY_GREEN"); + public static final CustomIcon Casing_InventoryManagaer_Purple = new CustomIcon("TileEntities/gt4/OVERLAY_PURPLE"); + public static final CustomIcon Casing_InventoryManagaer_Red = new CustomIcon("TileEntities/gt4/OVERLAY_RED"); + public static final CustomIcon Casing_InventoryManagaer_Yellow = new CustomIcon("TileEntities/gt4/OVERLAY_YELLOW"); + public static final CustomIcon Casing_InventoryManagaer_Blue = new CustomIcon("TileEntities/gt4/OVERLAY_BLUE"); + + public static final CustomIcon Casing_InventoryManagaer_Cyan_Redstone = + new CustomIcon("TileEntities/gt4/OVERLAY_CYAN_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Green_Redstone = + new CustomIcon("TileEntities/gt4/OVERLAY_GREEN_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Purple_Redstone = + new CustomIcon("TileEntities/gt4/OVERLAY_PURPLE_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Red_Redstone = + new CustomIcon("TileEntities/gt4/OVERLAY_RED_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Yellow_Redstone = + new CustomIcon("TileEntities/gt4/OVERLAY_YELLOW_REDSTONE"); + public static final CustomIcon Casing_InventoryManagaer_Blue_Redstone = + new CustomIcon("TileEntities/gt4/OVERLAY_BLUE_REDSTONE"); + + private static final CustomIcon Casing_Test_1 = new CustomIcon("number/1"); + private static final CustomIcon Casing_Test_2 = new CustomIcon("number/2"); + private static final CustomIcon Casing_Test_3 = new CustomIcon("number/3"); + private static final CustomIcon Casing_Test_4 = new CustomIcon("number/4"); + private static final CustomIcon Casing_Test_5 = new CustomIcon("number/5"); + private static final CustomIcon Casing_Test_6 = new CustomIcon("number/6"); + private static final CustomIcon Casing_Test_7 = new CustomIcon("number/7"); + private static final CustomIcon Casing_Test_8 = new CustomIcon("number/8"); + private static final CustomIcon Casing_Test_9 = new CustomIcon("number/9"); + private static final CustomIcon Casing_Test_10 = new CustomIcon("number/10"); + private static final CustomIcon Casing_Test_11 = new CustomIcon("number/11"); + private static final CustomIcon Casing_Test_12 = new CustomIcon("number/12"); + private static final CustomIcon Casing_Test_13 = new CustomIcon("number/13"); + private static final CustomIcon Casing_Test_14 = new CustomIcon("number/14"); + private static final CustomIcon Casing_Test_15 = new CustomIcon("number/15"); + private static final CustomIcon Casing_Test_16 = new CustomIcon("number/16"); + + public static final CustomIcon[] TEST_NUMBER = new CustomIcon[] { + Casing_Test_1, Casing_Test_2, Casing_Test_3, Casing_Test_4, + Casing_Test_5, Casing_Test_6, Casing_Test_7, Casing_Test_8, + Casing_Test_9, Casing_Test_10, Casing_Test_11, Casing_Test_12, + Casing_Test_13, Casing_Test_14, Casing_Test_15, Casing_Test_16 + }; + + // Covers + private static final CustomIcon Internal_Overlay_Overflow_Valve = new CustomIcon("iconsets/OVERLAY_OVERFLOW_VALVE"); + public static final CustomIcon Overlay_Overflow_Valve = Internal_Overlay_Overflow_Valve; + + // Hatch Overlays + // Charger Texture + private static final CustomIcon Internal_Overlay_Hatch_Charger = new CustomIcon("TileEntities/cover_charger"); + public static final CustomIcon Overlay_Hatch_Charger = Internal_Overlay_Hatch_Charger; + // Discharger Texture + private static final CustomIcon Internal_Overlay_Hatch_Discharger = new CustomIcon("TileEntities/cover_discharge"); + public static final CustomIcon Overlay_Hatch_Discharger = Internal_Overlay_Hatch_Discharger; + // Advanced Muffler + private static final CustomIcon Internal_Overlay_Hatch_Muffler_Adv = new CustomIcon("iconsets/OVERLAY_MUFFLER_ADV"); + public static final CustomIcon Overlay_Hatch_Muffler_Adv = Internal_Overlay_Hatch_Muffler_Adv; + // Control Core Bus + private static final CustomIcon Internal_Overlay_Hatch_Control_Core = + new CustomIcon("iconsets/OVERLAY_CONTROL_CORE_BUS"); + public static final CustomIcon Overlay_Hatch_Control_Core = Internal_Overlay_Hatch_Control_Core; + // Milling Ball Bus + private static final CustomIcon Internal_Overlay_Bus_Milling_Balls = + new CustomIcon("iconsets/OVERLAY_MILLING_BALL_BUS"); + public static final CustomIcon Overlay_Bus_Milling_Balls = Internal_Overlay_Bus_Milling_Balls; + // Catalyst Bus + private static final CustomIcon Internal_Overlay_Bus_Catalyst = new CustomIcon("iconsets/OVERLAY_CATALYSTS"); + public static final CustomIcon Overlay_Bus_Catalyst = Internal_Overlay_Bus_Catalyst; + + public static final CustomIcon Overlay_Cobble = new CustomIcon("iconsets/OVERLAY_COBBLE"); + public static final CustomIcon Overlay_Connector = new CustomIcon("iconsets/OVERLAY_CONNECTOR"); + public static final CustomIcon Overlay_Fire = new CustomIcon("iconsets/OVERLAY_FIRE"); + public static final CustomIcon Overlay_Grinder = new CustomIcon("iconsets/OVERLAY_GRINDER"); + public static final CustomIcon Overlay_GT_Logo = new CustomIcon("iconsets/OVERLAY_GT"); + public static final CustomIcon Overlay_Ice = new CustomIcon("iconsets/OVERLAY_ICE"); + public static final CustomIcon Overlay_Implosion = new CustomIcon("iconsets/OVERLAY_IMPLOSION"); + // Lapo Orb Hatch + public static final CustomIcon Overlay_Hatch_Lapo_Orb = new CustomIcon("iconsets/OVERLAY_LAPO"); + // Data Orb Hatch + public static final CustomIcon Overlay_Hatch_Data_Orb = new CustomIcon("iconsets/OVERLAY_DATA_ORB"); + + // RTG Hatch + private static final CustomIcon Internal_Overlay_Hatch_RTG_Off = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_OFF"); + public static final CustomIcon Overlay_Hatch_RTG_Off = Internal_Overlay_Hatch_RTG_Off; + private static final CustomIcon Internal_Overlay_Hatch_RTG_On = new CustomIcon("iconsets/OVERLAY_ENERGY_RTG_ON"); + public static final CustomIcon Overlay_Hatch_RTG_On = Internal_Overlay_Hatch_RTG_On; + + // Dimensional + private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = + new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue"); + public static final CustomIcon Overlay_Machine_Dimensional_Blue = Internal_Overlay_Machine_Dimensional_Blue; + private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = + new CustomIcon("TileEntities/adv_machine_dimensional_cover_orange"); + public static final CustomIcon Overlay_Machine_Dimensional_Orange = Internal_Overlay_Machine_Dimensional_Orange; + // Icons + private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab"); + public static final CustomIcon Overlay_MatterFab = Internal_Overlay_MatterFab; + private static final CustomIcon Internal_Overlay_MatterFab_Active = + new CustomIcon("TileEntities/adv_machine_matterfab_active"); + public static final CustomIcon Overlay_MatterFab_Active = Internal_Overlay_MatterFab_Active; + + private static final CustomIcon Internal_Overlay_MatterFab_Animated = + new CustomIcon("TileEntities/adv_machine_matterfab_animated"); + public static final CustomIcon Overlay_MatterFab_Animated = Internal_Overlay_MatterFab_Animated; + private static final CustomIcon Internal_Overlay_MatterFab_Active_Animated = + new CustomIcon("TileEntities/adv_machine_matterfab_active_animated"); + public static final CustomIcon Overlay_MatterFab_Active_Animated = Internal_Overlay_MatterFab_Active_Animated; + + private static final CustomIcon Internal_Overlay_Oil = new CustomIcon("TileEntities/adv_machine_oil"); + public static final CustomIcon Overlay_Oil = Internal_Overlay_Oil; + private static final CustomIcon Internal_Overlay_Water = new CustomIcon("TileEntities/adv_machine_water"); + public static final CustomIcon Overlay_Water = Internal_Overlay_Water; + private static final CustomIcon Internal_Overlay_UU_Matter = new CustomIcon("TileEntities/adv_machine_uum"); + public static final CustomIcon Overlay_UU_Matter = Internal_Overlay_UU_Matter; + + // GT++ Tiered Hulls + public static final CustomIcon TEXTURE_CASING_TIERED_ULV = new CustomIcon("iconsets/TieredHulls/CASING_ULV"); + public static final CustomIcon TEXTURE_CASING_TIERED_LV = new CustomIcon("iconsets/TieredHulls/CASING_LV"); + public static final CustomIcon TEXTURE_CASING_TIERED_MV = new CustomIcon("iconsets/TieredHulls/CASING_MV"); + public static final CustomIcon TEXTURE_CASING_TIERED_HV = new CustomIcon("iconsets/TieredHulls/CASING_HV"); + public static final CustomIcon TEXTURE_CASING_TIERED_EV = new CustomIcon("iconsets/TieredHulls/CASING_EV"); + public static final CustomIcon TEXTURE_CASING_TIERED_IV = new CustomIcon("iconsets/TieredHulls/CASING_IV"); + public static final CustomIcon TEXTURE_CASING_TIERED_LuV = new CustomIcon("iconsets/TieredHulls/CASING_LuV"); + public static final CustomIcon TEXTURE_CASING_TIERED_ZPM = new CustomIcon("iconsets/TieredHulls/CASING_ZPM"); + public static final CustomIcon TEXTURE_CASING_TIERED_UV = new CustomIcon("iconsets/TieredHulls/CASING_UV"); + public static final CustomIcon TEXTURE_CASING_TIERED_MAX = new CustomIcon("iconsets/TieredHulls/CASING_MAX"); + + // Metroid related + public static final CustomIcon TEXTURE_METAL_PANEL_A = new CustomIcon("metro/TEXTURE_METAL_PANEL_A"); + public static final CustomIcon TEXTURE_METAL_PANEL_B = new CustomIcon("metro/TEXTURE_METAL_PANEL_B"); + public static final CustomIcon TEXTURE_METAL_PANEL_C = new CustomIcon("metro/TEXTURE_METAL_PANEL_C"); + public static final CustomIcon TEXTURE_METAL_PANEL_D = new CustomIcon("metro/TEXTURE_METAL_PANEL_D"); + public static final CustomIcon TEXTURE_METAL_PANEL_E = new CustomIcon("metro/TEXTURE_METAL_PANEL_E"); + public static final CustomIcon TEXTURE_METAL_PANEL_F = new CustomIcon("metro/TEXTURE_METAL_PANEL_F"); + public static final CustomIcon TEXTURE_METAL_PANEL_G = new CustomIcon("metro/TEXTURE_METAL_PANEL_G"); + public static final CustomIcon TEXTURE_METAL_PANEL_H = new CustomIcon("metro/TEXTURE_METAL_PANEL_H"); + public static final CustomIcon TEXTURE_METAL_PANEL_I = new CustomIcon("metro/TEXTURE_METAL_PANEL_I"); + + public static final CustomIcon TEXTURE_MAGIC_PANEL_A = new CustomIcon("metro/TEXTURE_MAGIC_A"); + public static final CustomIcon TEXTURE_MAGIC_PANEL_B = new CustomIcon("metro/TEXTURE_MAGIC_B"); + + public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A"); + public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING = + new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A_GLOWING"); + + public static final CustomIcon TEXTURE_STONE_BIRD_A = new CustomIcon("metro/TEXTURE_STONE_BIRD_A"); + public static final CustomIcon TEXTURE_STONE_BIRD_A_LEFT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_LEFT"); + public static final CustomIcon TEXTURE_STONE_BIRD_A_RIGHT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_RIGHT"); + public static final CustomIcon TEXTURE_STONE_RED_A = new CustomIcon("metro/TEXTURE_STONE_RED_A"); + public static final CustomIcon TEXTURE_STONE_RED_B = new CustomIcon("metro/TEXTURE_STONE_RED_B"); + public static final CustomIcon TEXTURE_STONE_BLUE_A = new CustomIcon("metro/TEXTURE_STONE_BLUE_A"); + public static final CustomIcon TEXTURE_STONE_GREEN_A = new CustomIcon("metro/TEXTURE_STONE_GREEN_A"); + public static final CustomIcon TEXTURE_STONE_TABLET_A = new CustomIcon("metro/TEXTURE_STONE_TABLET_A"); + public static final CustomIcon TEXTURE_STONE_TABLET_B = new CustomIcon("metro/TEXTURE_STONE_TABLET_B"); + + public static final CustomIcon TEXTURE_TECH_A = new CustomIcon("metro/TEXTURE_TECH_A"); + public static final CustomIcon TEXTURE_TECH_B = new CustomIcon("metro/TEXTURE_TECH_B"); + 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"); + public static final CustomIcon TEXTURE_TECH_PANEL_B = new CustomIcon("metro/TEXTURE_TECH_PANEL_B"); + public static final CustomIcon TEXTURE_TECH_PANEL_C = new CustomIcon("metro/TEXTURE_TECH_PANEL_C"); + public static final CustomIcon TEXTURE_TECH_PANEL_D = new CustomIcon("metro/TEXTURE_TECH_PANEL_D"); + public static final CustomIcon TEXTURE_TECH_PANEL_E = new CustomIcon("metro/TEXTURE_TECH_PANEL_E"); + public static final CustomIcon TEXTURE_TECH_PANEL_F = new CustomIcon("metro/TEXTURE_TECH_PANEL_F"); + public static final CustomIcon TEXTURE_TECH_PANEL_G = new CustomIcon("metro/TEXTURE_TECH_PANEL_G"); + public static final CustomIcon TEXTURE_TECH_PANEL_H = new CustomIcon("metro/TEXTURE_TECH_PANEL_H"); + public static final CustomIcon TEXTURE_TECH_PANEL_I = new CustomIcon("metro/TEXTURE_TECH_PANEL_I"); + + public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE = + new CustomIcon("TileEntities/DecayablesChest_bottom"); + public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE_ALT = + new CustomIcon("TileEntities/DecayablesChest_top"); + + // LFTR Single blocks + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT = + new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE = + new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE = + new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE = + new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP = + new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP"); + public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE = + new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE"); + + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT = + new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE = + new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE = + new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE = + new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP = + new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP"); + public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE = + new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE"); + + // 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}), + }; + + public static IIconContainer[] CONNECTED_FUSION_HULLS = new IIconContainer[] { + TEXTURE_CASING_FUSION_COIL_II_1, TEXTURE_CASING_FUSION_COIL_II_2, TEXTURE_CASING_FUSION_COIL_II_3, + TEXTURE_CASING_FUSION_COIL_II_4, TEXTURE_CASING_FUSION_COIL_II_5, TEXTURE_CASING_FUSION_COIL_II_6, + TEXTURE_CASING_FUSION_COIL_II_7, TEXTURE_CASING_FUSION_COIL_II_8, TEXTURE_CASING_FUSION_COIL_II_9, + TEXTURE_CASING_FUSION_COIL_II_10, TEXTURE_CASING_FUSION_COIL_II_11, TEXTURE_CASING_FUSION_COIL_II_12 + }; + + public static IIconContainer[] TIERED_MACHINE_HULLS = new IIconContainer[] { + TEXTURE_CASING_TIERED_ULV, + TEXTURE_CASING_TIERED_LV, + TEXTURE_CASING_TIERED_MV, + TEXTURE_CASING_TIERED_HV, + TEXTURE_CASING_TIERED_EV, + TEXTURE_CASING_TIERED_IV, + TEXTURE_CASING_TIERED_LuV, + TEXTURE_CASING_TIERED_ZPM, + TEXTURE_CASING_TIERED_UV, + TEXTURE_CASING_TIERED_MAX + }; + + public static Object Casing_Material_Turbine; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java index cc5cf3d55e..bb09531d10 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java @@ -4,29 +4,32 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIco public class TexturesGtCutomCovers { - public static final CustomIcon[] TEXTURE_ZTONES_AGON = new CustomIcon[16]; - public static final CustomIcon[] TEXTURE_ZTONES_ISZM = new CustomIcon[16]; - public static final CustomIcon[] TEXTURE_ZTONES_KORP = new CustomIcon[16]; - public static final CustomIcon[] TEXTURE_ZTONES_JELT = new CustomIcon[16]; - public static final CustomIcon[] TEXTURE_ZTONES_BITT = new CustomIcon[16]; - - public static void init() { - generateZTones(); - } + public static final CustomIcon[] TEXTURE_ZTONES_AGON = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_ISZM = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_KORP = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_JELT = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_BITT = new CustomIcon[16]; - private static void generateZTones() { - // ZTONES - String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" }; - int aArrayIndex = 0; - CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, - TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT }; + public static void init() { + generateZTones(); + } - for (CustomIcon[] t : aArrays) { - for (int s = 0; s < 16; s++) { - t[s] = new CustomIcon("Ztones", "sets/" + aZtoneCoverTextureNames[aArrayIndex] + "/"+aZtoneCoverTextureNames[aArrayIndex]+"_ (" + s + ")"); - } - aArrayIndex++; - } - } + private static void generateZTones() { + // ZTONES + String[] aZtoneCoverTextureNames = new String[] {"agon", "iszm", "korp", "jelt", "bitt"}; + int aArrayIndex = 0; + CustomIcon[][] aArrays = new CustomIcon[][] { + TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT + }; + for (CustomIcon[] t : aArrays) { + for (int s = 0; s < 16; s++) { + t[s] = new CustomIcon( + "Ztones", + "sets/" + aZtoneCoverTextureNames[aArrayIndex] + "/" + aZtoneCoverTextureNames[aArrayIndex] + + "_ (" + s + ")"); + } + aArrayIndex++; + } + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java index ee104eaca3..b068d12d26 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java @@ -1,61 +1,51 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; - import gregtech.api.GregTech_API; import gregtech.api.interfaces.IIconContainer; - import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; public final class TexturesGtTools { - public final static CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER"); - public final static CustomIcon ANGLE_GRINDER = new CustomIcon("iconsets/ANGLE_GRINDER"); - public final static CustomIcon ELECTRIC_SNIPS = new CustomIcon("iconsets/ELECTRIC_SNIPS"); - public final static CustomIcon ELECTRIC_LIGHTER = new CustomIcon("iconsets/ELECTRIC_LIGHTER"); - public final static CustomIcon ELECTRIC_BUTCHER_KNIFE = new CustomIcon("iconsets/ELECTRIC_BUTCHER_KNIFE"); - - - - - - - - - public final static class CustomIcon implements IIconContainer, Runnable { - protected IIcon mIcon, mOverlay; - protected final String mIconName; - - public CustomIcon(final String aIconName) { - this.mIconName = aIconName; - Logger.INFO("Constructing a Custom Texture. " + this.mIconName); - GregTech_API.sGTItemIconload.add(this); - } - - @Override - public IIcon getIcon() { - return this.mIcon; - } - - @Override - public IIcon getOverlayIcon() { - return this.mOverlay; - } - - @Override - public void run() { - this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName); - //Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g); - this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName + "_OVERLAY"); - } - - @Override - public ResourceLocation getTextureFile() { - return TextureMap.locationItemsTexture; - } - } - + public static final CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER"); + public static final CustomIcon ANGLE_GRINDER = new CustomIcon("iconsets/ANGLE_GRINDER"); + public static final CustomIcon ELECTRIC_SNIPS = new CustomIcon("iconsets/ELECTRIC_SNIPS"); + public static final CustomIcon ELECTRIC_LIGHTER = new CustomIcon("iconsets/ELECTRIC_LIGHTER"); + public static final CustomIcon ELECTRIC_BUTCHER_KNIFE = new CustomIcon("iconsets/ELECTRIC_BUTCHER_KNIFE"); + + public static final class CustomIcon implements IIconContainer, Runnable { + protected IIcon mIcon, mOverlay; + protected final String mIconName; + + public CustomIcon(final String aIconName) { + this.mIconName = aIconName; + Logger.INFO("Constructing a Custom Texture. " + this.mIconName); + GregTech_API.sGTItemIconload.add(this); + } + + @Override + public IIcon getIcon() { + return this.mIcon; + } + + @Override + public IIcon getOverlayIcon() { + return this.mOverlay; + } + + @Override + public void run() { + this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName); + // Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g); + this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName + "_OVERLAY"); + } + + @Override + public ResourceLocation getTextureFile() { + return TextureMap.locationItemsTexture; + } + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java index 7169861340..b811f601e2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java @@ -76,7 +76,6 @@ import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TU_ACTIVE9; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine; import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaSpecialMultiCasings; import net.minecraft.tileentity.TileEntity; @@ -85,288 +84,348 @@ import net.minecraft.world.IBlockAccess; public class LargeTurbineTextureHandler { - /** - * LP Turbines - */ + /** + * LP Turbines + */ + public static BlockIcons[] OVERLAY_LP_TURBINE = new BlockIcons[] { + LARGETURBINE_ST1, + LARGETURBINE_ST2, + LARGETURBINE_ST3, + LARGETURBINE_ST4, + LARGETURBINE_ST5, + LARGETURBINE_ST6, + LARGETURBINE_ST7, + LARGETURBINE_ST8, + LARGETURBINE_ST9, + }; - public static BlockIcons[] OVERLAY_LP_TURBINE = new BlockIcons[]{ - LARGETURBINE_ST1, - LARGETURBINE_ST2, - LARGETURBINE_ST3, - LARGETURBINE_ST4, - LARGETURBINE_ST5, - LARGETURBINE_ST6, - LARGETURBINE_ST7, - LARGETURBINE_ST8, - LARGETURBINE_ST9, - }; + public static BlockIcons[] OVERLAY_LP_TURBINE_ACTIVE = new BlockIcons[] { + LARGETURBINE_ST_ACTIVE1, + LARGETURBINE_ST_ACTIVE2, + LARGETURBINE_ST_ACTIVE3, + LARGETURBINE_ST_ACTIVE4, + LARGETURBINE_ST_ACTIVE5, + LARGETURBINE_ST_ACTIVE6, + LARGETURBINE_ST_ACTIVE7, + LARGETURBINE_ST_ACTIVE8, + LARGETURBINE_ST_ACTIVE9, + }; - public static BlockIcons[] OVERLAY_LP_TURBINE_ACTIVE = new BlockIcons[]{ - LARGETURBINE_ST_ACTIVE1, - LARGETURBINE_ST_ACTIVE2, - LARGETURBINE_ST_ACTIVE3, - LARGETURBINE_ST_ACTIVE4, - LARGETURBINE_ST_ACTIVE5, - LARGETURBINE_ST_ACTIVE6, - LARGETURBINE_ST_ACTIVE7, - LARGETURBINE_ST_ACTIVE8, - LARGETURBINE_ST_ACTIVE9, - }; + /** + * HP Turbines + */ + public static BlockIcons[] OVERLAY_HP_TURBINE = new BlockIcons[] { + LARGETURBINE_TI1, + LARGETURBINE_TI2, + LARGETURBINE_TI3, + LARGETURBINE_TI4, + LARGETURBINE_TI5, + LARGETURBINE_TI6, + LARGETURBINE_TI7, + LARGETURBINE_TI8, + LARGETURBINE_TI9, + }; - /** - * HP Turbines - */ + public static BlockIcons[] OVERLAY_HP_TURBINE_ACTIVE = new BlockIcons[] { + LARGETURBINE_TI_ACTIVE1, + LARGETURBINE_TI_ACTIVE2, + LARGETURBINE_TI_ACTIVE3, + LARGETURBINE_TI_ACTIVE4, + LARGETURBINE_TI_ACTIVE5, + LARGETURBINE_TI_ACTIVE6, + LARGETURBINE_TI_ACTIVE7, + LARGETURBINE_TI_ACTIVE8, + LARGETURBINE_TI_ACTIVE9, + }; - public static BlockIcons[] OVERLAY_HP_TURBINE = new BlockIcons[]{ - LARGETURBINE_TI1, - LARGETURBINE_TI2, - LARGETURBINE_TI3, - LARGETURBINE_TI4, - LARGETURBINE_TI5, - LARGETURBINE_TI6, - LARGETURBINE_TI7, - LARGETURBINE_TI8, - LARGETURBINE_TI9, - }; + /** + * Gas Turbines + */ + public static BlockIcons[] OVERLAY_GAS_TURBINE = new BlockIcons[] { + LARGETURBINE_SS1, + LARGETURBINE_SS2, + LARGETURBINE_SS3, + LARGETURBINE_SS4, + LARGETURBINE_SS5, + LARGETURBINE_SS6, + LARGETURBINE_SS7, + LARGETURBINE_SS8, + LARGETURBINE_SS9, + }; - public static BlockIcons[] OVERLAY_HP_TURBINE_ACTIVE = new BlockIcons[]{ - LARGETURBINE_TI_ACTIVE1, - LARGETURBINE_TI_ACTIVE2, - LARGETURBINE_TI_ACTIVE3, - LARGETURBINE_TI_ACTIVE4, - LARGETURBINE_TI_ACTIVE5, - LARGETURBINE_TI_ACTIVE6, - LARGETURBINE_TI_ACTIVE7, - LARGETURBINE_TI_ACTIVE8, - LARGETURBINE_TI_ACTIVE9, - }; - - /** - * Gas Turbines - */ - - public static BlockIcons[] OVERLAY_GAS_TURBINE = new BlockIcons[]{ - LARGETURBINE_SS1, - LARGETURBINE_SS2, - LARGETURBINE_SS3, - LARGETURBINE_SS4, - LARGETURBINE_SS5, - LARGETURBINE_SS6, - LARGETURBINE_SS7, - LARGETURBINE_SS8, - LARGETURBINE_SS9, - }; + public static BlockIcons[] OVERLAY_GAS_TURBINE_ACTIVE = new BlockIcons[] { + LARGETURBINE_SS_ACTIVE1, + LARGETURBINE_SS_ACTIVE2, + LARGETURBINE_SS_ACTIVE3, + LARGETURBINE_SS_ACTIVE4, + LARGETURBINE_SS_ACTIVE5, + LARGETURBINE_SS_ACTIVE6, + LARGETURBINE_SS_ACTIVE7, + LARGETURBINE_SS_ACTIVE8, + LARGETURBINE_SS_ACTIVE9, + }; - public static BlockIcons[] OVERLAY_GAS_TURBINE_ACTIVE = new BlockIcons[]{ - LARGETURBINE_SS_ACTIVE1, - LARGETURBINE_SS_ACTIVE2, - LARGETURBINE_SS_ACTIVE3, - LARGETURBINE_SS_ACTIVE4, - LARGETURBINE_SS_ACTIVE5, - LARGETURBINE_SS_ACTIVE6, - LARGETURBINE_SS_ACTIVE7, - LARGETURBINE_SS_ACTIVE8, - LARGETURBINE_SS_ACTIVE9, - }; - - /** - * Plasma Turbines - */ - - public static BlockIcons[] OVERLAY_PLASMA_TURBINE = new BlockIcons[]{ - LARGETURBINE_TU1, - LARGETURBINE_TU2, - LARGETURBINE_TU3, - LARGETURBINE_TU4, - LARGETURBINE_TU5, - LARGETURBINE_TU6, - LARGETURBINE_TU7, - LARGETURBINE_TU8, - LARGETURBINE_TU9, - }; + /** + * Plasma Turbines + */ + public static BlockIcons[] OVERLAY_PLASMA_TURBINE = new BlockIcons[] { + LARGETURBINE_TU1, + LARGETURBINE_TU2, + LARGETURBINE_TU3, + LARGETURBINE_TU4, + LARGETURBINE_TU5, + LARGETURBINE_TU6, + LARGETURBINE_TU7, + LARGETURBINE_TU8, + LARGETURBINE_TU9, + }; - public static BlockIcons[] OVERLAY_PLASMA_TURBINE_ACTIVE = new BlockIcons[]{ - LARGETURBINE_TU_ACTIVE1, - LARGETURBINE_TU_ACTIVE2, - LARGETURBINE_TU_ACTIVE3, - LARGETURBINE_TU_ACTIVE4, - LARGETURBINE_TU_ACTIVE5, - LARGETURBINE_TU_ACTIVE6, - LARGETURBINE_TU_ACTIVE7, - LARGETURBINE_TU_ACTIVE8, - LARGETURBINE_TU_ACTIVE9, - }; + public static BlockIcons[] OVERLAY_PLASMA_TURBINE_ACTIVE = new BlockIcons[] { + LARGETURBINE_TU_ACTIVE1, + LARGETURBINE_TU_ACTIVE2, + LARGETURBINE_TU_ACTIVE3, + LARGETURBINE_TU_ACTIVE4, + LARGETURBINE_TU_ACTIVE5, + LARGETURBINE_TU_ACTIVE6, + LARGETURBINE_TU_ACTIVE7, + LARGETURBINE_TU_ACTIVE8, + LARGETURBINE_TU_ACTIVE9, + }; - public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaSpecialMultiCasings i) { - final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + public static IIcon handleCasingsGT( + final IBlockAccess aWorld, + final int xCoord, + final int yCoord, + final int zCoord, + final int aSide, + final GregtechMetaSpecialMultiCasings i) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - //0 shaft - //1 LP - //2 HP - //3 Gas - //4 Plasma + // 0 shaft + // 1 LP + // 2 HP + // 3 Gas + // 4 Plasma - BlockIcons[] mGetCurrentTextureSet = null; - BlockIcons[] mGetCurrentTextureSet_ACTIVE = null; + BlockIcons[] mGetCurrentTextureSet = null; + BlockIcons[] mGetCurrentTextureSet_ACTIVE = null; + if (tMeta <= 0 || tMeta >= 5) { + return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta); + } else { + if (tMeta == 1) { + mGetCurrentTextureSet = OVERLAY_LP_TURBINE; + mGetCurrentTextureSet_ACTIVE = OVERLAY_LP_TURBINE_ACTIVE; + } else if (tMeta == 2) { + mGetCurrentTextureSet = OVERLAY_HP_TURBINE; + mGetCurrentTextureSet_ACTIVE = OVERLAY_HP_TURBINE_ACTIVE; + } else if (tMeta == 3) { + mGetCurrentTextureSet = OVERLAY_GAS_TURBINE; + mGetCurrentTextureSet_ACTIVE = OVERLAY_GAS_TURBINE_ACTIVE; + } else if (tMeta == 4) { + mGetCurrentTextureSet = OVERLAY_PLASMA_TURBINE; + mGetCurrentTextureSet_ACTIVE = OVERLAY_PLASMA_TURBINE_ACTIVE; + } + if (mGetCurrentTextureSet == null || mGetCurrentTextureSet_ACTIVE == null) { + return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta); + } - if (tMeta <= 0 || tMeta >= 5) { - return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta); - } - else { - if (tMeta == 1) { - mGetCurrentTextureSet = OVERLAY_LP_TURBINE; - mGetCurrentTextureSet_ACTIVE = OVERLAY_LP_TURBINE_ACTIVE; - } - else if (tMeta == 2) { - mGetCurrentTextureSet = OVERLAY_HP_TURBINE; - mGetCurrentTextureSet_ACTIVE = OVERLAY_HP_TURBINE_ACTIVE; - } - else if (tMeta == 3) { - mGetCurrentTextureSet = OVERLAY_GAS_TURBINE; - mGetCurrentTextureSet_ACTIVE = OVERLAY_GAS_TURBINE_ACTIVE; - } - else if (tMeta == 4) { - mGetCurrentTextureSet = OVERLAY_PLASMA_TURBINE; - mGetCurrentTextureSet_ACTIVE = OVERLAY_PLASMA_TURBINE_ACTIVE; - } - if (mGetCurrentTextureSet == null || mGetCurrentTextureSet_ACTIVE == null) { - return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta); - } + 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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[0].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[3].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[6].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[1].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[7].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[8].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[5].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[2].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[0].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[3].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[6].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[1].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[7].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[8].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[5].getIcon(); + } + return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[2].getIcon(); + } + return mGetCurrentTextureSet[2].getIcon(); + } + } + } + return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta); + } + public static boolean isUsingAnimatedTexture(TileEntity tTileEntity) { + boolean aVal = true; + IGregTechTileEntity aTile; + if (tTileEntity instanceof IGregTechTileEntity) { + aTile = (IGregTechTileEntity) tTileEntity; + if (aTile != null) { + final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { + aVal = ((GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity) + .getBaseMetaTileEntity() + .isActive(); + // Logger.INFO("Returning "+aVal+" as Rotor Assembly controller status"); + } + } + } + return aVal; + } - - 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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[0].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[3].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[6].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[1].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[7].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[8].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[5].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[2].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[0].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[3].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[6].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[1].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[7].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[8].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[5].getIcon(); - } - return mGetCurrentTextureSet[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 GT_MetaTileEntity_Hatch_Turbine))) { - if (isUsingAnimatedTexture(tTileEntity)) { - return mGetCurrentTextureSet_ACTIVE[2].getIcon(); - } - return mGetCurrentTextureSet[2].getIcon(); - } - } - } - return GregtechMetaSpecialMultiCasings.getStaticIcon((byte) aSide, (byte) tMeta); - } - - public static boolean isUsingAnimatedTexture(TileEntity tTileEntity) { - boolean aVal = true; - IGregTechTileEntity aTile; - if (tTileEntity instanceof IGregTechTileEntity) { - aTile = (IGregTechTileEntity) tTileEntity; - if (aTile != null) { - final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity(); - if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { - aVal = ((GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity).getBaseMetaTileEntity().isActive(); - //Logger.INFO("Returning "+aVal+" as Rotor Assembly controller status"); - } - } - } - return aVal; - } - - public static GT_MetaTileEntity_Hatch_Turbine isTurbineHatch(final IGregTechTileEntity aTileEntity) { - if (aTileEntity != null) { - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { - return (GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity; - } - } - return null; - } - + public static GT_MetaTileEntity_Hatch_Turbine isTurbineHatch(final IGregTechTileEntity aTileEntity) { + if (aTileEntity != null) { + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { + return (GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity; + } + } + return null; + } } |