2013-11-07 23:13:44 -08:00
|
|
|
package tconstruct.blocks;
|
|
|
|
|
|
|
|
|
|
import net.minecraft.block.material.Material;
|
2013-12-31 11:26:08 -05:00
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
|
|
|
import net.minecraft.util.IIcon;
|
2013-11-07 23:13:44 -08:00
|
|
|
import net.minecraftforge.fluids.BlockFluidClassic;
|
|
|
|
|
import net.minecraftforge.fluids.Fluid;
|
|
|
|
|
import tconstruct.library.TConstructRegistry;
|
|
|
|
|
|
|
|
|
|
public class TConstructFluid extends BlockFluidClassic
|
|
|
|
|
{
|
|
|
|
|
String texture;
|
|
|
|
|
boolean alpha;
|
2013-12-31 11:26:08 -05:00
|
|
|
public IIcon stillIcon;
|
|
|
|
|
public IIcon flowIcon;
|
2013-11-07 23:13:44 -08:00
|
|
|
|
|
|
|
|
public TConstructFluid(int id, Fluid fluid, Material material, String texture)
|
|
|
|
|
{
|
|
|
|
|
super(id, fluid, material);
|
|
|
|
|
this.texture = texture;
|
2013-12-31 11:26:08 -05:00
|
|
|
//TODO setCreativeTab()
|
|
|
|
|
this.func_149647_a(TConstructRegistry.blockTab);
|
2013-11-07 23:13:44 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public TConstructFluid(int id, Fluid fluid, Material material, String texture, boolean alpha)
|
|
|
|
|
{
|
|
|
|
|
this(id, fluid, material, texture);
|
|
|
|
|
this.alpha = alpha;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2014-01-19 19:43:10 +11:00
|
|
|
public int func_149701_w ()
|
2013-11-07 23:13:44 -08:00
|
|
|
{
|
|
|
|
|
return alpha ? 1 : 0;
|
|
|
|
|
}
|
2013-12-31 11:26:08 -05:00
|
|
|
//TODO registerIcons
|
2013-11-07 23:13:44 -08:00
|
|
|
@Override
|
2013-12-31 11:26:08 -05:00
|
|
|
public void func_149651_a (IIconRegister iconRegister)
|
2013-11-07 23:13:44 -08:00
|
|
|
{
|
|
|
|
|
stillIcon = iconRegister.registerIcon("tinker:" + texture);
|
|
|
|
|
flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow");
|
|
|
|
|
}
|
|
|
|
|
|
2013-12-31 11:26:08 -05:00
|
|
|
//TODO getIcon()
|
2013-11-07 23:13:44 -08:00
|
|
|
@Override
|
2013-12-31 11:26:08 -05:00
|
|
|
public IIcon func_149691_a (int side, int meta)
|
2013-11-07 23:13:44 -08:00
|
|
|
{
|
|
|
|
|
if (side == 0 || side == 1)
|
|
|
|
|
return stillIcon;
|
|
|
|
|
return flowIcon;
|
|
|
|
|
}
|
|
|
|
|
}
|