Package net.minestom.server.utils.nbt
Record Class BinaryTagSerializer.ContextWithRegistries
java.lang.Object
java.lang.Record
net.minestom.server.utils.nbt.BinaryTagSerializer.ContextWithRegistries
- All Implemented Interfaces:
BinaryTagSerializer.Context
- Enclosing interface:
BinaryTagSerializer<T>
public static record BinaryTagSerializer.ContextWithRegistries(@NotNull Registries registries, boolean forClient)
extends Record
implements BinaryTagSerializer.Context
-
Field Summary
Fields inherited from interface net.minestom.server.utils.nbt.BinaryTagSerializer.Context
EMPTY
-
Constructor Summary
ConstructorDescriptionContextWithRegistries
(@NotNull Registries registries) ContextWithRegistries
(@NotNull Registries registries, boolean forClient) Creates an instance of aContextWithRegistries
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of theforClient
record component.final int
hashCode()
Returns a hash code value for this object.@NotNull Registries
Returns the value of theregistries
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ContextWithRegistries
-
ContextWithRegistries
Creates an instance of aContextWithRegistries
record class.- Parameters:
registries
- the value for theregistries
record componentforClient
- the value for theforClient
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 '=='. -
registries
Returns the value of theregistries
record component.- Specified by:
registries
in interfaceBinaryTagSerializer.Context
- Returns:
- the value of the
registries
record component
-
forClient
public boolean forClient()Returns the value of theforClient
record component.- Specified by:
forClient
in interfaceBinaryTagSerializer.Context
- Returns:
- the value of the
forClient
record component
-