2015-01-08 18:36:23 -05:00
|
|
|
package com.cricketcraft.chisel.block;
|
|
|
|
|
|
2015-01-09 02:09:22 -05:00
|
|
|
import net.minecraft.block.material.Material;
|
2015-01-08 18:36:23 -05:00
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
|
|
|
import net.minecraft.util.IIcon;
|
2015-01-09 02:09:22 -05:00
|
|
|
|
|
|
|
|
import com.cricketcraft.chisel.Chisel;
|
|
|
|
|
|
2015-01-08 18:36:23 -05:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
|
|
public class BlockCarvableGlow extends BlockCarvable {
|
|
|
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
|
private IIcon glowTexture;
|
|
|
|
|
|
|
|
|
|
private String glowTexturePath;
|
|
|
|
|
|
|
|
|
|
public BlockCarvableGlow(String glowTexture) {
|
|
|
|
|
super();
|
2015-01-11 18:34:08 +00:00
|
|
|
this.setLightLevel(0.5F); //Same as redstone torch
|
2015-01-08 18:36:23 -05:00
|
|
|
this.glowTexturePath = glowTexture;
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-09 02:09:22 -05:00
|
|
|
public BlockCarvableGlow(Material mat, String glowTexture) {
|
|
|
|
|
super(mat);
|
|
|
|
|
this.glowTexturePath = glowTexture;
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-08 18:36:23 -05:00
|
|
|
@Override
|
|
|
|
|
public void registerBlockIcons(IIconRegister register) {
|
|
|
|
|
super.registerBlockIcons(register);
|
|
|
|
|
glowTexture = register.registerIcon(Chisel.MOD_ID + ":" + glowTexturePath);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IIcon getGlowTexture() {
|
|
|
|
|
return glowTexture;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int getRenderType() {
|
|
|
|
|
return Chisel.renderGlowId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean renderAsNormalBlock() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|