diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2022-08-19 00:18:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 18:18:26 +0200 |
commit | 6c82842b56e9f613760c6b0cff6480af2e2ddb07 (patch) | |
tree | a3ac74162d8057960032403d2a354bccf0e345c3 /src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java | |
parent | 27a68fdf779e6ab8aa6ff5b48c0977855709c3ad (diff) | |
download | GT5-Unofficial-6c82842b56e9f613760c6b0cff6480af2e2ddb07.tar.gz GT5-Unofficial-6c82842b56e9f613760c6b0cff6480af2e2ddb07.tar.bz2 GT5-Unofficial-6c82842b56e9f613760c6b0cff6480af2e2ddb07.zip |
no more magical texture index (#1249)
* no more magical texture index
* add a reverse map for fxxk sake
Diffstat (limited to 'src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java')
-rw-r--r-- | src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java b/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java new file mode 100644 index 0000000000..7401d35323 --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/IHasIndexedTexture.java @@ -0,0 +1,15 @@ +package gregtech.api.interfaces; + +/** + * To be implemented on blocks. Usually machine casing blocks. + */ +public interface IHasIndexedTexture { + /** + * Returns the statically mapped texture for this casing. Return + * {@link gregtech.api.enums.Textures.BlockIcons#ERROR_TEXTURE_INDEX} if meta maps to a nonexistent block, or the + * block does not have a statically mapped texture. + * @param aMeta block meta + * @return texture index into {@link gregtech.api.enums.Textures.BlockIcons#casingTexturePages} + */ + int getTextureIndex(int aMeta); +} |