Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-132195

Bee spawn rules may be incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.17.11 Hotfix, 1.17.20.23 Beta, 1.17.20.22 Beta, 1.17.20.21 Beta, 1.17.10, 1.17.0, 1.17.2 Hotfix, 1.17.32, 1.17.34
    • Fix Version/s: 1.17.40.21 Beta
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Platform:
      Multiple
    • ADO:
      559545

      Description

      According to the wiki, bees are supposed to spawn naturally in 8 biomes with the following identifiers:

      • plains
      • sunflower_plains
      • flower_forest
      • forest
      • forest_hills (Java Edition calls it Wooded Hills)
      • birch_forest
      • birch_forest_hills
      • birch_forest_mutated

      We have had several reports that bees are not spawning in some of these biomes, or at all according to some reports, since the 1.17 update. Up until now we have been resolving these reports as Cannot Reproduce based on experiments that show that bees can be spawned in (at least) the plains, sunflower plains, flower forest, and forest biomes.

      However, as I was investigating these issues I found what appears to be an error in the spawn rules for a bee, and if my understanding of the behavior pack is correct this error should mean that bees cannot spawn in any of the forest or birch forest biomes.

      The error is as follows. Recently, behavior packs have seen changes to how they encode what biomes an entity is allowed to spawn in. In the old encoding, a biome had an identifier (like those listed above) and the spawn rules for a given entity tested the biome's identifier against a list of permitted biomes. For example, a stray had a spawn rule that checked for one of the biome identifiers ice_plains, ice_plains_spikes, or ice_mountains.

      In the new encoding, a biome has a set of "biome tags", each of which is a valueless name representing a property that the biome can either have or not have. As an example, a biome has the biome tag frozen if its temperature is cold enough to freeze water into ice. The revised spawn rule for strays now checks that the biome has the frozen property, butĀ doesn't have the ocean property. This new encoding separates spawn rules from built-in biome names so that add-on creators can use biome tags to integrate their custom biomes into the general mob spawning scheme, and so the game can treat their custom biomes just like it does the built-in ones.

      The error I found is that the spawn rules for the bee entity were not properly changed to the new encoding. As part of the change, a new biome tag bee_habitat was added to the biome definitions for all 8 biomes listed above, but not for any other biomes, so clearly it was meant to represent that bees were allowed to spawn in these biomes. However, the revised bee spawn rulesĀ do not test for the tag bee_habitat. Instead, they test for three tags named plains, flower_forest, and sunflower_plains. I think these are the identifiers from the old encoding, now changed to the new encoding but without replacing the biome identifiers with the new biome tag. Despite the mistake, it happens to succeed for these biomes because the flower_forest biome has a flower_forest tag and the plains biome has a plains tag. There is no such biome tag as sunflower_forest, but the sunflower_forest biome also has the plains tag so all three of these biomes can still spawn bees despite the mistake

      However, there is a problem with this analysis that I can't explain, namely, our experiments show that we can spawn a bee nest in a birch forest by bone mealing a birch sapling next to a flower. The birch_forest biome does not have either of the tags plains or flower_forest, so by my understanding the spawn rules should not allow bees to spawn there. Yet they do.

      Regardless of that, I feel certain that the bee spawn rules in the 1.17 vanilla behavior pack are wrong and need to be changed as follows:

      In pack\spawn_rules\bee.json, change:

                "minecraft:biome_filter": [
                  { "test": "has_biome_tag", "operator":"==", "value": "plains" },
                  { "test": "has_biome_tag", "operator":"==", "value": "sunflower_plains" },
                  { "test": "has_biome_tag", "operator":"==", "value": "flower_forest" }
                ]
      

      to:

                "minecraft:biome_filter": [
                  { "test": "has_biome_tag", "operator":"==", "value": "bee_habitat" }
                ]
      

      Note that even if forest biomes couldn't spawn bees, as my analysis predicted, this fix would simultaneously correct that problem as well because all the forest biomes have the bee_habitat biome tag.

        Attachments

          Issue Links

            Activity

              People

              Reporter:
              Auldrick [MCPE Mod] Auldrick
              Votes:
              9 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: