Record Class EnchantmentLevelLootNumberProvider

java.lang.Object
java.lang.Record
net.minecraft.loot.provider.number.EnchantmentLevelLootNumberProvider
Record Components:
amount -
All Implemented Interfaces:
LootContextAware, LootNumberProvider

public record EnchantmentLevelLootNumberProvider(EnchantmentLevelBasedValueType amount) extends Record implements LootNumberProvider
Mappings:
Namespace Name
named net/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider
intermediary net/minecraft/class_9753
official evb
named amount
intermediary comp_2784
official b
  • Field Details

    • amount

      private final EnchantmentLevelBasedValueType amount
      The field for the amount record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<EnchantmentLevelLootNumberProvider> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_51813 Lnet/minecraft/class_9753;field_51813:Lcom/mojang/serialization/MapCodec;
      official a Levb;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

  • Method Details

    • nextFloat

      public float nextFloat(LootContext context)
      Specified by:
      nextFloat in interface LootNumberProvider
      Mappings:
      Namespace Name Mixin selector
      named nextFloat Lnet/minecraft/loot/provider/number/LootNumberProvider;nextFloat(Lnet/minecraft/loot/context/LootContext;)F
      intermediary method_32454 Lnet/minecraft/class_5658;method_32454(Lnet/minecraft/class_47;)F
      official b Levd;b(Leqw;)F
    • getType

      public LootNumberProviderType getType()
      Specified by:
      getType in interface LootNumberProvider
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/loot/provider/number/LootNumberProvider;getType()Lnet/minecraft/loot/provider/number/LootNumberProviderType;
      intermediary method_365 Lnet/minecraft/class_5658;method_365()Lnet/minecraft/class_5657;
      official b Levd;b()Levc;
    • create

      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;create(Lnet/minecraft/enchantment/EnchantmentLevelBasedValueType;)Lnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;
      intermediary method_60313 Lnet/minecraft/class_9753;method_60313(Lnet/minecraft/class_9704;)Lnet/minecraft/class_9753;
      official a Levb;a(Lczt;)Levb;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • amount

      Returns the value of the amount record component.
      Returns:
      the value of the amount record component