Package net.minecraft.advancement
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
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AdvancementRewards>
private final int
The field for theexperience
record component.private final Optional<LazyContainer>
The field for thefunction
record component.private final List<Identifier>
The field for theloot
record component.static final AdvancementRewards
private final List<Identifier>
The field for therecipes
record component. -
Constructor Summary
ConstructorDescriptionAdvancementRewards
(int experience, List<Identifier> list, List<Identifier> list2, Optional<LazyContainer> optional) -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(ServerPlayerEntity player) final boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of theexperience
record component.function()
Returns the value of thefunction
record component.final int
hashCode()
Returns a hash code value for this object.loot()
Returns the value of theloot
record component.recipes()
Returns the value of therecipes
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
experience
private final int experienceThe field for theexperience
record component. -
loot
The field for theloot
record component. -
recipes
The field for therecipes
record component. -
function
The field for thefunction
record component. -
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
- 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
- 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
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
experience
public int experience()Returns the value of theexperience
record component.- Returns:
- the value of the
experience
record component
-
loot
Returns the value of theloot
record component.- Returns:
- the value of the
loot
record component
-
recipes
Returns the value of therecipes
record component.- Returns:
- the value of the
recipes
record component
-
function
Returns the value of thefunction
record component.- Returns:
- the value of the
function
record component
-