public class BlockData extends Object implements Comparable<BlockData>
Constructor and Description |
---|
BlockData(Block b) |
BlockData(ItemStack stack) |
BlockData(MaterialData data) |
BlockData(Material mat,
Number data)
Creates a
BlockData instance |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BlockData o) |
boolean |
equals(Object obj) |
static BlockData |
fromString(String in)
Converts a
BlockData string back into an object instance |
byte |
getData() |
Material |
getMaterial() |
int |
hashCode() |
boolean |
matches(Block b) |
boolean |
matches(ItemStack stack) |
boolean |
matches(MaterialData data) |
void |
toBlock(Block toChange) |
ItemStack |
toItemStack()
|
MaterialData |
toMaterialData() |
String |
toString() |
public BlockData(Material mat, Number data)
BlockData
instancemat
- The Material
valuedata
- A byte
representing an internal data value, set to
negative to match all data valuespublic BlockData(Block b)
public BlockData(ItemStack stack)
public BlockData(MaterialData data)
public Material getMaterial()
public byte getData()
public MaterialData toMaterialData()
public void toBlock(Block toChange)
public boolean matches(ItemStack stack)
public boolean matches(Block b)
public boolean matches(MaterialData data)
public static BlockData fromString(String in)
BlockData
string back into an object instancein
- The string to parseBlockData
public int compareTo(BlockData o)
compareTo
in interface Comparable<BlockData>
Copyright © 2017. All rights reserved.