Record Class UniformLootNumberProvider

java.lang.Object
java.lang.Record
net.minecraft.loot.provider.number.UniformLootNumberProvider
Record Components:
min -
max -
All Implemented Interfaces:
LootContextAware, LootNumberProvider

public record UniformLootNumberProvider(LootNumberProvider min, LootNumberProvider max) extends Record implements LootNumberProvider
Mappings:
Namespace Name
named net/minecraft/loot/provider/number/UniformLootNumberProvider
intermediary net/minecraft/class_5662
official eus
named min
intermediary comp_1900
official b
named max
intermediary comp_1901
official c
  • Field Details

    • min

      private final LootNumberProvider min
      The field for the min record component.
    • max

      private final LootNumberProvider max
      The field for the max record component.
    • CODEC

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

    • UniformLootNumberProvider

      public UniformLootNumberProvider(LootNumberProvider min, LootNumberProvider max)
      Creates an instance of a UniformLootNumberProvider record class.
      Parameters:
      min - the value for the min record component
      max - the value for the max record component
  • Method Details

    • 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 Leuo;b()Leun;
    • create

      public static UniformLootNumberProvider create(float min, float max)
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/loot/provider/number/UniformLootNumberProvider;create(FF)Lnet/minecraft/loot/provider/number/UniformLootNumberProvider;
      intermediary method_32462 Lnet/minecraft/class_5662;method_32462(FF)Lnet/minecraft/class_5662;
      official a Leus;a(FF)Leus;
    • nextInt

      public int nextInt(LootContext context)
      Specified by:
      nextInt in interface LootNumberProvider
      Mappings:
      Namespace Name Mixin selector
      named nextInt Lnet/minecraft/loot/provider/number/LootNumberProvider;nextInt(Lnet/minecraft/loot/context/LootContext;)I
      intermediary method_366 Lnet/minecraft/class_5658;method_366(Lnet/minecraft/class_47;)I
      official a Leuo;a(Leqj;)I
    • 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 Leuo;b(Leqj;)F
    • getRequiredParameters

      public Set<LootContextParameter<?>> getRequiredParameters()
      Specified by:
      getRequiredParameters in interface LootContextAware
      Mappings:
      Namespace Name Mixin selector
      named getRequiredParameters Lnet/minecraft/loot/context/LootContextAware;getRequiredParameters()Ljava/util/Set;
      intermediary method_293 Lnet/minecraft/class_46;method_293()Ljava/util/Set;
      official a Leqk;a()Ljava/util/Set;
    • 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.
    • min

      public LootNumberProvider min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • max

      public LootNumberProvider max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component