blob: 9ffeac5b8f2da7e35a6a7cb68a52996d7eb631f9 (
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
|
package gregtech.api.objects;
import static gregtech.api.enums.Mods.GregTech;
import net.minecraftforge.fluids.Fluid;
import gregtech.api.GregTechAPI;
import gregtech.api.fluid.GTFluidFactory;
/**
* @deprecated use {@link GTFluidFactory#builder}
*/
@Deprecated
public class GTFluid extends Fluid implements Runnable {
public final String mTextureName;
private final short[] mRGBa;
public GTFluid(String aName, String aTextureName, short[] aRGBa) {
super(aName);
mRGBa = aRGBa;
mTextureName = aTextureName;
GregTechAPI.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(GregTechAPI.sBlockIcons.registerIcon(GregTech.getResourcePath("fluids", "fluid." + mTextureName)));
}
}
|