Solved Yield from world.createExplosion(...)?

Discussion in 'Plugin Development' started by Codex Arcanum, Dec 27, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Codex Arcanum

    Is there any way for me to set the yield (percent of blocks dropped) from an explosion created by world.createExplosion(...)?

    I realize that the EnityExplodeEvent has a .setYield() method, which is all very well if I'm spawning an entity that explodes, but I don't think that is the case with world.createExplosion(...). Can anyone shed any light on whether the EntityExplodeEvent triggers on world.createExplosion(), and/or how I can set the yield otherwise?
     
    Reflxction likes this.
  2. Offline

    Codex Arcanum

    Desultory bump.
     
  3. Offline

    Gater12

    I think it triggers that event.... With no entity so null.
     
  4. Offline

    RawCode

    it trigger event and you can manually set any entity as source.
     
  5. Offline

    Codex Arcanum

    Problem solved. It does trigger the event, so just before the place in my code where I run world.createExplosion(...), I add the location to a list, and then set the yield on the first explosion that occurs at that location. Kind of awkward, but it works.
     
Thread Status:
Not open for further replies.

Share This Page