Package net.glowstone.block
Class ItemTable
java.lang.Object
net.glowstone.block.ItemTable
The lookup table for block and item types.
-
Method Summary
Modifier and TypeMethodDescriptiongetBlock
(int id) Deprecated.getBlock
(org.bukkit.Material type) Returns theBlockType
for aMaterial
, or null if not a block.getItem
(int id) Deprecated.getItem
(org.bukkit.Material mat) Returns theItemType
for aMaterial
, or null if not a block.static ItemTable
instance()
boolean
Register a new, non-Vanilla ItemType.
-
Method Details
-
instance
-
register
Register a new, non-Vanilla ItemType. It will be assigned an ID automatically.- Parameters:
key
- the namespaced key of the ItemTypetype
- the ItemType to register.- Returns:
- if the registration was successful
-
getItem
Deprecated. -
getItem
Returns theItemType
for aMaterial
, or null if not a block.- Parameters:
mat
- aMaterial
- Returns:
mat
as anItemType
-
getBlock
Deprecated. -
getBlock
Returns theBlockType
for aMaterial
, or null if not a block.- Parameters:
type
- aMaterial
- Returns:
type
as aBlockType
, or null iftype
isn't a block
-