I looked everywhere (I think) but I can't find anything on how to give my mobs spawn eggs I used this in 1.8 and it is telling me I need to change randomId to a string but that stilll doesnt make the egg work.
package net.soggymustache.zawam.entity;
import net.minecraft.entity.EntityList;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import net.soggymustache.zawam.ZAWAMain;
import net.soggymustache.zawam.entity.Warthog.EntityWarthog;
public class Entity {
public static int randomId;
public static void ZAWAMain(){
registerEntity();
}
public static void registerEntity(){
// createEntity(EntitySumatranRhinoceros.class, "SumatranRhinoceros", 0x424040,
}
public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor){
randomId = EntityRegistry.findGlobalUniqueEntityId();
EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
EntityRegistry.registerModEntity(entityClass, entityName, randomId, ZAWAMain.modInstance, 42, 1, true);
createEgg(randomId, solidColor, spotColor);
}
public static void createEgg(int randomId, int solidColor, int spotColor) {
EntityList.entityEggs.put(String.valueOf(randomId), new EntityList.EntityEggInfo(randomId, solidColor, spotColor));
}
}