Record Class ResolvableHolderReferenceComponent
java.lang.Object
java.lang.Record
org.geysermc.geyser.item.components.resolvable.ResolvableHolderReferenceComponent
- All Implemented Interfaces:
ResolvableComponent<Integer>
public record ResolvableHolderReferenceComponent(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<Integer> type, JavaRegistryKey<?> registry, net.kyori.adventure.key.Key reference)
extends Record
implements ResolvableComponent<Integer>
-
Constructor Summary
ConstructorsConstructorDescriptionResolvableHolderReferenceComponent(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<Integer> type, JavaRegistryKey<?> registry, net.kyori.adventure.key.Key reference) Creates an instance of aResolvableHolderReferenceComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.parse(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<Integer> type, com.google.gson.JsonObject object) net.kyori.adventure.key.KeyReturns the value of thereferencerecord component.registry()Returns the value of theregistryrecord component.resolve(JavaRegistryProvider registries) final StringtoString()Returns a string representation of this record class.org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<Integer> type()Returns the value of thetyperecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.geyser.item.components.resolvable.ResolvableComponent
resolve
-
Constructor Details
-
ResolvableHolderReferenceComponent
public ResolvableHolderReferenceComponent(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<Integer> type, JavaRegistryKey<?> registry, net.kyori.adventure.key.Key reference) Creates an instance of aResolvableHolderReferenceComponentrecord class.- Parameters:
type- the value for thetyperecord componentregistry- the value for theregistryrecord componentreference- the value for thereferencerecord component
-
-
Method Details
-
parse
public static ResolvableHolderReferenceComponent parse(org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<Integer> type, com.google.gson.JsonObject object) -
resolve
- Specified by:
resolvein interfaceResolvableComponent<Integer>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
type
public org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType<Integer> type()Returns the value of thetyperecord component.- Specified by:
typein interfaceResolvableComponent<Integer>- Returns:
- the value of the
typerecord component
-
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
reference
public net.kyori.adventure.key.Key reference()Returns the value of thereferencerecord component.- Returns:
- the value of the
referencerecord component
-