Package net.minecraft.tags
Record Class TagFile
java.lang.Object
java.lang.Record
net.minecraft.tags.TagFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TagFile> The field for theentriesrecord component.The field for theremoverecord component.private final booleanThe field for thereplacerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.remove()Returns the value of theremoverecord component.booleanreplace()Returns the value of thereplacerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
entries
The field for theentriesrecord component. -
replace
private final boolean replaceThe field for thereplacerecord component. -
remove
The field for theremoverecord component. -
CODEC
-
-
Constructor Details
-
TagFile
Deprecated.Forge: UseTagFile(List, boolean, List)which has support for remove entries. -
TagFile
Creates an instance of aTagFilerecord class.- Parameters:
entries- the value for theentriesrecord componentreplace- the value for thereplacerecord componentremove- the value for theremoverecord component
-
-
Method Details
-
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-
replace
public boolean replace()Returns the value of thereplacerecord component.- Returns:
- the value of the
replacerecord component
-
remove
Returns the value of theremoverecord component.- Returns:
- the value of the
removerecord component
-
TagFile(List, boolean, List)which has support for remove entries.