public abstract class ModernMetaType extends MetaTypeTemplate
ACKNOWLEDGED_BIT_SET, BLOCK_CHANGE_RECORD, BLOCK_CHANGE_RECORD_ARRAY, BLOCK_ENTITY1_18, BLOCK_ENTITY1_20_2, BOOLEAN, BYTE, BYTE_ARRAY_PRIMITIVE, CHUNK_POSITION, COMPONENT, COMPOUND_TAG, DOUBLE, EMPTY, FLAT_ITEM, FLAT_ITEM_ARRAY, FLAT_ITEM_ARRAY_VAR_INT, FLAT_VAR_INT_ITEM, FLAT_VAR_INT_ITEM_ARRAY, FLAT_VAR_INT_ITEM_ARRAY_VAR_INT, FLOAT, GAME_PROFILE, GLOBAL_POSITION, HOLDER_SET, INT, INT_ARRAY_PRIMITIVE, ITEM, ITEM_ARRAY, ITEM1_13, ITEM1_13_2, ITEM1_13_2_ARRAY, ITEM1_13_2_SHORT_ARRAY, ITEM1_13_ARRAY, ITEM1_13_SHORT_ARRAY, ITEM1_20_2, ITEM1_20_2_ARRAY, ITEM1_8, ITEM1_8_SHORT_ARRAY, LONG, LONG_ARRAY_PRIMITIVE, NAMED_COMPOUND_TAG, NAMED_COMPOUND_TAG_ARRAY, NBT, NBT_ARRAY, OPTIONAL_BOOLEAN, OPTIONAL_BYTE_ARRAY_PRIMITIVE, OPTIONAL_COMPONENT, OPTIONAL_COMPOUND_TAG, OPTIONAL_FLOAT, OPTIONAL_GLOBAL_POSITION, OPTIONAL_HOLDER_SET, OPTIONAL_NAMED_COMPOUND_TAG, OPTIONAL_PLAYER_MESSAGE_SIGNATURE, OPTIONAL_POSITION_1_14, OPTIONAL_POSITION1_8, OPTIONAL_PROFILE_KEY, OPTIONAL_SIGNATURE_BYTES, OPTIONAL_STRING, OPTIONAL_TAG, OPTIONAL_UUID, OPTIONAL_VAR_INT, PLAYER_MESSAGE_SIGNATURE, PLAYER_MESSAGE_SIGNATURE_ARRAY, POSITION1_14, POSITION1_8, PROFILE_ACTIONS_ENUM, PROFILE_KEY, QUATERNION, REGISTRY_ENTRY, REGISTRY_ENTRY_ARRAY, REMAINING_BYTES, ROTATION, SHORT, SHORT_BYTE_ARRAY, SIGNATURE_BYTES, SOUND_EVENT, STRING, STRING_ARRAY, TAG, TAG_ARRAY, UNSIGNED_BYTE, UNSIGNED_SHORT, UUID, UUID_ARRAY, VAR_INT, VAR_INT_ARRAY_PRIMITIVE, VAR_LONG, VAR_LONG_BLOCK_CHANGE_RECORD, VAR_LONG_BLOCK_CHANGE_RECORD_ARRAY, VECTOR, VECTOR3F, VILLAGER_DATA
Constructor and Description |
---|
ModernMetaType() |
Modifier and Type | Method and Description |
---|---|
protected abstract MetaType |
getType(int index) |
Metadata |
read(io.netty.buffer.ByteBuf buffer)
Reads a value from a ByteBuf.
|
void |
write(io.netty.buffer.ByteBuf buffer,
Metadata object)
Writes an object to a type to a ByteBuf.
|
getBaseClass
getOutputClass, getTypeName, toString
public Metadata read(io.netty.buffer.ByteBuf buffer) throws java.lang.Exception
ByteBufReader
buffer
- buffer to read fromjava.lang.Exception
- if it failed readingprotected abstract MetaType getType(int index)
public void write(io.netty.buffer.ByteBuf buffer, Metadata object) throws java.lang.Exception
ByteBufWriter
buffer
- buffer to write toobject
- value to writejava.lang.Exception
- if it failed to write