Solved Get Mob Egg Damage Value

Discussion in 'Plugin Development' started by bdubz4552, Jan 20, 2015.

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

    bdubz4552

    I was wondering if there was a way to get the damage value for a mob's spawn egg somehow. Right now I am just using a switch and magic numbers, and this works, but is obviously not ideal. I tried looking in the entity interfaces to see if any contained something like a (hypothetical) getSpawnEggDamage(Entity) method, but I couldn't find anything like this.
     
  2. Offline

    WinX64

    Try out the SpawnEgg class. You can create a new instance specifying your entity type, and then, create an ItemStack from it.
     
  3. Offline

    bdubz4552

    @WinX64 Worked beautifully, thank you very much.
     
Thread Status:
Not open for further replies.

Share This Page