aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces/IIconContainer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/interfaces/IIconContainer.java')
-rw-r--r--src/main/java/gregtech/api/interfaces/IIconContainer.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/interfaces/IIconContainer.java b/src/main/java/gregtech/api/interfaces/IIconContainer.java
new file mode 100644
index 0000000000..525721bb5c
--- /dev/null
+++ b/src/main/java/gregtech/api/interfaces/IIconContainer.java
@@ -0,0 +1,48 @@
+package gregtech.api.interfaces;
+
+import static gregtech.api.enums.GT_Values.UNCOLORED_RGBA;
+
+import net.minecraft.util.IIcon;
+import net.minecraft.util.ResourceLocation;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public interface IIconContainer {
+
+ /**
+ * @return A regular Icon.
+ */
+ @SideOnly(Side.CLIENT)
+ IIcon getIcon();
+
+ /**
+ * @return Icon of the Overlay (or null if there is no Icon)
+ */
+ @SideOnly(Side.CLIENT)
+ IIcon getOverlayIcon();
+
+ /**
+ * @return the Amount of Render Passes for this Icon.
+ */
+ @SideOnly(Side.CLIENT)
+ default int getIconPasses() {
+ return 1;
+ }
+
+ /**
+ * @return the Default Texture File for this Icon.
+ */
+ @SideOnly(Side.CLIENT)
+ ResourceLocation getTextureFile();
+
+ @SideOnly(Side.CLIENT)
+ default short[] getIconColor(int aRenderPass) {
+ return UNCOLORED_RGBA;
+ }
+
+ @SideOnly(Side.CLIENT)
+ default boolean isUsingColorModulation(int aRenderPass) {
+ return aRenderPass == 0;
+ }
+}