From 0121112e5ea9c72050957af2c2ad4aecd9d70270 Mon Sep 17 00:00:00 2001 From: Léa Gris Date: Mon, 3 Oct 2022 21:53:50 +0200 Subject: ref(texture_api): update to the texture api (#386) * ref(textures): replace deprecated texture objects with api * :spotlessapply --- 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, 802 insertions(+), 925 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPP_CopiedBlockTexture.java delete 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 e45e9e4e58..244053cfa8 100644 --- a/src/main/java/gregtech/api/enums/TAE.java +++ b/src/main/java/gregtech/api/enums/TAE.java @@ -1,16 +1,17 @@ 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 { @@ -19,7 +20,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 { @@ -33,18 +34,18 @@ public class TAE { * * @param aPage - The Texture page (0-3) * @param aID - The ID on the specified page (0-15) - * @param GTPP_CopiedBlockTexture - The Texture to register + * @param iTexture - The Texture to register * @return - Did it register correctly? */ - public static boolean registerTexture(int aPage, int aID, GTPP_CopiedBlockTexture GTPP_CopiedBlockTexture) { + public static boolean registerTexture(int aPage, int aID, ITexture iTexture) { int aRealID = aID + (aPage * 16); - return registerTexture(64 + aRealID, GTPP_CopiedBlockTexture); + return registerTexture(64 + aRealID, iTexture); } - public static boolean registerTexture(int aID, GTPP_CopiedBlockTexture GTPP_CopiedBlockTexture) { + public static boolean registerTexture(int aID, ITexture iTexture) { if (mFreeSlots.contains(aID)) { mFreeSlots.remove(aID); - mTAE.put(aID, GTPP_CopiedBlockTexture); + mTAE.put(aID, iTexture); return true; } else { CORE.crash("Tried to register texture with ID " + aID + " to TAE, but it is already in use."); @@ -69,7 +70,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, new GTPP_CopiedBlockTexture(ModBlocks.blockCasingsTieredGTPP, 1, 15)); + registerTexture(aFreeSlot, TextureFactory.of(ModBlocks.blockCasingsTieredGTPP, 15, ForgeDirection.UP)); } Logger.INFO("Finalising TAE."); for (int aKeyTae : mTAE.keySet()) { @@ -78,7 +79,7 @@ public class TAE { Logger.INFO("Finalised TAE."); } - private static boolean registerTextures(GTPP_CopiedBlockTexture GTPP_CopiedBlockTexture) { + private static boolean registerTextures(ITexture iTexture) { try { // Handle page 2. Logger.INFO("[TAE} Registering Texture, Last used casing ID is " + gtPPLastUsedIndex + "."); @@ -88,7 +89,7 @@ public class TAE { if (x != null) { ITexture[][] h = (ITexture[][]) x.get(null); if (h != null) { - h[64][secondaryIndex++] = GTPP_CopiedBlockTexture; + h[64][secondaryIndex++] = iTexture; x.set(null, h); Logger.INFO("[TAE} Registered Texture with ID " + (secondaryIndex - 1) + " in secondary index."); @@ -100,7 +101,7 @@ public class TAE { // set to page 1. else { - Textures.BlockIcons.setCasingTextureForId(gtPPLastUsedIndex, GTPP_CopiedBlockTexture); + Textures.BlockIcons.setCasingTextureForId(gtPPLastUsedIndex, iTexture); 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 81f1737f8c..cfc107b4fa 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java @@ -5,6 +5,7 @@ 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; @@ -14,8 +15,6 @@ 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; @@ -23,6 +22,7 @@ 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) { - GTPP_RenderedTexture aIconSet = new GTPP_RenderedTexture( + ITexture aIconSet = TextureFactory.of( blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); if (aIconSet != null) { - return new ITexture[] {new GTPP_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; + return new ITexture[] {TextureFactory.of(Blocks.stone, 0, ForgeDirection.DOWN), aIconSet}; } } @@ -126,7 +126,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { } } } - return new ITexture[] {new GTPP_RenderedTexture(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; + return new ITexture[] {TextureFactory.of(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) { - GTPP_RenderedTexture aIconSet = new GTPP_RenderedTexture( + ITexture aIconSet = TextureFactory.of( blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); if (aIconSet != null) { - return new ITexture[] {new GTPP_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; + return new ITexture[] {TextureFactory.of(Blocks.stone, 0, ForgeDirection.DOWN), aIconSet}; } } @@ -239,7 +239,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { } } } - return new ITexture[] {new GTPP_RenderedTexture(hiddenTextureArray[0], new short[] {240, 240, 240, 0})}; + return new ITexture[] {TextureFactory.of(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 8f513e9001..60685786f3 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.Logger; @@ -127,13 +127,13 @@ public class BaseItemComponent extends Item { if (componentType == ComponentTypes.PLATE) { GregTech_API.registerCover( componentMaterial.getPlate(1), - new GT_RenderedTexture( + TextureFactory.of( componentMaterial.getTextureSet().mTextures[71], componentMaterial.getRGBA(), false), null); } else if (componentType == ComponentTypes.PLATEDOUBLE) { GregTech_API.registerCover( componentMaterial.getPlateDouble(1), - new GT_RenderedTexture( + TextureFactory.of( 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 a31e728e23..29609f7edc 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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[] {new GT_RenderedTexture(RENDERING_ERROR)}; + public static final ITexture[] ERROR_RENDERING = new ITexture[] {TextureFactory.of(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 f6cf2391b3..f7aab7d450 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(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 02f0a3ff40..b5dc81b542 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,7 +9,6 @@ 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; @@ -152,56 +151,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], new GT_RenderedTexture(sDehydratorOverlays[0]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[0]) }; } @Override public ITexture[] getBottomFacingInactive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[2]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[2]) }; } @Override public ITexture[] getTopFacingInactive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[3]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[3]) }; } @Override public ITexture[] getSideFacingInactive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[4]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[4]) }; } @Override public ITexture[] getFrontFacingActive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[5]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[5]) }; } @Override public ITexture[] getBottomFacingActive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[7]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[7]) }; } @Override public ITexture[] getTopFacingActive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[8]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(sDehydratorOverlays[8]) }; } @Override public ITexture[] getSideFacingActive(final byte aColor) { return new ITexture[] { - Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[9]) + Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], TextureFactory.of(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 007e6a1761..bd70d916c8 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(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 b2ea5a62ec..81a61e98b4 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Control_Core)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Control_Core)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(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 500f1945bc..a3847dfa50 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Data_Orb)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(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 b11b3bc78e..950ddbffbb 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.random.XSTR; import gtPlusPlus.core.lib.CORE; @@ -89,15 +89,11 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile } public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] { - aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) - }; + return new ITexture[] {aBaseTexture, TextureFactory.of((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)}; } public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] { - aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) - }; + return new ITexture[] {aBaseTexture, TextureFactory.of((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 d56a95d60f..b20c463538 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Charger)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Charger)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Charger)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(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 94b927c80d..a908ea75f7 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; } public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(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 350b7a788a..1f3260c861 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,14 +1,12 @@ 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -56,16 +54,11 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In } public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] { - aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) - }; + return new ITexture[] {aBaseTexture, TextureFactory.of(BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE)}; } public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] { - aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) - }; + return new ITexture[] {aBaseTexture, TextureFactory.of(BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE)}; } public boolean allowPutStack( @@ -98,7 +91,7 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In } public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - return (MetaTileEntity) new GT_MetaTileEntity_Hatch_Naquadah(this.mName, this.mDescription, this.mTextures); + return new GT_MetaTileEntity_Hatch_Naquadah(this.mName, this.mDescription, this.mTextures); } @Override @@ -201,9 +194,7 @@ 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, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) - }; + return new ITexture[] {g, TextureFactory.of(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 d6b0a570ac..b644aa9cd6 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Discharger)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Discharger)}; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Discharger)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(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 0a2ccdb8e5..0fdb0cee78 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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, new GT_RenderedTexture(TexturesGtBlock.Overlay_Water)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Water)}; } public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] {aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Water)}; + return new ITexture[] {aBaseTexture, TextureFactory.of(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 d50d55b721..6a0fcfe8d4 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,7 +11,6 @@ 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; @@ -198,7 +197,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getSideFacingActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -207,7 +206,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getSideFacingInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -216,7 +215,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getFrontFacingActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -225,7 +224,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getFrontFacingInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -234,21 +233,21 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getTopFacingActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getTopFacingInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getBottomFacingActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) @@ -257,7 +256,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getBottomFacingInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) @@ -266,57 +265,57 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getBottomFacingPipeActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(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 ab721cd605..f166d7f3bc 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,7 +11,6 @@ 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; @@ -128,7 +127,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getSideFacingActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -137,7 +136,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getSideFacingInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -146,7 +145,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getFrontFacingActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -155,7 +154,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getFrontFacingInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) @@ -164,21 +163,21 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getTopFacingActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getTopFacingInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getBottomFacingActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) @@ -187,7 +186,7 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getBottomFacingInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) @@ -196,57 +195,57 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public ITexture[] getBottomFacingPipeActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + TextureFactory.of(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 5973d21fc5..41433e50f9 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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() - ? new GT_RenderedTexture(LargeTurbineTextureHandler.OVERLAY_LP_TURBINE_ACTIVE[4]) - : new GT_RenderedTexture(LargeTurbineTextureHandler.OVERLAY_LP_TURBINE[4]); + ? TextureFactory.of(LargeTurbineTextureHandler.OVERLAY_LP_TURBINE_ACTIVE[4]) + : TextureFactory.of(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 eff2413102..6d285a7f91 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.objects.GT_RenderedTexture; +import gregtech.api.render.TextureFactory; 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[] { - new GT_RenderedTexture( + TextureFactory.of( wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, vRGB)) }; if (aConnected) { float tThickNess = getThickNess(); if (tThickNess < 0.124F) return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.374F) // 0.375 x1 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( + TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + TextureFactory.of( Textures.BlockIcons.INSULATION_TINY, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.499F) // 0.500 x2 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( + TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + TextureFactory.of( Textures.BlockIcons.INSULATION_SMALL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.624F) // 0.625 x4 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( + TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + TextureFactory.of( Textures.BlockIcons.INSULATION_MEDIUM, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.749F) // 0.750 x8 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( + TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + TextureFactory.of( INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.874F) // 0.825 x12 return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( + TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + TextureFactory.of( Textures.BlockIcons.INSULATION_LARGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; return new ITexture[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GT_RenderedTexture( + TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + TextureFactory.of( Textures.BlockIcons.INSULATION_HUGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; } return new ITexture[] { - new GT_RenderedTexture( + TextureFactory.of( 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[] { - new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], Dyes.getModulation(aColorIndex, this.vRGB)) + TextureFactory.of(wireMaterial.mIconSet.mTex