Skip to content
On this page
NeoForge

ItemComponentEvent

top.katton.api.eventneoforge/src/main/kotlin/top/katton/api/event/ItemComponentEvent.kt
Item component and enchantment events for NeoForge platform.

ItemComponentEvent

ItemComponentEventNeoForgeObject
kotlin
@Suppress("unused")
object ItemComponentEvent

Item component and enchantment events for NeoForge platform.

This object provides placeholder events for item component modification and enchantment handling. Note: NeoForge doesn't have direct equivalents for all Fabric item component events, so these are provided for API compatibility.

ItemComponentEvent.ModifyComponentArg

ItemComponentEvent.ModifyComponentArgNeoForgeData Class
kotlin
data class ModifyComponentArg(val context: ModifyContext)

Argument class for item component modification events.

Properties

PropertyDescription
contextThe modification context containing item and registry information

ItemComponentEvent.onModifyComponent

ItemComponentEvent.onModifyComponentNeoForgeProperty
kotlin
@JvmField
@JvmField val onModifyComponent

Event triggered to modify default item components for items. Use this to add custom components to items during registration.

ItemComponentEvent.onAllowEnchanting

ItemComponentEvent.onAllowEnchantingNeoForgeProperty
kotlin
@JvmField
@JvmField val onAllowEnchanting

Event triggered to allow or deny an enchantment being applied to an item.

Returns

indicating whether to allow (TRUE), deny (FALSE), or use default (DEFAULT).

ItemComponentEvent.onModifyEnchantment

ItemComponentEvent.onModifyEnchantmentNeoForgeProperty
kotlin
@JvmField
@JvmField val onModifyEnchantment

Event triggered when an item's enchantment is being modified. Use this to customize enchantment behavior.