Package org.bukkit.material
Class MaterialData
java.lang.Object
org.bukkit.material.MaterialData
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
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
@Deprecated(forRemoval=true,
since="1.13")
public class MaterialData
extends Object
implements Cloneable
Deprecated, for removal: This API element is subject to removal in a future version.
Handles specific metadata for certain items or blocks
-
Constructor Summary
ConstructorDescriptionMaterialData
(Material type) Deprecated, for removal: This API element is subject to removal in a future version.MaterialData
(Material type, byte data) Deprecated.Magic value -
Method Summary
Modifier and TypeMethodDescriptionclone()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.byte
getData()
Deprecated.Magic valueDeprecated, for removal: This API element is subject to removal in a future version.Gets the Material that this MaterialData representsint
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.void
setData
(byte data) Deprecated.Magic valueDeprecated.this method creates an ItemStack of size 0 which is not generally useful.toItemStack
(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ItemStack based on this MaterialDatatoString()
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
MaterialData
Deprecated, for removal: This API element is subject to removal in a future version. -
MaterialData
Deprecated.Magic value- Parameters:
type
- the typedata
- the raw data value
-
-
Method Details
-
getData
Deprecated.Magic valueGets the raw data in this material- Returns:
- Raw data
-
setData
Deprecated.Magic valueSets the raw data of this material- Parameters:
data
- New raw data
-
getItemType
Deprecated, for removal: This API element is subject to removal in a future version.Gets the Material that this MaterialData represents- Returns:
- Material represented by this MaterialData
-
toItemStack
Deprecated.this method creates an ItemStack of size 0 which is not generally useful. ConsidertoItemStack(int)
.Creates a new ItemStack based on this MaterialData- Returns:
- New ItemStack containing a copy of this MaterialData
-
toItemStack
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ItemStack based on this MaterialData- Parameters:
amount
- The stack size of the new stack- Returns:
- New ItemStack containing a copy of this MaterialData
-
toString
Deprecated, for removal: This API element is subject to removal in a future version. -
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version. -
equals
Deprecated, for removal: This API element is subject to removal in a future version. -
clone
Deprecated, for removal: This API element is subject to removal in a future version.
-
BlockData
.