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 Details

    • LivingEntityDeathKubeEvent

      public LivingEntityDeathKubeEvent(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.damagesource.DamageSource source)
  • Method Details

    • getEntity

      @Info("The entity that dies.") public net.minecraft.world.entity.LivingEntity getEntity()
      Specified by:
      getEntity in interface KubeEntityEvent
      Specified by:
      getEntity in interface KubeLivingEntityEvent
    • getSource

      @Info("The damage source that triggers the death.") public net.minecraft.world.damagesource.DamageSource getSource()