aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/gregtech/api/objects
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-06-29 15:06:52 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-06-29 15:06:52 +1000
commitb2c498a2a3afd75838c2d8cf69f1cb00a55a9dfa (patch)
treeb6ecbcb88a0732dc27366f100c46cfb12a719b73 /src/Java/miscutil/gregtech/api/objects
parentcd1da32653fc6083e9fe92fee770ea2df3fa7eec (diff)
downloadGT5-Unofficial-b2c498a2a3afd75838c2d8cf69f1cb00a55a9dfa.tar.gz
GT5-Unofficial-b2c498a2a3afd75838c2d8cf69f1cb00a55a9dfa.tar.bz2
GT5-Unofficial-b2c498a2a3afd75838c2d8cf69f1cb00a55a9dfa.zip
+Added Two Frames for Forestry
+First attempt at adding an Alveary block for Forestry As always, Used authors code to implement it the cleanest way possible. (Sorry if you don't like it, but feel free to offer PR's with better solutions)
Diffstat (limited to 'src/Java/miscutil/gregtech/api/objects')
-rw-r--r--src/Java/miscutil/gregtech/api/objects/GregtechFluid.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Java/miscutil/gregtech/api/objects/GregtechFluid.java b/src/Java/miscutil/gregtech/api/objects/GregtechFluid.java
new file mode 100644
index 0000000000..6352883995
--- /dev/null
+++ b/src/Java/miscutil/gregtech/api/objects/GregtechFluid.java
@@ -0,0 +1,27 @@
+package miscutil.gregtech.api.objects;
+
+import gregtech.api.GregTech_API;
+import miscutil.core.lib.CORE;
+import net.minecraftforge.fluids.Fluid;
+
+public class GregtechFluid extends Fluid implements Runnable {
+ public final String mTextureName;
+ private final short[] mRGBa;
+
+ public GregtechFluid(String aName, String aTextureName, short[] aRGBa) {
+ super(aName);
+ mRGBa = aRGBa;
+ mTextureName = aTextureName;
+ GregTech_API.sGTBlockIconload.add(this);
+ }
+
+ @Override
+ public int getColor() {
+ return (Math.max(0, Math.min(255, mRGBa[0])) << 16) | (Math.max(0, Math.min(255, mRGBa[1])) << 8) | Math.max(0, Math.min(255, mRGBa[2]));
+ }
+
+ @Override
+ public void run() {
+ setIcons(GregTech_API.sBlockIcons.registerIcon(CORE.MODID + "fluids/fluid." + mTextureName));
+ }
+} \ No newline at end of file