java.lang.Object
java.lang.Enum<NameType>
net.darkhax.simplelootviewer.common.impl.data.info.NameType
All Implemented Interfaces:
Serializable, Comparable<NameType>, Constable

public enum NameType extends Enum<NameType>
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
    Enum Constant
    Description
    Handles block names.
    Handles full components without any size mitigating strategy.
    Handles entity names.
    Handles names that are sent as only a localization key.
    Handles loot tables with names derived from their resource location.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Object>
    Handles serializing the data across the network.
    final Function<Object,net.minecraft.network.chat.Component>
    Handles converting the data into a name.
  • Method Summary

    Modifier and Type
    Method
    Description
    static NameType
    Returns the enum constant of this class with the specified name.
    static NameType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BLOCK

      public static final NameType 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

      public static final NameType 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

      public static final NameType TABLE
      Handles loot tables with names derived from their resource location.
    • KEY

      public static final NameType KEY
      Handles names that are sent as only a localization key.
    • COMPONENT

      public static final NameType 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> dataCodec
      Handles serializing the data across the network.
    • nameBuilder

      public final Function<Object,net.minecraft.network.chat.Component> nameBuilder
      Handles converting the data into a name.
  • Method Details

    • values

      public static NameType[] 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

      public static NameType valueOf(String name)
      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 name
      NullPointerException - if the argument is null