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<RegistryKey<LootTable>> loot, List<Identifier> recipes, Optional<LazyContainer> function) extends Record
Mappings:
Namespace Name
named net/minecraft/advancement/AdvancementRewards
intermediary net/minecraft/class_170
official ak
named experience
intermediary comp_2025
official c
named loot
intermediary comp_2026
official d
named recipes
intermediary comp_2027
official e
named function
intermediary comp_2028
official f
  • Field Details

    • experience

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

      private final List<RegistryKey<LootTable>> 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
      named CODEC Lnet/minecraft/advancement/AdvancementRewards;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_47185 Lnet/minecraft/class_170;field_47185:Lcom/mojang/serialization/Codec;
      official a Lak;a:Lcom/mojang/serialization/Codec;
    • NONE

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

    • AdvancementRewards

      public AdvancementRewards(int experience, List<RegistryKey<LootTable>> list, List<Identifier> list2, Optional<LazyContainer> optional)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/advancement/AdvancementRewards;<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
      official <init> Lak;<init>(ILjava/util/List;Ljava/util/List;Ljava/util/Optional;)V
  • Method Details

    • apply

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