Record Class FixedLootScoreProvider

java.lang.Object
java.lang.Record
net.minecraft.loot.provider.score.FixedLootScoreProvider
Record Components:
name -
All Implemented Interfaces:
LootScoreProvider

public record FixedLootScoreProvider(String name) extends Record implements LootScoreProvider
Mappings:
Namespace Name
official ekw
intermediary net/minecraft/class_5667
named net/minecraft/loot/provider/score/FixedLootScoreProvider
official b
intermediary comp_1903
named name
  • Field Details

    • name

      private final String name
      The field for the name record component.
    • CODEC

      public static final com.mojang.serialization.Codec<FixedLootScoreProvider> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lekw;a:Lcom/mojang/serialization/Codec;
      intermediary field_45894 Lnet/minecraft/class_5667;field_45894:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/loot/provider/score/FixedLootScoreProvider;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • FixedLootScoreProvider

      public FixedLootScoreProvider(String name)
      Creates an instance of a FixedLootScoreProvider record class.
      Parameters:
      name - the value for the name record component
  • Method Details

    • create

      public static LootScoreProvider create(String name)
      Mappings:
      Namespace Name Mixin selector
      official a Lekw;a(Ljava/lang/String;)Leky;
      intermediary method_35572 Lnet/minecraft/class_5667;method_35572(Ljava/lang/String;)Lnet/minecraft/class_5670;
      named create Lnet/minecraft/loot/provider/score/FixedLootScoreProvider;create(Ljava/lang/String;)Lnet/minecraft/loot/provider/score/LootScoreProvider;
    • getType

      public LootScoreProviderType getType()
      Specified by:
      getType in interface LootScoreProvider
      Mappings:
      Namespace Name Mixin selector
      official a Leky;a()Lekx;
      intermediary method_32475 Lnet/minecraft/class_5670;method_32475()Lnet/minecraft/class_5669;
      named getType Lnet/minecraft/loot/provider/score/LootScoreProvider;getType()Lnet/minecraft/loot/provider/score/LootScoreProviderType;
    • getScoreHolder

      public ScoreHolder getScoreHolder(LootContext context)
      Specified by:
      getScoreHolder in interface LootScoreProvider
      Mappings:
      Namespace Name Mixin selector
      official a Leky;a(Legw;)Lemw;
      intermediary method_55379 Lnet/minecraft/class_5670;method_55379(Lnet/minecraft/class_47;)Lnet/minecraft/class_9015;
      named getScoreHolder Lnet/minecraft/loot/provider/score/LootScoreProvider;getScoreHolder(Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/scoreboard/ScoreHolder;
    • getRequiredParameters

      public Set<LootContextParameter<?>> getRequiredParameters()
      Specified by:
      getRequiredParameters in interface LootScoreProvider
      Mappings:
      Namespace Name Mixin selector
      official b Leky;b()Ljava/util/Set;
      intermediary method_32477 Lnet/minecraft/class_5670;method_32477()Ljava/util/Set;
      named getRequiredParameters Lnet/minecraft/loot/provider/score/LootScoreProvider;getRequiredParameters()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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component