Mojira Archive
MC-223385

LodestonePos NBT in custom villager trade gets removed from compass after trading in some cases

Place a Lodestone at 0 64 0. Don't break it. Summon the villagers. Trade.

With LodestoneTracked set to true, the coordinates will be removed from the compass after a trade. This does not work as expected.

/summon villager ~ ~ ~ {VillagerData:{profession:"minecraft:nitwit"},Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:1b},sell:{id:"minecraft:compass",Count:1b,tag:{LodestoneDimension:"minecraft:overworld",LodestoneTracked:1b,LodestonePos:{X:0,Y:64,Z:0}}}}]}}

With LodestoneTracked set to false, the coordinates will be kept on the compass after a trade, even if the lodestone is broken. This works as expected.

/summon villager ~ ~ ~ {VillagerData:{profession:"minecraft:nitwit"},Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:1b},sell:{id:"minecraft:compass",Count:1b,tag:{LodestoneDimension:"minecraft:overworld",LodestoneTracked:0b,LodestonePos:{X:0,Y:64,Z:0}}}}]}}

With LodestoneTracked unset, the coordinates will be removed from the compass after a trade. I suspect that this works as intended.

/summon villager ~ ~ ~ {VillagerData:{profession:"minecraft:nitwit"},Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:1b},sell:{id:"minecraft:compass",Count:1b,tag:{LodestoneDimension:"minecraft:overworld",LodestonePos:{X:0,Y:64,Z:0}}}}]}}

Cannot Reproduce

Ohtacaro

2021-04-16, 07:33 PM

2021-08-19, 01:07 AM

2021-08-19, 01:07 AM

1

1

Unconfirmed

(Unassigned)

1.16.5, 21w15a

-