equivalent-exchange-3/src/main/java/com/pahimar/ee3/block/BlockEE.java

36 lines
985 B
Java
Raw Normal View History

2013-08-23 16:59:50 +02:00
package com.pahimar.ee3.block;
import com.pahimar.ee3.EquivalentExchange3;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
2013-08-23 16:59:50 +02:00
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
2013-08-23 16:59:50 +02:00
public class BlockEE extends Block
{
public BlockEE(int id)
{
this(id, Material.rock);
}
public BlockEE(int id, Material material)
{
super(id, material);
setStepSound(soundStoneFootstep);
setCreativeTab(EquivalentExchange3.tabsEE3);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
blockIcon = iconRegister.registerIcon(String.format("%s", getUnwrappedUnlocalizedName(this.getUnlocalizedName())));
}
protected String getUnwrappedUnlocalizedName(String unlocalizedName)
{
return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
2013-08-23 16:59:50 +02:00
}
}