Enum Class NameType
- All Implemented Interfaces:
Serializable,Comparable<NameType>,Constable
Different types of names that we can serialize.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, Object> Handles serializing the data across the network.Handles converting the data into a name. -
Method Summary
-
Enum Constant Details
-
BLOCK
Handles block names. Only the ID of each block is serialized, the client will look up these IDs and join each unique name together. -
ENTITY
Handles entity names. Only the ID of each entity is serialized, the client will look up these IDs and join eac unique name together. -
TABLE
Handles loot tables with names derived from their resource location. -
KEY
Handles names that are sent as only a localization key. -
COMPONENT
Handles full components without any size mitigating strategy. This is unused but may be used by addons or used in the future.
-
-
Field Details
-
dataCodec
public final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Object> dataCodecHandles serializing the data across the network. -
nameBuilder
Handles converting the data into a name.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-