mojira.dev
MC-266798

Wandering Trader can't pathfind correctly when on a vehicle

Description:

I don't know if it can be considered as a bug since Wandering Traders aren't supposed to naturally spawn with a vehicle, but it makes it inconsistent with the recent /ride command and other ways that allow player to put a Wandering Trader on a vehicle. Especially since other entities like hostiles ones manage to guide their vehicle entities toward their target.

How to reproduce:

  1. On any world go at 0,0, create a plateform with the following command:

    /fill 0 100 0 10 100 10 stone
  2. Then teleport on the upper corner of this plateform, so to 10 101 10:

    /tp 10 101 10
  3. Summon a Wandering Trader on a Horse targeting the block 0 101 0:

    /summon horse ~ ~ ~ {Passengers:[{id:"minecraft:wandering_trader",WanderTarget:{X:0,Y:101,Z:0}}]}

What happens:

The Wandering Trader looks downward, and the horse starts to move very slowly. After some seconds, it stops to move and start to spin on itself indefinitely. This is due to the fact the Wandering Trader doesn't actually touch the ground, so it assumes it hasn't reached the right Y layer, and continue to try to reach it.

Expected behavior:

The path should be drawn from the horse's feet, and The Wandering Trader should be satisfied when the horse is near the location 0 101 0.

Linked issues

Attachments

Comments 2

execute on passengers run data modify entity @s Pos[1] set form entity @n[ (must be vehicle) ] Pos[1]

try this one. is will be work.

KawaMood

(Unassigned)

Community Consensus

Commands, Mob behaviour

1.20.2, 23w46a

Retrieved