Record Class NonVanillaItemRegistration
java.lang.Object
java.lang.Record
org.geysermc.geyser.registry.type.NonVanillaItemRegistration
public record NonVanillaItemRegistration(org.cloudburstmc.protocol.bedrock.data.inventory.ComponentItemData componentItemData, Item javaItem, ItemMapping mapping)
extends Record
The return data of a successful registration of a custom item.
-
Constructor Summary
ConstructorsConstructorDescriptionNonVanillaItemRegistration(org.cloudburstmc.protocol.bedrock.data.inventory.ComponentItemData componentItemData, Item javaItem, ItemMapping mapping)Creates an instance of aNonVanillaItemRegistrationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.cloudburstmc.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.javaItem()Returns the value of thejavaItemrecord component.mapping()Returns the value of themappingrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
NonVanillaItemRegistration
public NonVanillaItemRegistration(org.cloudburstmc.protocol.bedrock.data.inventory.ComponentItemData componentItemData, Item javaItem, ItemMapping mapping)Creates an instance of aNonVanillaItemRegistrationrecord class.- Parameters:
componentItemData- the value for thecomponentItemDatarecord componentjavaItem- the value for thejavaItemrecord 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 org.cloudburstmc.protocol.bedrock.data.inventory.ComponentItemData componentItemData()Returns the value of thecomponentItemDatarecord component.- Returns:
- the value of the
componentItemDatarecord component
-
javaItem
Returns the value of thejavaItemrecord component.- Returns:
- the value of the
javaItemrecord component
-
mapping
Returns the value of themappingrecord component.- Returns:
- the value of the
mappingrecord component
-