mojira.dev
MC-248852

Exploration map not working in barter loot table

Since there is currently no item or way to find nether fortesses (other than wandering around and relying on luck), I wanted to add an exploration map to the nearest nether fortress into the loot table of piglin bartering... except it fails to validate whenever I try.

 

The EXACT same block of code works fine in literally every other type of loot table (fishing, gift, chest, entity, even block), but does not work in barter loot tables.

Attachments

Comments 10

Could you upload the datapack, so that the bug can easily be repoduced?

Um sure, or I'll upload the loot table specifically. It can also be easily recreated by adding an exploration map to any other loot table in the game, then naming it piglin_bartering. This is what I am using

What else do you need?

"fails to validate" so you get an error in the log? Might be wise to provide that in that case.

sure?

 
Found validation problem in {minecraft:gameplay/piglin_bartering}.pools[0].entries[3].functions[0]: Parameters [<parameter minecraft:origin>] are not provided in this context
 
Found validation problem in {minecraft:gameplay/piglin_bartering}.pools[0].entries[4].functions[0]: Parameters [<parameter minecraft:origin>] are not provided in this context
 
Im assuming 3 and 4 are the two maps

Wait, shouldn't the ID be filled_map?

I dont know ill try it, but that exact same block of code works as expected in every other type of loot table, except for piglin trades.

 

Edit, that didnt work either

Hmm, seems barthering type loot tables have no "origin" context, unlike trading and container (at least).
Yeah, Mojang needs to correct it by setting it to the piglin who triggers is for this to work.

Can confirm in 1.20.2 / 23w41a:

[media]

[media]

Datapack used:

[media]

aceplante

(Unassigned)

Community Consensus

Platform

Normal

Data Packs

1.18.2, 23w41a

Retrieved