Package net.minecraft.advancements
Record Class AdvancementRequirements
java.lang.Object
java.lang.Record
net.minecraft.advancements.AdvancementRequirements
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AdvancementRequirements
private final String[][]
The field for therequirements
record component. -
Constructor Summary
ConstructorDescriptionAdvancementRequirements
(String[][] requirements) Creates an instance of aAdvancementRequirements
record class.AdvancementRequirements
(FriendlyByteBuf p_301089_) -
Method Summary
Modifier and TypeMethodDescriptionstatic AdvancementRequirements
allOf
(Collection<String> p_301049_) private static boolean
static AdvancementRequirements
anyOf
(Collection<String> p_301268_) int
final boolean
Indicates whether some other object is "equal to" this one.static AdvancementRequirements
final int
hashCode()
Returns a hash code value for this object.boolean
isEmpty()
names()
private static String[][]
read
(FriendlyByteBuf p_300972_) String[][]
Returns the value of therequirements
record component.int
size()
boolean
com.google.gson.JsonArray
toJson()
toString()
Returns a string representation of this record class.void
write
(FriendlyByteBuf p_301190_)
-
Field Details
-
requirements
The field for therequirements
record component. -
EMPTY
-
-
Constructor Details
-
AdvancementRequirements
-
AdvancementRequirements
Creates an instance of aAdvancementRequirements
record class.- Parameters:
requirements
- the value for therequirements
record component
-
-
Method Details
-
read
-
write
-
allOf
-
anyOf
-
size
public int size() -
test
-
count
-
anyMatch
-
fromJson
public static AdvancementRequirements fromJson(com.google.gson.JsonArray p_300976_, Set<String> p_301283_) -
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 therequirements
record component.- Returns:
- the value of the
requirements
record component
-