public class MaterialData
extends java.lang.Object
implements java.lang.Cloneable
构造器和说明 |
---|
MaterialData(int type)
已过时。
不安全的参数
|
MaterialData(int type,
byte data)
已过时。
不安全的参数
|
MaterialData(Material type) |
MaterialData(Material type,
byte data)
已过时。
不安全的参数
|
限定符和类型 | 方法和说明 |
---|---|
MaterialData |
clone() |
boolean |
equals(java.lang.Object obj) |
byte |
getData()
已过时。
不安全的参数
|
Material |
getItemType()
获取这个MaterialData代表的Material.
|
int |
getItemTypeId()
已过时。
不安全的参数
|
int |
hashCode() |
void |
setData(byte data)
已过时。
不安全的参数
|
ItemStack |
toItemStack()
已过时。
这个方法创建一个大小为0的物品堆,通常没有用.
考虑使用
toItemStack(int) . |
ItemStack |
toItemStack(int amount)
基于这个MaterialData创建一个新的ItemStack.
|
java.lang.String |
toString() |
@Deprecated public MaterialData(int type)
type
- the raw type idpublic MaterialData(Material type)
@Deprecated public MaterialData(int type, byte data)
type
- the raw type iddata
- the raw data value@Deprecated public MaterialData(Material type, byte data)
type
- the typedata
- the raw data value@Deprecated public byte getData()
原文:Gets the raw data in this material
@Deprecated public void setData(byte data)
原文:Sets the raw data of this material
data
- 新的原始数据public Material getItemType()
原文:Gets the Material that this MaterialData represents
@Deprecated public int getItemTypeId()
原文:Gets the Material Id that this MaterialData represents
@Deprecated public ItemStack toItemStack()
toItemStack(int)
.原文:Creates a new ItemStack based on this MaterialData
public ItemStack toItemStack(int amount)
原文:Creates a new ItemStack based on this MaterialData
amount
- 这个新的ItemStack的堆大小public java.lang.String toString()
toString
在类中 java.lang.Object
public int hashCode()
hashCode
在类中 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
public MaterialData clone()
clone
在类中 java.lang.Object