Posted October 25, 201410 yr I know when you set weightedProb in addSpawn higher for a high chance of spawns. I've searched Eclipse and online for the weightedProb for vanilla mobs but can't find it; they have this right? What's the usual amount for a mobs weightedProb? Do I have to use trial and error when setting custom mob's weightedProb to get it to spawn not too common and not too rare or is there somewhere in Eclipse or online that I can find each Mob's weightedProb for addSpawn?
October 25, 201410 yr Hi FYI how I found this info: 1) EntityRegistry.addSpawn: public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes) { for (BiomeGenBase biome : biomes) { @SuppressWarnings("unchecked") List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature); for (SpawnListEntry entry : spawns) { //Adjusting an existing spawn entry if (entry.entityClass == entityClass) { entry.itemWeight = weightedProb; entry.minGroupCount = min; entry.maxGroupCount = max; break; } } spawns.add(new SpawnListEntry(entityClass, weightedProb, min, max)); } } So my new spawns are being added to biome.getSpawnableList(), which is /** * Returns the correspondent list of the EnumCreatureType informed. */ public List getSpawnableList(EnumCreatureType p_76747_1_) { return p_76747_1_ == EnumCreatureType.monster ? this.spawnableMonsterList : (p_76747_1_ == EnumCreatureType.creature ? this.spawnableCreatureList : (p_76747_1_ == EnumCreatureType.waterCreature ? this.spawnableWaterCreatureList : (p_76747_1_ == EnumCreatureType.ambient ? this.spawnableCaveCreatureList : null))); } which shows me I'm looking for spawnableMonsterList, spawnableCreatureList, etc depending on the water type. Go to usage of spawnableMonsterList gives me BiomeGenBase constructor --> this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1)); this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, ); Jackpot! -TGG
October 25, 201410 yr Author Hi FYI how I found this info: 1) EntityRegistry.addSpawn: public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes) { for (BiomeGenBase biome : biomes) { @SuppressWarnings("unchecked") List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature); for (SpawnListEntry entry : spawns) { //Adjusting an existing spawn entry if (entry.entityClass == entityClass) { entry.itemWeight = weightedProb; entry.minGroupCount = min; entry.maxGroupCount = max; break; } } spawns.add(new SpawnListEntry(entityClass, weightedProb, min, max)); } } So my new spawns are being added to biome.getSpawnableList(), which is /** * Returns the correspondent list of the EnumCreatureType informed. */ public List getSpawnableList(EnumCreatureType p_76747_1_) { return p_76747_1_ == EnumCreatureType.monster ? this.spawnableMonsterList : (p_76747_1_ == EnumCreatureType.creature ? this.spawnableCreatureList : (p_76747_1_ == EnumCreatureType.waterCreature ? this.spawnableWaterCreatureList : (p_76747_1_ == EnumCreatureType.ambient ? this.spawnableCaveCreatureList : null))); } which shows me I'm looking for spawnableMonsterList, spawnableCreatureList, etc depending on the water type. Go to usage of spawnableMonsterList gives me BiomeGenBase constructor --> this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1)); this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, ); Jackpot! -TGG Oh, okay. I went is far as the EntityRegistry.addSpawn, then started looking in SpawnListEntry instead. Thanks for you help.
October 25, 201410 yr Hi >Oh, okay. I went is far as the EntityRegistry.addSpawn, then started looking in SpawnListEntry instead. You were close just needed to search for SpawnListEntry "new instance creation". And actually, if you do that, it will bring up a stack of other places too that I didn't mention, for other non-default biomes where the spawning rates are different. eg BiomeGenForest, BiomeGenJungle, etc > Thanks for you help. No worries! -TGG
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.