-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.4.2, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, 1.16.4 Release Candidate 1, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 21w05b, 21w11a, 1.17, 21w40a, 1.18.1, 1.19.3, 23w04a, 1.20.1, 23w32a, 1.21 Pre-Release 3, 1.21, 1.21.3
-
Confirmed
-
Mob spawning
-
Normal
-
Gameplay
The bug
Despite being friendly mobs, ocelots will not spawn on peaceful in jungle or bamboo jungle biomes
Code Analysis
The reason this happens is because for the mob cap in jungle and bamboo jungle biomes they are counted as monsters instead of creatures
Current Code
public static Biome jungle() { MobSpawnSettings.Builder mobspawnsettings$builder = new MobSpawnSettings.Builder(); BiomeDefaultFeatures.baseJungleSpawns(mobspawnsettings$builder); mobspawnsettings$builder.addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.PARROT, 40, 1, 2)).addSpawn(MobCategory.MONSTER, new MobSpawnSettings.SpawnerData(EntityType.OCELOT, 2, 1, 3)).addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.PANDA, 1, 1, 2)); return baseJungle(0.9F, false, false, true, mobspawnsettings$builder); } public static Biome bambooJungle() { MobSpawnSettings.Builder mobspawnsettings$builder = new MobSpawnSettings.Builder(); BiomeDefaultFeatures.baseJungleSpawns(mobspawnsettings$builder); mobspawnsettings$builder.addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.PARROT, 40, 1, 2)).addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.PANDA, 80, 1, 2)).addSpawn(MobCategory.MONSTER, new MobSpawnSettings.SpawnerData(EntityType.OCELOT, 2, 1, 1)); return baseJungle(0.9F, true, false, true, mobspawnsettings$builder); }
Fixed Code
public static Biome jungle() { MobSpawnSettings.Builder mobspawnsettings$builder = new MobSpawnSettings.Builder(); BiomeDefaultFeatures.baseJungleSpawns(mobspawnsettings$builder); //Setting the MobCategory to Creature for Ocelot fixes MC-1788 mobspawnsettings$builder.addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.PARROT, 40, 1, 2)).addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.OCELOT, 2, 1, 3)).addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.PANDA, 1, 1, 2)); return baseJungle(0.9F, false, false, true, mobspawnsettings$builder); } public static Biome bambooJungle() { MobSpawnSettings.Builder mobspawnsettings$builder = new MobSpawnSettings.Builder(); BiomeDefaultFeatures.baseJungleSpawns(mobspawnsettings$builder); //Setting the MobCategory to Creature for Ocelot fixes MC-1788 mobspawnsettings$builder.addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.PARROT, 40, 1, 2)).addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.PANDA, 80, 1, 2)).addSpawn(MobCategory.CREATURE, new MobSpawnSettings.SpawnerData(EntityType.OCELOT, 2, 1, 1)); return baseJungle(0.9F, true, false, true, mobspawnsettings$builder); }
- is duplicated by
-
MC-16357 Ocelots spawn using the hostile mob spawner
- Resolved
-
MC-19742 Peaceful doesn't work with ocelots?
- Resolved
-
MC-67851 hostle kitty!
- Resolved
-
MC-104824 Ocelots dissapearing after changing difficulty
- Resolved
-
MC-194320 Ocelot spawns
- Resolved
- relates to
-
MC-118464 Ocelots spawn with peaceful as difficulty after reopening the world
- Resolved