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

Pillagers without a crossbow target the entity they want to attack, even though it doesn't impact their behavior in any discernible manner.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.4, 24w10a, 24w11a
    • None
    • Confirmed
    • Data Packs

      When a pillager lacks a crossbow, it becomes unable to attack entities. However, it continues to target entities it wants to attack, leading to unnecessary calculations that impact performance. To reproduce this issue, download the provided datapack and execute the command

      /execute as @e at @s on target run function snapshots:raycast_particles/3

      in a repeating command block. Then spawn a pillager and remove its crossbow using the command

      /item replace entity @e[type=minecraft:pillager,limit=1,sort=nearest] weapon.mainhand with air

      . In survival mode or by spawning villagers, the pillager will still target them or you, as indicated by the emitted particles. The datapack command draws a line of particles between an entity and its target to visualize this behavior. Relates to MC-139433 and MC-163960.

            Unassigned Unassigned
            NoUser No User
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: