Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-1788

Ocelots do not spawn naturally on peaceful difficulty in jungle and bamboo jungle biomes

XMLWordPrintable

    • Icon: Bug 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

      net/minecraft/data/worldgen/biome/OverworldBiomes.java
         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

      net/minecraft/data/worldgen/biome/OverworldBiomes.java
         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);
         }
      

            Unassigned Unassigned
            Thumpbacker [Mod] Anthony Cicinelli
            Votes:
            59 Vote for this issue
            Watchers:
            33 Start watching this issue

              Created:
              Updated:
              CHK: