blob: bf16555e4fdba39598a6f9f378504ce8b5894048 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
package gtPlusPlus.xmod.gregtech.common.blocks.textures;
import static gregtech.api.enums.Mods.GTPlusPlus;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import gregtech.api.GregTechAPI;
import gregtech.api.interfaces.IIconContainer;
import gtPlusPlus.api.objects.Logger;
public final class TexturesGtTools {
public static final CustomIcon ANGLE_GRINDER = new CustomIcon("iconsets/ANGLE_GRINDER");
public static final CustomIcon ELECTRIC_SNIPS = new CustomIcon("iconsets/ELECTRIC_SNIPS");
public static final class CustomIcon implements IIconContainer, Runnable {
private IIcon mIcon, mOverlay;
private final String mIconName;
public CustomIcon(final String aIconName) {
this.mIconName = aIconName;
Logger.INFO("Constructing a Custom Texture. " + this.mIconName);
GregTechAPI.sGTItemIconload.add(this);
}
@Override
public IIcon getIcon() {
return this.mIcon;
}
@Override
public IIcon getOverlayIcon() {
return this.mOverlay;
}
@Override
public void run() {
this.mIcon = GregTechAPI.sItemIcons.registerIcon(GTPlusPlus.ID + ":" + this.mIconName);
// Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g);
this.mOverlay = GregTechAPI.sItemIcons.registerIcon(GTPlusPlus.ID + ":" + this.mIconName + "_OVERLAY");
}
@Override
public ResourceLocation getTextureFile() {
return TextureMap.locationItemsTexture;
}
}
}
|