2014-10-28 21:10:08 -04:00
|
|
|
package info.jbcs.minecraft.chisel.utils;
|
2014-03-16 22:26:43 +01:00
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
|
|
|
import net.minecraft.util.IIcon;
|
|
|
|
|
|
2014-04-21 19:13:15 +01:00
|
|
|
public class BlockTexturedOre extends Block
|
|
|
|
|
{
|
|
|
|
|
int currentPass;
|
|
|
|
|
Block base;
|
|
|
|
|
IIcon icon;
|
|
|
|
|
String iconFile;
|
|
|
|
|
|
|
|
|
|
public BlockTexturedOre(Material mat, Block base)
|
|
|
|
|
{
|
|
|
|
|
super(mat);
|
|
|
|
|
|
|
|
|
|
this.base = base;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BlockTexturedOre(Material mat, String iconFile)
|
|
|
|
|
{
|
|
|
|
|
super(mat);
|
|
|
|
|
|
|
|
|
|
this.iconFile = iconFile;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean renderAsNormalBlock()
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int getRenderType()
|
|
|
|
|
{
|
|
|
|
|
return BlockTexturedOreRenderer.id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int getRenderBlockPass()
|
|
|
|
|
{
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean canRenderInPass(int pass)
|
|
|
|
|
{
|
|
|
|
|
currentPass = pass;
|
|
|
|
|
|
|
|
|
|
return pass == 1 || pass == 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void registerBlockIcons(IIconRegister register)
|
|
|
|
|
{
|
|
|
|
|
if(iconFile != null)
|
|
|
|
|
icon = register.registerIcon(iconFile);
|
|
|
|
|
}
|
2014-03-16 22:26:43 +01:00
|
|
|
|
|
|
|
|
}
|