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
ConstructorsConstructorDescriptionContextWithRegistries(@NotNull Registries registries) ContextWithRegistries(@NotNull Registries registries, boolean forClient) Creates an instance of aContextWithRegistriesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforClientrecord component.final inthashCode()Returns a hash code value for this object.@NotNull RegistriesReturns the value of theregistriesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContextWithRegistries
-
ContextWithRegistries
Creates an instance of aContextWithRegistriesrecord class.- Parameters:
registries- the value for theregistriesrecord componentforClient- the value for theforClientrecord 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 theregistriesrecord component.- Specified by:
registriesin interfaceBinaryTagSerializer.Context- Returns:
- the value of the
registriesrecord component
-
forClient
public boolean forClient()Returns the value of theforClientrecord component.- Specified by:
forClientin interfaceBinaryTagSerializer.Context- Returns:
- the value of the
forClientrecord component
-