Record Class AdvancementRewards

java.lang.Object
java.lang.Record
net.minecraft.advancement.AdvancementRewards
Record Components:
experience -
loot -
recipes -
function -

public record AdvancementRewards(int experience, List<Identifier> loot, List<Identifier> recipes, Optional<LazyContainer> function) extends Record
Mappings:
Namespace Name
official aj
intermediary net/minecraft/class_170
named net/minecraft/advancement/AdvancementRewards
official c
intermediary comp_2025
named experience
official d
intermediary comp_2026
named loot
official e
intermediary comp_2027
named recipes
official f
intermediary comp_2028
named function
  • Field Details

    • experience

      private final int experience
      The field for the experience record component.
    • loot

      private final List<Identifier> loot
      The field for the loot record component.
    • recipes

      private final List<Identifier> recipes
      The field for the recipes record component.
    • function

      private final Optional<LazyContainer> function
      The field for the function record component.
    • CODEC

      public static final com.mojang.serialization.Codec<AdvancementRewards> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Laj;a:Lcom/mojang/serialization/Codec;
      intermediary field_47185 Lnet/minecraft/class_170;field_47185:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/advancement/AdvancementRewards;CODEC:Lcom/mojang/serialization/Codec;
    • NONE

      public static final AdvancementRewards NONE
      Mappings:
      Namespace Name Mixin selector
      official b Laj;b:Laj;
      intermediary field_1167 Lnet/minecraft/class_170;field_1167:Lnet/minecraft/class_170;
      named NONE Lnet/minecraft/advancement/AdvancementRewards;NONE:Lnet/minecraft/advancement/AdvancementRewards;
  • Constructor Details

    • AdvancementRewards

      public AdvancementRewards(int experience, List<Identifier> list, List<Identifier> list2, Optional<LazyContainer> optional)
      Mappings:
      Namespace Name Mixin selector
      official <init> Laj;<init>(ILjava/util/List;Ljava/util/List;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_170;<init>(ILjava/util/List;Ljava/util/List;Ljava/util/Optional;)V
      named <init> Lnet/minecraft/advancement/AdvancementRewards;<init>(ILjava/util/List;Ljava/util/List;Ljava/util/Optional;)V
  • Method Details

    • apply

      public void apply(ServerPlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official a Laj;a(Lane;)V
      intermediary method_748 Lnet/minecraft/class_170;method_748(Lnet/minecraft/class_3222;)V
      named apply Lnet/minecraft/advancement/AdvancementRewards;apply(Lnet/minecraft/server/network/ServerPlayerEntity;)V
    • 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.
    • experience

      public int experience()
      Returns the value of the experience record component.
      Returns:
      the value of the experience record component
    • loot

      public List<Identifier> loot()
      Returns the value of the loot record component.
      Returns:
      the value of the loot record component
    • recipes

      public List<Identifier> recipes()
      Returns the value of the recipes record component.
      Returns:
      the value of the recipes record component
    • function

      public Optional<LazyContainer> function()
      Returns the value of the function record component.
      Returns:
      the value of the function record component