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_299417_) -
Method Summary
Modifier and TypeMethodDescriptionstatic AdvancementRequirements
allOf
(Collection<String> p_300431_) private static boolean
static AdvancementRequirements
anyOf
(Collection<String> p_297776_) 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_298812_) 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_299546_)
-
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_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 therequirements
record component.- Returns:
- the value of the
requirements
record component
-