Package net.minecraft.tags
Record Class TagFile
java.lang.Object
java.lang.Record
net.minecraft.tags.TagFile
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TagFile>
The field for theentries
record component.The field for theremove
record component.private final boolean
The field for thereplace
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionentries()
Returns the value of theentries
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.remove()
Returns the value of theremove
record component.boolean
replace()
Returns the value of thereplace
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
entries
The field for theentries
record component. -
replace
private final boolean replaceThe field for thereplace
record component. -
remove
The field for theremove
record component. -
CODEC
-
-
Constructor Details
-
TagFile
Deprecated.Forge: UseTagFile(List, boolean, List)
which has support for remove entries. -
TagFile
Creates an instance of aTagFile
record class.- Parameters:
entries
- the value for theentries
record componentreplace
- the value for thereplace
record componentremove
- the value for theremove
record 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 theentries
record component.- Returns:
- the value of the
entries
record component
-
replace
public boolean replace()Returns the value of thereplace
record component.- Returns:
- the value of the
replace
record component
-
remove
Returns the value of theremove
record component.- Returns:
- the value of the
remove
record component
-
TagFile(List, boolean, List)
which has support for remove entries.