From 678c9a6e1e7a3a1127c40ae5c3dda7ef4519bfb7 Mon Sep 17 00:00:00 2001 From: Léa Gris Date: Thu, 20 May 2021 22:57:12 +0200 Subject: 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. --- src/main/java/gregtech/api/interfaces/ITexture.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/gregtech/api/interfaces/ITexture.java') diff --git a/src/main/java/gregtech/api/interfaces/ITexture.java b/src/main/java/gregtech/api/interfaces/ITexture.java index 61244a10ae..4c0b1984ca 100644 --- a/src/main/java/gregtech/api/interfaces/ITexture.java +++ b/src/main/java/gregtech/api/interfaces/ITexture.java @@ -19,6 +19,13 @@ public interface ITexture { boolean isValidTexture(); + /** + * @return {@code true} if this texture is from the old package + */ + default boolean isOldTexture() { + return getClass().toString().startsWith("gregtech.api.objects"); + } + /** * Will initialize the {@link Tessellator} if rendering off-world (Inventory) * @param aRenderer The {@link RenderBlocks} Renderer -- cgit