Record Class ApplyBonusLootFunction.UniformBonusCount

java.lang.Object
java.lang.Record
net.minecraft.loot.function.ApplyBonusLootFunction.UniformBonusCount
Record Components:
bonusMultiplier -
All Implemented Interfaces:
ApplyBonusLootFunction.Formula
Enclosing class:
ApplyBonusLootFunction

private static record ApplyBonusLootFunction.UniformBonusCount(int bonusMultiplier) extends Record implements ApplyBonusLootFunction.Formula
Mappings:
Namespace Name
named net/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCount
intermediary net/minecraft/class_94$class_100
official ert$e
named bonusMultiplier
intermediary comp_1852
official c
  • Field Details

    • bonusMultiplier

      private final int bonusMultiplier
      The field for the bonusMultiplier record component.
    • CODEC

      public static final com.mojang.serialization.Codec<ApplyBonusLootFunction.UniformBonusCount> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCount;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_45813 Lnet/minecraft/class_94$class_100;field_45813:Lcom/mojang/serialization/Codec;
      official a Lert$e;a:Lcom/mojang/serialization/Codec;
    • TYPE

      public static final ApplyBonusLootFunction.Type TYPE
      Mappings:
      Namespace Name Mixin selector
      named TYPE Lnet/minecraft/loot/function/ApplyBonusLootFunction$UniformBonusCount;TYPE:Lnet/minecraft/loot/function/ApplyBonusLootFunction$Type;
      intermediary field_45814 Lnet/minecraft/class_94$class_100;field_45814:Lnet/minecraft/class_94$class_8752;
      official b Lert$e;b:Lert$c;
  • Constructor Details

    • UniformBonusCount

      UniformBonusCount(int bonusMultiplier)
      Creates an instance of a UniformBonusCount record class.
      Parameters:
      bonusMultiplier - the value for the bonusMultiplier record component
  • Method Details

    • getValue

      public int getValue(Random random, int initialCount, int enchantmentLevel)
      Specified by:
      getValue in interface ApplyBonusLootFunction.Formula
      Mappings:
      Namespace Name Mixin selector
      named getValue Lnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;getValue(Lnet/minecraft/util/math/random/Random;II)I
      intermediary method_467 Lnet/minecraft/class_94$class_96;method_467(Lnet/minecraft/class_5819;II)I
      official a Lert$b;a(Layo;II)I
    • getType

      public ApplyBonusLootFunction.Type getType()
      Specified by:
      getType in interface ApplyBonusLootFunction.Formula
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/loot/function/ApplyBonusLootFunction$Formula;getType()Lnet/minecraft/loot/function/ApplyBonusLootFunction$Type;
      intermediary method_466 Lnet/minecraft/class_94$class_96;method_466()Lnet/minecraft/class_94$class_8752;
      official a Lert$b;a()Lert$c;
    • 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 '=='.
      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.
    • bonusMultiplier

      public int bonusMultiplier()
      Returns the value of the bonusMultiplier record component.
      Returns:
      the value of the bonusMultiplier record component