Mob spawn on block

Discussion in 'Plugin Development' started by Hex_27, Jul 18, 2015.

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

    Hex_27

    I want to change all mob spawning in spots where there is a presence of soulsand. Example, when there's soulsand at x:30 y:5, then all mobs spawning at x:30 will be affected. Is there a way to do this other than tremendous looping?
     
  2. Offline

    mariosunny

    You would have to listen to CreatureSpawnEvent, and then get the location of the creature being spawned and check whether or not soul sand is present.
     
  3. @Hex_27
    No, there isn't ;(. You can only go from y 0 to max y to check if there's soulsand. Maybe for a small ease, but I think it would make it even bigger, put already detected locations in a liand if the list already contains the X + Z you can get it without checking y 0 - 255 again
     
  4. Offline

    Hex_27

Thread Status:
Not open for further replies.

Share This Page