Add toString to ItemType
This commit is contained in:
parent
7b0f3f6e3c
commit
a85e1688cf
1 changed files with 6 additions and 0 deletions
|
@ -79,6 +79,12 @@ public class ItemType
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return item.getUnlocalizedName() + "@" + meta;
|
||||||
|
}
|
||||||
|
|
||||||
public static ItemType fromStack(ItemStack stack)
|
public static ItemType fromStack(ItemStack stack)
|
||||||
{
|
{
|
||||||
return new ItemType(stack.getItem(), stack.getItemDamage(), stack.stackTagCompound);
|
return new ItemType(stack.getItem(), stack.getItemDamage(), stack.stackTagCompound);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue