Record Class BinomialLootNumberProvider

java.lang.Object
java.lang.Record
net.minecraft.loot.provider.number.BinomialLootNumberProvider
Record Components:
n -
p -
All Implemented Interfaces:
LootContextAware, LootNumberProvider

public record BinomialLootNumberProvider(LootNumberProvider n, LootNumberProvider p) extends Record implements LootNumberProvider
Mappings:
Namespace Name
named net/minecraft/loot/provider/number/BinomialLootNumberProvider
intermediary net/minecraft/class_40
official fap
named n
intermediary comp_1893
official b
named p
intermediary comp_1894
official c
  • Field Details

    • n

      private final LootNumberProvider n
      The field for the n record component.
    • p

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

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

    • BinomialLootNumberProvider

      public BinomialLootNumberProvider(LootNumberProvider n, LootNumberProvider p)
      Creates an instance of a BinomialLootNumberProvider record class.
      Parameters:
      n - the value for the n record component
      p - the value for the p 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 Lfat;b()Lfas;
    • 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 Lfat;a(Lewo;)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 Lfat;b(Lewo;)F
    • create

      public static BinomialLootNumberProvider create(int n, float p)
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/loot/provider/number/BinomialLootNumberProvider;create(IF)Lnet/minecraft/loot/provider/number/BinomialLootNumberProvider;
      intermediary method_273 Lnet/minecraft/class_40;method_273(IF)Lnet/minecraft/class_40;
      official a Lfap;a(IF)Lfap;
    • getAllowedParameters

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

      public LootNumberProvider n()
      Returns the value of the n record component.
      Returns:
      the value of the n record component
    • p

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