Package net.minecraft.advancements
Record Class AdvancementRequirements
java.lang.Object
java.lang.Record
net.minecraft.advancements.AdvancementRequirements
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AdvancementRequirements> static final AdvancementRequirementsThe field for therequirementsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAdvancementRequirements(List<List<String>> requirements) Creates an instance of aAdvancementRequirementsrecord class.AdvancementRequirements(FriendlyByteBuf p_301089_) -
Method Summary
Modifier and TypeMethodDescriptionstatic AdvancementRequirementsallOf(Collection<String> p_301049_) private static booleanstatic AdvancementRequirementsanyOf(Collection<String> p_301268_) intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()names()Returns the value of therequirementsrecord component.intsize()booleantoString()Returns a string representation of this record class.com.mojang.serialization.DataResult<AdvancementRequirements> voidwrite(FriendlyByteBuf p_301190_)
-
Field Details
-
requirements
The field for therequirementsrecord component. -
CODEC
-
EMPTY
-
-
Constructor Details
-
AdvancementRequirements
-
AdvancementRequirements
Creates an instance of aAdvancementRequirementsrecord class.- Parameters:
requirements- the value for therequirementsrecord component
-
-
Method Details
-
write
-
allOf
-
anyOf
-
size
public int size() -
test
-
count
-
anyMatch
-
validate
-
isEmpty
public boolean isEmpty() -
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. -
names
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
requirements
Returns the value of therequirementsrecord component.- Returns:
- the value of the
requirementsrecord component
-