From 4ad9d33f0ee8fb22a0c77a6c9372be7f260c02a5 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:40:28 -0600 Subject: [PATCH 01/10] remove GTMultiTexture --- .../gregtech/api/objects/GTMultiTexture.java | 27 ------------------- .../common/items/MetaCustomCoverItem.java | 4 +-- .../items/MetaGeneratedGregtechItems.java | 12 ++++----- 3 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 src/main/java/gregtech/api/objects/GTMultiTexture.java diff --git a/src/main/java/gregtech/api/objects/GTMultiTexture.java b/src/main/java/gregtech/api/objects/GTMultiTexture.java deleted file mode 100644 index ecd2f556619..00000000000 --- a/src/main/java/gregtech/api/objects/GTMultiTexture.java +++ /dev/null @@ -1,27 +0,0 @@ -package gregtech.api.objects; - -import gregtech.api.interfaces.ITexture; -import gregtech.common.render.GTMultiTextureRender; - -/** - *

- * Lets Multiple ITextures Render overlay over each other.< - *

- *

- * I should have done this much earlier... - *

- * - * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. - */ -@Deprecated -public class GTMultiTexture extends GTMultiTextureRender implements ITexture { - - public GTMultiTexture(ITexture... aTextures) { - super(aTextures); - } - - @Override - public boolean isOldTexture() { - return true; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java index 76b0ca91ea7..606f0eca498 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java @@ -18,8 +18,8 @@ import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTechAPI; import gregtech.api.interfaces.IIconContainer; -import gregtech.api.objects.GTMultiTexture; import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.util.Utils; @@ -73,7 +73,7 @@ private void registerCover() { } GregTechAPI.registerCover( thisStack, - new GTMultiTexture(new GTRenderedTexture(mTextures[i])), + TextureFactory.of(new GTRenderedTexture(mTextures[i])), new CoverToggleVisual()); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index e4769e98ed4..70d19cb02ef 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -48,8 +48,8 @@ import gregtech.api.enums.TCAspects; import gregtech.api.enums.Textures; import gregtech.api.enums.TierEU; -import gregtech.api.objects.GTMultiTexture; import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gtPlusPlus.core.util.data.StringUtils; import gtPlusPlus.core.util.math.MathUtils; @@ -370,31 +370,31 @@ private void registerFuelRTGRecipes() { private void registerCovers() { GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_LV.get(1L), - new GTMultiTexture( + TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[4][0], new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(64_000)); GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_MV.get(1L), - new GTMultiTexture( + TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[5][0], new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(512_000)); GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_HV.get(1L), - new GTMultiTexture( + TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[5][0], new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(4_096_000)); GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_EV.get(1L), - new GTMultiTexture( + TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[8][0], new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(32_768_000)); GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_IV.get(1L), - new GTMultiTexture( + TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[8][0], new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(262_144_000)); From 99398b23005cd1147c52b2474a3ecfe2cbd7da55 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:44:40 -0600 Subject: [PATCH 02/10] remove GTSidedTexture --- .../gregtech/api/objects/GTSidedTexture.java | 48 ------------------- .../thing/metaTileEntity/Textures.java | 3 +- 2 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 src/main/java/gregtech/api/objects/GTSidedTexture.java diff --git a/src/main/java/gregtech/api/objects/GTSidedTexture.java b/src/main/java/gregtech/api/objects/GTSidedTexture.java deleted file mode 100644 index d7b2291386c..00000000000 --- a/src/main/java/gregtech/api/objects/GTSidedTexture.java +++ /dev/null @@ -1,48 +0,0 @@ -package gregtech.api.objects; - -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.IColorModulationContainer; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; -import gregtech.common.render.GTSidedTextureRender; - -/** - * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. - */ -@Deprecated -public class GTSidedTexture extends GTSidedTextureRender implements ITexture, IColorModulationContainer { - - @Deprecated - public short[] mRGBa; - - public GTSidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, - IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa, boolean aAllowAlpha) { - super(aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5, aRGBa, aAllowAlpha); - - // Backwards Compat - GTSidedTexture.this.mRGBa = aRGBa; - } - - public GTSidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, - IIconContainer aIcon4, IIconContainer aIcon5, short[] aRGBa) { - this(aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5, aRGBa, true); - } - - public GTSidedTexture(IIconContainer aIcon0, IIconContainer aIcon1, IIconContainer aIcon2, IIconContainer aIcon3, - IIconContainer aIcon4, IIconContainer aIcon5) { - this(aIcon0, aIcon1, aIcon2, aIcon3, aIcon4, aIcon5, Dyes._NULL.mRGBa); - } - - public GTSidedTexture(IIconContainer aBottom, IIconContainer aTop, IIconContainer aSides, short[] aRGBa) { - this(aBottom, aTop, aSides, aSides, aSides, aSides, aRGBa); - } - - public GTSidedTexture(IIconContainer aBottom, IIconContainer aTop, IIconContainer aSides) { - this(aBottom, aTop, aSides, Dyes._NULL.mRGBa); - } - - @Override - public boolean isOldTexture() { - return true; - } -} diff --git a/src/main/java/tectech/thing/metaTileEntity/Textures.java b/src/main/java/tectech/thing/metaTileEntity/Textures.java index d9e6c47a28d..4dac169def8 100644 --- a/src/main/java/tectech/thing/metaTileEntity/Textures.java +++ b/src/main/java/tectech/thing/metaTileEntity/Textures.java @@ -47,7 +47,6 @@ import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.objects.GTRenderedTexture; -import gregtech.api.objects.GTSidedTexture; import gregtech.api.render.TextureFactory; public class Textures { @@ -294,7 +293,7 @@ public class Textures { public static void run() { for (byte i = 0; i < MACHINE_CASINGS_TT.length; i++) { for (byte j = 0; j < MACHINE_CASINGS_TT[i].length; j++) { - MACHINE_CASINGS_TT[i][j] = new GTSidedTexture( + MACHINE_CASINGS_TT[i][j] = TextureFactory.of( MACHINECASINGS_BOTTOM_TT[i], MACHINECASINGS_TOP_TT[i], MACHINECASINGS_SIDE_TT[i], From 1a99a9b379aecb8fc557c9684fda9e0ee0bd16dd Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:45:08 -0600 Subject: [PATCH 03/10] remove GTStdRenderedTexture --- .../api/objects/GTStdRenderedTexture.java | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/main/java/gregtech/api/objects/GTStdRenderedTexture.java diff --git a/src/main/java/gregtech/api/objects/GTStdRenderedTexture.java b/src/main/java/gregtech/api/objects/GTStdRenderedTexture.java deleted file mode 100644 index 11a3a4818fa..00000000000 --- a/src/main/java/gregtech/api/objects/GTStdRenderedTexture.java +++ /dev/null @@ -1,46 +0,0 @@ -package gregtech.api.objects; - -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraftforge.common.util.ForgeDirection; - -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.util.LightingHelper; - -/** - * This ITexture implementation extends the GT_RenderedTexture class to render with bottom side flipped as with dumb - * blocks rendering. It is used in Ore blocks rendering so they better blends with dumb block ores from vanilla or other - * mods, when seen from bottom. - * - * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. - */ -@Deprecated -public class GTStdRenderedTexture extends GTRenderedTexture { - - @SuppressWarnings("unused") - public GTStdRenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean aAllowAlpha) { - super(aIcon, aRGBa, aAllowAlpha); - } - - public GTStdRenderedTexture(IIconContainer aIcon, short[] aRGBa) { - super(aIcon, aRGBa, true); - } - - @SuppressWarnings("unused") - public GTStdRenderedTexture(IIconContainer aIcon) { - super(aIcon, Dyes._NULL.mRGBa); - } - - @Override - public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ) { - LightingHelper lighting = new LightingHelper(aRenderer); - lighting.setupLightingYNeg(aBlock, aX, aY, aZ) - .setupColor(ForgeDirection.DOWN, mRGBa); - aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getIcon()); - if (mIconContainer.getOverlayIcon() != null) { - lighting.setupColor(ForgeDirection.DOWN, 0xffffff); - aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, mIconContainer.getOverlayIcon()); - } - } -} From 25a15fad3694b77f6ca723475f6b17e0622460fd Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:47:17 -0600 Subject: [PATCH 04/10] remove GTPPCopiedBlockTexture --- src/main/java/gregtech/api/enums/TAE.java | 20 ++++++------- .../core/block/base/BlockBaseOre.java | 4 +-- .../api/objects/GTPPCopiedBlockTexture.java | 28 ------------------- .../blocks/GregtechMetaCasingBlocks.java | 6 ++-- .../blocks/GregtechMetaCasingBlocks2.java | 4 +-- .../blocks/GregtechMetaCasingBlocks3.java | 5 ++-- .../blocks/GregtechMetaCasingBlocks4.java | 4 +-- .../blocks/GregtechMetaCasingBlocks5.java | 12 ++++---- .../blocks/GregtechMetaCasingBlocks6.java | 9 +++--- .../GregtechMetaSpecialMachineCasings.java | 4 +-- .../GregtechMetaSpecialMultiCasings.java | 4 +-- 11 files changed, 34 insertions(+), 66 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPPCopiedBlockTexture.java diff --git a/src/main/java/gregtech/api/enums/TAE.java b/src/main/java/gregtech/api/enums/TAE.java index edc0e5123ce..560162a5143 100644 --- a/src/main/java/gregtech/api/enums/TAE.java +++ b/src/main/java/gregtech/api/enums/TAE.java @@ -4,10 +4,10 @@ import java.util.HashSet; import gregtech.api.interfaces.ITexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.GTPPCore; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; public class TAE { @@ -16,7 +16,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 { @@ -28,20 +28,20 @@ public class TAE { /** * - * @param aPage - The Texture page (0-3) - * @param aID - The ID on the specified page (0-15) - * @param GTPPCopiedBlockTexture - The Texture to register + * @param aPage - The Texture page (0-3) + * @param aID - The ID on the specified page (0-15) + * @param texture - The Texture to register * @return - Did it register correctly? */ - public static boolean registerTexture(int aPage, int aID, GTPPCopiedBlockTexture GTPPCopiedBlockTexture) { + public static boolean registerTexture(int aPage, int aID, ITexture texture) { int aRealID = aID + (aPage * 16); - return registerTexture(64 + aRealID, GTPPCopiedBlockTexture); + return registerTexture(64 + aRealID, texture); } - public static boolean registerTexture(int aID, GTPPCopiedBlockTexture GTPPCopiedBlockTexture) { + public static boolean registerTexture(int aID, ITexture texture) { if (mFreeSlots.contains(aID)) { mFreeSlots.remove(aID); - mTAE.put(aID, GTPPCopiedBlockTexture); + mTAE.put(aID, texture); return true; } else { GTPPCore.crash("Tried to register texture with ID " + aID + " to TAE, but it is already in use."); @@ -66,7 +66,7 @@ public static void finalizeTAE() { Logger.INFO("Free Page slots within TAE: " + aPageAndSlotFree); Logger.INFO("Filling them with ERROR textures."); for (int aFreeSlot : aTemp) { - registerTexture(aFreeSlot, new GTPPCopiedBlockTexture(ModBlocks.blockCasingsTieredGTPP, 1, 15)); + registerTexture(aFreeSlot, TextureFactory.of(ModBlocks.blockCasingsTieredGTPP, 15)); } Logger.INFO("Finalising TAE."); for (int aKeyTae : mTAE.keySet()) { diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java index bc4f4b25a6a..259be4a79e8 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java @@ -21,6 +21,7 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTOreDictUnificator; import gtPlusPlus.api.interfaces.ITexturedBlock; import gtPlusPlus.core.client.renderer.CustomOreBlockRenderer; @@ -28,7 +29,6 @@ import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.api.objects.GTPPRenderedTexture; public class BlockBaseOre extends BasicBlock implements ITexturedBlock { @@ -108,7 +108,7 @@ public ITexture[] getTexture(Block block, ForgeDirection side) { GTPPRenderedTexture aIconSet = new GTPPRenderedTexture( blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); - return new ITexture[] { new GTPPCopiedBlockTexture(Blocks.stone, 0, 0), aIconSet }; + return new ITexture[] { TextureFactory.of(Blocks.stone, 0), aIconSet }; } return new ITexture[] { new GTPPRenderedTexture(Textures.BlockIcons.STONES[0], new short[] { 240, 240, 240, 0 }) }; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPPCopiedBlockTexture.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPPCopiedBlockTexture.java deleted file mode 100644 index 117104b4f26..00000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPPCopiedBlockTexture.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.objects; - -import net.minecraft.block.Block; - -import gregtech.api.enums.Dyes; -import gregtech.api.objects.GTCopiedBlockTexture; - -/** - * Made this to get rid of deprecation warnings everywhere. - * - * @author Alkalus - * - */ -@SuppressWarnings("deprecation") -public class GTPPCopiedBlockTexture extends GTCopiedBlockTexture { - - public GTPPCopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa, boolean aAllowAlpha) { - super(aBlock, aMeta, aMeta, aRGBa, aAllowAlpha); - } - - public GTPPCopiedBlockTexture(Block aBlock, int aSide, int aMeta, short[] aRGBa) { - this(aBlock, aSide, aMeta, aRGBa, true); - } - - public GTPPCopiedBlockTexture(Block aBlock, int aSide, int aMeta) { - this(aBlock, aSide, aMeta, Dyes._NULL.mRGBa); - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java index ef9274af1d0..32f1a70365c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java @@ -8,23 +8,21 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.MaterialCasings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler; public class GregtechMetaCasingBlocks extends GregtechMetaCasingBlocksAbstract { - CasingTextureHandler TextureHandler = new CasingTextureHandler(); - public GregtechMetaCasingBlocks() { super(GregtechMetaCasingItems.class, "miscutils.blockcasings", MaterialCasings.INSTANCE); for (byte i = 0; i < 16; i = (byte) (i + 1)) { if (i == 2 || i == 3 || i == 4) { continue; } - TAE.registerTexture(0, i, new GTPPCopiedBlockTexture(this, 6, i)); + TAE.registerTexture(0, i, TextureFactory.of(this, i)); } GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing"); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java index eefc983e215..2b97e8ca3a7 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java @@ -10,11 +10,11 @@ import net.minecraft.util.IIcon; import gregtech.api.enums.TAE; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTUtility; import gregtech.common.blocks.MaterialCasings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; @@ -65,7 +65,7 @@ public GregtechMetaCasingBlocks2() { if (i == 4 || i == 10 || i == 11 || i == 12 || i == 14) { continue; } - TAE.registerTexture(1, i, new GTPPCopiedBlockTexture(this, 6, i)); + TAE.registerTexture(1, i, TextureFactory.of(this, i)); } GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Thermal Processing Casing"); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java index 0a5399efdce..1974f1a9af4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java @@ -11,11 +11,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTUtility; import gregtech.common.blocks.MaterialCasings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; @@ -23,7 +23,6 @@ public class GregtechMetaCasingBlocks3 extends GregtechMetaCasingBlocksAbstract { public static boolean mConnectedMachineTextures = false; - CasingTextureHandler3 TextureHandler = new CasingTextureHandler3(); public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems { @@ -50,7 +49,7 @@ public GregtechMetaCasingBlocks3() { if (i >= 4 && i <= 8) { continue; } - TAE.registerTexture(2, i, new GTPPCopiedBlockTexture(this, 6, i)); + TAE.registerTexture(2, i, TextureFactory.of(this, i)); } GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Aquatic Casing"); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index 63b0357d1b2..1399fc75b07 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -9,10 +9,10 @@ import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.MaterialCasings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract { @@ -23,7 +23,7 @@ public GregtechMetaCasingBlocks4() { if (i == 2 || i == 4 || i == 5 || i == 6 || i == 7 || i == 8 || i == 12 || i == 13 || i == 14 || i == 15) { continue; } - TAE.registerTexture(3, i, new GTPPCopiedBlockTexture(this, 6, i)); + TAE.registerTexture(3, i, TextureFactory.of(this, i)); } GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base"); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java index afe195d7aa8..8303fbf1c30 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java @@ -8,10 +8,10 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.MaterialCasings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGrinderMultiblock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; @@ -26,23 +26,23 @@ public GregtechMetaCasingBlocks5() { super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.5", MaterialCasings.INSTANCE); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "IsaMill Exterior Casing"); // IsaMill // Casing - TAE.registerTexture(0, 2, new GTPPCopiedBlockTexture(this, 6, 0)); + TAE.registerTexture(0, 2, TextureFactory.of(this, 0)); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "IsaMill Piping"); // IsaMill // Pipe GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill // Gearbox GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator // Casing - TAE.registerTexture(0, 3, new GTPPCopiedBlockTexture(this, 6, 3)); + TAE.registerTexture(0, 3, TextureFactory.of(this, 3)); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge // Tower // Casing - TAE.registerTexture(0, 4, new GTPPCopiedBlockTexture(this, 6, 4)); + TAE.registerTexture(0, 4, TextureFactory.of(this, 4)); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Sturdy Printer Casing"); // Unused - TAE.registerTexture(1, 10, new GTPPCopiedBlockTexture(this, 6, 5)); + TAE.registerTexture(1, 10, TextureFactory.of(this, 5)); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Forge Casing"); // Forge Hammer // Casing - TAE.registerTexture(1, 11, new GTPPCopiedBlockTexture(this, 6, 6)); + TAE.registerTexture(1, 11, TextureFactory.of(this, 6)); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Neutron Pulse Manipulator"); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Cosmic Fabric Manipulator"); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Infinity Infused Manipulator"); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java index c51d6e6afd2..fa85a7de6e6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java @@ -13,17 +13,16 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.MaterialCasings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler6; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GregtechMetaCasingBlocks6 extends GregtechMetaCasingBlocksAbstract { public static boolean mConnectedMachineTextures = false; - CasingTextureHandler6 TextureHandler = new CasingTextureHandler6(); @Override public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { @@ -47,11 +46,11 @@ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, b public GregtechMetaCasingBlocks6() { super(GregtechMetaCasingItemBlocks3.class, "gtplusplus.blockcasings.6", MaterialCasings.INSTANCE); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Fusion Machine Casing MK IV"); - TAE.registerTexture(3, 4, new GTPPCopiedBlockTexture(this, 6, 0)); + TAE.registerTexture(3, 4, TextureFactory.of(this, 0)); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Advanced Fusion Coil II"); - TAE.registerTexture(3, 5, new GTPPCopiedBlockTexture(this, 6, 1)); + TAE.registerTexture(3, 5, TextureFactory.of(this, 1)); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Unnamed"); - TAE.registerTexture(3, 6, new GTPPCopiedBlockTexture(this, 6, 2)); + TAE.registerTexture(3, 6, TextureFactory.of(this, 2)); GregtechItemList.Casing_Fusion_External2.set(new ItemStack(this, 1, 0)); GregtechItemList.Casing_Fusion_Internal2.set(new ItemStack(this, 1, 1)); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java index 96fad17286a..62e6821dcd7 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java @@ -10,10 +10,10 @@ import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.MaterialCasings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksAbstract { @@ -43,7 +43,7 @@ public GregtechMetaSpecialMachineCasings() { .addStringLocalization(this.getUnlocalizedName() + ".1.name", "Sturdy Aluminium Machine Casing"); GTLanguageManager .addStringLocalization(this.getUnlocalizedName() + ".2.name", "Vigorous Laurenium Machine Casing"); - TAE.registerTexture(84, new GTPPCopiedBlockTexture(this, 6, 2)); + TAE.registerTexture(84, TextureFactory.of(this, 2)); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Rugged Botmium Machine Casing"); GregtechItemList.Casing_Machine_Custom_1.set(new ItemStack(this, 1, 0)); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java index a6ec678456b..d7fc9d9e528 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -13,10 +13,10 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.MaterialCasings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPCopiedBlockTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; @@ -57,7 +57,7 @@ public GregtechMetaSpecialMultiCasings() { GTLanguageManager .addStringLocalization(this.getUnlocalizedName() + ".14.name", "Reinforced Heat Exchanger Casing"); GTLanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Reinforced SC Turbine Casing"); - TAE.registerTexture(1, 12, new GTPPCopiedBlockTexture(this, 6, 14)); + TAE.registerTexture(1, 12, TextureFactory.of(this, 14)); GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0)); GregtechItemList.Casing_Turbine_LP.set(new ItemStack(this, 1, 1)); From a26912a2f86f47ac50fe0fc918de357f089cc9a7 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:52:35 -0600 Subject: [PATCH 05/10] remove GTCopiedBlockTexture --- .../api/objects/GTCopiedBlockTexture.java | 36 ------------------- .../thing/casing/BlockGTCasingsBA0.java | 6 ++-- .../thing/casing/BlockGTCasingsTT.java | 4 +-- .../thing/casing/BlockGodforgeCasings.java | 4 +-- .../SpacetimeCompressionFieldCasing.java | 4 +-- .../casing/StabilisationFieldCasing.java | 4 +-- .../casing/TimeAccelerationFieldCasing.java | 4 +-- 7 files changed, 13 insertions(+), 49 deletions(-) delete mode 100644 src/main/java/gregtech/api/objects/GTCopiedBlockTexture.java diff --git a/src/main/java/gregtech/api/objects/GTCopiedBlockTexture.java b/src/main/java/gregtech/api/objects/GTCopiedBlockTexture.java deleted file mode 100644 index 79be90c3b61..00000000000 --- a/src/main/java/gregtech/api/objects/GTCopiedBlockTexture.java +++ /dev/null @@ -1,36 +0,0 @@ -package gregtech.api.objects; - -import net.minecraft.block.Block; - -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.ITexture; -import gregtech.common.render.GTCopiedBlockTextureRender; - -/** - * @deprecated Replaced by the {@link gregtech.api.render.TextureFactory} API. - */ -@Deprecated -public class GTCopiedBlockTexture extends GTCopiedBlockTextureRender implements ITexture { - - // Backwards Compat - @Deprecated - public short[] mRGBa; - - public GTCopiedBlockTexture(Block aBlock, int ordinalSide, int aMeta, short[] aRGBa, boolean aAllowAlpha) { - super(aBlock, ordinalSide, aMeta, aRGBa, aAllowAlpha); - GTCopiedBlockTexture.this.mRGBa = aRGBa; - } - - public GTCopiedBlockTexture(Block aBlock, int ordinalSide, int aMeta, short[] aRGBa) { - this(aBlock, ordinalSide, aMeta, aRGBa, true); - } - - public GTCopiedBlockTexture(Block aBlock, int ordinalSide, int aMeta) { - this(aBlock, ordinalSide, aMeta, Dyes._NULL.mRGBa); - } - - @Override - public boolean isOldTexture() { - return true; - } -} diff --git a/src/main/java/tectech/thing/casing/BlockGTCasingsBA0.java b/src/main/java/tectech/thing/casing/BlockGTCasingsBA0.java index 19469a0c703..d2855f6dc44 100644 --- a/src/main/java/tectech/thing/casing/BlockGTCasingsBA0.java +++ b/src/main/java/tectech/thing/casing/BlockGTCasingsBA0.java @@ -12,7 +12,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; -import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.BlockCasingsAbstract; import gregtech.common.blocks.MaterialCasings; @@ -44,8 +44,8 @@ public class BlockGTCasingsBA0 extends BlockCasingsAbstract { public BlockGTCasingsBA0() { super(ItemCasingsBA0.class, "gt.blockcasingsBA0", MaterialCasings.INSTANCE); for (byte b = 0; b < 16; b = (byte) (b + 1)) { - Textures.BlockIcons.casingTexturePages[BlockGTCasingsTT.texturePage][b - + START_INDEX] = new GTCopiedBlockTexture(this, 6, b); + Textures.BlockIcons.casingTexturePages[BlockGTCasingsTT.texturePage][b + START_INDEX] = TextureFactory + .of(this, b); /* IMPORTANT for block recoloring **/ } diff --git a/src/main/java/tectech/thing/casing/BlockGTCasingsTT.java b/src/main/java/tectech/thing/casing/BlockGTCasingsTT.java index 33ec58d7daa..ab8b8e14253 100644 --- a/src/main/java/tectech/thing/casing/BlockGTCasingsTT.java +++ b/src/main/java/tectech/thing/casing/BlockGTCasingsTT.java @@ -12,7 +12,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; -import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.BlockCasingsAbstract; import gregtech.common.blocks.MaterialCasings; @@ -35,7 +35,7 @@ public BlockGTCasingsTT() { setCreativeTab(TecTech.creativeTabTecTech); for (byte b = 0; b < 16; b = (byte) (b + 1)) { - Textures.BlockIcons.casingTexturePages[texturePage][b] = new GTCopiedBlockTexture(this, 6, b); + Textures.BlockIcons.casingTexturePages[texturePage][b] = TextureFactory.of(this, b); /* IMPORTANT for block recoloring **/ } GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "High Power Casing"); diff --git a/src/main/java/tectech/thing/casing/BlockGodforgeCasings.java b/src/main/java/tectech/thing/casing/BlockGodforgeCasings.java index e744cdf9b79..ed39d57e576 100644 --- a/src/main/java/tectech/thing/casing/BlockGodforgeCasings.java +++ b/src/main/java/tectech/thing/casing/BlockGodforgeCasings.java @@ -12,7 +12,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; -import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.BlockCasingsAbstract; import gregtech.common.blocks.MaterialCasings; @@ -35,7 +35,7 @@ public class BlockGodforgeCasings extends BlockCasingsAbstract { public BlockGodforgeCasings() { super(ItemCasingsGodforge.class, "gt.godforgecasing", MaterialCasings.INSTANCE); for (byte b = 0; b < 16; b = (byte) (b + 1)) { - Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = new GTCopiedBlockTexture(this, 6, b); + Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = TextureFactory.of(this, b); } GTLanguageManager diff --git a/src/main/java/tectech/thing/casing/SpacetimeCompressionFieldCasing.java b/src/main/java/tectech/thing/casing/SpacetimeCompressionFieldCasing.java index cc89d83b7d8..ca7a3c06385 100644 --- a/src/main/java/tectech/thing/casing/SpacetimeCompressionFieldCasing.java +++ b/src/main/java/tectech/thing/casing/SpacetimeCompressionFieldCasing.java @@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; -import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.BlockCasingsAbstract; import gregtech.common.blocks.MaterialCasings; @@ -41,7 +41,7 @@ public class SpacetimeCompressionFieldCasing extends BlockCasingsAbstract { public SpacetimeCompressionFieldCasing() { super(ItemCasingsSpacetime.class, "gt.spacetime_compression_field_generator", MaterialCasings.INSTANCE); for (byte b = 0; b < 16; b = (byte) (b + 1)) { - Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = new GTCopiedBlockTexture(this, 6, b); + Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = TextureFactory.of(this, b); } for (int i = 0; i < MAX_BLOCK_TIER; i++) { diff --git a/src/main/java/tectech/thing/casing/StabilisationFieldCasing.java b/src/main/java/tectech/thing/casing/StabilisationFieldCasing.java index 21fb7acb76a..82d1ff9f696 100644 --- a/src/main/java/tectech/thing/casing/StabilisationFieldCasing.java +++ b/src/main/java/tectech/thing/casing/StabilisationFieldCasing.java @@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; -import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.BlockCasingsAbstract; import gregtech.common.blocks.MaterialCasings; @@ -41,7 +41,7 @@ public class StabilisationFieldCasing extends BlockCasingsAbstract { public StabilisationFieldCasing() { super(ItemCasingsStabilisation.class, "gt.stabilisation_field_generator", MaterialCasings.INSTANCE); for (byte b = 0; b < 16; b = (byte) (b + 1)) { - Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = new GTCopiedBlockTexture(this, 6, b); + Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = TextureFactory.of(this, b); } for (int i = 0; i < MAX_BLOCK_TIER; i++) { diff --git a/src/main/java/tectech/thing/casing/TimeAccelerationFieldCasing.java b/src/main/java/tectech/thing/casing/TimeAccelerationFieldCasing.java index 47615e7b793..359a966cdd9 100644 --- a/src/main/java/tectech/thing/casing/TimeAccelerationFieldCasing.java +++ b/src/main/java/tectech/thing/casing/TimeAccelerationFieldCasing.java @@ -15,7 +15,7 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; -import gregtech.api.objects.GTCopiedBlockTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.common.blocks.BlockCasingsAbstract; import gregtech.common.blocks.MaterialCasings; @@ -41,7 +41,7 @@ public class TimeAccelerationFieldCasing extends BlockCasingsAbstract { public TimeAccelerationFieldCasing() { super(ItemCasingsTimeAcceleration.class, "gt.time_acceleration_field_generator", MaterialCasings.INSTANCE); for (byte b = 0; b < 16; b = (byte) (b + 1)) { - Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = new GTCopiedBlockTexture(this, 6, b); + Textures.BlockIcons.casingTexturePages[7][b + START_INDEX] = TextureFactory.of(this, b); } for (int i = 0; i < MAX_BLOCK_TIER; i++) { From 95204d1c110e60c60c6a9378755d80c93e49ced1 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:57:15 -0600 Subject: [PATCH 06/10] remove GTPPRenderedTexture --- .../core/block/base/BlockBaseOre.java | 18 ++++++++----- .../api/objects/GTPPRenderedTexture.java | 27 ------------------- .../turbines/MTELargerTurbineBase.java | 7 +++-- 3 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPPRenderedTexture.java diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java index 259be4a79e8..c497f3af4c2 100644 --- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java +++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java @@ -29,7 +29,6 @@ import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPRenderedTexture; public class BlockBaseOre extends BasicBlock implements ITexturedBlock { @@ -105,13 +104,18 @@ public ITexture[] getTexture(ForgeDirection side) { @Override public ITexture[] getTexture(Block block, ForgeDirection side) { if (this.blockMaterial != null) { - GTPPRenderedTexture aIconSet = new GTPPRenderedTexture( - blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], - this.blockMaterial.getRGBA()); - return new ITexture[] { TextureFactory.of(Blocks.stone, 0), aIconSet }; + ITexture texture = TextureFactory.builder() + .addIcon(blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex]) + .setRGBA(blockMaterial.getRGBA()) + .stdOrient() + .build(); + return new ITexture[] { TextureFactory.of(Blocks.stone, 0), texture }; } - return new ITexture[] { - new GTPPRenderedTexture(Textures.BlockIcons.STONES[0], new short[] { 240, 240, 240, 0 }) }; + return new ITexture[] { TextureFactory.builder() + .addIcon(Textures.BlockIcons.STONES[0]) + .setRGBA(new short[] { 240, 240, 240, 0 }) + .stdOrient() + .build() }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPPRenderedTexture.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPPRenderedTexture.java deleted file mode 100644 index fda498d1f6a..00000000000 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/objects/GTPPRenderedTexture.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.xmod.gregtech.api.objects; - -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.objects.GTRenderedTexture; - -/** - * Made this to get rid of deprecation warnings everywhere. - * - * @author Alkalus - * - */ -@SuppressWarnings("deprecation") -public class GTPPRenderedTexture extends GTRenderedTexture { - - public GTPPRenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean aAllowAlpha) { - super(aIcon, aRGBa, aAllowAlpha); - } - - public GTPPRenderedTexture(IIconContainer aIcon, short[] aRGBa) { - this(aIcon, aRGBa, true); - } - - public GTPPRenderedTexture(IIconContainer aIcon) { - this(aIcon, Dyes._NULL.mRGBa); - } -} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/MTELargerTurbineBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/MTELargerTurbineBase.java index 826bac7aa93..593fdeaff24 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/MTELargerTurbineBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/MTELargerTurbineBase.java @@ -43,6 +43,7 @@ import gregtech.api.metatileentity.implementations.MTEHatchInputBus; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.TurbineStatCalculator; @@ -54,7 +55,6 @@ import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.MTEHatchTurbine; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GTPPMultiBlockBase; -import gtPlusPlus.xmod.gregtech.api.objects.GTPPRenderedTexture; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public abstract class MTELargerTurbineBase extends GTPPMultiBlockBase @@ -121,9 +121,8 @@ protected IStructureDefinition computeValue(Class type) protected boolean looseFit = false; protected float[] flowMultipliers = new float[] { 1, 1, 1 }; - public ITexture frontFace = new GTPPRenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced); - public ITexture frontFaceActive = new GTPPRenderedTexture( - TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active); + public ITexture frontFace = TextureFactory.of(TexturesGtBlock.Overlay_Machine_Controller_Advanced); + public ITexture frontFaceActive = TextureFactory.of(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active); public ArrayList mTurbineRotorHatches = new ArrayList<>(); From b127163893f1ad0591ed1688e6a1ba41b9e9b390 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:30:03 -0600 Subject: [PATCH 07/10] GTRenderedTexture - simple fixes --- .../tileEntity/MTEFuelRefineFactory.java | 6 +- .../tileEntity/MTELargeEssentiaGenerator.java | 6 +- .../tileEntity/MTEMultiNqGenerator.java | 6 +- .../machines/basic/MTEWorldAccelerator.java | 6 +- .../core/item/base/BaseItemComponent.java | 14 +- .../implementations/GTPPMTECable.java | 43 ++-- .../MTEHatchElementalDataOrbHolder.java | 6 +- .../MTEHatchFluidGenerator.java | 6 +- .../implementations/MTEHatchInputBattery.java | 6 +- .../MTEHatchMufflerAdvanced.java | 6 +- .../implementations/MTEHatchNaquadah.java | 8 +- .../MTEHatchOutputBattery.java | 6 +- .../implementations/MTEHatchReservoir.java | 6 +- .../MTEHatchSteamBusOutput.java | 57 ++-- .../MTETreeFarmerStructural.java | 4 +- .../base/MTESteamMultiBase.java | 5 +- .../base/machines/MTETreeFarmerBase.java | 12 +- .../nbthandlers/MTEHatchCatalysts.java | 6 +- .../nbthandlers/MTEHatchMillingBalls.java | 6 +- .../common/items/MetaCustomCoverItem.java | 6 +- .../items/MetaGeneratedGregtechItems.java | 11 +- .../automation/MTEElectricAutoWorkbench.java | 10 +- .../automation/MTETesseractGenerator.java | 10 +- .../automation/MTETesseractTerminal.java | 10 +- .../generators/MTEBoilerBase.java | 12 +- .../tileentities/generators/MTEBoilerHV.java | 12 +- .../tileentities/generators/MTEBoilerLV.java | 12 +- .../tileentities/generators/MTEBoilerMV.java | 12 +- .../generators/MTEGeothermalGenerator.java | 34 ++- .../generators/MTERTGenerator.java | 34 +-- .../generators/MTERocketFuelGenerator.java | 29 +-- .../generators/MTESemiFluidGenerator.java | 24 +- .../machines/basic/MTECropHarvestor.java | 12 +- .../machines/basic/MTEPollutionCreator.java | 22 +- .../machines/basic/MTEPollutionDetector.java | 30 +-- .../machines/basic/MTEWirelessCharger.java | 22 +- .../processing/advanced/MTEAdvFusionMk4.java | 18 +- .../processing/advanced/MTEAdvFusionMk5.java | 18 +- .../processing/steam/MTESteamCentrifuge.java | 10 +- .../processing/steam/MTESteamCompressor.java | 10 +- .../processing/steam/MTESteamForgeHammer.java | 10 +- .../processing/steam/MTESteamMacerator.java | 10 +- .../multi/processing/steam/MTESteamMixer.java | 10 +- .../processing/steam/MTESteamWasher.java | 10 +- .../processing/steam/MTESteamWaterPump.java | 10 +- ...aTileEntity_PowerSubStationController.java | 4 +- .../tileentities/misc/MTESolarHeater.java | 34 +-- .../redstone/MTERedstoneButtonPanel.java | 16 +- .../redstone/MTERedstoneCircuitBlock.java | 26 +- .../redstone/MTERedstoneLamp.java | 6 +- .../redstone/MTERedstoneStrengthDisplay.java | 16 +- .../redstone/MTERedstoneStrengthScale.java | 4 +- .../tileentities/storage/MTEEnergyBuffer.java | 18 +- .../tileentities/storage/MTETieredChest.java | 6 +- .../tileentities/storage/MTETieredTank.java | 6 +- .../gregtech/loaders/RecipeGenPlates.java | 4 +- .../common/hatch/MTEBusInputFocus.java | 6 +- .../common/hatch/MTEHatchInputBeamline.java | 16 +- .../common/hatch/MTEHatchOutputBeamline.java | 16 +- .../tectech/loader/thing/CoverLoader.java | 10 +- .../thing/metaTileEntity/Textures.java | 243 +++++++++--------- .../hatch/MTEHatchCapacitor.java | 6 +- .../hatch/MTEHatchCreativeMaintenance.java | 6 +- .../hatch/MTEHatchDataConnector.java | 17 +- .../hatch/MTEHatchDataItemsInput.java | 17 +- .../hatch/MTEHatchObjectHolder.java | 6 +- .../metaTileEntity/hatch/MTEHatchParam.java | 6 +- .../metaTileEntity/hatch/MTEHatchRack.java | 6 +- .../hatch/MTEHatchUncertainty.java | 6 +- .../hatch/MTEHatchWirelessDataItemsInput.java | 17 +- .../MTEHatchWirelessDataItemsOutput.java | 17 +- .../metaTileEntity/pipe/MTEPipeData.java | 8 +- .../metaTileEntity/pipe/MTEPipeEnergy.java | 8 +- .../pipe/MTEPipeEnergyMirror.java | 8 +- .../single/MTEBuckConverter.java | 8 +- .../single/MTEDebugPollutor.java | 6 +- .../single/MTEDebugPowerGenerator.java | 6 +- .../single/MTEDebugStructureWriter.java | 8 +- .../single/MTEOwnerDetector.java | 8 +- 79 files changed, 577 insertions(+), 641 deletions(-) diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEFuelRefineFactory.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEFuelRefineFactory.java index 0c025d68db7..5d6b6841f95 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEFuelRefineFactory.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEFuelRefineFactory.java @@ -34,7 +34,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; @@ -268,17 +267,16 @@ public boolean supportsVoidProtection() { } @Override - @SuppressWarnings("ALL") public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, int colorIndex, boolean aActive, boolean aRedstone) { if (side == facing) { if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(179), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE), TextureFactory.builder() + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE), TextureFactory.builder() .addIcon(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW) .glow() .build() }; return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(179), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE), TextureFactory.builder() + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE), TextureFactory.builder() .addIcon(Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_GLOW) .glow() .build() }; diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaGenerator.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaGenerator.java index 1546a853832..660e54b02ee 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaGenerator.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaGenerator.java @@ -36,7 +36,6 @@ import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchDynamo; import gregtech.api.metatileentity.implementations.MTEHatchInput; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.objects.XSTR; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; @@ -479,17 +478,16 @@ protected MultiblockTooltipBuilder createTooltip() { } @Override - @SuppressWarnings("ALL") public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, int colorIndex, boolean aActive, boolean aRedstone) { if (side == facing) { if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(1536), - new GTRenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG), TextureFactory.builder() + TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG), TextureFactory.builder() .addIcon(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG_GLOW) .glow() .build() }; return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(1536), - new GTRenderedTexture(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG) }; + TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DRAGONEGG) }; } return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(1536) }; } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEMultiNqGenerator.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEMultiNqGenerator.java index 0d41722d0a5..0827e9e7c67 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEMultiNqGenerator.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEMultiNqGenerator.java @@ -42,7 +42,6 @@ import gregtech.api.metatileentity.implementations.MTEHatchInput; import gregtech.api.metatileentity.implementations.MTEHatchMaintenance; import gregtech.api.metatileentity.implementations.MTEHatchOutput; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; @@ -439,17 +438,16 @@ protected MultiblockTooltipBuilder createTooltip() { } @Override - @SuppressWarnings("ALL") public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, int colorIndex, boolean aActive, boolean aRedstone) { if (side == facing) { if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(44), - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE), TextureFactory.builder() + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE), TextureFactory.builder() .addIcon(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW) .glow() .build() }; return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(44), - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT) }; } return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(44) }; } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/MTEWorldAccelerator.java b/src/main/java/gregtech/common/tileentities/machines/basic/MTEWorldAccelerator.java index 5046ecd8b14..0a0bb208edc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/MTEWorldAccelerator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/MTEWorldAccelerator.java @@ -26,7 +26,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLog; public class MTEWorldAccelerator extends MTETieredMachineBlock { @@ -173,10 +173,10 @@ public ITexture[] getTexture(IGregTechTileEntity pBaseMetaTileEntity, ForgeDirec int colorIndex, boolean pActive, boolean pRedstone) { if (mMode == 0) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][colorIndex + 1], side.offsetY != 0 ? null - : pActive ? new GTRenderedTexture(_mGTIco_Norm_Active) : new GTRenderedTexture(_mGTIco_Norm_Idle) }; + : pActive ? TextureFactory.of(_mGTIco_Norm_Active) : TextureFactory.of(_mGTIco_Norm_Idle) }; } else { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][colorIndex + 1], side.offsetY != 0 ? null - : pActive ? new GTRenderedTexture(_mGTIco_TE_Active) : new GTRenderedTexture(_mGTIco_TE_Idle) }; + : pActive ? TextureFactory.of(_mGTIco_TE_Active) : TextureFactory.of(_mGTIco_TE_Idle) }; } } diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java index ba98bb25b73..33385eec8e0 100644 --- a/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/main/java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -23,7 +23,7 @@ import gregtech.api.GregTechAPI; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TextureSet; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTOreDictUnificator; import gtPlusPlus.api.objects.Logger; @@ -147,18 +147,14 @@ public boolean registerComponent() { if (componentType == ComponentTypes.PLATE) { GregTechAPI.registerCover( componentMaterial.getPlate(1), - new GTRenderedTexture( - componentMaterial.getTextureSet().mTextures[71], - componentMaterial.getRGBA(), - false), + TextureFactory + .of(componentMaterial.getTextureSet().mTextures[71], componentMaterial.getRGBA(), false), null); } else if (componentType == ComponentTypes.PLATEDOUBLE) { GregTechAPI.registerCover( componentMaterial.getPlateDouble(1), - new GTRenderedTexture( - componentMaterial.getTextureSet().mTextures[72], - componentMaterial.getRGBA(), - false), + TextureFactory + .of(componentMaterial.getTextureSet().mTextures[72], componentMaterial.getRGBA(), false), null); } return true; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GTPPMTECable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GTPPMTECable.java index 5f6d3762f8a..9dae608d9f6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GTPPMTECable.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GTPPMTECable.java @@ -11,7 +11,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntityCable; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTECable; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; public class GTPPMTECable extends MTECable implements IMetaTileEntityCable { @@ -91,51 +91,44 @@ private ITexture[] getTextureGTNH(IGregTechTileEntity aBaseMetaTileEntity, Forge wireMaterial = Materials.Iron; } - if (!mInsulated) return new ITexture[] { new GTRenderedTexture( - wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], - Dyes.getModulation(aColorIndex, vRGB)) }; + if (!mInsulated) return new ITexture[] { 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 GTRenderedTexture( + if (tThickNess < 0.124F) return new ITexture[] { TextureFactory.of( Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.374F) // 0.375 x1 - return new ITexture[] { - new GTRenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GTRenderedTexture( + return new ITexture[] { 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 GTRenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GTRenderedTexture( + return new ITexture[] { 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 GTRenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GTRenderedTexture( + return new ITexture[] { 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 GTRenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GTRenderedTexture( + return new ITexture[] { TextureFactory.of(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), + TextureFactory.of( Textures.BlockIcons.INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; if (tThickNess < 0.874F) // 0.825 x12 - return new ITexture[] { - new GTRenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GTRenderedTexture( + return new ITexture[] { 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 GTRenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), - new GTRenderedTexture( + return new ITexture[] { 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 GTRenderedTexture( - Textures.BlockIcons.INSULATION_FULL, - Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; + return new ITexture[] { TextureFactory + .of(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa)) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchElementalDataOrbHolder.java index 68396fee78a..a68a9f2e7ee 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchElementalDataOrbHolder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchElementalDataOrbHolder.java @@ -19,7 +19,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.core.util.minecraft.ItemUtils; @@ -48,12 +48,12 @@ public MTEHatchElementalDataOrbHolder(String aName, int aTier, String[] aDescrip @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(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 GTRenderedTexture(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/MTEHatchFluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchFluidGenerator.java index 9eafd09a10d..d9937f01488 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchFluidGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchFluidGenerator.java @@ -13,8 +13,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatchInput; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.objects.XSTR; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.core.util.minecraft.FluidUtils; @@ -57,12 +57,12 @@ public synchronized String[] getDescription() { @Override public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(Textures.BlockIcons.OVERLAY_MUFFLER) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_MUFFLER) }; } @Override public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(Textures.BlockIcons.OVERLAY_MUFFLER) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_MUFFLER) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchInputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchInputBattery.java index 99000edc8f2..afc6efe87a4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchInputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchInputBattery.java @@ -17,8 +17,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gregtech.api.util.GTUtility; import gtPlusPlus.core.lib.GTPPCore; @@ -82,12 +82,12 @@ public long maxAmperesIn() { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(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 GTRenderedTexture(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/MTEHatchMufflerAdvanced.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchMufflerAdvanced.java index 40e804bf362..e9e992dd692 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchMufflerAdvanced.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchMufflerAdvanced.java @@ -19,7 +19,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatchMuffler; import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.pollution.Pollution; import gtPlusPlus.core.item.general.ItemAirFilter; import gtPlusPlus.core.lib.GTPPCore; @@ -53,12 +53,12 @@ public String[] getDescription() { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Muffler_Adv) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Hatch_Muffler_Adv) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchNaquadah.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchNaquadah.java index adcf85c7751..8de64b0544f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchNaquadah.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchNaquadah.java @@ -11,7 +11,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatchInput; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.core.lib.GTPPCore; @@ -46,12 +46,12 @@ private void initHatch() { @Override public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; } public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, @@ -144,7 +144,7 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec if (side == ForgeDirection.UP || side == ForgeDirection.DOWN) { ITexture g = textureIndex > 0 ? BlockIcons.casingTexturePages[a2][texturePointer] : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; - return new ITexture[] { g, new GTRenderedTexture(BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; + return new ITexture[] { g, TextureFactory.of(BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; } return side != facing ? (textureIndex > 0 ? new ITexture[] { BlockIcons.casingTexturePages[a2][texturePointer] } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchOutputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchOutputBattery.java index 54303503c02..1c4c805bd29 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchOutputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchOutputBattery.java @@ -16,7 +16,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gregtech.api.util.GTUtility; import gtPlusPlus.core.lib.GTPPCore; @@ -73,12 +73,12 @@ public long maxEUStore() { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(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 GTRenderedTexture(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/MTEHatchReservoir.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchReservoir.java index 4351133d535..b9194d9867f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchReservoir.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchReservoir.java @@ -9,7 +9,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class MTEHatchReservoir extends MTEHatchFluidGenerator { @@ -66,12 +66,12 @@ public void generateParticles(World aWorld, String name) {} @Override public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Water) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Water) }; } @Override public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Water) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Water) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchSteamBusOutput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchSteamBusOutput.java index 52864b8beae..a2b5aa1aef8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchSteamBusOutput.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTEHatchSteamBusOutput.java @@ -17,7 +17,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.render.TextureFactory; import gtPlusPlus.core.lib.GTPPCore; @@ -122,83 +121,83 @@ public ITexture[][][] getTextureSet(ITexture[] aTextures) { } public ITexture[] getSideFacingActive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + return new ITexture[] { TextureFactory + .of(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getSideFacingInactive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + return new ITexture[] { TextureFactory + .of(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getFrontFacingActive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + return new ITexture[] { TextureFactory + .of(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getFrontFacingInactive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + return new ITexture[] { TextureFactory + .of(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getTopFacingActive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; + return new ITexture[] { TextureFactory + .of(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getTopFacingInactive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; + return new ITexture[] { TextureFactory + .of(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getBottomFacingActive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( + return new ITexture[] { TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; } public ITexture[] getBottomFacingInactive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( + return new ITexture[] { TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; } public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( + return new ITexture[] { TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[] { new GTRenderedTexture( + return new ITexture[] { TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { return new ITexture[] { - new GTRenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + TextureFactory + .of(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { return new ITexture[] { - new GTRenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + TextureFactory + .of(mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { return new ITexture[] { - new GTRenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[] { - new GTRenderedTexture( + TextureFactory.of( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + TextureFactory.of(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTETreeFarmerStructural.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTETreeFarmerStructural.java index dca1cfbfa46..8093b34fee6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTETreeFarmerStructural.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/MTETreeFarmerStructural.java @@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.MTETreeFarmerBase; public class MTETreeFarmerStructural extends MTETreeFarmerBase { @@ -32,7 +32,7 @@ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { @Override public ITexture getOverlayIcon() { - return new GTRenderedTexture(Textures.BlockIcons.VOID); + return TextureFactory.of(Textures.BlockIcons.VOID); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/MTESteamMultiBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/MTESteamMultiBase.java index a9076840858..5ee3ba6b718 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/MTESteamMultiBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/MTESteamMultiBase.java @@ -29,7 +29,6 @@ import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchInput; import gregtech.api.metatileentity.implementations.MTEHatchOutput; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.util.GTUtility; import gregtech.api.util.GTWaila; @@ -71,9 +70,9 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()) }; } - protected abstract GTRenderedTexture getFrontOverlay(); + protected abstract ITexture getFrontOverlay(); - protected abstract GTRenderedTexture getFrontOverlayActive(); + protected abstract ITexture getFrontOverlayActive(); public abstract int getTierRecipes(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/MTETreeFarmerBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/MTETreeFarmerBase.java index e3f264ee84d..2f36a9ae9e9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/MTETreeFarmerBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/MTETreeFarmerBase.java @@ -7,7 +7,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public abstract class MTETreeFarmerBase extends MTETieredMachineBlock { @@ -139,23 +139,23 @@ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, fina } public ITexture[] getFront(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Farm_Manager) }; } public ITexture[] getBack(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Farm_Manager) }; } public ITexture[] getBottom(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Sterile_Casing) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Sterile_Casing) }; } public ITexture[] getTop(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Podzol) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Podzol) }; } public ITexture[] getSides(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Farm_Manager) }; } public ITexture[] getFrontActive(final byte aColor) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/MTEHatchCatalysts.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/MTEHatchCatalysts.java index ca8624a7d28..ec054686b37 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/MTEHatchCatalysts.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/MTEHatchCatalysts.java @@ -10,7 +10,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; @@ -27,12 +27,12 @@ public MTEHatchCatalysts(String aName, String[] aDescription, ITexture[][][] aTe @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Bus_Catalyst) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Bus_Catalyst) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/MTEHatchMillingBalls.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/MTEHatchMillingBalls.java index 9f50f9846ef..ec462610a05 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/MTEHatchMillingBalls.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/MTEHatchMillingBalls.java @@ -10,7 +10,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; @@ -27,12 +27,12 @@ public MTEHatchMillingBalls(String aName, String[] aDescription, ITexture[][][] @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Bus_Milling_Balls) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Bus_Milling_Balls) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Bus_Milling_Balls) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Bus_Milling_Balls) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java index 606f0eca498..2bdeec2caa1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaCustomCoverItem.java @@ -18,7 +18,6 @@ import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTechAPI; import gregtech.api.interfaces.IIconContainer; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.render.TextureFactory; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.creative.AddToCreativeTab; @@ -71,10 +70,7 @@ private void registerCover() { if (i > 0 && hide()) { ItemUtils.hideItemFromNEI(thisStack); } - GregTechAPI.registerCover( - thisStack, - TextureFactory.of(new GTRenderedTexture(mTextures[i])), - new CoverToggleVisual()); + GregTechAPI.registerCover(thisStack, TextureFactory.of(mTextures[i]), new CoverToggleVisual()); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index 70d19cb02ef..116ee802c19 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -48,7 +48,6 @@ import gregtech.api.enums.TCAspects; import gregtech.api.enums.Textures; import gregtech.api.enums.TierEU; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gtPlusPlus.core.util.data.StringUtils; @@ -372,31 +371,31 @@ private void registerCovers() { GregtechItemList.Cover_Overflow_Valve_LV.get(1L), TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[4][0], - new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), + TextureFactory.of(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(64_000)); GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_MV.get(1L), TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[5][0], - new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), + TextureFactory.of(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(512_000)); GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_HV.get(1L), TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[5][0], - new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), + TextureFactory.of(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(4_096_000)); GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_EV.get(1L), TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[8][0], - new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), + TextureFactory.of(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(32_768_000)); GregTechAPI.registerCover( GregtechItemList.Cover_Overflow_Valve_IV.get(1L), TextureFactory.of( Textures.BlockIcons.MACHINE_CASINGS[8][0], - new GTRenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)), + TextureFactory.of(TexturesGtBlock.Overlay_Overflow_Valve)), new CoverOverflowValve(262_144_000)); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTEElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTEElectricAutoWorkbench.java index 5a9ff884c82..a153b0581e6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTEElectricAutoWorkbench.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTEElectricAutoWorkbench.java @@ -27,7 +27,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicTank; import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gregtech.api.util.GTOreDictUnificator; import gregtech.api.util.GTUtility; @@ -763,12 +763,12 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina public ITexture[] getFront(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; + TextureFactory.of(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; } public ITexture[] getBack(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(BlockIcons.OVERLAY_PIPE) }; + TextureFactory.of(BlockIcons.OVERLAY_PIPE) }; } public ITexture[] getBottom(final byte aColor) { @@ -777,12 +777,12 @@ public ITexture[] getBottom(final byte aColor) { public ITexture[] getTop(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; + TextureFactory.of(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; } public ITexture[] getSides(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; + TextureFactory.of(TexturesGtBlock.Casing_Adv_Workbench_Crafting_Overlay) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTETesseractGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTETesseractGenerator.java index a48bcdace46..596a6030f6a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTETesseractGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTETesseractGenerator.java @@ -28,7 +28,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicTank; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.GTPPCore; @@ -748,10 +748,10 @@ public ITexture[][][] getTextureSet(final ITexture[] aTextures) { public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side, final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { return side == facing - ? new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } - : new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GTRenderedTexture(Textures.BlockIcons.VOID) }; + ? new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Dimensional), + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_Frequency) } + : new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Dimensional), + TextureFactory.of(Textures.BlockIcons.VOID) }; } // To-Do? diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTETesseractTerminal.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTETesseractTerminal.java index 1935129e32e..26cbd8979aa 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTETesseractTerminal.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTETesseractTerminal.java @@ -19,7 +19,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicTank; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.core.util.minecraft.PlayerUtils; @@ -569,10 +569,10 @@ public ITexture[][][] getTextureSet(final ITexture[] aTextures) { public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side, final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { return side == facing - ? new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } - : new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GTRenderedTexture(Textures.BlockIcons.VOID) }; + ? new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Dimensional), + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_Frequency) } + : new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Dimensional), + TextureFactory.of(Textures.BlockIcons.VOID) }; } // To-Do? diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerBase.java index af4fcc4598b..03531aaa287 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerBase.java @@ -21,7 +21,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTOreDictUnificator; import gregtech.common.pollution.PollutionConfig; import gregtech.common.tileentities.boilers.MTEBoiler; @@ -62,7 +62,7 @@ public String[] getDescription() { } public ITexture getOverlayIcon() { - return new GTRenderedTexture(Textures.BlockIcons.BOILER_FRONT); + return TextureFactory.of(Textures.BlockIcons.BOILER_FRONT); } @Override @@ -83,13 +83,13 @@ public ITexture[][][] getTextureSet(final ITexture[] aTextures) { return rTextures; } - protected GTRenderedTexture getCasingTexture() { + protected ITexture getCasingTexture() { if (this.tier == 1) { - return new GTRenderedTexture(Textures.BlockIcons.MACHINE_LV_SIDE); + return TextureFactory.of(Textures.BlockIcons.MACHINE_LV_SIDE); } else if (this.tier == 2) { - return new GTRenderedTexture(Textures.BlockIcons.MACHINE_MV_SIDE); + return TextureFactory.of(Textures.BlockIcons.MACHINE_MV_SIDE); } else { - return new GTRenderedTexture(Textures.BlockIcons.MACHINE_HV_SIDE); + return TextureFactory.of(Textures.BlockIcons.MACHINE_HV_SIDE); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerHV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerHV.java index 6bb0c658bd5..0f12ef39c8a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerHV.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerHV.java @@ -4,7 +4,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; public class MTEBoilerHV extends MTEBoilerBase { @@ -22,26 +22,26 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { } @Override - protected GTRenderedTexture getCasingTexture() { - return new GTRenderedTexture(Textures.BlockIcons.MACHINE_HV_SIDE); + protected ITexture getCasingTexture() { + return TextureFactory.of(Textures.BlockIcons.MACHINE_HV_SIDE); } @Override public ITexture[] getFront(final byte aColor) { return new ITexture[] { super.getFront(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.BOILER_FRONT) }; + TextureFactory.of(Textures.BlockIcons.BOILER_FRONT) }; } @Override public ITexture[] getTop(final byte aColor) { return new ITexture[] { super.getTop(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.MACHINE_HV_TOP) }; + TextureFactory.of(Textures.BlockIcons.MACHINE_HV_TOP) }; } @Override public ITexture[] getFrontActive(final byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerLV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerLV.java index 0d8c03e448d..a66b8d3e15f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerLV.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerLV.java @@ -4,7 +4,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; public class MTEBoilerLV extends MTEBoilerBase { @@ -22,26 +22,26 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { } @Override - protected GTRenderedTexture getCasingTexture() { - return new GTRenderedTexture(Textures.BlockIcons.MACHINE_LV_SIDE); + protected ITexture getCasingTexture() { + return TextureFactory.of(Textures.BlockIcons.MACHINE_LV_SIDE); } @Override public ITexture[] getFront(final byte aColor) { return new ITexture[] { super.getFront(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.BOILER_FRONT) }; + TextureFactory.of(Textures.BlockIcons.BOILER_FRONT) }; } @Override public ITexture[] getTop(final byte aColor) { return new ITexture[] { super.getTop(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.MACHINE_LV_TOP) }; + TextureFactory.of(Textures.BlockIcons.MACHINE_LV_TOP) }; } @Override public ITexture[] getFrontActive(final byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerMV.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerMV.java index 32bda689c29..d5b19c749a4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerMV.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEBoilerMV.java @@ -4,7 +4,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; public class MTEBoilerMV extends MTEBoilerBase { @@ -22,26 +22,26 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { } @Override - protected GTRenderedTexture getCasingTexture() { - return new GTRenderedTexture(Textures.BlockIcons.MACHINE_MV_SIDE); + protected ITexture getCasingTexture() { + return TextureFactory.of(Textures.BlockIcons.MACHINE_MV_SIDE); } @Override public ITexture[] getFront(final byte aColor) { return new ITexture[] { super.getFront(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.BOILER_FRONT) }; + TextureFactory.of(Textures.BlockIcons.BOILER_FRONT) }; } @Override public ITexture[] getTop(final byte aColor) { return new ITexture[] { super.getTop(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.MACHINE_MV_TOP) }; + TextureFactory.of(Textures.BlockIcons.MACHINE_MV_TOP) }; } @Override public ITexture[] getFrontActive(final byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEGeothermalGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEGeothermalGenerator.java index b89a6092dc0..c21b4de8931 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEGeothermalGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTEGeothermalGenerator.java @@ -14,9 +14,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicGenerator; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gregtech.common.pollution.PollutionConfig; import gtPlusPlus.core.lib.GTPPCore; @@ -90,68 +90,64 @@ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { @Override public ITexture[] getFront(final byte aColor) { - return new ITexture[] { super.getFront(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), + return new ITexture[] { super.getFront(aColor)[0], TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] }; } @Override public ITexture[] getBack(final byte aColor) { - return new ITexture[] { super.getBack(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK), - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical) }; + return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_BACK), + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Diesel_Vertical) }; } @Override public ITexture[] getBottom(final byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) }; } @Override public ITexture[] getTop(final byte aColor) { - return new ITexture[] { super.getTop(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER) }; + return new ITexture[] { super.getTop(aColor)[0], TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER) }; } @Override public ITexture[] getSides(final byte aColor) { - return new ITexture[] { super.getSides(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT) }; + return new ITexture[] { super.getSides(aColor)[0], TextureFactory.of(Textures.BlockIcons.BOILER_LAVA_FRONT) }; } @Override public ITexture[] getFrontActive(final byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE), + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier] }; } @Override public ITexture[] getBackActive(final byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE), - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE), + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active) }; } @Override public ITexture[] getBottomActive(final byte aColor) { return new ITexture[] { super.getBottomActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) }; } @Override public ITexture[] getTopActive(final byte aColor) { return new ITexture[] { super.getTopActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE) }; } @Override public ITexture[] getSidesActive(final byte aColor) { return new ITexture[] { super.getSidesActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTERTGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTERTGenerator.java index ddad318ccf3..3b551a14b64 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTERTGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTERTGenerator.java @@ -14,8 +14,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicGenerator; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTRecipe; import gregtech.api.util.GTUtility; import gregtech.common.pollution.Pollution; @@ -219,67 +219,67 @@ public int getEfficiency() { @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP), + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB) }; } @Override public ITexture[] getBack(byte aColor) { return new ITexture[] { super.getBack(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) }; } @Override public ITexture[] getTop(byte aColor) { return new ITexture[] { super.getTop(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP), - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP), + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()] }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()] }; } @Override public ITexture[] getFrontActive(byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE) }; } @Override public ITexture[] getBackActive(byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; } @Override public ITexture[] getBottomActive(byte aColor) { return new ITexture[] { super.getBottomActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) }; } @Override public ITexture[] getTopActive(byte aColor) { return new ITexture[] { super.getTopActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; } @Override public ITexture[] getSidesActive(byte aColor) { return new ITexture[] { gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS[this.mTier][(0)], - new GTRenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), - gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()] }; + TextureFactory.of(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE), + Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[getTier()] }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTERocketFuelGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTERocketFuelGenerator.java index 3565ac831ba..708df8cbc5a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTERocketFuelGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTERocketFuelGenerator.java @@ -9,8 +9,8 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gtPlusPlus.api.recipe.GTPPRecipeMaps; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.MTERocketFuelGeneratorBase; @@ -65,17 +65,14 @@ public int getFuelValue(final ItemStack aStack) { return rValue; } - private GTRenderedTexture getCasingTexture() { + private ITexture getCasingTexture() { if (this.mTier <= 4) { - return new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + return TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top); } else if (this.mTier == 5) { - - return new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); + return TextureFactory.of(TexturesGtBlock.Casing_Machine_Advanced); } else { - - return new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Ultra); + return TextureFactory.of(TexturesGtBlock.Casing_Machine_Ultra); } - // return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); } @Override @@ -87,25 +84,25 @@ public ITexture[] getFront(final byte aColor) { @Override public ITexture[] getBack(final byte aColor) { return new ITexture[] { super.getBack(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Vent) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Vent) }; } @Override public ITexture[] getBottom(final byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } @Override public ITexture[] getTop(final byte aColor) { return new ITexture[] { super.getTop(aColor)[0], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Redstone_Off) }; } @Override public ITexture[] getSides(final byte aColor) { return new ITexture[] { super.getSides(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal) }; } @Override @@ -117,24 +114,24 @@ public ITexture[] getFrontActive(final byte aColor) { @Override public ITexture[] getBackActive(final byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Vent_Fast) }; } @Override public ITexture[] getBottomActive(final byte aColor) { return new ITexture[] { super.getBottomActive(aColor)[0], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } @Override public ITexture[] getTopActive(final byte aColor) { return new ITexture[] { super.getTopActive(aColor)[0], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Redstone_On) }; } @Override public ITexture[] getSidesActive(final byte aColor) { return new ITexture[] { super.getSidesActive(aColor)[0], this.getCasingTexture(), - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTESemiFluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTESemiFluidGenerator.java index 3e22764a6ef..a981cd466d9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTESemiFluidGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/MTESemiFluidGenerator.java @@ -13,8 +13,8 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicGenerator; import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gregtech.api.util.GTUtility; import gregtech.common.pollution.PollutionConfig; @@ -103,62 +103,60 @@ public int getFuelValue(ItemStack aStack) { @Override public ITexture[] getFront(byte aColor) { return new ITexture[] { super.getFront(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBack(byte aColor) { - return new ITexture[] { super.getBack(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; + return new ITexture[] { super.getBack(aColor)[0], TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; } @Override public ITexture[] getBottom(byte aColor) { return new ITexture[] { super.getBottom(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) }; } @Override public ITexture[] getTop(byte aColor) { - return new ITexture[] { super.getTop(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE) }; + return new ITexture[] { super.getTop(aColor)[0], TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_SIDE) }; } @Override public ITexture[] getSides(byte aColor) { return new ITexture[] { super.getSides(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_TOP) }; } @Override public ITexture[] getFrontActive(byte aColor) { return new ITexture[] { super.getFrontActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE), + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] }; } @Override public ITexture[] getBackActive(byte aColor) { return new ITexture[] { super.getBackActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; } @Override public ITexture[] getBottomActive(byte aColor) { return new ITexture[] { super.getBottomActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) }; } @Override public ITexture[] getTopActive(byte aColor) { return new ITexture[] { super.getTopActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE) }; } @Override public ITexture[] getSidesActive(byte aColor) { return new ITexture[] { super.getSidesActive(aColor)[0], - new GTRenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; + TextureFactory.of(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTECropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTECropHarvestor.java index f1f129606fc..39e699ea610 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTECropHarvestor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTECropHarvestor.java @@ -30,7 +30,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicTank; import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.GTPPCore; @@ -572,27 +572,27 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina public ITexture[] getFront(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter) }; + TextureFactory.of(TexturesGtBlock.Casing_CropHarvester_Cutter) }; } public ITexture[] getBack(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter) }; + TextureFactory.of(TexturesGtBlock.Casing_CropHarvester_Cutter) }; } public ITexture[] getBottom(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_CropHarvester_Boxes) }; + TextureFactory.of(TexturesGtBlock.Casing_CropHarvester_Boxes) }; } public ITexture[] getTop(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_CropHarvester_Boxes) }; + TextureFactory.of(TexturesGtBlock.Casing_CropHarvester_Boxes) }; } public ITexture[] getSides(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_CropHarvester_Cutter) }; + TextureFactory.of(TexturesGtBlock.Casing_CropHarvester_Cutter) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEPollutionCreator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEPollutionCreator.java index e1a2d5c8027..c34235acb33 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEPollutionCreator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEPollutionCreator.java @@ -11,7 +11,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.pollution.Pollution; import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.core.util.minecraft.PlayerUtils; @@ -71,52 +71,52 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina public ITexture[] getFront(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_2) }; } public ITexture[] getBack(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getBottom(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getTop(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getSides(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getFrontActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_2) }; } public ITexture[] getBackActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getBottomActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getTopActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getSidesActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEPollutionDetector.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEPollutionDetector.java index f8c1ddbdeb1..17238441bf6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEPollutionDetector.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEPollutionDetector.java @@ -11,7 +11,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.common.pollution.Pollution; import gtPlusPlus.core.lib.GTPPCore; @@ -51,10 +51,10 @@ public String[] getDescription() { public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side, final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { return side == facing - ? new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency) } - : new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), - new GTRenderedTexture(Textures.BlockIcons.VOID) }; + ? new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Dimensional), + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_Frequency) } + : new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Dimensional), + TextureFactory.of(Textures.BlockIcons.VOID) }; } @Override @@ -84,52 +84,52 @@ public ITexture[][][] getTextureSet(final ITexture[] aTextures) { public ITexture[] getFront(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_2) }; } public ITexture[] getBack(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getBottom(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getTop(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getSides(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getFrontActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_2) }; } public ITexture[] getBackActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getBottomActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getTopActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getSidesActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEWirelessCharger.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEWirelessCharger.java index 739a0983317..e1678d32434 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEWirelessCharger.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEWirelessCharger.java @@ -17,7 +17,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.core.util.minecraft.EntityUtils; @@ -101,52 +101,52 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina public ITexture[] getFront(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_2) }; } public ITexture[] getBack(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getBottom(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getTop(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getSides(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getFrontActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Screen_2) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Screen_2) }; } public ITexture[] getBackActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getBottomActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getTopActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getSidesActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvFusionMk4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvFusionMk4.java index 4477c3b7bc9..aa6e66c9ca8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvFusionMk4.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvFusionMk4.java @@ -14,7 +14,6 @@ import gregtech.api.metatileentity.implementations.MTEHatchEnergy; import gregtech.api.metatileentity.implementations.MTEHatchInput; import gregtech.api.metatileentity.implementations.MTEHatchOutput; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.objects.overclockdescriber.OverclockDescriber; import gregtech.api.render.TextureFactory; import gregtech.api.util.AdvancedFusionOverclockDescriber; @@ -115,27 +114,24 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { if (side == facing) { return new ITexture[] { - new GTRenderedTexture( - Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)), + TextureFactory + .of(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)), TextureFactory.builder() .addIcon(this.getIconOverlay()) .extFacing() .build() }; } else if (!aActive) { - return new ITexture[] { new GTRenderedTexture( - Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; + return new ITexture[] { TextureFactory + .of(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; } else { - return new ITexture[] { new GTRenderedTexture( - TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; + return new ITexture[] { TextureFactory + .of(TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_ULTRA, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; } } @Override public ITexture getTextureOverlay() { - return new GTRenderedTexture( + return TextureFactory.of( this.getBaseMetaTileEntity() .isActive() ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvFusionMk5.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvFusionMk5.java index a7d7529f346..90946f54401 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvFusionMk5.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvFusionMk5.java @@ -14,7 +14,6 @@ import gregtech.api.metatileentity.implementations.MTEHatchEnergy; import gregtech.api.metatileentity.implementations.MTEHatchInput; import gregtech.api.metatileentity.implementations.MTEHatchOutput; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.objects.overclockdescriber.OverclockDescriber; import gregtech.api.render.TextureFactory; import gregtech.api.util.AdvancedFusionOverclockDescriber; @@ -115,27 +114,24 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { if (side == facing) { return new ITexture[] { - new GTRenderedTexture( - Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)), + TextureFactory + .of(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)), TextureFactory.builder() .addIcon(this.getIconOverlay()) .extFacing() .build() }; } else if (!aActive) { - return new ITexture[] { new GTRenderedTexture( - Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; + return new ITexture[] { TextureFactory + .of(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; } else { - return new ITexture[] { new GTRenderedTexture( - TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_HYPER, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; + return new ITexture[] { TextureFactory + .of(TexturesGtBlock.TEXTURE_CASING_FUSION_CASING_HYPER, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; } } @Override public ITexture getTextureOverlay() { - return new GTRenderedTexture( + return TextureFactory.of( this.getBaseMetaTileEntity() .isActive() ? TexturesGtBlock.Casing_Machine_Screen_Rainbow : TexturesGtBlock.Casing_Machine_Screen_1); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java index 740a71e5898..a382afd472b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java @@ -41,11 +41,11 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTRecipe; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; @@ -154,13 +154,13 @@ public byte getUpdateData() { } @Override - protected GTRenderedTexture getFrontOverlay() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_CENTRIFUGE); + protected ITexture getFrontOverlay() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_CENTRIFUGE); } @Override - protected GTRenderedTexture getFrontOverlayActive() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_CENTRIFUGE_ACTIVE); + protected ITexture getFrontOverlayActive() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_CENTRIFUGE_ACTIVE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java index bd20334bf5e..55a82d87d3d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java @@ -42,12 +42,12 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.recipe.metadata.CompressionTierKey; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTRecipe; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; @@ -132,13 +132,13 @@ public byte getUpdateData() { } @Override - protected GTRenderedTexture getFrontOverlay() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR); + protected ITexture getFrontOverlay() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR); } @Override - protected GTRenderedTexture getFrontOverlayActive() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE); + protected ITexture getFrontOverlayActive() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java index 67f2d7c139a..2a50599e363 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java @@ -44,11 +44,11 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTRecipe; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; @@ -153,13 +153,13 @@ public byte getUpdateData() { } @Override - protected GTRenderedTexture getFrontOverlay() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FORGE_HAMMER); + protected ITexture getFrontOverlay() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FORGE_HAMMER); } @Override - protected GTRenderedTexture getFrontOverlayActive() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FORGE_HAMMER_ACTIVE); + protected ITexture getFrontOverlayActive() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_FORGE_HAMMER_ACTIVE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java index 6b3e8b437f2..55281182af6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java @@ -42,11 +42,11 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTRecipe; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; @@ -128,13 +128,13 @@ public byte getUpdateData() { } @Override - protected GTRenderedTexture getFrontOverlay() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR); + protected ITexture getFrontOverlay() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR); } @Override - protected GTRenderedTexture getFrontOverlayActive() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE); + protected ITexture getFrontOverlayActive() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java index a2c4dbd7ec3..c9fecf79392 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java @@ -47,10 +47,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTRecipe; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; @@ -155,13 +155,13 @@ public byte getUpdateData() { } @Override - protected GTRenderedTexture getFrontOverlay() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_CENTRIFUGE); + protected ITexture getFrontOverlay() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_CENTRIFUGE); } @Override - protected GTRenderedTexture getFrontOverlayActive() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_CENTRIFUGE_ACTIVE); + protected ITexture getFrontOverlayActive() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_CENTRIFUGE_ACTIVE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java index 8257a4a65ac..bdfcafd4078 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java @@ -48,12 +48,12 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.recipe.check.SimpleCheckRecipeResult; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTRecipe; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; @@ -163,13 +163,13 @@ public byte getUpdateData() { } @Override - protected GTRenderedTexture getFrontOverlay() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_WASHER); + protected ITexture getFrontOverlay() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_WASHER); } @Override - protected GTRenderedTexture getFrontOverlayActive() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_WASHER_ACTIVE); + protected ITexture getFrontOverlayActive() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_STEAM_WASHER_ACTIVE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWaterPump.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWaterPump.java index 8b592a1cc1e..3493daf39ca 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWaterPump.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWaterPump.java @@ -43,9 +43,9 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.VoidProtectionHelper; @@ -206,13 +206,13 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina } @Override - protected GTRenderedTexture getFrontOverlay() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_WATER_PUMP); + protected ITexture getFrontOverlay() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_WATER_PUMP); } @Override - protected GTRenderedTexture getFrontOverlayActive() { - return new GTRenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_WATER_PUMP_ACTIVE); + protected ITexture getFrontOverlayActive() { + return TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_WATER_PUMP_ACTIVE); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java index 24b1b0ec4d1..d7decca1cff 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java @@ -69,9 +69,9 @@ import gregtech.api.metatileentity.implementations.MTEHatchDynamo; import gregtech.api.metatileentity.implementations.MTEHatchEnergy; import gregtech.api.metatileentity.implementations.MTEHatchMaintenance; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.SimpleCheckRecipeResult; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; import gtPlusPlus.api.objects.Logger; @@ -149,7 +149,7 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { if (side == facing) { return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(24)), - new GTRenderedTexture( + TextureFactory.of( aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER) }; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/MTESolarHeater.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/MTESolarHeater.java index 45721139bb0..9c61ae3e7b5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/MTESolarHeater.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/MTESolarHeater.java @@ -13,7 +13,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.core.lib.GTPPCore; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.MTESolarTower; @@ -68,49 +68,49 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina } public ITexture[] getFront(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GTRenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top), + TextureFactory.of(Textures.BlockIcons.SOLARPANEL_IV) }; } public ITexture[] getBack(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top) }; } public ITexture[] getBottom(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getTop(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GTRenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top), + TextureFactory.of(Textures.BlockIcons.SOLARPANEL_LuV) }; } public ITexture[] getSides(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GTRenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top), + TextureFactory.of(Textures.BlockIcons.SOLARPANEL_IV) }; } public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GTRenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top), + TextureFactory.of(Textures.BlockIcons.SOLARPANEL_IV) }; } public ITexture[] getBackActive(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top) }; } public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Bottom) }; } public ITexture[] getTopActive(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GTRenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top), + TextureFactory.of(Textures.BlockIcons.SOLARPANEL_LuV) }; } public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top), - new GTRenderedTexture(Textures.BlockIcons.SOLARPANEL_IV) }; + return new ITexture[] { TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top), + TextureFactory.of(Textures.BlockIcons.SOLARPANEL_IV) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneButtonPanel.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneButtonPanel.java index a83d05f9287..9de18bde0d1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneButtonPanel.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneButtonPanel.java @@ -8,7 +8,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; @@ -161,7 +161,7 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { if (side == facing) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - new GTRenderedTexture(sIconList[mType * 16 + mRedstoneStrength]) }; + TextureFactory.of(sIconList[mType * 16 + mRedstoneStrength]) }; } return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (side == facing ? 0 : side == facing.getOpposite() ? 1 @@ -174,31 +174,31 @@ public ITexture[] getFront(final byte aColor) { public ITexture[] getTop(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Main_Off) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Top_Main_Off) }; } public ITexture[] getTopActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Main_On) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Top_Main_On) }; } public ITexture[] getBottom(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Main_Off) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Bottom_Main_Off) }; } public ITexture[] getBottomActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Main_On) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Bottom_Main_On) }; } public ITexture[] getSides(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Main_Off) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Side_Main_Off) }; } public ITexture[] getSidesActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Main_On) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Side_Main_On) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java index 4e0510bf333..2112a1c998a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java @@ -35,7 +35,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.CircuitryBehavior; import gregtech.api.util.CoverBehavior; import gregtech.api.util.GTLog; @@ -440,42 +440,42 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex + 1]; } - private GTRenderedTexture getBase() { - return new GTRenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + private ITexture getBase() { + return TextureFactory.of(TexturesGtBlock.Casing_Machine_Simple_Top); } public ITexture[] getTop(final byte aColor) { - return new ITexture[] { getBase(), new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Off) }; + return new ITexture[] { getBase(), TextureFactory.of(TexturesGtBlock.Casing_Redstone_Top_Off) }; } public ITexture[] getTopActive(final byte aColor) { - return new ITexture[] { getBase(), new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Top_On) }; + return new ITexture[] { getBase(), TextureFactory.of(TexturesGtBlock.Casing_Redstone_Top_On) }; } public ITexture[] getBack(final byte aColor) { - return new ITexture[] { getBase(), new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off), - new GTRenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red) }; + return new ITexture[] { getBase(), TextureFactory.of(TexturesGtBlock.Casing_Redstone_Side_Off), + TextureFactory.of(TexturesGtBlock.Casing_InventoryManagaer_Red) }; } public ITexture[] getBackActive(final byte aColor) { - return new ITexture[] { getBase(), new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On), - new GTRenderedTexture(TexturesGtBlock.Casing_InventoryManagaer_Red_Redstone) }; + return new ITexture[] { getBase(), TextureFactory.of(TexturesGtBlock.Casing_Redstone_Side_On), + TextureFactory.of(TexturesGtBlock.Casing_InventoryManagaer_Red_Redstone) }; } public ITexture[] getBottom(final byte aColor) { - return new ITexture[] { getBase(), new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Off) }; + return new ITexture[] { getBase(), TextureFactory.of(TexturesGtBlock.Casing_Redstone_Bottom_Off) }; } public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[] { getBase(), new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_On) }; + return new ITexture[] { getBase(), TextureFactory.of(TexturesGtBlock.Casing_Redstone_Bottom_On) }; } public ITexture[] getSides(final byte aColor) { - return new ITexture[] { getBase(), new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off) }; + return new ITexture[] { getBase(), TextureFactory.of(TexturesGtBlock.Casing_Redstone_Side_Off) }; } public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[] { getBase(), new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On) }; + return new ITexture[] { getBase(), TextureFactory.of(TexturesGtBlock.Casing_Redstone_Side_On) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneLamp.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneLamp.java index 7b963d3c7d6..84a6908ed50 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneLamp.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneLamp.java @@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; @@ -64,10 +64,10 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina } public ITexture[] getSides(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(sIconList[0]) }; + return new ITexture[] { TextureFactory.of(sIconList[0]) }; } public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[] { new GTRenderedTexture(sIconList[1]) }; + return new ITexture[] { TextureFactory.of(sIconList[1]) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneStrengthDisplay.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneStrengthDisplay.java index c2591c6a410..1768dc5ada8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneStrengthDisplay.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneStrengthDisplay.java @@ -8,7 +8,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; @@ -95,7 +95,7 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { if (side == facing) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - new GTRenderedTexture(sIconList[mType * 16 + mRedstoneStrength]) }; + TextureFactory.of(sIconList[mType * 16 + mRedstoneStrength]) }; } return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (side == facing ? 0 : side == facing.getOpposite() ? 1 @@ -108,31 +108,31 @@ public ITexture[] getFront(final byte aColor) { public ITexture[] getTop(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Top_Off) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Top_Off) }; } public ITexture[] getTopActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Top_On) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Top_On) }; } public ITexture[] getBottom(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_Off) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Bottom_Off) }; } public ITexture[] getBottomActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Bottom_On) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Bottom_On) }; } public ITexture[] getSides(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Side_Off) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Side_Off) }; } public ITexture[] getSidesActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Casing_Redstone_Side_On) }; + TextureFactory.of(TexturesGtBlock.Casing_Redstone_Side_On) }; } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneStrengthScale.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneStrengthScale.java index e59500dcc0b..cd62d0bd1b0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneStrengthScale.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneStrengthScale.java @@ -7,7 +7,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; @@ -44,7 +44,7 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { if (side == facing) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], - new GTRenderedTexture(sIconList[mType * 16 + mRedstoneStrength]) }; + TextureFactory.of(sIconList[mType * 16 + mRedstoneStrength]) }; } return this.mTextures[(aActive || hasRedstoneSignal() ? 5 : 0) + (side == facing ? 0 : side == facing.getOpposite() ? 1 diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTEEnergyBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTEEnergyBuffer.java index bc844cd1dd8..d632220a571 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTEEnergyBuffer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTEEnergyBuffer.java @@ -13,7 +13,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.GTPPCore; @@ -88,22 +88,22 @@ public ITexture[] getFront(final byte aColor) { public ITexture[] getBack(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; } public ITexture[] getBottom(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; } public ITexture[] getTop(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Screen_Logo) }; } public ITexture[] getSides(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; } public ITexture[] getFrontActive(final byte aColor) { @@ -113,22 +113,22 @@ public ITexture[] getFrontActive(final byte aColor) { public ITexture[] getBackActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; } public ITexture[] getBottomActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; } public ITexture[] getTopActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Screen_Logo) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Screen_Logo) }; } public ITexture[] getSidesActive(final byte aColor) { return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Dimensional_Orange) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTETieredChest.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTETieredChest.java index ba2d621a275..7c90d1e10d3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTETieredChest.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTETieredChest.java @@ -22,7 +22,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.core.lib.GTPPCore; @@ -203,10 +203,10 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec int aColorIndex, boolean aActive, boolean aRedstone) { return aBaseMetaTileEntity.getFrontFacing() == ForgeDirection.DOWN && side == ForgeDirection.WEST ? new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], - new GTRenderedTexture(BlockIcons.OVERLAY_QCHEST) } + TextureFactory.of(BlockIcons.OVERLAY_QCHEST) } : (side == aBaseMetaTileEntity.getFrontFacing() ? new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], - new GTRenderedTexture(BlockIcons.OVERLAY_QCHEST) } + TextureFactory.of(BlockIcons.OVERLAY_QCHEST) } : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTETieredTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTETieredTank.java index fb766b9dd57..2531f127ccd 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTETieredTank.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/MTETieredTank.java @@ -19,7 +19,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicTank; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTUtility; import gtPlusPlus.api.objects.Logger; @@ -63,9 +63,9 @@ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, fina final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) { return side == ForgeDirection.UP ? new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_TOP_FLUIDTANK) } + TextureFactory.of(Textures.BlockIcons.OVERLAY_TOP_FLUIDTANK) } : new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_FLUIDTANK) }; + TextureFactory.of(Textures.BlockIcons.OVERLAY_SIDE_FLUIDTANK) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenPlates.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenPlates.java index defc71232bf..7efe9105030 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenPlates.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGenPlates.java @@ -13,7 +13,7 @@ import gregtech.api.GregTechAPI; import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; @@ -148,7 +148,7 @@ private void generateRecipes(final Material material) { GregTechAPI.registerCover( material.getFoil(1), - new GTRenderedTexture(material.getTextureSet().mTextures[70], material.getRGBA(), false), + TextureFactory.of(material.getTextureSet().mTextures[70], material.getRGBA(), false), null); Logger.WARNING("Bender Foil Recipe: " + material.getLocalizedName() + " - Success"); } diff --git a/src/main/java/gtnhlanth/common/hatch/MTEBusInputFocus.java b/src/main/java/gtnhlanth/common/hatch/MTEBusInputFocus.java index 33341669920..e812c8ff934 100644 --- a/src/main/java/gtnhlanth/common/hatch/MTEBusInputFocus.java +++ b/src/main/java/gtnhlanth/common/hatch/MTEBusInputFocus.java @@ -8,7 +8,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.MTEHatchNbtConsumable; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtnhlanth.common.item.ICanFocus; @@ -69,12 +69,12 @@ public void depleteFocusDurability(int damage) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Bus_Catalyst) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TexturesGtBlock.Overlay_Bus_Catalyst) }; } @Override diff --git a/src/main/java/gtnhlanth/common/hatch/MTEHatchInputBeamline.java b/src/main/java/gtnhlanth/common/hatch/MTEHatchInputBeamline.java index 1d13270e313..cedcde402a1 100644 --- a/src/main/java/gtnhlanth/common/hatch/MTEHatchInputBeamline.java +++ b/src/main/java/gtnhlanth/common/hatch/MTEHatchInputBeamline.java @@ -10,7 +10,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtnhlanth.common.beamline.BeamLinePacket; import gtnhlanth.common.beamline.IConnectsToBeamline; import tectech.util.TTUtility; @@ -40,19 +40,17 @@ public MTEHatchInputBeamline(String name, int tier, String[] desc, ITexture[][][ @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - activeIcon, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(connIcon) }; + TextureFactory + .of(activeIcon, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(connIcon) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - sideIcon, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(connIcon) }; + TextureFactory + .of(sideIcon, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(connIcon) }; } @Override diff --git a/src/main/java/gtnhlanth/common/hatch/MTEHatchOutputBeamline.java b/src/main/java/gtnhlanth/common/hatch/MTEHatchOutputBeamline.java index a5db1c21763..af7e0adc7a7 100644 --- a/src/main/java/gtnhlanth/common/hatch/MTEHatchOutputBeamline.java +++ b/src/main/java/gtnhlanth/common/hatch/MTEHatchOutputBeamline.java @@ -10,7 +10,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gtnhlanth.common.beamline.BeamLinePacket; import gtnhlanth.common.beamline.IConnectsToBeamline; import gtnhlanth.common.beamline.MTEBeamlinePipe; @@ -38,19 +38,17 @@ public MTEHatchOutputBeamline(String aName, int aTier, String[] aDescription, IT @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - activeIcon, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(connIcon) }; + TextureFactory + .of(activeIcon, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(connIcon) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - sideIcon, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(connIcon) }; + TextureFactory + .of(sideIcon, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(connIcon) }; } @Override diff --git a/src/main/java/tectech/loader/thing/CoverLoader.java b/src/main/java/tectech/loader/thing/CoverLoader.java index d5c203e91df..06c5532f2e0 100644 --- a/src/main/java/tectech/loader/thing/CoverLoader.java +++ b/src/main/java/tectech/loader/thing/CoverLoader.java @@ -5,7 +5,7 @@ import gregtech.api.GregTechAPI; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import tectech.TecTech; import tectech.thing.cover.CoverEnderFluidLink; import tectech.thing.cover.CoverPowerPassUpgrade; @@ -28,19 +28,19 @@ public void run() { GregTechAPI.registerCover( new ItemStack(ItemTeslaCoilCover.INSTANCE, 1, 0), - new GTRenderedTexture(TESLA_OVERLAY), + TextureFactory.of(TESLA_OVERLAY), new CoverTeslaCoil()); GregTechAPI.registerCover( new ItemStack(ItemTeslaCoilCover.INSTANCE, 1, 1), - new GTRenderedTexture(TESLA_OVERLAY_ULTIMATE), + TextureFactory.of(TESLA_OVERLAY_ULTIMATE), new CoverTeslaCoilUltimate()); GregTechAPI.registerCover( new ItemStack(ItemEnderFluidLinkCover.INSTANCE, 1, 0), - new GTRenderedTexture(ENDERFLUIDLINK_OVERLAY), + TextureFactory.of(ENDERFLUIDLINK_OVERLAY), new CoverEnderFluidLink()); GregTechAPI.registerCover( new ItemStack(ItemPowerPassUpgradeCover.INSTANCE, 1, 0), - new GTRenderedTexture(POWERPASSUPGRADE_OVERLAY), + TextureFactory.of(POWERPASSUPGRADE_OVERLAY), new CoverPowerPassUpgrade()); TecTech.LOGGER.info("Cover functionality registered"); } diff --git a/src/main/java/tectech/thing/metaTileEntity/Textures.java b/src/main/java/tectech/thing/metaTileEntity/Textures.java index 4dac169def8..e50687ab61b 100644 --- a/src/main/java/tectech/thing/metaTileEntity/Textures.java +++ b/src/main/java/tectech/thing/metaTileEntity/Textures.java @@ -46,7 +46,6 @@ import gregtech.api.enums.Dyes; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.render.TextureFactory; public class Textures { @@ -91,133 +90,133 @@ public class Textures { MACHINE_UV_BOTTOM, MACHINE_MAX_BOTTOM, MACHINE_UEV_BOTTOM, MACHINE_UIV_BOTTOM, MACHINE_UMV_BOTTOM, MACHINE_UXV_BOTTOM, MACHINE_MAXV_BOTTOM, }; public static ITexture[] OVERLAYS_ENERGY_IN_TT = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 180, 180, 180, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 220, 220, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 200, 200, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 180, 180, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 160, 160, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 140, 140, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 120, 120, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 100, 100, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 80, 80, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN, new short[] { 60, 60, 245, 0 }), }, + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 180, 180, 180, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 220, 220, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 200, 200, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 180, 180, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 160, 160, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 140, 140, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 120, 120, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 100, 100, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 80, 80, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[] { 60, 60, 245, 0 }), }, OVERLAYS_ENERGY_OUT_TT = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 180, 180, 180, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 220, 220, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 200, 200, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 180, 180, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 160, 160, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 140, 140, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 120, 120, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 100, 100, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 80, 80, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT, new short[] { 60, 60, 245, 0 }), }, + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 180, 180, 180, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 220, 220, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 200, 200, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 180, 180, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 160, 160, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 140, 140, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 120, 120, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 100, 100, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 80, 80, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[] { 60, 60, 245, 0 }), }, OVERLAYS_ENERGY_IN_MULTI_TT = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 180, 180, 180, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 220, 220, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 200, 200, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 180, 180, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 160, 160, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 140, 140, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 120, 120, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 100, 100, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 80, 80, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[] { 60, 60, 245, 0 }), }, + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 180, 180, 180, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 220, 220, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 200, 200, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 180, 180, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 160, 160, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 140, 140, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 120, 120, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 100, 100, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 80, 80, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[] { 60, 60, 245, 0 }), }, OVERLAYS_ENERGY_OUT_MULTI_TT = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 180, 180, 180, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 220, 220, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 200, 200, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 180, 180, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 160, 160, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 140, 140, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 120, 120, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 100, 100, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 80, 80, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[] { 60, 60, 245, 0 }), }, + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 180, 180, 180, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 220, 220, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 200, 200, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 180, 180, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 160, 160, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 140, 140, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 120, 120, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 100, 100, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 80, 80, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[] { 60, 60, 245, 0 }), }, OVERLAYS_ENERGY_IN_POWER_TT = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 180, 180, 180, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 220, 220, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 200, 200, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 180, 180, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 160, 160, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 140, 140, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 120, 120, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 100, 100, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 80, 80, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[] { 60, 60, 245, 0 }), }, + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 180, 180, 180, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 220, 220, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 200, 200, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 180, 180, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 160, 160, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 140, 140, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 120, 120, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 100, 100, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 80, 80, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[] { 60, 60, 245, 0 }), }, OVERLAYS_ENERGY_OUT_POWER_TT = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 180, 180, 180, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 220, 220, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 200, 200, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 180, 180, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 160, 160, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 140, 140, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 120, 120, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 100, 100, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 80, 80, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[] { 60, 60, 245, 0 }), }, + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 180, 180, 180, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 220, 220, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 200, 200, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 180, 180, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 160, 160, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 140, 140, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 120, 120, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 100, 100, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 80, 80, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[] { 60, 60, 245, 0 }), }, OVERLAYS_ENERGY_IN_LASER_TT = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 180, 180, 180, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 220, 220, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 200, 200, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 180, 180, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 160, 160, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 140, 140, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 120, 120, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 100, 100, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 80, 80, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_IN_LASER, new short[] { 60, 60, 245, 0 }), }, + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 180, 180, 180, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 220, 220, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 200, 200, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 180, 180, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 160, 160, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 140, 140, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 120, 120, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 100, 100, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 80, 80, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_IN_LASER, new short[] { 60, 60, 245, 0 }), }, OVERLAYS_ENERGY_OUT_LASER_TT = new ITexture[] { - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 180, 180, 180, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 220, 220, 220, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 255, 100, 0, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 255, 255, 30, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 128, 128, 128, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 240, 240, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 220, 220, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 200, 200, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 180, 180, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 160, 160, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 140, 140, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 120, 120, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 100, 100, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 80, 80, 245, 0 }), - new GTRenderedTexture(OVERLAY_ENERGY_OUT_LASER, new short[] { 60, 60, 245, 0 }), }; + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 180, 180, 180, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 220, 220, 220, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 255, 100, 0, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 255, 255, 30, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 128, 128, 128, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 240, 240, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 220, 220, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 200, 200, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 180, 180, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 160, 160, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 140, 140, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 120, 120, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 100, 100, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 80, 80, 245, 0 }), + TextureFactory.of(OVERLAY_ENERGY_OUT_LASER, new short[] { 60, 60, 245, 0 }), }; public static final ITexture[] OVERLAYS_ENERGY_IN_WIRELESS_MULTI_4A = { TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS_4A, new short[] { 255, 255, 255, 0 }), TextureFactory.of(OVERLAY_ENERGY_ON_WIRELESS_4A, new short[] { 255, 255, 255, 0 }), @@ -288,7 +287,7 @@ public class Textures { public static ITexture[][] MACHINE_CASINGS_TT = new ITexture[15][17]; - public static ITexture TESLA_TRANSCEIVER_TOP_BA = new GTRenderedTexture(TESLA_TRANSCEIVER_TOP); + public static ITexture TESLA_TRANSCEIVER_TOP_BA = TextureFactory.of(TESLA_TRANSCEIVER_TOP); public static void run() { for (byte i = 0; i < MACHINE_CASINGS_TT.length; i++) { diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java index 30af3d838be..03d59791377 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java @@ -26,7 +26,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import tectech.Reference; import tectech.TecTech; import tectech.loader.ConfigHandler; @@ -73,12 +73,12 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TM_H_ACTIVE) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TM_H_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(TM_H) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(TM_H) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCreativeMaintenance.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCreativeMaintenance.java index 28d631e6066..3b55535c0aa 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCreativeMaintenance.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCreativeMaintenance.java @@ -15,7 +15,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatchMaintenance; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import tectech.util.CommonValues; import tectech.util.TTUtility; @@ -52,12 +52,12 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(face) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(face) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(face) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(face) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataConnector.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataConnector.java index 912457718b4..9b656c9b78a 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataConnector.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataConnector.java @@ -18,7 +18,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.mixin.interfaces.accessors.EntityPlayerMPAccessor; import tectech.mechanics.dataTransport.DataPacket; import tectech.mechanics.pipe.IConnectsToDataPipe; @@ -60,20 +60,17 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - EM_D_ACTIVE, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(EM_D_CONN) }; + return new ITexture[] { aBaseTexture, TextureFactory + .of(EM_D_ACTIVE, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(EM_D_CONN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - EM_D_SIDES, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(EM_D_CONN) }; + TextureFactory + .of(EM_D_SIDES, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(EM_D_CONN) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataItemsInput.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataItemsInput.java index 25320704214..d2f65930d40 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataItemsInput.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataItemsInput.java @@ -25,7 +25,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatchDataAccess; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.mixin.interfaces.accessors.EntityPlayerMPAccessor; import tectech.mechanics.dataTransport.InventoryDataPacket; import tectech.mechanics.pipe.IConnectsToDataPipe; @@ -51,20 +51,17 @@ public MTEHatchDataItemsInput(String aName, int aTier, String[] aDescription, IT @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - EM_D_ACTIVE, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(EM_D_CONN) }; + return new ITexture[] { aBaseTexture, TextureFactory + .of(EM_D_ACTIVE, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(EM_D_CONN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - EM_D_SIDES, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(EM_D_CONN) }; + TextureFactory + .of(EM_D_SIDES, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(EM_D_CONN) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchObjectHolder.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchObjectHolder.java index 201b54e24c6..4b3a9c651e3 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchObjectHolder.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchObjectHolder.java @@ -24,7 +24,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import tectech.thing.gui.TecTechUITextures; import tectech.util.CommonValues; import tectech.util.TTUtility; @@ -63,12 +63,12 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(EM_H_ACTIVE) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(EM_H_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(EM_H) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(EM_H) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchParam.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchParam.java index 2bf8a2c3120..3da244b255e 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchParam.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchParam.java @@ -33,7 +33,7 @@ import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.mixin.interfaces.accessors.EntityPlayerMPAccessor; import tectech.TecTech; import tectech.thing.gui.TecTechUITextures; @@ -85,12 +85,12 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(ScreenON) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(ScreenON) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(ScreenOFF) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(ScreenOFF) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java index 4decc0a4a85..40e77bc1298 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java @@ -36,7 +36,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.mixin.interfaces.accessors.EntityPlayerMPAccessor; import tectech.TecTech; import tectech.loader.ConfigHandler; @@ -99,12 +99,12 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(EM_R_ACTIVE) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(EM_R_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(EM_R) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(EM_R) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchUncertainty.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchUncertainty.java index 507f1aa8d83..a47be645b8c 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchUncertainty.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchUncertainty.java @@ -39,7 +39,7 @@ import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.mixin.interfaces.accessors.EntityPlayerMPAccessor; import tectech.TecTech; import tectech.thing.gui.TecTechUITextures; @@ -80,12 +80,12 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(ScreenON) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(ScreenON) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, new GTRenderedTexture(ScreenOFF) }; + return new ITexture[] { aBaseTexture, TextureFactory.of(ScreenOFF) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsInput.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsInput.java index 369e99725e3..378af4b68a0 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsInput.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsInput.java @@ -22,7 +22,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatchDataAccess; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.WirelessDataStore; import gregtech.mixin.interfaces.accessors.EntityPlayerMPAccessor; import tectech.util.CommonValues; @@ -54,20 +54,17 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - EM_D_ACTIVE, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(EM_D_CONN) }; + return new ITexture[] { aBaseTexture, TextureFactory + .of(EM_D_ACTIVE, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(EM_D_CONN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - EM_D_SIDES, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(EM_D_CONN) }; + TextureFactory + .of(EM_D_SIDES, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(EM_D_CONN) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsOutput.java b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsOutput.java index df4af869ea7..22e9a12eb5d 100644 --- a/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsOutput.java +++ b/src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsOutput.java @@ -17,7 +17,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.WirelessDataStore; import tectech.mechanics.dataTransport.InventoryDataPacket; import tectech.util.CommonValues; @@ -117,19 +117,16 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - EM_D_ACTIVE, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(EM_D_CONN) }; + return new ITexture[] { aBaseTexture, TextureFactory + .of(EM_D_ACTIVE, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(EM_D_CONN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GTRenderedTexture( - EM_D_SIDES, - Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), - new GTRenderedTexture(EM_D_CONN) }; + TextureFactory + .of(EM_D_SIDES, Dyes.getModulation(getBaseMetaTileEntity().getColorization(), MACHINE_METAL.getRGBA())), + TextureFactory.of(EM_D_CONN) }; } } diff --git a/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeData.java b/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeData.java index 32eac048465..3322a25d0ad 100644 --- a/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeData.java +++ b/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeData.java @@ -22,7 +22,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.GTClient; import tectech.TecTech; import tectech.loader.NetworkDispatcher; @@ -67,10 +67,8 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, int aConnections, int colorIndex, boolean aConnected, boolean aRedstone) { - return new ITexture[] { new GTRenderedTexture(EMpipe), - new GTRenderedTexture( - getActive() ? EMbarActive : EMbar, - Dyes.getModulation(colorIndex, MACHINE_METAL.getRGBA())) }; + return new ITexture[] { TextureFactory.of(EMpipe), TextureFactory + .of(getActive() ? EMbarActive : EMbar, Dyes.getModulation(colorIndex, MACHINE_METAL.getRGBA())) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergy.java b/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergy.java index e94f4d31ff3..1bbe0cecff7 100644 --- a/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergy.java +++ b/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergy.java @@ -25,7 +25,7 @@ import gregtech.api.logic.interfaces.PowerLogicHost; import gregtech.api.metatileentity.BaseMetaPipeEntity; import gregtech.api.metatileentity.MetaPipeEntity; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.GTClient; import tectech.TecTech; import tectech.loader.NetworkDispatcher; @@ -67,10 +67,8 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, int aConnections, int colorIndex, boolean aConnected, boolean aRedstone) { - return new ITexture[] { new GTRenderedTexture(EMpipe), - new GTRenderedTexture( - getActive() ? EMCandyActive : EMcandy, - Dyes.getModulation(colorIndex, MACHINE_METAL.getRGBA())) }; + return new ITexture[] { TextureFactory.of(EMpipe), TextureFactory + .of(getActive() ? EMCandyActive : EMcandy, Dyes.getModulation(colorIndex, MACHINE_METAL.getRGBA())) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergyMirror.java b/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergyMirror.java index 91fdc3e3a1f..0bb9fed7476 100644 --- a/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergyMirror.java +++ b/src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergyMirror.java @@ -19,7 +19,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.PowerLogic; import gregtech.api.logic.interfaces.PowerLogicHost; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.GTClient; import tectech.TecTech; import tectech.loader.NetworkDispatcher; @@ -59,10 +59,8 @@ public void registerIcons(IIconRegister aBlockIconRegister) { @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, int aConnections, int colorIndex, boolean aConnected, boolean aRedstone) { - return new ITexture[] { new GTRenderedTexture(EMpipe), - new GTRenderedTexture( - getActive() ? EMCandyActive : EMcandy, - Dyes.getModulation(colorIndex, MACHINE_METAL.getRGBA())) }; + return new ITexture[] { TextureFactory.of(EMpipe), TextureFactory + .of(getActive() ? EMCandyActive : EMcandy, Dyes.getModulation(colorIndex, MACHINE_METAL.getRGBA())) }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/single/MTEBuckConverter.java b/src/main/java/tectech/thing/metaTileEntity/single/MTEBuckConverter.java index eaa0b3cb17b..7b9906e8e6d 100644 --- a/src/main/java/tectech/thing/metaTileEntity/single/MTEBuckConverter.java +++ b/src/main/java/tectech/thing/metaTileEntity/single/MTEBuckConverter.java @@ -32,14 +32,14 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import tectech.util.CommonValues; import tectech.util.TTUtility; public class MTEBuckConverter extends MTETieredMachineBlock implements IAddUIWidgets, IAddGregtechLogo { - private static GTRenderedTexture BUCK, BUCK_ACTIVE; + private static ITexture BUCK, BUCK_ACTIVE; public int EUT = 0, AMP = 0; private static final NumberFormatMUI numberFormat = new NumberFormatMUI(); @@ -69,8 +69,8 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { super.registerIcons(aBlockIconRegister); - BUCK = new GTRenderedTexture(new Textures.BlockIcons.CustomIcon("iconsets/BUCK")); - BUCK_ACTIVE = new GTRenderedTexture(new Textures.BlockIcons.CustomIcon("iconsets/BUCK_ACTIVE")); + BUCK = TextureFactory.of(new Textures.BlockIcons.CustomIcon("iconsets/BUCK")); + BUCK_ACTIVE = TextureFactory.of(new Textures.BlockIcons.CustomIcon("iconsets/BUCK_ACTIVE")); } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPollutor.java b/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPollutor.java index ffc5f2a04c6..805c7c742c7 100644 --- a/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPollutor.java +++ b/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPollutor.java @@ -30,7 +30,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.common.pollution.Pollution; import tectech.TecTech; import tectech.util.CommonValues; @@ -41,7 +41,7 @@ */ public class MTEDebugPollutor extends MTETieredMachineBlock implements IAddUIWidgets, IAddGregtechLogo { - private static GTRenderedTexture POLLUTOR; + private static ITexture POLLUTOR; public int pollution = 0; private static final NumberFormatMUI numberFormat = new NumberFormatMUI(); @@ -72,7 +72,7 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { super.registerIcons(aBlockIconRegister); - POLLUTOR = new GTRenderedTexture(new Textures.BlockIcons.CustomIcon("iconsets/POLLUTOR")); + POLLUTOR = TextureFactory.of(new Textures.BlockIcons.CustomIcon("iconsets/POLLUTOR")); } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPowerGenerator.java b/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPowerGenerator.java index 0251a919f0c..7ee6d3a2997 100644 --- a/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPowerGenerator.java +++ b/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPowerGenerator.java @@ -36,7 +36,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import tectech.mechanics.pipe.IConnectsToEnergyTunnel; import tectech.thing.metaTileEntity.hatch.MTEHatchEnergyTunnel; @@ -50,7 +50,7 @@ public class MTEDebugPowerGenerator extends MTETieredMachineBlock implements IConnectsToEnergyTunnel, IAddUIWidgets, IAddGregtechLogo { - public static GTRenderedTexture GENNY; + public static ITexture GENNY; private boolean LASER = false; public int EUT = 0, AMP = 0; public boolean producing = true; @@ -92,7 +92,7 @@ public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPla @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { super.registerIcons(aBlockIconRegister); - GENNY = new GTRenderedTexture(new Textures.BlockIcons.CustomIcon("iconsets/GENNY")); + GENNY = TextureFactory.of(new Textures.BlockIcons.CustomIcon("iconsets/GENNY")); } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugStructureWriter.java b/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugStructureWriter.java index 5248cf1b807..25407470ab4 100644 --- a/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugStructureWriter.java +++ b/src/main/java/tectech/thing/metaTileEntity/single/MTEDebugStructureWriter.java @@ -31,7 +31,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import tectech.TecTech; import tectech.util.CommonValues; import tectech.util.TTUtility; @@ -41,7 +41,7 @@ */ public class MTEDebugStructureWriter extends MTETieredMachineBlock implements IAddUIWidgets, IAddGregtechLogo { - private static GTRenderedTexture MARK; + private static ITexture MARK; public short[] numbers = new short[6]; public boolean size = false; public String[] result = new String[] { "Undefined" }; @@ -73,14 +73,14 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { super.registerIcons(aBlockIconRegister); - MARK = new GTRenderedTexture(new Textures.BlockIcons.CustomIcon("iconsets/MARK")); + MARK = TextureFactory.of(new Textures.BlockIcons.CustomIcon("iconsets/MARK")); } @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, int colorIndex, boolean aActive, boolean aRedstone) { return new ITexture[] { tectech.thing.metaTileEntity.Textures.MACHINE_CASINGS_TT[mTier][colorIndex + 1], - side != facing ? new GTRenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : MARK }; + side != facing ? TextureFactory.of(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : MARK }; } @Override diff --git a/src/main/java/tectech/thing/metaTileEntity/single/MTEOwnerDetector.java b/src/main/java/tectech/thing/metaTileEntity/single/MTEOwnerDetector.java index bdf3e249b9a..fcf49158984 100644 --- a/src/main/java/tectech/thing/metaTileEntity/single/MTEOwnerDetector.java +++ b/src/main/java/tectech/thing/metaTileEntity/single/MTEOwnerDetector.java @@ -17,7 +17,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.mixin.interfaces.accessors.EntityPlayerMPAccessor; import tectech.TecTech; @@ -29,7 +29,7 @@ */ public class MTEOwnerDetector extends MTETieredMachineBlock { - private static GTRenderedTexture OWNER_ONLINE, OWNER_OFFLINE; + private static ITexture OWNER_ONLINE, OWNER_OFFLINE; private String uuid; private boolean interdimensional = true; @@ -61,8 +61,8 @@ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { super.registerIcons(aBlockIconRegister); - OWNER_ONLINE = new GTRenderedTexture(new Textures.BlockIcons.CustomIcon("iconsets/OWNER_ONLINE")); - OWNER_OFFLINE = new GTRenderedTexture(new Textures.BlockIcons.CustomIcon("iconsets/OWNER_OFFLINE")); + OWNER_ONLINE = TextureFactory.of(new Textures.BlockIcons.CustomIcon("iconsets/OWNER_ONLINE")); + OWNER_OFFLINE = TextureFactory.of(new Textures.BlockIcons.CustomIcon("iconsets/OWNER_OFFLINE")); } @Override From d3d2b8d35b2201572a639fb63c1de1e4b7fdd1e8 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:55:29 -0600 Subject: [PATCH 08/10] GTRenderedTexture - complex fixes --- .../basic/MTEAtmosphericReconditioner.java | 48 ++++++++++++--- .../machines/basic/MTEAutoChisel.java | 58 ++++++++++++++++--- 2 files changed, 88 insertions(+), 18 deletions(-) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEAtmosphericReconditioner.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEAtmosphericReconditioner.java index 2dde10f1873..14688cccbad 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEAtmosphericReconditioner.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEAtmosphericReconditioner.java @@ -31,7 +31,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicMachine; import gregtech.api.objects.GTItemStack; -import gregtech.api.objects.GTRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTModHandler; import gregtech.api.util.GTUtility; import gregtech.common.items.IDMetaTool01; @@ -66,14 +66,44 @@ public MTEAtmosphericReconditioner(int aID, String aName, String aNameRegional, "Making sure you don't live in Gwalior - Uses 2A", 3, 0, - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB), - new GTRenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active), - new GTRenderedTexture(TexturesGtBlock.Overlay_MatterFab), - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast), - new GTRenderedTexture(TexturesGtBlock.Overlay_Machine_Vent), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), - new GTRenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB)); + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(TexturesGtBlock.Overlay_MatterFab_Active), + TextureFactory.builder() + .addIcon(TexturesGtBlock.Overlay_MatterFab_Active_Glow) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(TexturesGtBlock.Overlay_MatterFab), + TextureFactory.builder() + .addIcon(TexturesGtBlock.Overlay_MatterFab_Glow) + .glow() + .build()), + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Vent_Fast), + TextureFactory.of(TexturesGtBlock.Overlay_Machine_Vent), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_GLOW) + .glow() + .build())); } public MTEAtmosphericReconditioner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEAutoChisel.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEAutoChisel.java index b4f69323f46..e9dc495e3ba 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEAutoChisel.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/MTEAutoChisel.java @@ -18,8 +18,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEBasicMachine; -import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.BasicUIProperties; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; @@ -40,14 +40,54 @@ public MTEAutoChisel(int aID, String aName, String aNameRegional, int aTier) { "Chisels things, Gregtech style", 1, 1, - new GTRenderedTexture(BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), - new GTRenderedTexture(BlockIcons.OVERLAY_SIDE_MASSFAB), - new GTRenderedTexture(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE), - new GTRenderedTexture(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER), - new GTRenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active), - new GTRenderedTexture(TexturesGtBlock.Overlay_MatterFab), - new GTRenderedTexture(BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), - new GTRenderedTexture(BlockIcons.OVERLAY_BOTTOM_MASSFAB)); + TextureFactory.of( + TextureFactory.of(BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), + TextureFactory.builder() + .addIcon(BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(BlockIcons.OVERLAY_SIDE_MASSFAB), + TextureFactory.builder() + .addIcon(BlockIcons.OVERLAY_SIDE_MASSFAB_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE), + TextureFactory.builder() + .addIcon(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER), + TextureFactory.builder() + .addIcon(BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(TexturesGtBlock.Overlay_MatterFab_Active), + TextureFactory.builder() + .addIcon(TexturesGtBlock.Overlay_MatterFab_Active_Glow) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(TexturesGtBlock.Overlay_MatterFab), + TextureFactory.builder() + .addIcon(TexturesGtBlock.Overlay_MatterFab_Glow) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), + TextureFactory.builder() + .addIcon(BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(BlockIcons.OVERLAY_BOTTOM_MASSFAB), + TextureFactory.builder() + .addIcon(BlockIcons.OVERLAY_BOTTOM_MASSFAB_GLOW) + .glow() + .build())); } public MTEAutoChisel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { From e904fea895c0c8192c65a16e9ef98ea030d0f696 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:56:03 -0600 Subject: [PATCH 09/10] remove GTRenderedTexture --- .../api/objects/GTRenderedTexture.java | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 src/main/java/gregtech/api/objects/GTRenderedTexture.java diff --git a/src/main/java/gregtech/api/objects/GTRenderedTexture.java b/src/main/java/gregtech/api/objects/GTRenderedTexture.java deleted file mode 100644 index abb2e280510..00000000000 --- a/src/main/java/gregtech/api/objects/GTRenderedTexture.java +++ /dev/null @@ -1,33 +0,0 @@ -package gregtech.api.objects; - -import gregtech.api.enums.Dyes; -import gregtech.api.interfaces.IColorModulationContainer; -import gregtech.api.interfaces.IIconContainer; -import gregtech.api.interfaces.ITexture; - -@Deprecated -public class GTRenderedTexture extends gregtech.common.render.GTRenderedTexture - implements ITexture, IColorModulationContainer { - - @Deprecated - public short[] mRGBa; - - public GTRenderedTexture(IIconContainer aIcon, short[] aRGBa, boolean aAllowAlpha) { - super(aIcon, aRGBa, aAllowAlpha, false, true, false); - if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GTRenderedTexture"); - mRGBa = aRGBa; - } - - public GTRenderedTexture(IIconContainer aIcon, short[] aRGBa) { - this(aIcon, aRGBa, true); - } - - public GTRenderedTexture(IIconContainer aIcon) { - this(aIcon, Dyes._NULL.mRGBa); - } - - @Override - public boolean isOldTexture() { - return true; - } -} From d3c6c46aaa6d487d4148fa7ec4697a4dbd708f14 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Sat, 25 Jan 2025 01:37:56 -0600 Subject: [PATCH 10/10] fix gt++ ore block renderer --- .../renderer/CustomOreBlockRenderer.java | 2460 +---------------- 1 file changed, 44 insertions(+), 2416 deletions(-) diff --git a/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java b/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java index a32dd2da8f4..2f843a1d5b9 100644 --- a/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java +++ b/src/main/java/gtPlusPlus/core/client/renderer/CustomOreBlockRenderer.java @@ -1,22 +1,29 @@ package gtPlusPlus.core.client.renderer; +import static gregtech.common.render.GTRendererBlock.renderNegativeXFacing; +import static gregtech.common.render.GTRendererBlock.renderNegativeYFacing; +import static gregtech.common.render.GTRendererBlock.renderNegativeZFacing; +import static gregtech.common.render.GTRendererBlock.renderPositiveXFacing; +import static gregtech.common.render.GTRendererBlock.renderPositiveYFacing; +import static gregtech.common.render.GTRendererBlock.renderPositiveZFacing; + import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.opengl.GL11; +import com.gtnewhorizons.angelica.api.ThreadSafeISBRH; + import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; -import gregtech.api.interfaces.ITexture; +import gregtech.GTMod; import gtPlusPlus.api.interfaces.ITexturedBlock; import gtPlusPlus.api.objects.Logger; +@ThreadSafeISBRH(perThread = true) public class CustomOreBlockRenderer implements ISimpleBlockRenderingHandler { public static CustomOreBlockRenderer INSTANCE; @@ -29,306 +36,51 @@ public CustomOreBlockRenderer() { Logger.INFO("Registered Custom Ore Block Renderer."); } - public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, - RenderBlocks aRenderer) { - if ((aBlock instanceof ITexturedBlock)) { - return renderStandardBlock( - aWorld, - aX, - aY, - aZ, - aBlock, - aRenderer, - new ITexture[][] { ((ITexturedBlock) aBlock).getTexture(ForgeDirection.DOWN), - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.UP), - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.NORTH), - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.SOUTH), - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.WEST), - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.EAST) }); - } - return false; - } - - public boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, - RenderBlocks aRenderer, ITexture[][] aTextures) { - aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); - aRenderer.setRenderBoundsFromBlock(aBlock); - int l = aBlock.colorMultiplier(aWorld, aX, aY, aZ); - float RED = (float) (l >> 16 & 255) / 255.0F; - float GREEN = (float) (l >> 8 & 255) / 255.0F; - float BLUE = (float) (l & 255) / 255.0F; - - if (Minecraft.isAmbientOcclusionEnabled() && aBlock.getLightValue() == 0) { - if (RenderBlocks.getInstance().partialRenderBounds) { - return INSTANCE.renderStandardBlockWithAmbientOcclusionPartial( - aWorld, - aRenderer, - aTextures, - aBlock, - aX, - aY, - aZ, - RED, - GREEN, - BLUE); - } else { - return INSTANCE.renderStandardBlockWithAmbientOcclusion( - aWorld, - aRenderer, - aTextures, - aBlock, - aX, - aY, - aZ, - RED, - GREEN, - BLUE); - } - } else { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[0], true); - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[1], true); - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[2], true); - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[3], true); - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[4], true); - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aTextures[5], true); - } - return true; - } - - public static void renderFaceYNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, - ITexture[][] aIcon) { - renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[0], true); - } - - public static void renderFaceYPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, - ITexture[][] aIcon) { - renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[1], true); - } - - public static void renderFaceZNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, - ITexture[][] aIcon) { - renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[2], true); - } - - public static void renderFaceZPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, - ITexture[][] aIcon) { - renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[3], true); - } - - public static void renderFaceXNeg(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, - ITexture[][] aIcon) { - renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[4], true); - } - - public static void renderFaceXPos(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ, - ITexture[][] aIcon) { - renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, aIcon[5], true); - } - - public static void renderNegativeYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY - 1, aZ, 0))) { - return; - } - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY - 1 : aY, aZ)); - } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderYNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveYFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY + 1, aZ, 1))) { - return; - } - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aFullBlock ? aY + 1 : aY, aZ)); - } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderYPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderNegativeZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ - 1, 2))) { - return; - } - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ - 1 : aZ)); - } - aRenderer.flipTexture = (!aFullBlock); - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderZNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveZFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX, aY, aZ + 1, 3))) { - return; - } - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aX, aY, aFullBlock ? aZ + 1 : aZ)); - } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderZPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderNegativeXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX - 1, aY, aZ, 4))) { - return; - } - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX - 1 : aX, aY, aZ)); - } - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderXNeg(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - - public static void renderPositiveXFacing(IBlockAccess aWorld, RenderBlocks aRenderer, Block aBlock, int aX, int aY, - int aZ, ITexture[] aIcon, boolean aFullBlock) { - if (aWorld != null) { - if ((aFullBlock) && (!aBlock.shouldSideBeRendered(aWorld, aX + 1, aY, aZ, 5))) { - return; - } - Tessellator.instance - .setBrightness(aBlock.getMixedBrightnessForBlock(aWorld, aFullBlock ? aX + 1 : aX, aY, aZ)); - } - aRenderer.flipTexture = (!aFullBlock); - if (aIcon != null) { - for (ITexture iTexture : aIcon) { - if (iTexture != null) { - iTexture.renderXPos(aRenderer, aBlock, aX, aY, aZ); - } - } - } - aRenderer.flipTexture = false; - } - @Override public void renderInventoryBlock(Block aBlock, int aMeta, int aModelID, RenderBlocks aRenderer) { - aBlock.setBlockBoundsForItemRender(); - aRenderer.setRenderBoundsFromBlock(aBlock); + aRenderer.enableAO = false; + aRenderer.useInventoryTint = true; GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F); - renderNegativeYFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.DOWN), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F); - renderPositiveYFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.UP), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F); - renderNegativeZFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.NORTH), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F); - renderPositiveZFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.SOUTH), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F); - renderNegativeXFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.WEST), - true); - Tessellator.instance.draw(); - Tessellator.instance.startDrawingQuads(); - Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F); - renderPositiveXFacing( - null, - aRenderer, - aBlock, - 0, - 0, - 0, - ((ITexturedBlock) aBlock).getTexture(ForgeDirection.EAST), - true); - Tessellator.instance.draw(); + aBlock.setBlockBoundsForItemRender(); + aRenderer.setRenderBoundsFromBlock(aBlock); + + ITexturedBlock textures = (ITexturedBlock) aBlock; + + renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, textures.getTexture(ForgeDirection.DOWN), true); + renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, textures.getTexture(ForgeDirection.UP), true); + renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, textures.getTexture(ForgeDirection.NORTH), true); + renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, textures.getTexture(ForgeDirection.SOUTH), true); + renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, textures.getTexture(ForgeDirection.WEST), true); + renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, textures.getTexture(ForgeDirection.EAST), true); + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); aRenderer.setRenderBoundsFromBlock(aBlock); GL11.glTranslatef(0.5F, 0.5F, 0.5F); + aRenderer.useInventoryTint = false; } @Override public boolean renderWorldBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, int aModelID, RenderBlocks aRenderer) { - blockAccess = aWorld; - return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer); + if (!(aBlock instanceof ITexturedBlock textures)) { + return false; + } + + aRenderer.enableAO = Minecraft.isAmbientOcclusionEnabled() && GTMod.gregtechproxy.mRenderTileAmbientOcclusion; + aRenderer.useInventoryTint = false; + aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + aRenderer.setRenderBoundsFromBlock(aBlock); + + renderNegativeYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, textures.getTexture(ForgeDirection.DOWN), true); + renderPositiveYFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, textures.getTexture(ForgeDirection.UP), true); + renderNegativeZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, textures.getTexture(ForgeDirection.NORTH), true); + renderPositiveZFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, textures.getTexture(ForgeDirection.SOUTH), true); + renderNegativeXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, textures.getTexture(ForgeDirection.WEST), true); + renderPositiveXFacing(aWorld, aRenderer, aBlock, aX, aY, aZ, textures.getTexture(ForgeDirection.EAST), true); + + aRenderer.enableAO = false; + return true; } @Override @@ -340,2128 +92,4 @@ public boolean shouldRender3DInInventory(int aModel) { public int getRenderId() { return this.mRenderID; } - - public void setRenderBounds(double p_147782_1_, double p_147782_3_, double p_147782_5_, double p_147782_7_, - double p_147782_9_, double p_147782_11_) { - if (!this.lockBlockBounds) { - this.renderMinX = p_147782_1_; - this.renderMaxX = p_147782_7_; - this.renderMinY = p_147782_3_; - this.renderMaxY = p_147782_9_; - this.renderMinZ = p_147782_5_; - this.renderMaxZ = p_147782_11_; - this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 - && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D - || this.renderMinY > 0.0D - || this.renderMaxY < 1.0D - || this.renderMinZ > 0.0D - || this.renderMaxZ < 1.0D); - } - } - - /** - * Like setRenderBounds, but automatically pulling the bounds from the given Block. - */ - public void setRenderBoundsFromBlock(Block block) { - if (!this.lockBlockBounds) { - this.renderMinX = block.getBlockBoundsMinX(); - this.renderMaxX = block.getBlockBoundsMaxX(); - this.renderMinY = block.getBlockBoundsMinY(); - this.renderMaxY = block.getBlockBoundsMaxY(); - this.renderMinZ = block.getBlockBoundsMinZ(); - this.renderMaxZ = block.getBlockBoundsMaxZ(); - this.partialRenderBounds = this.minecraftRB.gameSettings.ambientOcclusion >= 2 - && (this.renderMinX > 0.0D || this.renderMaxX < 1.0D - || this.renderMinY > 0.0D - || this.renderMaxY < 1.0D - || this.renderMinZ > 0.0D - || this.renderMaxZ < 1.0D); - } - } - - /** - * Vanilla Variables - */ - - /** The minimum X value for rendering (default 0.0). */ - public double renderMinX; - /** The maximum X value for rendering (default 1.0). */ - public double renderMaxX; - /** The minimum Y value for rendering (default 0.0). */ - public double renderMinY; - /** The maximum Y value for rendering (default 1.0). */ - public double renderMaxY; - /** The minimum Z value for rendering (default 0.0). */ - public double renderMinZ; - /** The maximum Z value for rendering (default 1.0). */ - public double renderMaxZ; - - public boolean lockBlockBounds; - public boolean partialRenderBounds; - public final Minecraft minecraftRB = RenderBlocks.getInstance().minecraftRB; - public int uvRotateEast; - public int uvRotateWest; - public int uvRotateSouth; - public int uvRotateNorth; - public int uvRotateTop; - public int uvRotateBottom; - /** Whether ambient occlusion is enabled or not */ - public boolean enableAO; - /** Used as a scratch variable for ambient occlusion on the north/bottom/east corner. */ - public float aoLightValueScratchXYZNNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the north face. */ - public float aoLightValueScratchXYNN; - /** Used as a scratch variable for ambient occlusion on the north/bottom/west corner. */ - public float aoLightValueScratchXYZNNP; - /** Used as a scratch variable for ambient occlusion between the bottom face and the east face. */ - public float aoLightValueScratchYZNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the west face. */ - public float aoLightValueScratchYZNP; - /** Used as a scratch variable for ambient occlusion on the south/bottom/east corner. */ - public float aoLightValueScratchXYZPNN; - /** Used as a scratch variable for ambient occlusion between the bottom face and the south face. */ - public float aoLightValueScratchXYPN; - /** Used as a scratch variable for ambient occlusion on the south/bottom/west corner. */ - public float aoLightValueScratchXYZPNP; - /** Used as a scratch variable for ambient occlusion on the north/top/east corner. */ - public float aoLightValueScratchXYZNPN; - /** Used as a scratch variable for ambient occlusion between the top face and the north face. */ - public float aoLightValueScratchXYNP; - /** Used as a scratch variable for ambient occlusion on the north/top/west corner. */ - public float aoLightValueScratchXYZNPP; - /** Used as a scratch variable for ambient occlusion between the top face and the east face. */ - public float aoLightValueScratchYZPN; - /** Used as a scratch variable for ambient occlusion on the south/top/east corner. */ - public float aoLightValueScratchXYZPPN; - /** Used as a scratch variable for ambient occlusion between the top face and the south face. */ - public float aoLightValueScratchXYPP; - /** Used as a scratch variable for ambient occlusion between the top face and the west face. */ - public float aoLightValueScratchYZPP; - /** Used as a scratch variable for ambient occlusion on the south/top/west corner. */ - public float aoLightValueScratchXYZPPP; - /** Used as a scratch variable for ambient occlusion between the north face and the east face. */ - public float aoLightValueScratchXZNN; - /** Used as a scratch variable for ambient occlusion between the south face and the east face. */ - public float aoLightValueScratchXZPN; - /** Used as a scratch variable for ambient occlusion between the north face and the west face. */ - public float aoLightValueScratchXZNP; - /** Used as a scratch variable for ambient occlusion between the south face and the west face. */ - public float aoLightValueScratchXZPP; - /** Ambient occlusion brightness XYZNNN */ - public int aoBrightnessXYZNNN; - /** Ambient occlusion brightness XYNN */ - public int aoBrightnessXYNN; - /** Ambient occlusion brightness XYZNNP */ - public int aoBrightnessXYZNNP; - /** Ambient occlusion brightness YZNN */ - public int aoBrightnessYZNN; - /** Ambient occlusion brightness YZNP */ - public int aoBrightnessYZNP; - /** Ambient occlusion brightness XYZPNN */ - public int aoBrightnessXYZPNN; - /** Ambient occlusion brightness XYPN */ - public int aoBrightnessXYPN; - /** Ambient occlusion brightness XYZPNP */ - public int aoBrightnessXYZPNP; - /** Ambient occlusion brightness XYZNPN */ - public int aoBrightnessXYZNPN; - /** Ambient occlusion brightness XYNP */ - public int aoBrightnessXYNP; - /** Ambient occlusion brightness XYZNPP */ - public int aoBrightnessXYZNPP; - /** Ambient occlusion brightness YZPN */ - public int aoBrightnessYZPN; - /** Ambient occlusion brightness XYZPPN */ - public int aoBrightnessXYZPPN; - /** Ambient occlusion brightness XYPP */ - public int aoBrightnessXYPP; - /** Ambient occlusion brightness YZPP */ - public int aoBrightnessYZPP; - /** Ambient occlusion brightness XYZPPP */ - public int aoBrightnessXYZPPP; - /** Ambient occlusion brightness XZNN */ - public int aoBrightnessXZNN; - /** Ambient occlusion brightness XZPN */ - public int aoBrightnessXZPN; - /** Ambient occlusion brightness XZNP */ - public int aoBrightnessXZNP; - /** Ambient occlusion brightness XZPP */ - public int aoBrightnessXZPP; - /** Brightness top left */ - public int brightnessTopLeft; - /** Brightness bottom left */ - public int brightnessBottomLeft; - /** Brightness bottom right */ - public int brightnessBottomRight; - /** Brightness top right */ - public int brightnessTopRight; - /** Red color value for the top left corner */ - public float colorRedTopLeft; - /** Red color value for the bottom left corner */ - public float colorRedBottomLeft; - /** Red color value for the bottom right corner */ - public float colorRedBottomRight; - /** Red color value for the top right corner */ - public float colorRedTopRight; - /** Green color value for the top left corner */ - public float colorGreenTopLeft; - /** Green color value for the bottom left corner */ - public float colorGreenBottomLeft; - /** Green color value for the bottom right corner */ - public float colorGreenBottomRight; - /** Green color value for the top right corner */ - public float colorGreenTopRight; - /** Blue color value for the top left corner */ - public float colorBlueTopLeft; - /** Blue color value for the bottom left corner */ - public float colorBlueBottomLeft; - /** Blue color value for the bottom right corner */ - public float colorBlueBottomRight; - /** Blue color value for the top right corner */ - public float colorBlueTopRight; - /** If set to >=0, all block faces will be rendered using this texture index */ - public IIcon overrideBlockTexture; - - /** - * Clear override block texture - */ - public void clearOverrideBlockTexture() { - this.overrideBlockTexture = null; - } - - public boolean hasOverrideBlockTexture() { - return this.overrideBlockTexture != null; - } - - public IIcon getBlockIcon(Block block, IBlockAccess access, int x, int y, int z, int side) { - return this.getIconSafe(block.getIcon(access, x, y, z, side)); - } - - public IIcon getBlockIconFromSideAndMetadata(Block block, int side, int meta) { - return this.getIconSafe(block.getIcon(side, meta)); - } - - public IIcon getBlockIconFromSide(Block block, int side) { - return this.getIconSafe(block.getBlockTextureFromSide(side)); - } - - public IIcon getBlockIcon(Block block) { - return this.getIconSafe(block.getBlockTextureFromSide(1)); - } - - public IIcon getIconSafe(IIcon iicon) { - if (iicon == null) { - iicon = ((TextureMap) Minecraft.getMinecraft() - .getTextureManager() - .getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno"); - } - return iicon; - } - - IBlockAccess blockAccess = RenderBlocks.getInstance().blockAccess; - - public boolean renderStandardBlockWithAmbientOcclusion(IBlockAccess aWorld, RenderBlocks aRenderer, - ITexture[][] aTextures, Block block, int xPos, int yPos, int zPos, float R, float G, float B) { - this.enableAO = true; - boolean flag = false; - float f3 = 0.0F; - float f4 = 0.0F; - float f5 = 0.0F; - float f6 = 0.0F; - boolean flag1 = true; - int l = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos); - Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(983055); - - if (this.getBlockIcon(block) - .getIconName() - .equals("grass_top")) { - flag1 = false; - } else if (this.hasOverrideBlockTexture()) { - flag1 = false; - } - - boolean flag2; - boolean flag3; - boolean flag4; - boolean flag5; - int i1; - float f7; - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos, yPos - 1, zPos, 0)) { - if (this.renderMinY <= 0.0D) { - --yPos; - } - - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1) - .getCanBlockGrass(); - - if (!flag5 && !flag3) { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; - } else { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; - } else { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag5 && !flag2) { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; - } else { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag2) { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; - } else { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMinY <= 0.0D) { - ++yPos; - } - - i1 = l; - - if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXYNN + this.aoLightValueScratchYZNP + f7) - / 4.0F; - f6 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXYPN) - / 4.0F; - f5 = (f7 + this.aoLightValueScratchYZNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNN) - / 4.0F; - f4 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNN + f7 + this.aoLightValueScratchYZNN) - / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXYNN, this.aoBrightnessYZNP, i1); - this.brightnessTopRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXYPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYPN, this.aoBrightnessXYZPNN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNN, this.aoBrightnessYZNN, i1); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.5F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.5F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos, yPos + 1, zPos, 1)) { - if (this.renderMaxY >= 1.0D) { - ++yPos; - } - - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1) - .getCanBlockGrass(); - - if (!flag5 && !flag3) { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; - } else { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag5 && !flag2) { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; - } else { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; - } else { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag4 && !flag2) { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; - } else { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMaxY >= 1.0D) { - --yPos; - } - - i1 = l; - - if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYZNPP + this.aoLightValueScratchXYNP + this.aoLightValueScratchYZPP + f7) - / 4.0F; - f3 = (this.aoLightValueScratchYZPP + f7 + this.aoLightValueScratchXYZPPP + this.aoLightValueScratchXYPP) - / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPN) - / 4.0F; - f5 = (this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) - / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNPP, this.aoBrightnessXYNP, this.aoBrightnessYZPP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXYZPPP, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXYPP, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYNP, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - IIcon iicon; - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos - 1, 2)) { - if (this.renderMinZ <= 0.0D) { - --zPos; - } - - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1) - .getCanBlockGrass(); - - if (!flag3 && !flag5) { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } else { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } else { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } else { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } else { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMinZ <= 0.0D) { - ++zPos; - } - - i1 = l; - - if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXZNN + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) - / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXZPN + this.aoLightValueScratchXYZPPN) - / 4.0F; - f5 = (this.aoLightValueScratchYZNN + f7 + this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXZPN) - / 4.0F; - f6 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXZNN + this.aoLightValueScratchYZNN + f7) - / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYZPNN, this.aoBrightnessXZPN, i1); - this.brightnessTopRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXZNN, this.aoBrightnessYZNN, i1); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.8F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 2); - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName() - .equals("grass_side") && !this.hasOverrideBlockTexture()) { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos + 1, 3)) { - if (this.renderMaxZ >= 1.0D) { - ++zPos; - } - - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1) - .getCanBlockGrass(); - - if (!flag3 && !flag5) { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } else { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } else { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } else { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } else { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMaxZ >= 1.0D) { - --zPos; - } - - i1 = l; - - if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXZNP + this.aoLightValueScratchXYZNPP + f7 + this.aoLightValueScratchYZPP) - / 4.0F; - f6 = (f7 + this.aoLightValueScratchYZPP + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYZPPP) - / 4.0F; - f5 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXZPP) - / 4.0F; - f4 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXZNP + this.aoLightValueScratchYZNP + f7) - / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYZNPP, this.aoBrightnessYZPP, i1); - this.brightnessTopRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXZPP, this.aoBrightnessXYZPPP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, this.aoBrightnessYZNP, i1); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.8F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 3); - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName() - .equals("grass_side") && !this.hasOverrideBlockTexture()) { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos - 1, yPos, zPos, 4)) { - if (this.renderMinX <= 0.0D) { - --xPos; - } - - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) - .getCanBlockGrass(); - - if (!flag4 && !flag3) { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } else { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag5 && !flag3) { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } else { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag4 && !flag2) { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } else { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag5 && !flag2) { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } else { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMinX <= 0.0D) { - ++xPos; - } - - i1 = l; - - if (this.renderMinX <= 0.0D || !blockAccess.getBlock(xPos - 1, yPos, zPos) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNP + f7 + this.aoLightValueScratchXZNP) - / 4.0F; - f3 = (f7 + this.aoLightValueScratchXZNP + this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPP) - / 4.0F; - f4 = (this.aoLightValueScratchXZNN + f7 + this.aoLightValueScratchXYZNPN + this.aoLightValueScratchXYNP) - / 4.0F; - f5 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXYNN + this.aoLightValueScratchXZNN + f7) - / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYNP, this.aoBrightnessXYZNPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessXYNP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXYNN, this.aoBrightnessXZNN, i1); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.6F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 4); - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName() - .equals("grass_side") && !this.hasOverrideBlockTexture()) { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos + 1, yPos, zPos, 5)) { - if (this.renderMaxX >= 1.0D) { - ++xPos; - } - - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) - .getCanBlockGrass(); - - if (!flag3 && !flag5) { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } else { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag3 && !flag4) { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } else { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag2 && !flag5) { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } else { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag2 && !flag4) { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } else { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMaxX >= 1.0D) { - --xPos; - } - - i1 = l; - - if (this.renderMaxX >= 1.0D || !blockAccess.getBlock(xPos + 1, yPos, zPos) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNP + f7 + this.aoLightValueScratchXZPP) - / 4.0F; - f4 = (this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXZPN + f7) - / 4.0F; - f5 = (this.aoLightValueScratchXZPN + f7 + this.aoLightValueScratchXYZPPN + this.aoLightValueScratchXYPP) - / 4.0F; - f6 = (f7 + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPP) - / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYPN, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - this.brightnessTopRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZPP, this.aoBrightnessXYPP, this.aoBrightnessXYZPPP, i1); - this.brightnessBottomRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZPNN, this.aoBrightnessXYPN, this.aoBrightnessXZPN, i1); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.6F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 5); - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName() - .equals("grass_side") && !this.hasOverrideBlockTexture()) { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - this.enableAO = false; - return flag; - } - - /** - * Renders non-full-cube block with ambient occusion. Args: block, x, y, z, red, green, blue (lighting) - */ - public boolean renderStandardBlockWithAmbientOcclusionPartial(IBlockAccess aWorld, RenderBlocks aRenderer, - ITexture[][] aTextures, Block block, int xPos, int yPos, int zPos, float R, float G, float B) { - this.enableAO = true; - boolean flag = false; - float f3 = 0.0F; - float f4 = 0.0F; - float f5 = 0.0F; - float f6 = 0.0F; - boolean flag1 = true; - int l = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos); - Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(983055); - - if (this.getBlockIcon(block) - .getIconName() - .equals("grass_top")) { - flag1 = false; - } else if (this.hasOverrideBlockTexture()) { - flag1 = false; - } - - boolean flag2; - boolean flag3; - boolean flag4; - boolean flag5; - int i1; - float f7; - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos, yPos - 1, zPos, 0)) { - if (this.renderMinY <= 0.0D) { - --yPos; - } - - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1) - .getCanBlockGrass(); - - if (!flag5 && !flag3) { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXYNN; - } else { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXYNN; - this.aoBrightnessXYZNNP = this.aoBrightnessXYNN; - } else { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag5 && !flag2) { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXYPN; - } else { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag2) { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXYPN; - this.aoBrightnessXYZPNP = this.aoBrightnessXYPN; - } else { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMinY <= 0.0D) { - ++yPos; - } - - i1 = l; - - if (this.renderMinY <= 0.0D || !blockAccess.getBlock(xPos, yPos - 1, zPos) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - f3 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXYNN + this.aoLightValueScratchYZNP + f7) - / 4.0F; - f6 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXYPN) - / 4.0F; - f5 = (f7 + this.aoLightValueScratchYZNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNN) - / 4.0F; - f4 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNN + f7 + this.aoLightValueScratchYZNN) - / 4.0F; - this.brightnessTopLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXYNN, this.aoBrightnessYZNP, i1); - this.brightnessTopRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXYPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYPN, this.aoBrightnessXYZPNN, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNN, this.aoBrightnessYZNN, i1); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.5F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.5F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.5F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.5F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos, yPos + 1, zPos, 1)) { - if (this.renderMaxY >= 1.0D) { - ++yPos; - } - - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1) - .getCanBlockGrass(); - - if (!flag5 && !flag3) { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPN = this.aoBrightnessXYNP; - } else { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos - 1); - } - - if (!flag5 && !flag2) { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPN = this.aoBrightnessXYPP; - } else { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos - 1); - } - - if (!flag4 && !flag3) { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXYNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXYNP; - } else { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos + 1); - } - - if (!flag4 && !flag2) { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXYPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXYPP; - } else { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos + 1); - } - - if (this.renderMaxY >= 1.0D) { - --yPos; - } - - i1 = l; - - if (this.renderMaxY >= 1.0D || !blockAccess.getBlock(xPos, yPos + 1, zPos) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - } - - f7 = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - f6 = (this.aoLightValueScratchXYZNPP + this.aoLightValueScratchXYNP + this.aoLightValueScratchYZPP + f7) - / 4.0F; - f3 = (this.aoLightValueScratchYZPP + f7 + this.aoLightValueScratchXYZPPP + this.aoLightValueScratchXYPP) - / 4.0F; - f4 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPN) - / 4.0F; - f5 = (this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) - / 4.0F; - this.brightnessTopRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNPP, this.aoBrightnessXYNP, this.aoBrightnessYZPP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXYZPPP, this.aoBrightnessXYPP, i1); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXYPP, this.aoBrightnessXYZPPN, i1); - this.brightnessBottomRight = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYNP, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B; - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - CustomOreBlockRenderer.renderFaceYPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - flag = true; - } - - float f8; - float f9; - float f10; - float f11; - int j1; - int k1; - int l1; - int i2; - IIcon iicon; - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos - 1, 2)) { - if (this.renderMinZ <= 0.0D) { - --zPos; - } - - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNN = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPN = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessYZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos - 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos - 1) - .getCanBlockGrass(); - - if (!flag3 && !flag5) { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } else { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } else { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } else { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } else { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMinZ <= 0.0D) { - ++zPos; - } - - i1 = l; - - if (this.renderMinZ <= 0.0D || !blockAccess.getBlock(xPos, yPos, zPos - 1) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXZNN + this.aoLightValueScratchXYZNPN + f7 + this.aoLightValueScratchYZPN) - / 4.0F; - f9 = (f7 + this.aoLightValueScratchYZPN + this.aoLightValueScratchXZPN + this.aoLightValueScratchXYZPPN) - / 4.0F; - f10 = (this.aoLightValueScratchYZNN + f7 + this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXZPN) - / 4.0F; - f11 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXZNN + this.aoLightValueScratchYZNN + f7) - / 4.0F; - f3 = (float) ((double) f8 * this.renderMaxY * (1.0D - this.renderMinX) - + (double) f9 * this.renderMaxY * this.renderMinX - + (double) f10 * (1.0D - this.renderMaxY) * this.renderMinX - + (double) f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - f4 = (float) ((double) f8 * this.renderMaxY * (1.0D - this.renderMaxX) - + (double) f9 * this.renderMaxY * this.renderMaxX - + (double) f10 * (1.0D - this.renderMaxY) * this.renderMaxX - + (double) f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - f5 = (float) ((double) f8 * this.renderMinY * (1.0D - this.renderMaxX) - + (double) f9 * this.renderMinY * this.renderMaxX - + (double) f10 * (1.0D - this.renderMinY) * this.renderMaxX - + (double) f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - f6 = (float) ((double) f8 * this.renderMinY * (1.0D - this.renderMinX) - + (double) f9 * this.renderMinY * this.renderMinX - + (double) f10 * (1.0D - this.renderMinY) * this.renderMinX - + (double) f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - j1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessYZPN, i1); - k1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZPN, this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, i1); - l1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZNN, this.aoBrightnessXYZPNN, this.aoBrightnessXZPN, i1); - i2 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXZNN, this.aoBrightnessYZNN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - k1, - l1, - i2, - this.renderMaxY * (1.0D - this.renderMinX), - this.renderMaxY * this.renderMinX, - (1.0D - this.renderMaxY) * this.renderMinX, - (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - k1, - l1, - i2, - this.renderMaxY * (1.0D - this.renderMaxX), - this.renderMaxY * this.renderMaxX, - (1.0D - this.renderMaxY) * this.renderMaxX, - (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - this.brightnessBottomRight = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - k1, - l1, - i2, - this.renderMinY * (1.0D - this.renderMaxX), - this.renderMinY * this.renderMaxX, - (1.0D - this.renderMinY) * this.renderMaxX, - (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - this.brightnessTopRight = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - k1, - l1, - i2, - this.renderMinY * (1.0D - this.renderMinX), - this.renderMinY * this.renderMinX, - (1.0D - this.renderMinY) * this.renderMinX, - (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.8F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 2); - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName() - .equals("grass_side") && !this.hasOverrideBlockTexture()) { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos, yPos, zPos + 1, 3)) { - if (this.renderMaxZ >= 1.0D) { - ++zPos; - } - - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZNP = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchYZPP = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - this.aoBrightnessYZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessYZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos, yPos + 1, zPos + 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos, yPos - 1, zPos + 1) - .getCanBlockGrass(); - - if (!flag3 && !flag5) { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } else { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos - 1, zPos); - } - - if (!flag3 && !flag4) { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } else { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos + 1, zPos); - } - - if (!flag2 && !flag5) { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } else { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos - 1, zPos); - } - - if (!flag2 && !flag4) { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } else { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos + 1, zPos); - } - - if (this.renderMaxZ >= 1.0D) { - --zPos; - } - - i1 = l; - - if (this.renderMaxZ >= 1.0D || !blockAccess.getBlock(xPos, yPos, zPos + 1) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - } - - f7 = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXZNP + this.aoLightValueScratchXYZNPP + f7 + this.aoLightValueScratchYZPP) - / 4.0F; - f9 = (f7 + this.aoLightValueScratchYZPP + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYZPPP) - / 4.0F; - f10 = (this.aoLightValueScratchYZNP + f7 + this.aoLightValueScratchXYZPNP + this.aoLightValueScratchXZPP) - / 4.0F; - f11 = (this.aoLightValueScratchXYZNNP + this.aoLightValueScratchXZNP + this.aoLightValueScratchYZNP + f7) - / 4.0F; - f3 = (float) ((double) f8 * this.renderMaxY * (1.0D - this.renderMinX) - + (double) f9 * this.renderMaxY * this.renderMinX - + (double) f10 * (1.0D - this.renderMaxY) * this.renderMinX - + (double) f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinX)); - f4 = (float) ((double) f8 * this.renderMinY * (1.0D - this.renderMinX) - + (double) f9 * this.renderMinY * this.renderMinX - + (double) f10 * (1.0D - this.renderMinY) * this.renderMinX - + (double) f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinX)); - f5 = (float) ((double) f8 * this.renderMinY * (1.0D - this.renderMaxX) - + (double) f9 * this.renderMinY * this.renderMaxX - + (double) f10 * (1.0D - this.renderMinY) * this.renderMaxX - + (double) f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxX)); - f6 = (float) ((double) f8 * this.renderMaxY * (1.0D - this.renderMaxX) - + (double) f9 * this.renderMaxY * this.renderMaxX - + (double) f10 * (1.0D - this.renderMaxY) * this.renderMaxX - + (double) f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX)); - j1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYZNPP, this.aoBrightnessYZPP, i1); - k1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZPP, this.aoBrightnessXZPP, this.aoBrightnessXYZPPP, i1); - l1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessYZNP, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - i2 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, this.aoBrightnessYZNP, i1); - this.brightnessTopLeft = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - i2, - l1, - k1, - this.renderMaxY * (1.0D - this.renderMinX), - (1.0D - this.renderMaxY) * (1.0D - this.renderMinX), - (1.0D - this.renderMaxY) * this.renderMinX, - this.renderMaxY * this.renderMinX); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - i2, - l1, - k1, - this.renderMinY * (1.0D - this.renderMinX), - (1.0D - this.renderMinY) * (1.0D - this.renderMinX), - (1.0D - this.renderMinY) * this.renderMinX, - this.renderMinY * this.renderMinX); - this.brightnessBottomRight = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - i2, - l1, - k1, - this.renderMinY * (1.0D - this.renderMaxX), - (1.0D - this.renderMinY) * (1.0D - this.renderMaxX), - (1.0D - this.renderMinY) * this.renderMaxX, - this.renderMinY * this.renderMaxX); - this.brightnessTopRight = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - i2, - l1, - k1, - this.renderMaxY * (1.0D - this.renderMaxX), - (1.0D - this.renderMaxY) * (1.0D - this.renderMaxX), - (1.0D - this.renderMaxY) * this.renderMaxX, - this.renderMaxY * this.renderMaxX); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.8F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.8F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.8F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.8F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 3); - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName() - .equals("grass_side") && !this.hasOverrideBlockTexture()) { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceZPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos - 1, yPos, zPos, 4)) { - if (this.renderMinX <= 0.0D) { - --xPos; - } - - this.aoLightValueScratchXYNN = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNN = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZNP = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYNP = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos - 1, yPos + 1, zPos) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos - 1, yPos - 1, zPos) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos - 1, yPos, zPos - 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos - 1, yPos, zPos + 1) - .getCanBlockGrass(); - - if (!flag4 && !flag3) { - this.aoLightValueScratchXYZNNN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNNN = this.aoBrightnessXZNN; - } else { - this.aoLightValueScratchXYZNNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag5 && !flag3) { - this.aoLightValueScratchXYZNNP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNNP = this.aoBrightnessXZNP; - } else { - this.aoLightValueScratchXYZNNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag4 && !flag2) { - this.aoLightValueScratchXYZNPN = this.aoLightValueScratchXZNN; - this.aoBrightnessXYZNPN = this.aoBrightnessXZNN; - } else { - this.aoLightValueScratchXYZNPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag5 && !flag2) { - this.aoLightValueScratchXYZNPP = this.aoLightValueScratchXZNP; - this.aoBrightnessXYZNPP = this.aoBrightnessXZNP; - } else { - this.aoLightValueScratchXYZNPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZNPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMinX <= 0.0D) { - ++xPos; - } - - i1 = l; - - if (this.renderMinX <= 0.0D || !blockAccess.getBlock(xPos - 1, yPos, zPos) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos - 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos - 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXYNN + this.aoLightValueScratchXYZNNP + f7 + this.aoLightValueScratchXZNP) - / 4.0F; - f9 = (f7 + this.aoLightValueScratchXZNP + this.aoLightValueScratchXYNP + this.aoLightValueScratchXYZNPP) - / 4.0F; - f10 = (this.aoLightValueScratchXZNN + f7 + this.aoLightValueScratchXYZNPN + this.aoLightValueScratchXYNP) - / 4.0F; - f11 = (this.aoLightValueScratchXYZNNN + this.aoLightValueScratchXYNN + this.aoLightValueScratchXZNN + f7) - / 4.0F; - f3 = (float) ((double) f9 * this.renderMaxY * this.renderMaxZ - + (double) f10 * this.renderMaxY * (1.0D - this.renderMaxZ) - + (double) f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ) - + (double) f8 * (1.0D - this.renderMaxY) * this.renderMaxZ); - f4 = (float) ((double) f9 * this.renderMaxY * this.renderMinZ - + (double) f10 * this.renderMaxY * (1.0D - this.renderMinZ) - + (double) f11 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ) - + (double) f8 * (1.0D - this.renderMaxY) * this.renderMinZ); - f5 = (float) ((double) f9 * this.renderMinY * this.renderMinZ - + (double) f10 * this.renderMinY * (1.0D - this.renderMinZ) - + (double) f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMinZ) - + (double) f8 * (1.0D - this.renderMinY) * this.renderMinZ); - f6 = (float) ((double) f9 * this.renderMinY * this.renderMaxZ - + (double) f10 * this.renderMinY * (1.0D - this.renderMaxZ) - + (double) f11 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ) - + (double) f8 * (1.0D - this.renderMinY) * this.renderMaxZ); - j1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYNN, this.aoBrightnessXYZNNP, this.aoBrightnessXZNP, i1); - k1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZNP, this.aoBrightnessXYNP, this.aoBrightnessXYZNPP, i1); - l1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZNN, this.aoBrightnessXYZNPN, this.aoBrightnessXYNP, i1); - i2 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZNNN, this.aoBrightnessXYNN, this.aoBrightnessXZNN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance() - .mixAoBrightness( - k1, - l1, - i2, - j1, - this.renderMaxY * this.renderMaxZ, - this.renderMaxY * (1.0D - this.renderMaxZ), - (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ), - (1.0D - this.renderMaxY) * this.renderMaxZ); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .mixAoBrightness( - k1, - l1, - i2, - j1, - this.renderMaxY * this.renderMinZ, - this.renderMaxY * (1.0D - this.renderMinZ), - (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ), - (1.0D - this.renderMaxY) * this.renderMinZ); - this.brightnessBottomRight = RenderBlocks.getInstance() - .mixAoBrightness( - k1, - l1, - i2, - j1, - this.renderMinY * this.renderMinZ, - this.renderMinY * (1.0D - this.renderMinZ), - (1.0D - this.renderMinY) * (1.0D - this.renderMinZ), - (1.0D - this.renderMinY) * this.renderMinZ); - this.brightnessTopRight = RenderBlocks.getInstance() - .mixAoBrightness( - k1, - l1, - i2, - j1, - this.renderMinY * this.renderMaxZ, - this.renderMinY * (1.0D - this.renderMaxZ), - (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ), - (1.0D - this.renderMinY) * this.renderMaxZ); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.6F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 4); - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName() - .equals("grass_side") && !this.hasOverrideBlockTexture()) { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXNeg(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - if (RenderBlocks.getInstance().renderAllFaces - || block.shouldSideBeRendered(blockAccess, xPos + 1, yPos, zPos, 5)) { - if (this.renderMaxX >= 1.0D) { - ++xPos; - } - - this.aoLightValueScratchXYPN = blockAccess.getBlock(xPos, yPos - 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPN = blockAccess.getBlock(xPos, yPos, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXZPP = blockAccess.getBlock(xPos, yPos, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoLightValueScratchXYPP = blockAccess.getBlock(xPos, yPos + 1, zPos) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos); - this.aoBrightnessXZPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos - 1); - this.aoBrightnessXZPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos, zPos + 1); - this.aoBrightnessXYPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos); - flag2 = blockAccess.getBlock(xPos + 1, yPos + 1, zPos) - .getCanBlockGrass(); - flag3 = blockAccess.getBlock(xPos + 1, yPos - 1, zPos) - .getCanBlockGrass(); - flag4 = blockAccess.getBlock(xPos + 1, yPos, zPos + 1) - .getCanBlockGrass(); - flag5 = blockAccess.getBlock(xPos + 1, yPos, zPos - 1) - .getCanBlockGrass(); - - if (!flag3 && !flag5) { - this.aoLightValueScratchXYZPNN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPNN = this.aoBrightnessXZPN; - } else { - this.aoLightValueScratchXYZPNN = blockAccess.getBlock(xPos, yPos - 1, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos - 1); - } - - if (!flag3 && !flag4) { - this.aoLightValueScratchXYZPNP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPNP = this.aoBrightnessXZPP; - } else { - this.aoLightValueScratchXYZPNP = blockAccess.getBlock(xPos, yPos - 1, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPNP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos - 1, zPos + 1); - } - - if (!flag2 && !flag5) { - this.aoLightValueScratchXYZPPN = this.aoLightValueScratchXZPN; - this.aoBrightnessXYZPPN = this.aoBrightnessXZPN; - } else { - this.aoLightValueScratchXYZPPN = blockAccess.getBlock(xPos, yPos + 1, zPos - 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPN = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos - 1); - } - - if (!flag2 && !flag4) { - this.aoLightValueScratchXYZPPP = this.aoLightValueScratchXZPP; - this.aoBrightnessXYZPPP = this.aoBrightnessXZPP; - } else { - this.aoLightValueScratchXYZPPP = blockAccess.getBlock(xPos, yPos + 1, zPos + 1) - .getAmbientOcclusionLightValue(); - this.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(blockAccess, xPos, yPos + 1, zPos + 1); - } - - if (this.renderMaxX >= 1.0D) { - --xPos; - } - - i1 = l; - - if (this.renderMaxX >= 1.0D || !blockAccess.getBlock(xPos + 1, yPos, zPos) - .isOpaqueCube()) { - i1 = block.getMixedBrightnessForBlock(blockAccess, xPos + 1, yPos, zPos); - } - - f7 = blockAccess.getBlock(xPos + 1, yPos, zPos) - .getAmbientOcclusionLightValue(); - f8 = (this.aoLightValueScratchXYPN + this.aoLightValueScratchXYZPNP + f7 + this.aoLightValueScratchXZPP) - / 4.0F; - f9 = (this.aoLightValueScratchXYZPNN + this.aoLightValueScratchXYPN + this.aoLightValueScratchXZPN + f7) - / 4.0F; - f10 = (this.aoLightValueScratchXZPN + f7 + this.aoLightValueScratchXYZPPN + this.aoLightValueScratchXYPP) - / 4.0F; - f11 = (f7 + this.aoLightValueScratchXZPP + this.aoLightValueScratchXYPP + this.aoLightValueScratchXYZPPP) - / 4.0F; - f3 = (float) ((double) f8 * (1.0D - this.renderMinY) * this.renderMaxZ - + (double) f9 * (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ) - + (double) f10 * this.renderMinY * (1.0D - this.renderMaxZ) - + (double) f11 * this.renderMinY * this.renderMaxZ); - f4 = (float) ((double) f8 * (1.0D - this.renderMinY) * this.renderMinZ - + (double) f9 * (1.0D - this.renderMinY) * (1.0D - this.renderMinZ) - + (double) f10 * this.renderMinY * (1.0D - this.renderMinZ) - + (double) f11 * this.renderMinY * this.renderMinZ); - f5 = (float) ((double) f8 * (1.0D - this.renderMaxY) * this.renderMinZ - + (double) f9 * (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ) - + (double) f10 * this.renderMaxY * (1.0D - this.renderMinZ) - + (double) f11 * this.renderMaxY * this.renderMinZ); - f6 = (float) ((double) f8 * (1.0D - this.renderMaxY) * this.renderMaxZ - + (double) f9 * (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ) - + (double) f10 * this.renderMaxY * (1.0D - this.renderMaxZ) - + (double) f11 * this.renderMaxY * this.renderMaxZ); - j1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYPN, this.aoBrightnessXYZPNP, this.aoBrightnessXZPP, i1); - k1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZPP, this.aoBrightnessXYPP, this.aoBrightnessXYZPPP, i1); - l1 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXZPN, this.aoBrightnessXYZPPN, this.aoBrightnessXYPP, i1); - i2 = RenderBlocks.getInstance() - .getAoBrightness(this.aoBrightnessXYZPNN, this.aoBrightnessXYPN, this.aoBrightnessXZPN, i1); - this.brightnessTopLeft = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - i2, - l1, - k1, - (1.0D - this.renderMinY) * this.renderMaxZ, - (1.0D - this.renderMinY) * (1.0D - this.renderMaxZ), - this.renderMinY * (1.0D - this.renderMaxZ), - this.renderMinY * this.renderMaxZ); - this.brightnessBottomLeft = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - i2, - l1, - k1, - (1.0D - this.renderMinY) * this.renderMinZ, - (1.0D - this.renderMinY) * (1.0D - this.renderMinZ), - this.renderMinY * (1.0D - this.renderMinZ), - this.renderMinY * this.renderMinZ); - this.brightnessBottomRight = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - i2, - l1, - k1, - (1.0D - this.renderMaxY) * this.renderMinZ, - (1.0D - this.renderMaxY) * (1.0D - this.renderMinZ), - this.renderMaxY * (1.0D - this.renderMinZ), - this.renderMaxY * this.renderMinZ); - this.brightnessTopRight = RenderBlocks.getInstance() - .mixAoBrightness( - j1, - i2, - l1, - k1, - (1.0D - this.renderMaxY) * this.renderMaxZ, - (1.0D - this.renderMaxY) * (1.0D - this.renderMaxZ), - this.renderMaxY * (1.0D - this.renderMaxZ), - this.renderMaxY * this.renderMaxZ); - - if (flag1) { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = R - * 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = G - * 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = B - * 0.6F; - } else { - this.colorRedTopLeft = this.colorRedBottomLeft = this.colorRedBottomRight = this.colorRedTopRight = 0.6F; - this.colorGreenTopLeft = this.colorGreenBottomLeft = this.colorGreenBottomRight = this.colorGreenTopRight = 0.6F; - this.colorBlueTopLeft = this.colorBlueBottomLeft = this.colorBlueBottomRight = this.colorBlueTopRight = 0.6F; - } - - this.colorRedTopLeft *= f3; - this.colorGreenTopLeft *= f3; - this.colorBlueTopLeft *= f3; - this.colorRedBottomLeft *= f4; - this.colorGreenBottomLeft *= f4; - this.colorBlueBottomLeft *= f4; - this.colorRedBottomRight *= f5; - this.colorGreenBottomRight *= f5; - this.colorBlueBottomRight *= f5; - this.colorRedTopRight *= f6; - this.colorGreenTopRight *= f6; - this.colorBlueTopRight *= f6; - iicon = this.getBlockIcon(block, blockAccess, xPos, yPos, zPos, 5); - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - - RenderBlocks.getInstance(); - if (RenderBlocks.fancyGrass && iicon.getIconName() - .equals("grass_side") && !this.hasOverrideBlockTexture()) { - this.colorRedTopLeft *= R; - this.colorRedBottomLeft *= R; - this.colorRedBottomRight *= R; - this.colorRedTopRight *= R; - this.colorGreenTopLeft *= G; - this.colorGreenBottomLeft *= G; - this.colorGreenBottomRight *= G; - this.colorGreenTopRight *= G; - this.colorBlueTopLeft *= B; - this.colorBlueBottomLeft *= B; - this.colorBlueBottomRight *= B; - this.colorBlueTopRight *= B; - CustomOreBlockRenderer.renderFaceXPos(aWorld, aRenderer, block, xPos, yPos, zPos, aTextures); - } - - flag = true; - } - - this.enableAO = false; - return flag; - } }