I would like to program a plugin where you can break down Mob Spawner and then drop a normal spawner and a spawnee.
I've made it so far that drops a spawner.
The problem now is, however, that I want that e.g. A Zombie Spawner Drops A Zombie Egg Or A Lohen Spawner A Lohen Egg.
I just do not know how it works, that is tested what a Spawner is mined or was?
Can someone help me there?
Try to cast the Spawner Block to a CreatureSpawner and
getSpawnedType ()
Should retire an entity type.
I'm still a newcomer and do not endorse that, but thanks anyway
@EventHandler
public void onBreack (BlockBreakEvent e) {
Block b = e.getBlock;
CreatureSpawner cs = (CreatureSpawner) b;
EntityType eType = cs.getSpawnedType ();
}
Something like that (the code is not checked for errors because it was not created in an IDE)