diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2022-09-07 17:20:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 11:20:57 +0200 |
commit | aa094aee4db85c9a08c7ee4054f14459c4ce4cc1 (patch) | |
tree | e0994a689f3cd6447fe305e43fd3798d6559fac2 /src/main/java | |
parent | 74b5ef849dea6d9a05e47f0294ccc689069f6f2c (diff) | |
download | GT5-Unofficial-aa094aee4db85c9a08c7ee4054f14459c4ce4cc1.tar.gz GT5-Unofficial-aa094aee4db85c9a08c7ee4054f14459c4ce4cc1.tar.bz2 GT5-Unofficial-aa094aee4db85c9a08c7ee4054f14459c4ce4cc1.zip |
revert to spritesheet for block textures for gaia spirit (#1351)
* revert to spritesheet for block textures for gaia spirit
also removed now-unused transcendent metal block textures
* Spotless apply for branch fix/animated-material-texture-fix for #1351 (#1352)
Co-authored-by: Glease <4586901+Glease@users.noreply.github.com>
Co-authored-by: GitHub GTNH Actions <>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/gregtech/api/enums/MaterialsBotania.java | 2 | ||||
-rw-r--r-- | src/main/java/gregtech/api/enums/TextureSet.java | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/enums/MaterialsBotania.java b/src/main/java/gregtech/api/enums/MaterialsBotania.java index 334940d47a..ef07ec4297 100644 --- a/src/main/java/gregtech/api/enums/MaterialsBotania.java +++ b/src/main/java/gregtech/api/enums/MaterialsBotania.java @@ -76,7 +76,7 @@ public class MaterialsBotania { .constructMaterial(); public static Materials GaiaSpirit = new Materials( 205, - TextureSet.SET_METALLIC, + TextureSet.SET_METALLIC.withBlockTextures("GaiaSpirit"), 32.0F, 850000, 12, diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java index 78864e1ca5..52bb081bd3 100644 --- a/src/main/java/gregtech/api/enums/TextureSet.java +++ b/src/main/java/gregtech/api/enums/TextureSet.java @@ -187,4 +187,30 @@ public class TextureSet { this("CUSTOM/" + aSetName); this.is_custom = is_custom; } + + /** + * Construct a TextureSet that will delegate some of its textures to the origin TextureSet. + * + * This assumes you want to construct a custom texture set. + */ + private TextureSet(String aSetName, TextureSet origin, boolean overrideBlock, boolean overrideItem) { + this("CUSTOM/" + aSetName); + this.is_custom = true; + + for (int i = 0; i < mTextures.length; i++) { + if (mTextures[i] instanceof Textures.ItemIcons.CustomIcon) { + if (!overrideItem) { + mTextures[i] = origin.mTextures[i]; + } + } else if (mTextures[i] instanceof Textures.BlockIcons.CustomIcon) { + if (!overrideBlock) { + mTextures[i] = origin.mTextures[i]; + } + } + } + } + + public TextureSet withBlockTextures(String aNewSetName) { + return new TextureSet(aNewSetName, this, true, false); + } } |