Represents a type of block, combined with any identifiable metadata.
More...
|
| BlockData (Material material, byte data) |
| Constructs a block data object with a material and metadata. More...
|
|
| BlockData (ItemStack item) |
| Constructs a block data object from an itemstack.
|
|
| BlockData (Material material) |
| Constructs a block data object with a material and any metadata. More...
|
|
byte | getData () |
| Gets the metadata value.
|
|
String | getDisplayName () |
| Gets a human-readable name for this block data. More...
|
|
Material | getMaterial () |
| Gets the material type.
|
|
String | getName () |
| Gets a human-readable name for this block data, without color. More...
|
|
boolean | matchesBlock (Block block) |
| Checks if the specified block matches this block data, taking metadata into account. More...
|
|
void | setData (byte data) |
| Sets the metadata value.
|
|
void | setMaterial (Material mat) |
| Sets the material type.
|
|
Represents a type of block, combined with any identifiable metadata.
- Author
- authorblues
org.mctourney.autoreferee.util.BlockData.BlockData |
( |
Material |
material, |
|
|
byte |
data |
|
) |
| |
Constructs a block data object with a material and metadata.
- Parameters
-
material | material type |
data | metadata value, or -1 if any metadata |
org.mctourney.autoreferee.util.BlockData.BlockData |
( |
Material |
material) | |
|
Constructs a block data object with a material and any metadata.
- Parameters
-
static BlockData org.mctourney.autoreferee.util.BlockData.fromBlock |
( |
Block |
block) | |
|
|
static |
Generates a block data object from a block.
- Parameters
-
- Returns
- block data object
static BlockData org.mctourney.autoreferee.util.BlockData.fromInventory |
( |
Inventory |
inv) | |
|
|
static |
Generates a block data object from an inventory.
If an inventory contains more than one type of block, the block of the most quantity is returned.
- Parameters
-
- Returns
- block data object
static BlockData org.mctourney.autoreferee.util.BlockData.fromItemStack |
( |
ItemStack |
item) | |
|
|
static |
Generates a block data object from an item stack.
- Parameters
-
- Returns
- block data object
String org.mctourney.autoreferee.util.BlockData.getDisplayName |
( |
) | |
|
Gets a human-readable name for this block data.
- Returns
- colored block data name
String org.mctourney.autoreferee.util.BlockData.getName |
( |
) | |
|
Gets a human-readable name for this block data, without color.
- Returns
- block data name
boolean org.mctourney.autoreferee.util.BlockData.matchesBlock |
( |
Block |
block) | |
|
Checks if the specified block matches this block data, taking metadata into account.
- Returns
- true if block matches, otherwise false
static BlockData org.mctourney.autoreferee.util.BlockData.unserialize |
( |
String |
string) | |
|
|
static |
Unserializes a block data object from a comma-seperated string.
- Parameters
-
string | serialized block data object |
- Returns
- block data object
The documentation for this class was generated from the following file: