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 named net/minecraft/advancement/Advancementintermediary net/minecraft/class_161official afnamed parentintermediary comp_1912official cnamed displayintermediary comp_1913official dnamed rewardsintermediary comp_1914official enamed criteriaintermediary comp_1915official fnamed requirementsintermediary comp_1916official gnamed sendsTelemetryEventintermediary comp_1917official hnamed nameintermediary comp_1918official i
-
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.static final PacketCodec<RegistryByteBuf, Advancement> 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.private static Advancementread(RegistryByteBuf 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, RegistryEntryLookup.RegistryLookup lookup) private voidwrite(RegistryByteBuf 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 named CRITERIA_CODECLnet/minecraft/advancement/Advancement;CRITERIA_CODEC:Lcom/mojang/serialization/Codec;intermediary field_47180Lnet/minecraft/class_161;field_47180:Lcom/mojang/serialization/Codec;official jLaf;j:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/advancement/Advancement;CODEC:Lcom/mojang/serialization/Codec;intermediary field_47179Lnet/minecraft/class_161;field_47179:Lcom/mojang/serialization/Codec;official aLaf;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/advancement/Advancement;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_47996Lnet/minecraft/class_161;field_47996:Lnet/minecraft/class_9139;official bLaf;b:Lyx;
-
-
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 named <init>Lnet/minecraft/advancement/Advancement;<init>(Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/advancement/AdvancementRewards;Ljava/util/Map;Lnet/minecraft/advancement/AdvancementRequirements;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)Vofficial <init>Laf;<init>(Ljava/util/Optional;Ljava/util/Optional;Lak;Ljava/util/Map;Laj;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 named validateLnet/minecraft/advancement/Advancement;validate(Lnet/minecraft/advancement/Advancement;)Lcom/mojang/serialization/DataResult;intermediary method_54910Lnet/minecraft/class_161;method_54910(Lnet/minecraft/class_161;)Lcom/mojang/serialization/DataResult;official aLaf;a(Laf;)Lcom/mojang/serialization/DataResult;
-
createNameFromDisplay
- Mappings:
Namespace Name Mixin selector named createNameFromDisplayLnet/minecraft/advancement/Advancement;createNameFromDisplay(Lnet/minecraft/advancement/AdvancementDisplay;)Lnet/minecraft/text/Text;intermediary method_53623Lnet/minecraft/class_161;method_53623(Lnet/minecraft/class_185;)Lnet/minecraft/class_2561;official aLaf;a(Las;)Lwz;
-
getNameFromIdentity
- Mappings:
Namespace Name Mixin selector named getNameFromIdentityLnet/minecraft/advancement/Advancement;getNameFromIdentity(Lnet/minecraft/advancement/AdvancementEntry;)Lnet/minecraft/text/Text;intermediary method_53622Lnet/minecraft/class_161;method_53622(Lnet/minecraft/class_8779;)Lnet/minecraft/class_2561;official aLaf;a(Lag;)Lwz;
-
write
- Mappings:
Namespace Name Mixin selector named writeLnet/minecraft/advancement/Advancement;write(Lnet/minecraft/network/RegistryByteBuf;)Vintermediary method_53627Lnet/minecraft/class_161;method_53627(Lnet/minecraft/class_9129;)Vofficial aLaf;a(Lwk;)V
-
read
- Mappings:
Namespace Name Mixin selector named readLnet/minecraft/advancement/Advancement;read(Lnet/minecraft/network/RegistryByteBuf;)Lnet/minecraft/advancement/Advancement;intermediary method_53632Lnet/minecraft/class_161;method_53632(Lnet/minecraft/class_9129;)Lnet/minecraft/class_161;official bLaf;b(Lwk;)Laf;
-
isRoot
public boolean isRoot()- Mappings:
Namespace Name Mixin selector named isRootLnet/minecraft/advancement/Advancement;isRoot()Zintermediary method_53630Lnet/minecraft/class_161;method_53630()Zofficial aLaf;a()Z
-
validate
- Mappings:
Namespace Name Mixin selector named validateLnet/minecraft/advancement/Advancement;validate(Lnet/minecraft/util/ErrorReporter;Lnet/minecraft/registry/RegistryEntryLookup$RegistryLookup;)Vintermediary method_54912Lnet/minecraft/class_161;method_54912(Lnet/minecraft/class_8942;Lnet/minecraft/class_7871$class_7872;)Vofficial aLaf;a(Layu;Ljn$a;)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
-