Package net.minecraft.advancements
Record Class AdvancementRequirements
java.lang.Object
java.lang.Record
net.minecraft.advancements.AdvancementRequirements
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AdvancementRequirements>static final AdvancementRequirementsThe field for therequirementsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionAdvancementRequirements(List<List<String>> requirements) Creates an instance of aAdvancementRequirementsrecord class.AdvancementRequirements(FriendlyByteBuf p_301089_) 
- 
Method SummaryModifier 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- 
requirementsThe field for therequirementsrecord component.
- 
CODEC
- 
EMPTY
 
- 
- 
Constructor Details- 
AdvancementRequirements
- 
AdvancementRequirementsCreates an instance of aAdvancementRequirementsrecord class.- Parameters:
- requirements- the value for the- requirementsrecord component
 
 
- 
- 
Method Details- 
write
- 
allOf
- 
anyOf
- 
sizepublic int size()
- 
test
- 
count
- 
anyMatch
- 
validate
- 
isEmptypublic boolean isEmpty()
- 
toStringReturns 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
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
requirementsReturns the value of therequirementsrecord component.- Returns:
- the value of the requirementsrecord component
 
 
-