Finished adding the standard blocks and localized them - pillars are next
This commit is contained in:
parent
d52240813e
commit
1286efbca7
10 changed files with 285 additions and 33 deletions
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -25,6 +25,6 @@ public class ItemBlockDemonPillarBase extends ItemBlock
|
|||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
return meta % BlockDemonPillar.names.length;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue