EntityDamage - trouble with causes

Discussion in 'Plugin Development' started by Bone008, Jun 19, 2011.

Thread Status:
Not open for further replies.
  1. I'm kinda confused about the DamageCauses.
    I did some debugging with damage-events and their causes and I just can't get the BLOCK_EXPLOSION-cause to be used. The name would suggest that it's when your hit by tnt, but that only triggers a lot of ENTITY_EXPLOSION-causes and no BLOCK_EXPLOSION. Same with creepers and ghast's fireballs.
    So when is there a BLOCK_EXPLOSION?

    And how do I get the entity that attacked when I have the ENTITY_ATTACK-cause?
    This is probably really easy and I'm just to blind to find the method right now :S
     
  2. Offline

    Shamebot

    1. Searching for repo:Bukkit/CraftBukkit BLOCK_EXPLOSION on github gave me no code where it's used.
    2. Cast to EntityDamagedByEntityEvent
     
  3. 1. Then it looks like it's another implemented but unused part of the API.
    2. Oooow, now I remember there was that other event you could use :oops:

    Thanks for your reply, that helped me out.
     
Thread Status:
Not open for further replies.

Share This Page