Does anyone know how to add a Spawn Egg for an entity such as the Ender Crystal that works?
I know how to add Spawn Eggs, just they won't work with these kind of entities, however there have been mods that do this. I'm just wanting to add spawn eggs for extra entities as an extra feature for a mod I'm making.
I haven't looked at the source for 1.5 yet, but in 1.4.x you could go to ItemMonsterPlacer. There should be something that basically says, "If the entity being spawned is an instance of EntityLiving, init and spawn it, then play one of its sounds." Remove all references to EntityLiving so it spawns the entity but doesn't init or play a sound. This has the side effect of all sheep/testificates/etc spawned being the same color, but it's not really a problem IMO.
Now you need to add spawn egg colors to the entities you want to spawn. Use an image editor to pick 2 colors, then convert them from RGB to integers using this. http://www.shodor.org/stella2java/rgbint.html These then go into the list entries for your entities.
Rollback Post to RevisionRollBack
If anyone wants to port/remake this, feel free to do that! Or don't. It's up to you, really.
I know how to add Spawn Eggs, just they won't work with these kind of entities, however there have been mods that do this. I'm just wanting to add spawn eggs for extra entities as an extra feature for a mod I'm making.
EDIT: Well, I figured it out.
Now you need to add spawn egg colors to the entities you want to spawn. Use an image editor to pick 2 colors, then convert them from RGB to integers using this. http://www.shodor.org/stella2java/rgbint.html These then go into the list entries for your entities.
If anyone wants to port/remake this, feel free to do that! Or don't. It's up to you, really.