Skip to content
On this page

NeoForge

ServerEntityCombatEvent

top.katton.api.eventneoforge/src/main/kotlin/top/katton/api/event/ServerEntityCombatEvent.kt
Server entity combat events for NeoForge platform.

ServerEntityCombatEvent

NeoForgeObject
kotlin
@Suppress("unused")
@EventBusSubscriber( modid = Katton.MOD_ID, value = [Dist.DEDICATED_SERVER] )
modid

Server entity combat events for NeoForge platform.

This object provides events related to entity combat including critical hits, shield blocking, and entity kills.

ServerEntityCombatEvent.onAfterKilledOtherEntity

NeoForgeProperty
kotlin
@JvmField
@JvmField val onAfterKilledOtherEntity

Event triggered after an entity kills another entity. This is a notification event that cannot be cancelled.

ServerEntityCombatEvent.onCriticalHit

NeoForgeProperty
kotlin
val onCriticalHit

Event triggered when a critical hit is performed.

ServerEntityCombatEvent.onShieldBlock

NeoForgeProperty
kotlin
val onShieldBlock

Event triggered when an entity blocks with a shield. Can be used to modify the amount of damage blocked.

Returns

The amount of damage that should be blocked.