Record Class NonVanillaItemRegistration
java.lang.Object
java.lang.Record
org.geysermc.geyser.registry.type.NonVanillaItemRegistration
public record NonVanillaItemRegistration(com.nukkitx.protocol.bedrock.data.inventory.ComponentItemData componentItemData, ItemMapping mapping)
extends Record
The return data of a successful registration of a custom item.
-
Constructor Summary
ConstructorsConstructorDescriptionNonVanillaItemRegistration(com.nukkitx.protocol.bedrock.data.inventory.ComponentItemData componentItemData, ItemMapping mapping)Creates an instance of aNonVanillaItemRegistrationrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.nukkitx.protocol.bedrock.data.inventory.ComponentItemDataReturns the value of thecomponentItemDatarecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.mapping()Returns the value of themappingrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
NonVanillaItemRegistration
public NonVanillaItemRegistration(com.nukkitx.protocol.bedrock.data.inventory.ComponentItemData componentItemData, ItemMapping mapping)Creates an instance of aNonVanillaItemRegistrationrecord class.- Parameters:
componentItemData- the value for thecomponentItemDatarecord componentmapping- the value for themappingrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
componentItemData
public com.nukkitx.protocol.bedrock.data.inventory.ComponentItemData componentItemData()Returns the value of thecomponentItemDatarecord component.- Returns:
- the value of the
componentItemDatarecord component
-
mapping
Returns the value of themappingrecord component.- Returns:
- the value of the
mappingrecord component
-