Started work on most of the framework for the BlockStringWall - commiting so TehNut can fix my mistakes in life

This commit is contained in:
WayofTime 2016-09-05 13:11:07 -04:00
parent afcba54df4
commit 78b035d0fd
5 changed files with 284 additions and 0 deletions

View file

@ -0,0 +1,29 @@
package WayofTime.bloodmagic.item.block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import WayofTime.bloodmagic.block.BlockDemonWallBase;
public class ItemBlockDemonWallBase extends ItemBlock
{
public final BlockDemonWallBase demonBlock;
public ItemBlockDemonWallBase(BlockDemonWallBase block)
{
super(block);
setHasSubtypes(true);
demonBlock = block;
}
@Override
public String getUnlocalizedName(ItemStack stack)
{
return super.getUnlocalizedName(stack) + demonBlock.names[stack.getItemDamage() % demonBlock.names.length];
}
@Override
public int getMetadata(int meta)
{
return meta % demonBlock.names.length;
}
}