类 MaterialData
java.lang.Object
org.bukkit.material.MaterialData
- 所有已实现的接口:
Cloneable
- 直接已知子类:
Banner,Bed,Cake,Cauldron,Coal,CocoaPlant,Command,Comparator,Crops,Diode,DirectionalContainer,Door,Dye,FlowerPot,Gate,Hopper,LongGrass,Mushroom,NetherWarts,Observer,PistonBaseMaterial,PistonExtensionMaterial,PressurePlate,Pumpkin,Rails,RedstoneWire,Sandstone,Sign,SimpleAttachableMaterialData,Skull,SpawnEgg,Stairs,TexturedMaterial,Tripwire,Vine,Wood,Wool
为某些物品或方块处理特定的元数据.
-
构造器概要
构造器构造器说明MaterialData(int type) 已过时。不安全的参数MaterialData(int type, byte data) 已过时。不安全的参数MaterialData(Material type) MaterialData(Material type, byte data) 已过时。不安全的参数 -
方法概要
-
构造器详细资料
-
MaterialData
已过时。不安全的参数- 参数:
type- the raw type id
-
MaterialData
-
MaterialData
已过时。不安全的参数- 参数:
type- the raw type iddata- the raw data value
-
MaterialData
已过时。不安全的参数- 参数:
type- the typedata- the raw data value
-
-
方法详细资料
-
getData
已过时。不安全的参数获取这个物品的原始数据。原文:Gets the raw data in this material
- 返回:
- 原始数据
-
setData
已过时。不安全的参数设置这个物品的原始数据.原文:Sets the raw data of this material
- 参数:
data- 新的原始数据
-
getItemType
获取这个MaterialData代表的Material.原文:Gets the Material that this MaterialData represents
- 返回:
- 这个MaterialData代表的Material
-
getItemTypeId
已过时。不安全的参数获取这个MaterialData代表的Material ID.原文:Gets the Material Id that this MaterialData represents
- 返回:
- 这个MaterialData代表的Material ID
-
toItemStack
已过时。这个方法创建一个大小为0的物品堆,通常没有用. 考虑使用toItemStack(int).基于这个MaterialData创建一个新的ItemStack.原文:Creates a new ItemStack based on this MaterialData
- 返回:
- 新的ItemSatck,包含这个Material的副本
-
toItemStack
基于这个MaterialData创建一个新的ItemStack.原文:Creates a new ItemStack based on this MaterialData
- 参数:
amount- 这个新的ItemStack的堆大小- 返回:
- 新的ItemSatck,包含这个Material的副本
-
toString
-
hashCode
public int hashCode() -
equals
-
clone
-