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>(Transcoder<D> transcoder, Registries registries, boolean forClient, boolean init)
extends Record
implements TranscoderProxy<D>
-
Nested Class Summary
Nested classes/interfaces inherited from interface Transcoder
Transcoder.ListBuilder<D>, Transcoder.MapBuilder<D>, Transcoder.MapLike<D> -
Field Summary
Fields inherited from interface Transcoder
CRC32_HASH, JAVA, JSON, NBT -
Constructor Summary
ConstructorsConstructorDescriptionRegistryTranscoder(Transcoder<D> transcoder, Registries registries) RegistryTranscoder(Transcoder<D> transcoder, Registries registries, boolean forClient, boolean init) Creates an instance of aRegistryTranscoderrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelegate()The delegate to use; This should be considered immutable during its lifetime.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.Returns the value of theregistriesrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranscoderrecord component.Methods inherited from interface Transcoder
emptyList, emptyMapMethods inherited from interface 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
-
RegistryTranscoder
public RegistryTranscoder(Transcoder<D> transcoder, 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
Description copied from interface:TranscoderProxyThe delegate to use; This should be considered immutable during its lifetime.- Specified by:
delegatein interfaceTranscoderProxy<D>- Returns:
- the
Transcoderdelegated forTranscoderProxy
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-