Determining if a creature was spawned by a mobspawner

Discussion in 'Plugin Development' started by nossr50, Feb 26, 2011.

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

    nossr50

    Is there anyway to determine if a creature was spawned by a mobspawner or then grabbing blocks near the creature when it spawns and checking if the blocks are a mobspawner?

    Thanks
     
  2. Offline

    Edward Hand

    I don't think it's possible.
     
  3. Offline

    KaBob

    The following code provides different results for natural spawning versus /spawnmob when put in the creaturespawn event. I haven't tested it with mob spawners, but I'd say theres a pretty good chance it gives something different for them too. If not, you can try looking at other pieces of the array and maybe one of them would be different for mob spawners.
    Throwable t =new Throwable();
    StackTraceElement[] elements = t.getStackTrace();
    System.out.println(elements[5].toString());
     
Thread Status:
Not open for further replies.

Share This Page