Package dev.latvian.mods.kubejs.entity
Class LivingEntityDeathKubeEvent
java.lang.Object
dev.latvian.mods.kubejs.entity.LivingEntityDeathKubeEvent
- All Implemented Interfaces:
KubeEntityEvent,KubeLivingEntityEvent,KubeEvent,KubeLevelEvent
@Info("Invoked before a living entity dies.\n\n**NOTE**: You need to set hp to > 0 besides cancelling the event to prevent the entity from dying.\n")
public class LivingEntityDeathKubeEvent
extends Object
implements KubeLivingEntityEvent
-
Constructor Summary
ConstructorsConstructorDescriptionLivingEntityDeathKubeEvent(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.damagesource.DamageSource source) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.entity.KubeEntityEvent
getLevel, getPlayerMethods inherited from interface dev.latvian.mods.kubejs.event.KubeEvent
afterPosted, cancel, cancel, defaultExitValue, exit, exit, getExitValueType, mapExitValue, success, successMethods inherited from interface dev.latvian.mods.kubejs.level.KubeLevelEvent
getRegistries, getServer
-
Constructor Details
-
LivingEntityDeathKubeEvent
public LivingEntityDeathKubeEvent(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.damagesource.DamageSource source)
-
-
Method Details
-
getEntity
- Specified by:
getEntityin interfaceKubeEntityEvent- Specified by:
getEntityin interfaceKubeLivingEntityEvent
-
getSource
@Info("The damage source that triggers the death.") public net.minecraft.world.damagesource.DamageSource getSource()
-