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

Villagers and Piglin no longer seek out Items

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • 1.19.3 Pre-release 3
    • 22w46a, 1.19.3 Pre-release 2
    • None
    • Confirmed
    • Mob behaviour
    • Very Important
    • Platform

    Description

      The bug

      Villagers are no longer able to explicitly walk towards their wanted items.
      The same goes for Piglin admiring items.

      To reproduce

      1. Summon a piglin.
      2. Ensure the mobGriefing gamerule is true.
      3. Throw gold items at the piglin.

      Expected result

      The piglin would play the admiring sound and go pick up the gold item.

      Observed result

      The piglin ignores the item, and only plays the admiring sound.

      Code analysis

      This is caused by changes to the GoToWantedItem Behavior. It includes a check for item pickup cooldowns using MemoryModuleType.ITEM_PICKUP_COOLDOWN_TICKS for use by the allay AI.

      The actual issue stems from the BehaviorBuilder refactor and using instance.registered(MemoryModuleType.ITEM_PICKUP_COOLDOWN_TICKS) in GoToWantedItem. This memory module is not registered for Villagers and Piglin causing the Behavior to never run.

      Attachments

        Issue Links

          Activity

            People

              xilefian [Mojang] Felix Jones
              andre111_ andre111_
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                CHK: