diff options
author | Léa Gris <lea.gris@noiraude.net> | 2021-05-20 22:57:12 +0200 |
---|---|---|
committer | Léa Gris <lea.gris@noiraude.net> | 2021-05-21 13:41:21 +0200 |
commit | 678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7 (patch) | |
tree | f275c84399e59b714bcd9a70f0ffa6d6020f5ffe /src/main/java/gregtech/api/enums/Textures.java | |
parent | 04468545985a4fed401d9b6626670e8af5938920 (diff) | |
download | GT5-Unofficial-678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7.tar.gz GT5-Unofficial-678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7.tar.bz2 GT5-Unofficial-678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7.zip |
feat(render): implementation-free api texture factory
Provides an implementation-free API Texture factory an builder.
Deprecates gregtech.api.objects.GT_*Texture.java classes
Once all GregTech add-on will be migrated to the new implemnetation-free API,
changes to the implementation will not affect the add-on.
For now, this API allow rendering of in-world glow textures.
In-inventory/hand rendering of glow texture require implementation changes
that are postponed until no add-on uses the deprecated embedded implementation API.
Diffstat (limited to 'src/main/java/gregtech/api/enums/Textures.java')
-rw-r--r-- | src/main/java/gregtech/api/enums/Textures.java | 273 |
1 files changed, 137 insertions, 136 deletions
diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index f9a70e2b6c..8cb3547768 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -3,9 +3,7 @@ package gregtech.api.enums; import gregtech.api.GregTech_API; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; -import gregtech.api.render.GT_RenderedTexture; -import gregtech.api.render.GT_SidedTexture; -import gregtech.api.render.GT_StdRenderedTexture; +import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; @@ -1009,30 +1007,30 @@ public class Textures { /** * Icon for Fresh CFoam */ - public static final ITexture[] FRESHFOAM = {new GT_RenderedTexture(CFOAM_FRESH)}; + public static final ITexture[] FRESHFOAM = {TextureFactory.of(CFOAM_FRESH)}; /** * Icons for Hardened CFoam * 0 = No Color * 1 - 16 = Colors */ public static final ITexture[][] HARDENEDFOAMS = { - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.CONSTRUCTION_FOAM.mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[0].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[1].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[2].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[3].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[4].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[5].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[6].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[7].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[8].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[9].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[10].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[11].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[12].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[13].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[14].mRGBa)}, - new ITexture[]{new GT_RenderedTexture(CFOAM_HARDENED, Dyes.VALUES[15].mRGBa)} + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.CONSTRUCTION_FOAM.mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[0].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[1].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[2].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[3].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[4].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[5].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[6].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[7].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[8].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[9].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[10].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[11].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[12].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[13].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[14].mRGBa)}, + new ITexture[]{TextureFactory.of(CFOAM_HARDENED, Dyes.VALUES[15].mRGBa)} }; /** * Machine Casings by Tier @@ -1451,135 +1449,135 @@ public class Textures { BLOCK_BLAZE }; public static ITexture[] HIDDEN_TEXTURE = { - new GT_StdRenderedTexture(HIDDEN_FACE) + TextureFactory.builder().addIcon(HIDDEN_FACE).stdOrient().build() }; public static ITexture[] ERROR_RENDERING = { - new GT_RenderedTexture(RENDERING_ERROR) + TextureFactory.of(RENDERING_ERROR) }; public static ITexture[] OVERLAYS_ENERGY_IN = { - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN, new short[]{40, 40, 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}), + TextureFactory.of(OVERLAY_ENERGY_IN, new short[]{40, 40, 245, 0}), }; public static ITexture[] OVERLAYS_ENERGY_OUT = { - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT, new short[]{40, 40, 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}), + TextureFactory.of(OVERLAY_ENERGY_OUT, new short[]{40, 40, 245, 0}), }; public static ITexture[] OVERLAYS_ENERGY_IN_MULTI = { - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_MULTI, new short[]{40, 40, 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}), + TextureFactory.of(OVERLAY_ENERGY_IN_MULTI, new short[]{40, 40, 245, 0}), }; public static ITexture[] OVERLAYS_ENERGY_OUT_MULTI = { - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_MULTI, new short[]{40, 40, 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}), + TextureFactory.of(OVERLAY_ENERGY_OUT_MULTI, new short[]{40, 40, 245, 0}), }; public static ITexture[] OVERLAYS_ENERGY_IN_POWER = { - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_IN_POWER, new short[]{40, 40, 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}), + TextureFactory.of(OVERLAY_ENERGY_IN_POWER, new short[]{40, 40, 245, 0}), }; public static ITexture[] OVERLAYS_ENERGY_OUT_POWER = { - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{180, 180, 180, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{220, 220, 220, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{255, 100, 0, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{255, 255, 30, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{128, 128, 128, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{240, 240, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{220, 220, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{200, 200, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{180, 180, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{160, 160, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{140, 140, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{120, 120, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{100, 100, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{80, 80, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{60, 60, 245, 0}), - new GT_RenderedTexture(OVERLAY_ENERGY_OUT_POWER, new short[]{40, 40, 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}), + TextureFactory.of(OVERLAY_ENERGY_OUT_POWER, new short[]{40, 40, 245, 0}), }; public static ITexture[] LOCKERS = { - new GT_RenderedTexture(OVERLAY_LOCKER_000), - new GT_RenderedTexture(OVERLAY_LOCKER_001), - new GT_RenderedTexture(OVERLAY_LOCKER_002), - new GT_RenderedTexture(OVERLAY_LOCKER_003), - new GT_RenderedTexture(OVERLAY_LOCKER_004), - new GT_RenderedTexture(OVERLAY_LOCKER_005), - new GT_RenderedTexture(OVERLAY_LOCKER_006), - new GT_RenderedTexture(OVERLAY_LOCKER_007), - new GT_RenderedTexture(OVERLAY_LOCKER_008), - new GT_RenderedTexture(OVERLAY_LOCKER_009), - new GT_RenderedTexture(OVERLAY_LOCKER_010), - new GT_RenderedTexture(OVERLAY_LOCKER_011), - new GT_RenderedTexture(OVERLAY_LOCKER_012), - new GT_RenderedTexture(OVERLAY_LOCKER_013), + TextureFactory.of(OVERLAY_LOCKER_000), + TextureFactory.of(OVERLAY_LOCKER_001), + TextureFactory.of(OVERLAY_LOCKER_002), + TextureFactory.of(OVERLAY_LOCKER_003), + TextureFactory.of(OVERLAY_LOCKER_004), + TextureFactory.of(OVERLAY_LOCKER_005), + TextureFactory.of(OVERLAY_LOCKER_006), + TextureFactory.of(OVERLAY_LOCKER_007), + TextureFactory.of(OVERLAY_LOCKER_008), + TextureFactory.of(OVERLAY_LOCKER_009), + TextureFactory.of(OVERLAY_LOCKER_010), + TextureFactory.of(OVERLAY_LOCKER_011), + TextureFactory.of(OVERLAY_LOCKER_012), + TextureFactory.of(OVERLAY_LOCKER_013), }; /** * USE casingTexturePages[page] instead of CASING_BLOCKS since it is casingTexturePages[0] @@ -1595,8 +1593,11 @@ public class Textures { static { for (byte i = 0; i < MACHINE_CASINGS.length; i++) for (byte j = 0; j < MACHINE_CASINGS[i].length; j++) - MACHINE_CASINGS[i][j] = new GT_SidedTexture(MACHINECASINGS_BOTTOM[i], MACHINECASINGS_TOP[i], MACHINECASINGS_SIDE[i], Dyes.getModulation(j - 1, Dyes.MACHINE_METAL.mRGBa)); - casingTexturePages[0] = CASING_BLOCKS; + MACHINE_CASINGS[i][j] = TextureFactory.of( + MACHINECASINGS_BOTTOM[i], + MACHINECASINGS_TOP[i], + MACHINECASINGS_SIDE[i], Dyes.getModulation(j - 1, Dyes.MACHINE_METAL.mRGBa)); + casingTexturePages[0] = new ITexture[128]; //adds some known pages, modders also can do it... GT_Utility.addTexturePage((byte) 1); GT_Utility.addTexturePage((byte) 8); @@ -1743,7 +1744,7 @@ public class Textures { ENERGY_BAR_8, }; - public static final ITexture[] ERROR_RENDERING = {new GT_RenderedTexture(RENDERING_ERROR)}; + public static final ITexture[] ERROR_RENDERING = {TextureFactory.of(RENDERING_ERROR)}; protected IIcon mIcon, mOverlay; |