Posted February 10, 201312 yr Hey guys, I have just made my new mob (Sand Pig). I can spawn it in with an spawnegg and it looks fine (With one little exception of the legs not moving when it moves). The problem is it won't spawn, here is the code I have for spawning it: public void entityRegisters(){ EntityRegistry.registerModEntity(EntitySandPig.class, "Sand Pig", 1, this, 80, 3, true); EntityRegistry.addSpawn(EntitySandPig.class, 10, 3, 6, EnumCreatureType.creature, BiomeGenBase.desert, BiomeGenBase.desertHills); I really do not have a clue why this isn't spawning so if anyone could help me out I would appreciate it. (Btw I am new to Java coding and don't understand all of the code) Also if anyone knows why it's legs don't move when it moves I would appreciate it if you helped out with that as well
February 10, 201312 yr I recently added my first mob, so the code may not be perfect, but it works (= ducks do spawn). I'm not sure if the spawning worked without the global method. private void registerDuck() { EntityRegistry.registerGlobalEntityID(EntityDuck.class, "jaffasDuck", DuckEntityID, ColorHelper.getInt(0, 127, 75), ColorHelper.getInt(200, 200, 255)); EntityRegistry.registerModEntity(EntityDuck.class, "jaffasDuck", DuckEntityID, this, 160, 1, true); LanguageRegistry.instance().addStringLocalization("entity.jaffasDuck.name", "en_US", "Duck"); } private void registerDuckSpawns() { EntityRegistry.addSpawn(EntityDuck.class, 7, 1, 2, EnumCreatureType.creature, taigaHills, jungle, jungleHills); // low EntityRegistry.addSpawn(EntityDuck.class, 10, 1, 3, EnumCreatureType.creature, plains, taiga, forestHills); // med EntityRegistry.addSpawn(EntityDuck.class, 15, 2, 6, EnumCreatureType.creature, swampland, river, beach, forest);// high } Also creatures (passive mobs) do not despawn (and there is a monster cap), so make sure you're trying it on new chunks or in a new world . mnn.getNativeLang() != English If I helped you please click on the "thank you" button.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.