diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-08-14 20:04:13 +0100 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-08-14 20:04:13 +0100 |
commit | ede55e818ba0312f061e154402cd82ec4603480d (patch) | |
tree | c5cb3074cc45f9bc36b2e2a891dd00da87498c12 /src/Java/gtPlusPlus/xmod/gregtech/common/blocks | |
parent | 800119d6a1e75ffd0201a9dfc44c53a7604a9f37 (diff) | |
download | GT5-Unofficial-ede55e818ba0312f061e154402cd82ec4603480d.tar.gz GT5-Unofficial-ede55e818ba0312f061e154402cd82ec4603480d.tar.bz2 GT5-Unofficial-ede55e818ba0312f061e154402cd82ec4603480d.zip |
+ Attempted to add custom covers for Ztones blocks. Should close #521.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/blocks')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java | 13 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java | 32 |
2 files changed, 40 insertions, 5 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index aaacbcd3a0..aed50ebae8 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -30,9 +30,15 @@ public class TexturesGtBlock { public static class CustomIcon implements IIconContainer, Runnable { protected IIcon mIcon; protected String mIconName; + protected String mModID; public CustomIcon(final String aIconName) { + this(CORE.MODID, aIconName); + } + + public CustomIcon(final String aModID, final String aIconName) { this.mIconName = aIconName; + this.mModID = aModID; mCustomiconMap.put(this); Logger.WARNING("Constructing a Custom Texture. " + this.mIconName); GregTech_API.sGTBlockIconload.add(this); @@ -50,7 +56,7 @@ public class TexturesGtBlock { @Override public void run() { - this.mIcon = GregTech_API.sBlockIcons.registerIcon(CORE.MODID + ":" + this.mIconName); + this.mIcon = GregTech_API.sBlockIcons.registerIcon(this.mModID + ":" + this.mIconName); Logger.WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath()); } @@ -555,10 +561,7 @@ public class TexturesGtBlock { - public static Object Casing_Material_Turbine; - - - + public static Object Casing_Material_Turbine; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java new file mode 100644 index 0000000000..cc5cf3d55e --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java @@ -0,0 +1,32 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures; + +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; + +public class TexturesGtCutomCovers { + + public static final CustomIcon[] TEXTURE_ZTONES_AGON = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_ISZM = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_KORP = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_JELT = new CustomIcon[16]; + public static final CustomIcon[] TEXTURE_ZTONES_BITT = new CustomIcon[16]; + + public static void init() { + generateZTones(); + } + + private static void generateZTones() { + // ZTONES + String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" }; + int aArrayIndex = 0; + CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, + TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT }; + + for (CustomIcon[] t : aArrays) { + for (int s = 0; s < 16; s++) { + t[s] = new CustomIcon("Ztones", "sets/" + aZtoneCoverTextureNames[aArrayIndex] + "/"+aZtoneCoverTextureNames[aArrayIndex]+"_ (" + s + ")"); + } + aArrayIndex++; + } + } + +} |