Posted March 23, 201411 yr Hello, what's the proper way to add a spawn? Is that the right way: EntityRegistry.addSpawn(EntityPig2.class, 1, 1, 1, EnumCreatureType.creature, BiomeGenBase.desert, BiomeGenBase.desertHills, BiomeGenBase.extremeHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.hell, BiomeGenBase.iceMountains, BiomeGenBase.icePlains, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.mushroomIsland, BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.river, BiomeGenBase.swampland, BiomeGenBase.taiga); burnner
March 23, 201411 yr EntityRegistry.addSpawn(EntityPig2.class, 1, 1, 1, EnumCreatureType.creature, BiomeGenBase.biomeList);
March 23, 201411 yr EntityRegistry.addSpawn(EntityPig2.class, 1, 1, 1, EnumCreatureType.creature, BiomeGenBase.biomeList); No, this will crash, since biomeList contains null values! Look here for a solution: http://www.minecraftforge.net/forum/index.php/topic,17455.msg88353.html#msg88353 Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
March 23, 201411 yr there's no "biomList" Also since when is biomeList not visible? You checked the BiomeGenBase class for it and made sure it's really not visible? If it isn't, is there a getter method? Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
March 23, 201411 yr I think he means that its not biomeList, he can't find it. @OP: Probably as field/func names.
March 23, 201411 yr EntityRegistry.addSpawn(EntityPig2.class, 1, 1, 1, EnumCreatureType.creature, BiomeGenBase.biomeList); No, this will crash, since biomeList contains null values! Look here for a solution: http://www.minecraftforge.net/forum/index.php/topic,17455.msg88353.html#msg88353 I am sorry to have confused.
March 24, 201411 yr Try BiomeGenBase$getBiomeGenArray() It returns the biomeList -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
March 24, 201411 yr Author there's no "biomList" Also since when is biomeList not visible? You checked the BiomeGenBase class for it and made sure it's really not visible? If it isn't, is there a getter method? Eclipse says it's not visibile
March 24, 201411 yr there's no "biomList" Also since when is biomeList not visible? You checked the BiomeGenBase class for it and made sure it's really not visible? If it isn't, is there a getter method? Eclipse says it's not visibile Well, then it's changed in 1.7. Use sequituri's suggestion then. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
March 24, 201411 yr Use this: public static BiomeGenBase[] biomesWithout(BiomeGenBase... biomesWithout){ ArrayList<BiomeGenBase> biomes = new ArrayList<BiomeGenBase>(); for(BiomeGenBase biome : BiomeGenBase.biomeList){ for(int i = 0; i < biomesWithout.length; i++){ if(biome != null && biome != biomesWithout[i]){ biomes.add(biome); } } } return biomes.toArray(new BiomeGenBase[biomes.size()]); } And: EntityRegistry.addSpawn(EntityPig2.class, 1, 1, 1, EnumCreatureType.creature, biomesWithout(/** here write biomes in which the mob will not spawn */));
May 22, 201411 yr I'm pretty sure I said that. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
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.