1.17.1 Get Mob from Spawn Egg

Discussion in 'Spigot Plugin Development' started by Vhbob, Oct 10, 2021.

  1. Hi, I am currently working on a plugin that will allow a player to set a certain combination of mobs that will spawn. I would like to do this by using a GUI that lets player's increase/decrease the mobs spawned by clicking on a spawn egg for that certain mob type. I know I can acquire a list of all valid spawn eggs by checking the materials list for types including "SPAWN_EGG", but is there an easy way to convert that egg to the EntityType that it spawns? Thanks!