Solved Changing what mob a spawner will spawn?

Discussion in 'Spigot Plugin Development' started by robotnik, Apr 14, 2017.

  1. So Looking through the spigot API i'm lost as to how to do this. Im guessing it involves using the getMetadata and setMetadata methods, but not sure at all how to use them.

    Can anyone give an example of using these methods to change the type of mob a spawner will spawn, or point me in the right direction on how to do this?
     
  2. Block spawnerBlock;
    CreatureSpawner spawner = ((CreatureSpawner) spawnerBlock.getState());
     
    • Informative Informative x 1
  3. perfect that's what I needed, thanks!
     
  4. Change the title with a solved tag if your problem has been solved