Files
TinkersConstruct/src/main/java/tconstruct/blocks/TConstructFluid.java
T

52 lines
1.4 KiB
Java
Raw Normal View History

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;
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;
2014-01-29 22:58:29 -05:00
public TConstructFluid(Fluid fluid, Material material, String texture)
{
2014-01-29 22:58:29 -05:00
super(fluid, material);
this.texture = texture;
2013-12-31 11:26:08 -05:00
//TODO setCreativeTab()
this.func_149647_a(TConstructRegistry.blockTab);
}
2014-01-29 22:58:29 -05:00
public TConstructFluid(Fluid fluid, Material material, String texture, boolean alpha)
{
2014-01-29 22:58:29 -05:00
this(fluid, material, texture);
this.alpha = alpha;
}
@Override
2014-01-19 19:43:10 +11:00
public int func_149701_w ()
{
return alpha ? 1 : 0;
}
2013-12-31 11:26:08 -05:00
//TODO registerIcons
@Override
2013-12-31 11:26:08 -05:00
public void func_149651_a (IIconRegister iconRegister)
{
stillIcon = iconRegister.registerIcon("tinker:" + texture);
flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow");
}
2013-12-31 11:26:08 -05:00
//TODO getIcon()
@Override
2013-12-31 11:26:08 -05:00
public IIcon func_149691_a (int side, int meta)
{
if (side == 0 || side == 1)
return stillIcon;
return flowIcon;
}
}