Finished adding the standard blocks and localized them - pillars are next

This commit is contained in:
WayofTime 2016-09-04 18:09:04 -04:00
parent d52240813e
commit 1286efbca7
10 changed files with 285 additions and 33 deletions

View file

@ -0,0 +1,27 @@
package WayofTime.bloodmagic.item.block;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import WayofTime.bloodmagic.block.BlockDemonLight;
public class ItemBlockDemonLight extends ItemBlock
{
public ItemBlockDemonLight(Block block)
{
super(block);
setHasSubtypes(true);
}
@Override
public String getUnlocalizedName(ItemStack stack)
{
return super.getUnlocalizedName(stack) + BlockDemonLight.names[stack.getItemDamage()];
}
@Override
public int getMetadata(int meta)
{
return meta;
}
}

View file

@ -25,6 +25,6 @@ public class ItemBlockDemonPillarBase extends ItemBlock
@Override
public int getMetadata(int meta)
{
return meta;
return meta % BlockDemonPillar.names.length;
}
}