Baby piglins will pick up more items than vanilla

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • This server is running CraftBukkit version 3087-Spigot-9fb885e-a0149bf (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
    • Yes

      In vanilla. The baby piglins will pickup any item, but only one of them. As a result the server code extracts one count at a time. The below video shows the bugged behavior. The intended behavior would be to stop picking up after the first one.

      I have verified that this is caused by the Piglin Bartering Api commit.

      https://youtu.be/Ez0kenPxMm0

       

      A suggested fix, is in PiglinAI. Line 220.

      From: `if (a(entitypiglin, itemstack)) {`

      To: `if (isLovedByPiglin(item, entitypiglin)) {`

      When I made that switch, the issue disappeared for me.

      The vanilla behavior of that line is to check whether it is `TagsItem.PIGLIN_LOVED`

            Assignee:
            Unassigned
            Reporter:
            chickeneer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: