java.lang.CloneableBanner, 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, Woolpublic class MaterialData
extends java.lang.Object
implements java.lang.Cloneable
| Constructor | Description |
|---|---|
MaterialData(int type) |
Deprecated.
Magic value
|
MaterialData(int type,
byte data) |
Deprecated.
Magic value
|
MaterialData(Material type) |
|
MaterialData(Material type,
byte data) |
Deprecated.
Magic value
|
| Modifier and Type | Method | Description |
|---|---|---|
MaterialData |
clone() |
|
boolean |
equals(java.lang.Object obj) |
|
byte |
getData() |
Deprecated.
Magic value
|
Material |
getItemType() |
Gets the Material that this MaterialData represents
|
int |
getItemTypeId() |
Deprecated.
Magic value
|
int |
hashCode() |
|
void |
setData(byte data) |
Deprecated.
Magic value
|
ItemStack |
toItemStack() |
Deprecated.
this method creates an ItemStack of size 0 which is not
generally useful.
|
ItemStack |
toItemStack(int amount) |
Creates a new ItemStack based on this MaterialData
|
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()
@Deprecated public void setData(byte data)
data - New raw datapublic Material getItemType()
@Deprecated public int getItemTypeId()
@Deprecated public ItemStack toItemStack()
toItemStack(int).public ItemStack toItemStack(int amount)
amount - The stack size of the new stackpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic MaterialData clone()
clone in class java.lang.ObjectCopyright © 2018. All rights reserved.