Trying to spawn loot in a function that takes a bit to spawn (exploration maps).
When running the function directly, I get the specified loot (rather quickly, probably within a few ticks).
When scheduling the function, I instead sometimes get a weird map that can spawn more maps when right clicked. I believe this is because the map was not generated within 1 tick.
Easiest way to reproduce is with endcity maps in the end with the following function:
loot give @s loot halemaster:explore/map_endcity
And loot table:
{
"type": "minecraft:generic",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:map",
"weight": 5,
"functions": [
{
"function": "minecraft:exploration_map",
"destination": "EndCity",
"decoration": "target_x",
"zoom": 1,
"skip_existing_chunks": false
},
{
"function": "minecraft:set_nbt",
"tag": "{\"display\": {\"MapColor\": 16711935},\"to_explore_map\": map_endcity}"
},
{
"function": "minecraft:set_name",
"name": "End City Explorer Map"
}
]
}
]
}
]
}
And then you can do the following:
/function <funcName>
and
/schedule function <funcName> 1s
Attachments
Comments 2
A duplicate of MC-218156. And that is because of there is a optional "search_radius" value in exploration_map item modifer, default searching 50 chunks of radius.
This issue should be closed.
Attached screenshot: Me trying the same function on a command block being powered by observer clock. The command worked as expected and I got the right map.