Class OnyxItemImpl
java.lang.Object
com.zombienw.onyxlib.impl.item.OnyxItemImpl
- All Implemented Interfaces:
OnyxItem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the underlying vanilla material for this item.create()Generates a single ItemStack representing this custom item.create(int amount) Generates a stack of this custom item.displayName(String name) Sets the display name using a legacy string with no italics.displayName(net.kyori.adventure.text.Component component) Sets the display name using an Adventure Component.getId()getKey()Provides direct access to the ItemMeta for complex modifications.Sets the relative path to the texture file, WITHOUT the .png extension.
-
Constructor Details
-
OnyxItemImpl
-
-
Method Details
-
getId
-
getTexturePath
-
getBaseMaterial
-
getKey
-
baseItem
Description copied from interface:OnyxItemSets the underlying vanilla material for this item. Required for the item to be created. -
displayName
Description copied from interface:OnyxItemSets the display name using a legacy string with no italics.- Specified by:
displayNamein interfaceOnyxItem- Parameters:
name- The display name.- Returns:
- This OnyxItem instance.
-
displayName
Description copied from interface:OnyxItemSets the display name using an Adventure Component.- Specified by:
displayNamein interfaceOnyxItem- Parameters:
component- The display name component.- Returns:
- This OnyxItem instance.
-
texture
Description copied from interface:OnyxItemSets the relative path to the texture file, WITHOUT the .png extension. The path is relative to assets//textures/ in your plugin jar. Example: texture("items/strawberry") -> assets/myplugin/textures/items/strawberry.png
-
itemMeta
Description copied from interface:OnyxItemProvides direct access to the ItemMeta for complex modifications. -
create
-
create
-