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 AdvancementRequirementsprivate final String[][]The field for therequirementsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAdvancementRequirements(String[][] requirements) Creates an instance of aAdvancementRequirementsrecord class.AdvancementRequirements(FriendlyByteBuf p_299417_) -
Method Summary
Modifier and TypeMethodDescriptionstatic AdvancementRequirementsallOf(Collection<String> p_300431_) private static booleanstatic AdvancementRequirementsanyOf(Collection<String> p_297776_) intfinal booleanIndicates whether some other object is "equal to" this one.static AdvancementRequirementsfinal inthashCode()Returns a hash code value for this object.booleanisEmpty()names()private static String[][]read(FriendlyByteBuf p_298812_) String[][]Returns the value of therequirementsrecord component.intsize()booleancom.google.gson.JsonArraytoJson()toString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_299546_)
-
Field Details
-
requirements
The field for therequirementsrecord component. -
EMPTY
-
-
Constructor Details
-
AdvancementRequirements
-
AdvancementRequirements
Creates an instance of aAdvancementRequirementsrecord class.- Parameters:
requirements- the value for therequirementsrecord component
-
-
Method Details
-
read
-
write
-
allOf
-
anyOf
-
size
public int size() -
test
-
count
-
anyMatch
-
fromJson
public static AdvancementRequirements fromJson(com.google.gson.JsonArray p_297416_, Set<String> p_298134_) -
toJson
public com.google.gson.JsonArray toJson() -
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
-