-
Notifications
You must be signed in to change notification settings - Fork 755
/
TConstructFluid.java
53 lines (46 loc) · 1.41 KB
/
TConstructFluid.java
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
package tconstruct.smeltery.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraftforge.fluids.BlockFluidClassic;
import net.minecraftforge.fluids.Fluid;
import tconstruct.library.TConstructRegistry;
public class TConstructFluid extends BlockFluidClassic
{
String texture;
boolean alpha;
public IIcon stillIcon;
public IIcon flowIcon;
public TConstructFluid(Fluid fluid, Material material, String texture)
{
super(fluid, material);
this.texture = texture;
this.setCreativeTab(TConstructRegistry.blockTab);
}
public TConstructFluid(Fluid fluid, Material material, String texture, boolean alpha)
{
this(fluid, material, texture);
this.alpha = alpha;
}
@Override
public int getRenderBlockPass ()
{
return alpha ? 1 : 0;
}
@Override
public void registerBlockIcons (IIconRegister iconRegister)
{
stillIcon = iconRegister.registerIcon("tinker:" + texture);
flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon (int side, int meta)
{
if (side == 0 || side == 1)
return stillIcon;
return flowIcon;
}
}