public static class WrappedDataWatcher.Registry extends Object
WrappedDataWatcher.Serializers in 1.9.
| Constructor and Description |
|---|
Registry() |
| Modifier and Type | Method and Description |
|---|---|
static WrappedDataWatcher.Serializer |
fromHandle(Object handle)
Gets the serializer associated with a given NMS handle.
|
static WrappedDataWatcher.Serializer |
get(Class<?> clazz)
Gets the first serializer associated with a given class.
|
static WrappedDataWatcher.Serializer |
get(Class<?> clazz,
boolean optional)
Gets the first serializer associated with a given class and optional state.
|
static WrappedDataWatcher.Serializer |
getBlockDataSerializer(boolean optional)
Gets the serializer for BlockData
|
static WrappedDataWatcher.Serializer |
getBlockPositionSerializer(boolean optional)
Gets the serializer for BlockPositions
|
static WrappedDataWatcher.Serializer |
getChatComponentSerializer()
Gets the serializer for IChatBaseComponents
|
static WrappedDataWatcher.Serializer |
getDirectionSerializer()
Gets the serializer for Directions
|
static WrappedDataWatcher.Serializer |
getItemStackSerializer(boolean optional)
Gets the serializer for ItemStacks
|
static WrappedDataWatcher.Serializer |
getUUIDSerializer(boolean optional)
Gets the serializer for UUIDs
|
static WrappedDataWatcher.Serializer |
getVectorSerializer()
Gets the serializer for Vector3Fs
|
public static WrappedDataWatcher.Serializer get(Class<?> clazz)
Note: If the serializer is optional,
values must be wrapped in an Optional.
If there are multiple serializers for a given class (i.e. BlockPosition),
you should use get(Class, boolean) for more precision.
clazz - Class to find serializer forpublic static WrappedDataWatcher.Serializer get(Class<?> clazz, boolean optional)
Note: If the serializer is optional, values must be
wrapped in an Optional
clazz - Class to find serializer foroptional - Optional statepublic static WrappedDataWatcher.Serializer fromHandle(Object handle)
handle - The handlepublic static WrappedDataWatcher.Serializer getChatComponentSerializer()
public static WrappedDataWatcher.Serializer getItemStackSerializer(boolean optional)
optional - If true, objects must be wrapped in an Optionalpublic static WrappedDataWatcher.Serializer getBlockDataSerializer(boolean optional)
optional - If true, objects must be wrapped in an Optionalpublic static WrappedDataWatcher.Serializer getVectorSerializer()
public static WrappedDataWatcher.Serializer getBlockPositionSerializer(boolean optional)
optional - If true, objects must be wrapped in an Optionalpublic static WrappedDataWatcher.Serializer getDirectionSerializer()
public static WrappedDataWatcher.Serializer getUUIDSerializer(boolean optional)
optional - If true, objects must be wrapped in an OptionalCopyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.