Enum Class Rarity

java.lang.Object
java.lang.Enum<Rarity>
net.minecraft.util.Rarity
All Implemented Interfaces:
Serializable, Comparable<Rarity>, Constable, StringIdentifiable

public enum Rarity extends Enum<Rarity> implements StringIdentifiable
Mappings:
Namespace Name
named net/minecraft/util/Rarity
intermediary net/minecraft/class_1814
official cyl
  • Enum Constant Details

    • COMMON

      public static final Rarity COMMON
      Mappings:
      Namespace Name Mixin selector
      named COMMON Lnet/minecraft/util/Rarity;COMMON:Lnet/minecraft/util/Rarity;
      intermediary field_8906 Lnet/minecraft/class_1814;field_8906:Lnet/minecraft/class_1814;
      official a Lcyl;a:Lcyl;
    • UNCOMMON

      public static final Rarity UNCOMMON
      Mappings:
      Namespace Name Mixin selector
      named UNCOMMON Lnet/minecraft/util/Rarity;UNCOMMON:Lnet/minecraft/util/Rarity;
      intermediary field_8907 Lnet/minecraft/class_1814;field_8907:Lnet/minecraft/class_1814;
      official b Lcyl;b:Lcyl;
    • RARE

      public static final Rarity RARE
      Mappings:
      Namespace Name Mixin selector
      named RARE Lnet/minecraft/util/Rarity;RARE:Lnet/minecraft/util/Rarity;
      intermediary field_8903 Lnet/minecraft/class_1814;field_8903:Lnet/minecraft/class_1814;
      official c Lcyl;c:Lcyl;
    • EPIC

      public static final Rarity EPIC
      Mappings:
      Namespace Name Mixin selector
      named EPIC Lnet/minecraft/util/Rarity;EPIC:Lnet/minecraft/util/Rarity;
      intermediary field_8904 Lnet/minecraft/class_1814;field_8904:Lnet/minecraft/class_1814;
      official d Lcyl;d:Lcyl;
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<Rarity> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/util/Rarity;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_50001 Lnet/minecraft/class_1814;field_50001:Lcom/mojang/serialization/Codec;
      official e Lcyl;e:Lcom/mojang/serialization/Codec;
    • ID_TO_VALUE

      public static final IntFunction<Rarity> ID_TO_VALUE
      Mappings:
      Namespace Name Mixin selector
      named ID_TO_VALUE Lnet/minecraft/util/Rarity;ID_TO_VALUE:Ljava/util/function/IntFunction;
      intermediary field_50002 Lnet/minecraft/class_1814;field_50002:Ljava/util/function/IntFunction;
      official f Lcyl;f:Ljava/util/function/IntFunction;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,Rarity> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/util/Rarity;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_50003 Lnet/minecraft/class_1814;field_50003:Lnet/minecraft/class_9139;
      official g Lcyl;g:Lzt;
    • index

      private final int index
      Mappings:
      Namespace Name Mixin selector
      named index Lnet/minecraft/util/Rarity;index:I
      intermediary field_50004 Lnet/minecraft/class_1814;field_50004:I
      official h Lcyl;h:I
    • name

      private final String name
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/util/Rarity;name:Ljava/lang/String;
      intermediary field_50005 Lnet/minecraft/class_1814;field_50005:Ljava/lang/String;
      official i Lcyl;i:Ljava/lang/String;
    • formatting

      private final Formatting formatting
      Mappings:
      Namespace Name Mixin selector
      named formatting Lnet/minecraft/util/Rarity;formatting:Lnet/minecraft/util/Formatting;
      intermediary field_8908 Lnet/minecraft/class_1814;field_8908:Lnet/minecraft/class_124;
      official j Lcyl;j:Ln;
  • Constructor Details

    • Rarity

      private Rarity(int index, String name, Formatting formatting)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/Rarity;<init>(Ljava/lang/String;IILjava/lang/String;Lnet/minecraft/util/Formatting;)V
      intermediary <init> Lnet/minecraft/class_1814;<init>(Ljava/lang/String;IILjava/lang/String;Lnet/minecraft/class_124;)V
      official <init> Lcyl;<init>(Ljava/lang/String;IILjava/lang/String;Ln;)V
  • Method Details

    • values

      public static Rarity[] 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 Rarity 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
    • getFormatting

      public Formatting getFormatting()
      Mappings:
      Namespace Name Mixin selector
      named getFormatting Lnet/minecraft/util/Rarity;getFormatting()Lnet/minecraft/util/Formatting;
      intermediary method_58413 Lnet/minecraft/class_1814;method_58413()Lnet/minecraft/class_124;
      official a Lcyl;a()Ln;
    • asString

      public String asString()
      Returns the unique string representation of the enum, used for serialization.
      Specified by:
      asString in interface StringIdentifiable
      Returns:
      the unique string representation of the enum, used for serialization
      Mappings:
      Namespace Name Mixin selector
      named asString Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
      intermediary method_15434 Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
      official c Lbba;c()Ljava/lang/String;