-
Bug
-
Resolution: Fixed
-
22w46a, 1.19.3 Pre-release 2
-
None
-
Confirmed
-
Mob behaviour
-
Very Important
-
Platform
The bug
Villagers are no longer able to explicitly walk towards their wanted items.
The same goes for Piglin admiring items.
To reproduce
- Summon a piglin.
- Ensure the mobGriefing gamerule is true.
- 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.
- is duplicated by
-
MC-257687 Piglin doesn't care about gold ingots thrown on the ground
- Resolved