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

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.15.1
    • Fix Version/s: 1.15.2 Pre-Release 1
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Entities
    • Mojang Priority:
      Normal

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                CHK:

                Potential Duplicates