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

Bees do not remember how many crops they've pollinated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.15.2 Pre-Release 1
    • 1.15.1
    • None
    • Confirmed
    • Entities
    • Normal

      The bug

      Between serialization and deserialization of a bee entity to NBT, the value of CropsGrownSincePollination seems to be lost. A bee with a CropsGrownSincePollination value of 5 can be serialized to NBT, instantly deserialized from NBT, and instantly reserialized to NBT, and the second NBT compound will have a CropsGrownSincePollination value of 0. A source dive finds that this is caused due to the deserialization method trying to set the crops grown since pollination field from the tag NumCropsGrownSincePollination, instead of the CropsGrownSincePollination tag it's serialized to.

      This will result in bees being able to pollinate infinite crops, as long as they're saved to and loaded from NBT before returning to the hive and losing their pollen.

            cojomax99 [Mojang] Cory Scheviak
            b0undarybreaker Meredith Espinosa
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: