From 751e9117abff08d46d82081bc043757d65d67823 Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Mon, 31 Oct 2022 18:20:16 +0100 Subject: Revert "ref(texture_api): update to the texture api (#386)" This reverts commit 0121112e5ea9c72050957af2c2ad4aecd9d70270. --- src/main/java/gregtech/api/enums/TAE.java | 23 ++-- .../gtPlusPlus/core/block/base/BlockBaseOre.java | 16 +-- .../core/item/base/BaseItemComponent.java | 6 +- .../xmod/gregtech/api/enums/CustomGtTextures.java | 4 +- .../custom/power/GTPP_MTE_BasicMachine.java | 14 +-- .../GT_MetaTileEntity_Dehydrator.java | 17 +-- .../GT_MetaTileEntity_DeluxeMachine.java | 14 +-- .../GT_MetaTileEntity_Hatch_ControlCore.java | 6 +- ...etaTileEntity_Hatch_ElementalDataOrbHolder.java | 6 +- .../GT_MetaTileEntity_Hatch_FluidGenerator.java | 10 +- .../GT_MetaTileEntity_Hatch_InputBattery.java | 6 +- .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 6 +- .../GT_MetaTileEntity_Hatch_Naquadah.java | 19 ++- .../GT_MetaTileEntity_Hatch_OutputBattery.java | 6 +- .../GT_MetaTileEntity_Hatch_Reservoir.java | 6 +- .../GT_MetaTileEntity_Hatch_Steam_BusInput.java | 41 +++---- .../GT_MetaTileEntity_Hatch_Steam_BusOutput.java | 41 +++---- .../GT_MetaTileEntity_Hatch_Turbine.java | 6 +- .../GregtechMetaPipeEntity_Cable.java | 62 +++++----- .../GregtechMetaTreeFarmerStructural.java | 4 +- .../base/GregtechMetaPipeEntityBase_Cable.java | 30 ++--- .../base/GregtechMeta_SteamMultiBase.java | 5 +- .../base/machines/GregtechMetaSafeBlockBase.java | 6 +- .../base/machines/GregtechMetaTreeFarmerBase.java | 12 +- .../GT_MetaTileEntity_Hatch_Catalysts.java | 6 +- .../GT_MetaTileEntity_Hatch_MillingBalls.java | 6 +- .../api/objects/GTPP_CopiedBlockTexture.java | 26 +++++ .../gregtech/api/objects/GTPP_RenderedTexture.java | 26 +++++ .../common/blocks/GregtechMetaCasingBlocks.java | 4 +- .../common/blocks/GregtechMetaCasingBlocks2.java | 4 +- .../common/blocks/GregtechMetaCasingBlocks3.java | 4 +- .../common/blocks/GregtechMetaCasingBlocks4.java | 4 +- .../common/blocks/GregtechMetaCasingBlocks5.java | 12 +- .../blocks/GregtechMetaSpecialMachineCasings.java | 4 +- .../blocks/GregtechMetaSpecialMultiCasings.java | 4 +- .../common/blocks/textures/TexturesGtBlock.java | 118 +++++++++---------- .../gregtech/common/items/MetaCustomCoverItem.java | 5 +- .../common/items/MetaGeneratedGregtechItems.java | 129 ++++++++++++--------- .../GT_MetaTileEntity_ElectricAutoWorkbench.java | 10 +- ...GT_MetaTileEntity_ElectricInventoryManager.java | 26 ++--- .../GT_MetaTileEntity_TesseractGenerator.java | 10 +- .../GT_MetaTileEntity_TesseractTerminal.java | 10 +- .../generators/GT_MetaTileEntity_Boiler_Base.java | 12 +- .../generators/GT_MetaTileEntity_Boiler_HV.java | 12 +- .../generators/GT_MetaTileEntity_Boiler_LV.java | 14 ++- .../generators/GT_MetaTileEntity_Boiler_MV.java | 14 ++- .../generators/GT_MetaTileEntity_Boiler_Solar.java | 14 +-- .../generators/GT_MetaTileEntity_RfConvertor.java | 4 +- .../GT_MetaTileEntity_SemiFluidGenerator.java | 28 +++-- ...gtechMetaTileEntityDoubleFuelGeneratorBase.java | 32 ++--- .../GregtechMetaTileEntityGeothermalGenerator.java | 31 ++--- .../GregtechMetaTileEntityRocketFuelGenerator.java | 32 ++--- .../GregtechMetaTileEntitySolarGenerator.java | 48 ++++---- .../generators/GregtechMetaTileEntity_RTG.java | 32 ++--- .../ULV/GT_MetaTileEntity_ULV_GasTurbine.java | 4 +- .../ULV/GT_MetaTileEntity_ULV_SteamTurbine.java | 4 +- .../creative/GregtechMetaCreativeEnergyBuffer.java | 6 +- .../basic/GT_MetaTileEntity_CropHarvestor.java | 13 +-- .../basic/GT_MetaTileEntity_WorldAccelerator.java | 10 +- .../GregtechMetaAtmosphericReconditioner.java | 18 +-- .../machines/basic/GregtechMetaCondensor.java | 20 ++-- .../basic/GregtechMetaGarbageCollector.java | 22 ++-- .../basic/GregtechMetaPollutionCreator.java | 22 ++-- .../basic/GregtechMetaPollutionDetector.java | 30 ++--- .../basic/GregtechMetaTileEntityChunkLoader.java | 42 +++---- ...GregtechMetaTileEntityThaumcraftResearcher.java | 15 ++- .../basic/GregtechMetaTileEntity_AutoChisel.java | 18 +-- .../basic/GregtechMetaTileEntity_BasicWasher.java | 18 +-- .../GregtechMetaTileEntity_ChemicalReactor.java | 18 +-- ...regtechMetaTileEntity_CompactFusionReactor.java | 27 ++--- .../basic/GregtechMetaTileEntity_PocketFusion.java | 27 ++--- .../GregtechMetaTileEntity_ReactorColdTrap.java | 18 +-- ...egtechMetaTileEntity_ReactorProcessingUnit.java | 18 +-- .../basic/GregtechMetaWirelessCharger.java | 22 ++-- .../GregtechMetaTileEntity_IronBlastFurnace.java | 10 +- .../GregtechMetaTileEntity_Adv_Fusion_MK4.java | 9 +- .../GregtechMetaTileEntity_SteamCompressor.java | 11 +- .../GregtechMetaTileEntity_SteamMacerator.java | 12 +- .../turbines/GT_MTE_LargeTurbine_Gas.java | 6 +- .../turbines/GT_MTE_LargeTurbine_Plasma.java | 6 +- .../turbines/GT_MTE_LargeTurbine_SHSteam.java | 6 +- .../turbines/GT_MTE_LargeTurbine_Steam.java | 6 +- ...chMetaTileEntity_PowerSubStationController.java | 4 +- .../misc/GT_TileEntity_ComputerCube.java | 8 +- .../tileentities/misc/TileEntitySolarHeater.java | 34 +++--- .../GT_MetaTileEntity_RedstoneButtonPanel.java | 16 +-- .../GT_MetaTileEntity_RedstoneCircuitBlock.java | 26 ++--- .../redstone/GT_MetaTileEntity_RedstoneLamp.java | 6 +- .../GT_MetaTileEntity_RedstoneStrengthDisplay.java | 16 +-- .../GT_MetaTileEntity_RedstoneStrengthScale.java | 4 +- .../GT_MetaTileEntity_AdvancedCraftingTable.java | 26 ++--- .../GT_MetaTileEntity_ConnectableCrate.java | 12 +- .../storage/GT_MetaTileEntity_TieredChest.java | 6 +- .../storage/GT_MetaTileEntity_TieredTank.java | 6 +- .../storage/GregtechMetaEnergyBuffer.java | 34 +++--- .../storage/GregtechMetaSafeBlock.java | 4 +- .../storage/shelving/GT4Entity_Shelf.java | 26 +++-- .../storage/shelving/GT4Entity_Shelf_Desk.java | 10 +- .../xmod/gregtech/loaders/RecipeGen_Plates.java | 4 +- 99 files changed, 925 insertions(+), 802 deletions(-) create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPP_CopiedBlockTexture.java create mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPP_RenderedTexture.java (limited to 'src/main/java') diff --git a/src/main/java/gregtech/api/enums/TAE.java b/src/main/java/gregtech/api/enums/TAE.java index 244053cfa8..e45e9e4e58 100644 --- a/src/main/java/gregtech/api/enums/TAE.java +++ b/src/main/java/gregtech/api/enums/TAE.java @@ -1,17 +1,16 @@ package gregtech.api.enums; import gregtech.api.interfaces.ITexture; -import gregtech.api.render.TextureFactory; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; import java.lang.reflect.Field; import java.util.HashMap; import java.util.HashSet; -import net.minecraftforge.common.util.ForgeDirection; public class TAE { @@ -20,7 +19,7 @@ public class TAE { public static int gtPPLastUsedIndex = 64; public static int secondaryIndex = 0; - public static HashMap mTAE = new HashMap(); + public static HashMap mTAE = new HashMap(); private static final HashSet mFreeSlots = new HashSet(64); static { @@ -34,18 +33,18 @@ public class TAE { * * @param aPage - The Texture page (0-3) * @param aID - The ID on the specified page (0-15) - * @param iTexture - The Texture to register + * @param GTPP_CopiedBlockTexture - The Texture to register * @return - Did it register correctly? */ - public static boolean registerTexture(int aPage, int aID, ITexture iTexture) { + public static boolean registerTexture(int aPage, int aID, GTPP_CopiedBlockTexture GTPP_CopiedBlockTexture) { int aRealID = aID + (aPage * 16); - return registerTexture(64 + aRealID, iTexture); + return registerTexture(64 + aRealID, GTPP_CopiedBlockTexture); } - public static boolean registerTexture(int aID, ITexture iTexture) { + public static boolean registerTexture(int aID, GTPP_CopiedBlockTexture GTPP_CopiedBlockTexture) { if (mFreeSlots.contains(aID)) { mFreeSlots.remove(aID); - mTAE.put(aID, iTexture); + mTAE.put(aID, GTPP_CopiedBlockTexture); return true; } else { CORE.crash("Tried to register texture with ID " + aID + " to TAE, but it is already in use."); @@ -70,7 +69,7 @@ public class TAE { Logger.INFO("Free Page slots within TAE: " + aPageAndSlotFree); Logger.INFO("Filling them with ERROR textures."); for (int aFreeSlot : aTemp.values()) { - registerTexture(aFreeSlot, TextureFactory.of(ModBlocks.blockCasingsTieredGTPP, 15, ForgeDirection.UP)); + registerTexture(aFreeSlot, new GTPP_CopiedBlockTexture(ModBlocks.blockCasingsTieredGTPP, 1, 15)); } Logger.INFO("Finalising TAE."); for (int aKeyTae : mTAE.keySet()) { @@ -79,7 +78,7 @@ public class TAE { Logger.INFO("Finalised TAE."); } - private static boolean registerTextures(ITexture iTexture) { + private static boolean registerTextures(GTPP_CopiedBlockTexture GTPP_CopiedBlockTexture) { try { // Handle page 2. Logger.INFO("[TAE} Registering Texture, Last used casing ID is " + gtPPLastUsedIndex + "."); @@ -89,7 +88,7 @@ public class TAE { if (x != null) { ITexture[][] h = (ITexture[][]) x.get(null); if (h != null) { - h[64][secondaryIndex++] = iTexture; + h[64][secondaryIndex++] = GTPP_CopiedBlockTexture; x.set(null, h); Logger.INFO("[TAE} Registered Texture with ID " + (secondaryIndex - 1) + " in secondary index."); @@ -101,7 +100,7 @@ public class TAE { // set to page 1. else { - Textures.BlockIcons.setCasingTextureForId(gtPPLastUsedIndex, iTexture); + Textures.BlockIcons.setCasingTextureForId(gtPPLastUsedIndex, GTPP_CopiedBlockTexture); Logger.INFO("[TAE} Registered Texture with ID " + (gtPPLastUsedIndex) + " in main index."); gtPPLastUsedIndex++; return true; diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java index cfc107b4fa..81f1737f8c 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java @@ -5,7 +5,6 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; -import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.interfaces.ITexturedBlock; import gtPlusPlus.core.client.renderer.CustomOreBlockRenderer; @@ -15,6 +14,8 @@ import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.xmod.gregtech.api.objects.GTPP_CopiedBlockTexture; +import gtPlusPlus.xmod.gregtech.api.objects.GTPP_RenderedTexture; import java.lang.reflect.Field; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,7 +23,6 @@ import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Blocks; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraftforge.common.util.ForgeDirection; public class BlockBaseOre extends BasicBlock implements ITexturedBlock { @@ -101,11 +101,11 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { public ITexture[] getTexture(Block block, byte side) { if (this.blockMaterial != null) { - ITexture aIconSet = TextureFactory.of( + GTPP_RenderedTexture aIconSet = new GTPP_RenderedTexture( blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); if (aIconSet != null) { - return new ITexture[] {TextureFactory.of(Blocks.stone, 0, ForgeDirection.DOWN), aIconSet}; + return new ITexture[] {new GTPP_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; } } @@ -126,7 +126,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { } } } - return new ITexture[] {TextureFactory.of(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; + return new ITexture[] {new GTPP_RenderedTexture(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; } @Override @@ -214,11 +214,11 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { public ITexture[] getTexture(Block block, byte side) { if (this.blockMaterial != null) { - ITexture aIconSet = TextureFactory.of( + GTPP_RenderedTexture aIconSet = new GTPP_RenderedTexture( blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); if (aIconSet != null) { - return new ITexture[] {TextureFactory.of(Blocks.stone, 0, ForgeDirection.DOWN), aIconSet}; + return new ITexture[] {new GTPP_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; } } @@ -239,7 +239,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { } } } - return new ITexture[] {TextureFactory.of(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; + return new ITexture[] {new GTPP_RenderedTexture(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; } } } diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java index 46c40a3bdc..aa22f7d813 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -6,7 +6,7 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TextureSet; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.Logger; @@ -155,13 +155,13 @@ public class BaseItemComponent extends Item { if (componentType == ComponentTypes.PLATE) { GregTech_API.registerCover( componentMaterial.getPlate(1), - TextureFactory.of( + new GT_RenderedTexture( componentMaterial.getTextureSet().mTextures[71], componentMaterial.getRGBA(), false), null); } else if (componentType == ComponentTypes.PLATEDOUBLE) { GregTech_API.registerCover( componentMaterial.getPlateDouble(1), - TextureFactory.of( + new GT_RenderedTexture( componentMaterial.getTextureSet().mTextures[72], componentMaterial.getRGBA(), false), null); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java index 29609f7edc..a31e728e23 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/CustomGtTextures.java @@ -3,7 +3,7 @@ package gtPlusPlus.xmod.gregtech.api.enums; import gregtech.api.GregTech_API; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gtPlusPlus.core.lib.CORE; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; @@ -16,7 +16,7 @@ public class CustomGtTextures { PUMP, SKOOKUMCHOOCHER; - public static final ITexture[] ERROR_RENDERING = new ITexture[] {TextureFactory.of(RENDERING_ERROR)}; + public static final ITexture[] ERROR_RENDERING = new ITexture[] {new GT_RenderedTexture(RENDERING_ERROR)}; protected IIcon mIcon, mOverlay; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java index f7aab7d450..f6cf2391b3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/GTPP_MTE_BasicMachine.java @@ -11,7 +11,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -991,42 +991,42 @@ public abstract class GTPP_MTE_BasicMachine extends GTPP_MTE_BasicTank { public ITexture[] getBottomFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java index b5dc81b542..02f0a3ff40 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java @@ -9,6 +9,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTPP_Recipe; import gregtech.api.util.GT_Recipe; @@ -151,56 +152,56 @@ public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine @Override public ITexture[] getFrontFacingInactive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[0]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[0]) }; } @Override public ITexture[] getBottomFacingInactive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[2]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[2]) }; } @Override public ITexture[] getTopFacingInactive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[3]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[3]) }; } @Override public ITexture[] getSideFacingInactive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[4]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[4]) }; } @Override public ITexture[] getFrontFacingActive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[5]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[5]) }; } @Override public ITexture[] getBottomFacingActive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[7]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[7]) }; } @Override public ITexture[] getTopFacingActive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[8]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[8]) }; } @Override public ITexture[] getSideFacingActive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[9]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[9]) }; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java index bd70d916c8..007e6a1761 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java @@ -10,7 +10,7 @@ import gregtech.api.gui.GT_GUIContainer_BasicMachine; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -974,42 +974,42 @@ public abstract class GT_MetaTileEntity_DeluxeMachine extends GT_MetaTileEntity_ public ITexture[] getBottomFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java index 81a61e98b4..b2ea5a62ec 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java @@ -5,7 +5,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.minecraft.BlockPos; @@ -50,12 +50,12 @@ public class GT_MetaTileEntity_Hatch_ControlCore extends GT_MetaTileEntity_Hatch @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Control_Core)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Control_Core)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core)}; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java index a3847dfa50..500f1945bc 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java @@ -4,7 +4,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gtPlusPlus.api.objects.Logger; @@ -43,12 +43,12 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java index 950ddbffbb..b11b3bc78e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java @@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.random.XSTR; import gtPlusPlus.core.lib.CORE; @@ -89,11 +89,15 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile } public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)}; + return new ITexture[] { + aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) + }; } public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)}; + return new ITexture[] { + aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) + }; } public boolean isSimpleMachine() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java index b20c463538..d56a95d60f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java @@ -7,7 +7,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; @@ -75,12 +75,12 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Charger)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Charger)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Charger)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Charger)}; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java index a908ea75f7..94b927c80d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java @@ -5,7 +5,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Config; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.general.ItemAirFilter; @@ -80,11 +80,11 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; } public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; } public boolean isValidSlot(int aIndex) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java index 1f3260c861..350b7a788a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java @@ -1,12 +1,14 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; import gregtech.api.enums.Textures.BlockIcons; +import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -54,11 +56,16 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In } public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE)}; + return new ITexture[] { + aBaseTexture, + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) + }; } public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE)}; + return new ITexture[] { + aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) + }; } public boolean allowPutStack( @@ -91,7 +98,7 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In } public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Hatch_Naquadah(this.mName, this.mDescription, this.mTextures); + return (MetaTileEntity) new GT_MetaTileEntity_Hatch_Naquadah(this.mName, this.mDescription, this.mTextures); } @Override @@ -194,7 +201,9 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In ? StaticFields59.getCasingTexturePages(a2, texturePointer) : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; - return new ITexture[] {g, TextureFactory.of(BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE)}; + return new ITexture[] { + g, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) + }; } return aSide != aFacing diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java index b644aa9cd6..d6b0a570ac 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java @@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.lib.CORE; @@ -66,12 +66,12 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Discharger)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Discharger)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Discharger)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Discharger)}; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java index 0fdb0cee78..0a2ccdb8e5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java @@ -4,7 +4,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.block.Block; @@ -117,10 +117,10 @@ public class GT_MetaTileEntity_Hatch_Reservoir extends GT_MetaTileEntity_Hatch_F public void generateParticles(World aWorld, String name) {} public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Water)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Water)}; } public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Water)}; + return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Water)}; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java index 6a0fcfe8d4..d50d55b721 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java @@ -11,6 +11,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -197,7 +198,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getSideFacingActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -206,7 +207,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getSideFacingInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -215,7 +216,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getFrontFacingActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -224,7 +225,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getFrontFacingInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -233,21 +234,21 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getTopFacingActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getTopFacingInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getBottomFacingActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) @@ -256,7 +257,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getBottomFacingInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) @@ -265,57 +266,57 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getBottomFacingPipeActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java index f166d7f3bc..ab721cd605 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java @@ -11,6 +11,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.render.TextureFactory; import gtPlusPlus.core.lib.CORE; import net.minecraft.entity.player.EntityPlayer; @@ -127,7 +128,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getSideFacingActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -136,7 +137,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getSideFacingInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -145,7 +146,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getFrontFacingActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -154,7 +155,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getFrontFacingInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -163,21 +164,21 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getTopFacingActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getTopFacingInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getBottomFacingActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) @@ -186,7 +187,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getBottomFacingInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) @@ -195,57 +196,57 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getBottomFacingPipeActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java index 41433e50f9..5973d21fc5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java @@ -8,7 +8,7 @@ import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; @@ -276,8 +276,8 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { private ITexture getFrontFacingTurbineTexture() { if (!mHasController) { return this.getBaseMetaTileEntity().isActive() - ? TextureFactory.of(LargeTurbineTextureHandler.OVERLAY_LP_TURBINE_ACTIVE[4]) - : TextureFactory.of(LargeTurbineTextureHandler.OVERLAY_LP_TURBINE[4]); + ? new GT_RenderedTexture(LargeTurbineTextureHandler.OVERLAY_LP_TURBINE_ACTIVE[4]) + : new GT_RenderedTexture(LargeTurbineTextureHandler.OVERLAY_LP_TURBINE[4]); } else { if (usingAnimations()) { if (isControllerActive()) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java index 6d285a7f91..eff2413102 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java @@ -8,7 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; -import gregtech.api.render.TextureFactory; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implements IMetaTileEntityCable { @@ -147,60 +147,60 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem if (!mInsulated) return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, vRGB)) }; if (aConnected) { float tThickNess = getThickNess(); if (tThickNess < 0.124F) return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.374F) // 0.375 x1 return new ITexture[] { - TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - TextureFactory.of( + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( Textures.BlockIcons.INSULATION_TINY, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.499F) // 0.500 x2 return new ITexture[] { - TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - TextureFactory.of( + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( Textures.BlockIcons.INSULATION_SMALL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.624F) // 0.625 x4 return new ITexture[] { - TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - TextureFactory.of( + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( Textures.BlockIcons.INSULATION_MEDIUM, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.749F) // 0.750 x8 return new ITexture[] { - TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - TextureFactory.of( + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.874F) // 0.825 x12 return new ITexture[] { - TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - TextureFactory.of( + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( Textures.BlockIcons.INSULATION_LARGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; return new ITexture[] { - TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - TextureFactory.of( + new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + new GT_RenderedTexture( Textures.BlockIcons.INSULATION_HUGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; } return new ITexture[] { - TextureFactory.of( + new GT_RenderedTexture( Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; } @@ -235,60 +235,60 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem if (!(this.mInsulated)) return new ITexture[] { - TextureFactory.of(wireMaterial.mIconSet.mTextures[69], Dyes.getModulation(aColorIndex, this.vRGB)) + new GT_RenderedTexture(wireMaterial.mIconSet.mTextur