aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/api/objects
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-02-22 13:55:56 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-02-22 13:55:56 +1000
commit24905c16017decae4ee60ce4128b6d26de66baf5 (patch)
tree503cef5b6b77e04b11feea7563cd5f4ef5ef6942 /src/Java/gtPlusPlus/api/objects
parentc5ddbd07991eea29132efbd7f4131ab9a4a977cf (diff)
downloadGT5-Unofficial-24905c16017decae4ee60ce4128b6d26de66baf5.tar.gz
GT5-Unofficial-24905c16017decae4ee60ce4128b6d26de66baf5.tar.bz2
GT5-Unofficial-24905c16017decae4ee60ce4128b6d26de66baf5.zip
% Minor project cleanup.
Diffstat (limited to 'src/Java/gtPlusPlus/api/objects')
-rw-r--r--src/Java/gtPlusPlus/api/objects/minecraft/FluidGT6.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/FluidGT6.java b/src/Java/gtPlusPlus/api/objects/minecraft/FluidGT6.java
new file mode 100644
index 0000000000..d5922242f4
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/objects/minecraft/FluidGT6.java
@@ -0,0 +1,30 @@
+package gtPlusPlus.api.objects.minecraft;
+
+import gregtech.api.GregTech_API;
+import gtPlusPlus.core.lib.CORE;
+import net.minecraftforge.fluids.Fluid;
+
+public class FluidGT6 extends Fluid implements Runnable
+{
+ private final short[] mRGBa;
+ public final String mTextureName;
+
+ public FluidGT6(final String aName, final String aTextureName, final short[] aRGBa) {
+ super(aName);
+ this.mRGBa = aRGBa;
+ this.mTextureName = aTextureName;
+ if (GregTech_API.sGTBlockIconload != null) {
+ GregTech_API.sGTBlockIconload.add(this);
+ }
+ }
+
+ @Override
+ public int getColor() {
+ return (Math.max(0, Math.min(255, this.mRGBa[0])) << 16) | (Math.max(0, Math.min(255, this.mRGBa[1])) << 8) | Math.max(0, Math.min(255, this.mRGBa[2]));
+ }
+
+ @Override
+ public void run() {
+ this.setIcons(GregTech_API.sBlockIcons.registerIcon(CORE.MODID+ ":" + "fluids/fluid." + this.mTextureName));
+ }
+}