Package net.minecraft.advancement
Record Class Advancement
java.lang.Object
java.lang.Record
net.minecraft.advancement.Advancement
- Record Components:
parent-display-rewards-criteria-requirements-sendsTelemetryEvent-name-
public record Advancement(Optional<Identifier> parent, Optional<AdvancementDisplay> display, AdvancementRewards rewards, Map<String,AdvancementCriterion<?>> criteria, AdvancementRequirements requirements, boolean sendsTelemetryEvent, Optional<Text> name)
extends Record
- Mappings:
Namespace Name official aeintermediary net/minecraft/class_161named net/minecraft/advancement/Advancementofficial bintermediary comp_1912named parentofficial cintermediary comp_1913named displayofficial dintermediary comp_1914named rewardsofficial eintermediary comp_1915named criteriaofficial fintermediary comp_1916named requirementsofficial gintermediary comp_1917named sendsTelemetryEventofficial hintermediary comp_1918named name
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Advancement>private final Map<String,AdvancementCriterion<?>> The field for thecriteriarecord component.private static final com.mojang.serialization.Codec<Map<String,AdvancementCriterion<?>>> private final Optional<AdvancementDisplay>The field for thedisplayrecord component.The field for thenamerecord component.private final Optional<Identifier>The field for theparentrecord component.private final AdvancementRequirementsThe field for therequirementsrecord component.private final AdvancementRewardsThe field for therewardsrecord component.private final booleanThe field for thesendsTelemetryEventrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAdvancement(Optional<Identifier> parent, Optional<AdvancementDisplay> display, AdvancementRewards rewards, Map<String, AdvancementCriterion<?>> criteria, AdvancementRequirements requirements, boolean sendsTelemetryEvent) Advancement(Optional<Identifier> optional, Optional<AdvancementDisplay> optional2, AdvancementRewards advancementRewards, Map<String, AdvancementCriterion<?>> map, AdvancementRequirements advancementRequirements, boolean bool, Optional<Text> optional3) -
Method Summary
Modifier and TypeMethodDescriptionprivate static TextcreateNameFromDisplay(AdvancementDisplay display) criteria()Returns the value of thecriteriarecord component.display()Returns the value of thedisplayrecord component.final booleanIndicates whether some other object is "equal to" this one.static TextgetNameFromIdentity(AdvancementEntry identifiedAdvancement) final inthashCode()Returns a hash code value for this object.booleanisRoot()name()Returns the value of thenamerecord component.parent()Returns the value of theparentrecord component.static Advancementread(PacketByteBuf buf) Returns the value of therequirementsrecord component.rewards()Returns the value of therewardsrecord component.booleanReturns the value of thesendsTelemetryEventrecord component.final StringtoString()Returns a string representation of this record class.private static com.mojang.serialization.DataResult<Advancement>validate(Advancement advancement) voidvalidate(ErrorReporter errorReporter, LootDataLookup conditionsLookup) voidwrite(PacketByteBuf buf)
-
Field Details
-
parent
The field for theparentrecord component. -
display
The field for thedisplayrecord component. -
rewards
The field for therewardsrecord component. -
criteria
The field for thecriteriarecord component. -
requirements
The field for therequirementsrecord component. -
sendsTelemetryEvent
private final boolean sendsTelemetryEventThe field for thesendsTelemetryEventrecord component. -
name
The field for thenamerecord component. -
CRITERIA_CODEC
private static final com.mojang.serialization.Codec<Map<String,AdvancementCriterion<?>>> CRITERIA_CODEC- Mappings:
Namespace Name Mixin selector official iLae;i:Lcom/mojang/serialization/Codec;intermediary field_47180Lnet/minecraft/class_161;field_47180:Lcom/mojang/serialization/Codec;named CRITERIA_CODECLnet/minecraft/advancement/Advancement;CRITERIA_CODEC:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector official aLae;a:Lcom/mojang/serialization/Codec;intermediary field_47179Lnet/minecraft/class_161;field_47179:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/advancement/Advancement;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
Advancement
public Advancement(Optional<Identifier> parent, Optional<AdvancementDisplay> display, AdvancementRewards rewards, Map<String, AdvancementCriterion<?>> criteria, AdvancementRequirements requirements, boolean sendsTelemetryEvent) - Mappings:
Namespace Name Mixin selector official <init>Lae;<init>(Ljava/util/Optional;Ljava/util/Optional;Laj;Ljava/util/Map;Lai;Z)Vintermediary <init>Lnet/minecraft/class_161;<init>(Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/class_170;Ljava/util/Map;Lnet/minecraft/class_8782;Z)Vnamed <init>Lnet/minecraft/advancement/Advancement;<init>(Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/advancement/AdvancementRewards;Ljava/util/Map;Lnet/minecraft/advancement/AdvancementRequirements;Z)V
-
Advancement
public Advancement(Optional<Identifier> optional, Optional<AdvancementDisplay> optional2, AdvancementRewards advancementRewards, Map<String, AdvancementCriterion<?>> map, AdvancementRequirements advancementRequirements, boolean bool, Optional<Text> optional3)
-
-
Method Details
-
validate
- Mappings:
Namespace Name Mixin selector official aLae;a(Lae;)Lcom/mojang/serialization/DataResult;intermediary method_54910Lnet/minecraft/class_161;method_54910(Lnet/minecraft/class_161;)Lcom/mojang/serialization/DataResult;named validateLnet/minecraft/advancement/Advancement;validate(Lnet/minecraft/advancement/Advancement;)Lcom/mojang/serialization/DataResult;
-
createNameFromDisplay
- Mappings:
Namespace Name Mixin selector official aLae;a(Lar;)Lvf;intermediary method_53623Lnet/minecraft/class_161;method_53623(Lnet/minecraft/class_185;)Lnet/minecraft/class_2561;named createNameFromDisplayLnet/minecraft/advancement/Advancement;createNameFromDisplay(Lnet/minecraft/advancement/AdvancementDisplay;)Lnet/minecraft/text/Text;
-
getNameFromIdentity
- Mappings:
Namespace Name Mixin selector official aLae;a(Laf;)Lvf;intermediary method_53622Lnet/minecraft/class_161;method_53622(Lnet/minecraft/class_8779;)Lnet/minecraft/class_2561;named getNameFromIdentityLnet/minecraft/advancement/Advancement;getNameFromIdentity(Lnet/minecraft/advancement/AdvancementEntry;)Lnet/minecraft/text/Text;
-
write
- Mappings:
Namespace Name Mixin selector official aLae;a(Lui;)Vintermediary method_53627Lnet/minecraft/class_161;method_53627(Lnet/minecraft/class_2540;)Vnamed writeLnet/minecraft/advancement/Advancement;write(Lnet/minecraft/network/PacketByteBuf;)V
-
read
- Mappings:
Namespace Name Mixin selector official bLae;b(Lui;)Lae;intermediary method_53632Lnet/minecraft/class_161;method_53632(Lnet/minecraft/class_2540;)Lnet/minecraft/class_161;named readLnet/minecraft/advancement/Advancement;read(Lnet/minecraft/network/PacketByteBuf;)Lnet/minecraft/advancement/Advancement;
-
isRoot
public boolean isRoot()- Mappings:
Namespace Name Mixin selector official aLae;a()Zintermediary method_53630Lnet/minecraft/class_161;method_53630()Znamed isRootLnet/minecraft/advancement/Advancement;isRoot()Z
-
validate
- Mappings:
Namespace Name Mixin selector official aLae;a(Laut;Leha;)Vintermediary method_54912Lnet/minecraft/class_161;method_54912(Lnet/minecraft/class_8942;Lnet/minecraft/class_8489;)Vnamed validateLnet/minecraft/advancement/Advancement;validate(Lnet/minecraft/util/ErrorReporter;Lnet/minecraft/loot/LootDataLookup;)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 '=='. -
parent
Returns the value of theparentrecord component.- Returns:
- the value of the
parentrecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
rewards
Returns the value of therewardsrecord component.- Returns:
- the value of the
rewardsrecord component
-
criteria
Returns the value of thecriteriarecord component.- Returns:
- the value of the
criteriarecord component
-
requirements
Returns the value of therequirementsrecord component.- Returns:
- the value of the
requirementsrecord component
-
sendsTelemetryEvent
public boolean sendsTelemetryEvent()Returns the value of thesendsTelemetryEventrecord component.- Returns:
- the value of the
sendsTelemetryEventrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-