Package net.minestom.server.registry
Record Class RegistryTranscoder<D>
java.lang.Object
java.lang.Record
net.minestom.server.registry.RegistryTranscoder<D>
- All Implemented Interfaces:
Transcoder<D>,TranscoderProxy<D>
public record RegistryTranscoder<D>(@NotNull Transcoder<D> transcoder, @NotNull Registries registries, boolean forClient, boolean init)
extends Record
implements TranscoderProxy<D>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.codec.Transcoder
Transcoder.ListBuilder<D>, Transcoder.MapBuilder<D>, Transcoder.MapLike<D> -
Field Summary
Fields inherited from interface net.minestom.server.codec.Transcoder
CRC32_HASH, JAVA, JSON, NBT -
Constructor Summary
ConstructorsConstructorDescriptionRegistryTranscoder(@NotNull Transcoder<D> transcoder, @NotNull Registries registries) RegistryTranscoder(@NotNull Transcoder<D> transcoder, @NotNull Registries registries, boolean forClient, boolean init) Creates an instance of aRegistryTranscoderrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Transcoder<D> delegate()final 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.booleaninit()Returns the value of theinitrecord component.@NotNull RegistriesReturns the value of theregistriesrecord component.final StringtoString()Returns a string representation of this record class.@NotNull Transcoder<D> Returns the value of thetranscoderrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minestom.server.codec.Transcoder
emptyList, emptyMapMethods inherited from interface net.minestom.server.codec.TranscoderProxy
convertTo, createBoolean, createByte, createByteArray, createDouble, createFloat, createInt, createIntArray, createList, createLong, createLongArray, createMap, createNull, createShort, createString, getBoolean, getByte, getByteArray, getDouble, getFloat, getInt, getIntArray, getList, getLong, getLongArray, getMap, getShort, getString
-
Constructor Details
-
RegistryTranscoder
public RegistryTranscoder(@NotNull @NotNull Transcoder<D> transcoder, @NotNull @NotNull Registries registries) -
RegistryTranscoder
public RegistryTranscoder(@NotNull @NotNull Transcoder<D> transcoder, @NotNull @NotNull Registries registries, boolean forClient, boolean init) Creates an instance of aRegistryTranscoderrecord class.- Parameters:
transcoder- the value for thetranscoderrecord componentregistries- the value for theregistriesrecord componentforClient- the value for theforClientrecord componentinit- the value for theinitrecord component
-
-
Method Details
-
delegate
- Specified by:
delegatein interfaceTranscoderProxy<D>
-
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 '=='. -
transcoder
Returns the value of thetranscoderrecord component.- Returns:
- the value of the
transcoderrecord component
-
registries
Returns the value of theregistriesrecord component.- Returns:
- the value of the
registriesrecord component
-
forClient
public boolean forClient()Returns the value of theforClientrecord component.- Returns:
- the value of the
forClientrecord component
-
init
public boolean init()Returns the value of theinitrecord component.- Returns:
- the value of the
initrecord component
-