Skip to content
On this page
NeoForge

ServerEntityCombatEvent

top.katton.api.eventneoforge/src/main/kotlin/top/katton/api/event/ServerEntityCombatEvent.kt
NeoForge 平台的服务端实体战斗事件。 此对象提供与实体战斗相关的事件,包括暴击、盾牌格挡和击杀。

ServerEntityCombatEvent

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

NeoForge 平台的服务端实体战斗事件。 此对象提供与实体战斗相关的事件,包括暴击、盾牌格挡和击杀。

ServerEntityCombatEvent.onAfterKilledOtherEntity

ServerEntityCombatEvent.onAfterKilledOtherEntityNeoForge属性
kotlin
@JvmField
@JvmField val onAfterKilledOtherEntity

当一个实体击杀另一个实体后触发。 这是一个通知事件,不能取消。

ServerEntityCombatEvent.onCriticalHit

ServerEntityCombatEvent.onCriticalHitNeoForge属性
kotlin
val onCriticalHit

当发生暴击时触发。

ServerEntityCombatEvent.onShieldBlock

ServerEntityCombatEvent.onShieldBlockNeoForge属性
kotlin
val onShieldBlock

当实体使用盾牌格挡时触发。 可用于修改格挡的伤害量。

返回值

应当被格挡的伤害量。