Record Class ScoreLootNumberProvider

java.lang.Object
java.lang.Record
net.minecraft.loot.provider.number.ScoreLootNumberProvider
Record Components:
target -
score -
scale -
All Implemented Interfaces:
LootContextAware, LootNumberProvider

public record ScoreLootNumberProvider(LootScoreProvider target, String score, float scale) extends Record implements LootNumberProvider
Mappings:
Namespace Name
official eks
intermediary net/minecraft/class_5660
named net/minecraft/loot/provider/number/ScoreLootNumberProvider
official b
intermediary comp_1897
named target
official c
intermediary comp_1898
named score
official d
intermediary comp_1899
named scale
  • Field Details

    • target

      private final LootScoreProvider target
      The field for the target record component.
    • score

      private final String score
      The field for the score record component.
    • scale

      private final float scale
      The field for the scale record component.
    • CODEC

      public static final com.mojang.serialization.Codec<ScoreLootNumberProvider> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Leks;a:Lcom/mojang/serialization/Codec;
      intermediary field_45890 Lnet/minecraft/class_5660;field_45890:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/loot/provider/number/ScoreLootNumberProvider;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • ScoreLootNumberProvider

      public ScoreLootNumberProvider(LootScoreProvider target, String score, float scale)
      Creates an instance of a ScoreLootNumberProvider record class.
      Parameters:
      target - the value for the target record component
      score - the value for the score record component
      scale - the value for the scale record component
  • Method Details

    • getType

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

      public Set<LootContextParameter<?>> getRequiredParameters()
      Specified by:
      getRequiredParameters in interface LootContextAware
      Mappings:
      Namespace Name Mixin selector
      official a Legx;a()Ljava/util/Set;
      intermediary method_293 Lnet/minecraft/class_46;method_293()Ljava/util/Set;
      named getRequiredParameters Lnet/minecraft/loot/context/LootContextAware;getRequiredParameters()Ljava/util/Set;
    • create

      public static ScoreLootNumberProvider create(LootContext.EntityTarget target, String score)
      Mappings:
      Namespace Name Mixin selector
      official a Leks;a(Legw$b;Ljava/lang/String;)Leks;
      intermediary method_35569 Lnet/minecraft/class_5660;method_35569(Lnet/minecraft/class_47$class_50;Ljava/lang/String;)Lnet/minecraft/class_5660;
      named create Lnet/minecraft/loot/provider/number/ScoreLootNumberProvider;create(Lnet/minecraft/loot/context/LootContext$EntityTarget;Ljava/lang/String;)Lnet/minecraft/loot/provider/number/ScoreLootNumberProvider;
    • create

      public static ScoreLootNumberProvider create(LootContext.EntityTarget target, String score, float scale)
      Mappings:
      Namespace Name Mixin selector
      official a Leks;a(Legw$b;Ljava/lang/String;F)Leks;
      intermediary method_35570 Lnet/minecraft/class_5660;method_35570(Lnet/minecraft/class_47$class_50;Ljava/lang/String;F)Lnet/minecraft/class_5660;
      named create Lnet/minecraft/loot/provider/number/ScoreLootNumberProvider;create(Lnet/minecraft/loot/context/LootContext$EntityTarget;Ljava/lang/String;F)Lnet/minecraft/loot/provider/number/ScoreLootNumberProvider;
    • nextFloat

      public float nextFloat(LootContext context)
      Specified by:
      nextFloat in interface LootNumberProvider
      Mappings:
      Namespace Name Mixin selector
      official b Lekq;b(Legw;)F
      intermediary method_32454 Lnet/minecraft/class_5658;method_32454(Lnet/minecraft/class_47;)F
      named nextFloat Lnet/minecraft/loot/provider/number/LootNumberProvider;nextFloat(Lnet/minecraft/loot/context/LootContext;)F
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • target

      public LootScoreProvider target()
      Returns the value of the target record component.
      Returns:
      the value of the target record component
    • score

      public String score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component
    • scale

      public float scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component