aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
blob: ee104eaca35f08c22581bdea97184f416747c34c (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
52
53
54
55
56
57
58
59
60
61
package gtPlusPlus.xmod.gregtech.common.blocks.textures;

import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;

import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;

import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;

public final class TexturesGtTools {

	public final static CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER");
	public final static CustomIcon ANGLE_GRINDER = new CustomIcon("iconsets/ANGLE_GRINDER");
	public final static CustomIcon ELECTRIC_SNIPS = new CustomIcon("iconsets/ELECTRIC_SNIPS");
	public final static CustomIcon ELECTRIC_LIGHTER = new CustomIcon("iconsets/ELECTRIC_LIGHTER");
	public final static CustomIcon ELECTRIC_BUTCHER_KNIFE = new CustomIcon("iconsets/ELECTRIC_BUTCHER_KNIFE");








	public final static class CustomIcon implements IIconContainer, Runnable {
		protected IIcon mIcon, mOverlay;
		protected final String mIconName;

		public CustomIcon(final String aIconName) {
			this.mIconName = aIconName;
			Logger.INFO("Constructing a Custom Texture. " + this.mIconName);
			GregTech_API.sGTItemIconload.add(this);
		}

		@Override
		public IIcon getIcon() {
			return this.mIcon;
		}

		@Override
		public IIcon getOverlayIcon() {
			return this.mOverlay;
		}

		@Override
		public void run() {
			this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":"  + this.mIconName);
			//Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g);
			this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":"  + this.mIconName + "_OVERLAY");
		}

		@Override
		public ResourceLocation getTextureFile() {
			return TextureMap.locationItemsTexture;
		}
	}

}