Minecraft Data Packs / Game Mechanic

BarryMeyers Traveler Maps

  • check_circle Functions
  • check_circle Loot Tables
  • check_circle Predicates
  • 8,302 views, 9 today
  • 706 downloads, 0 today
  • 40
  • 42
  • 12
BarryMeyers's Avatar BarryMeyers
Level 24 : Expert Explorer
8
[​FR] Si vous vouliez ce data pack en français, je le tranduirais pour vous en me demandant.
[​EO] Se vi volus ĉi tiun data pack en esperanto, mi ĝin tradukus por vi tiam, kiam vi min demandus.

What is this?

Have you ever wanted to explore, but have wandered for hours without finding anything particularly useful? Do you want to be an explorer, but want some guidance, a direction? Now, wandering traders are willing to sell you information, but at a steep price. After all, information is never cheap.

Wandering traders will have a 33% chance to sell you an explorer map or a very special compass for 20 emeralds, leading you to the following structures in regions that nobody has explored yet:
  • Illager Mansions (1%)
  • Illager Outposts (5%)
  • Witch Huts (15%)
  • Desert Temples (10%)
  • Jungle Temples (10%)
  • Igloos (14%)
  • Ocean Monuments (9%)
  • Ocean Ruins (14%)
  • Villages (22%)
Underground structures are very common and usually nearby. Using a map to find them is a bit too easy, in my opinion. Shipwrecks are not an option, as dolphins already reveal their locations when fed. If you really want maps to these structures, you would have to add in the explorer map loot in the loot table JSON file yourself.

The chances of each structure map are based on my judgment of how worthy the loot of each structure are worth the cost of the map.

Please unzip the downloaded file. Inside are two folders. One contains the versions of the data pack that are NOT compatible with Wandering Regional Traders, while the other folder contains versions that are. The versions that are NOT compatible with Regional Wandering Trader has less strict load order requirements. If you want to use the compatible version, check the Compatibility section for order requirements.

Inside each folder are the classic version and the optimised version. For a smoother experience, I recommend the classic version. The optimised version has the least load on your computer, but is not smooth to use. If the trader would sell you a map in the optimised version, you would need to interact with it TWICE in order to show the trade. This is a consequence of the optimisation techniques. I would not recommend that version, but it exists for those who insist anyways.

After selecting a version, simply place the zip file of the chosen version into the data pack folder of your world. You do not need to unzip the chosen file.

Warnings
This data pack cannot be used on versions earlier than 1.15, as the game does not support predicates then.

Beware, due to the very nature of explorer maps, your game may freeze, albeit very slightly, upon the spawning of a wandering trader who has a map for sale or when a compass is converted in the nether. This freezing is unavoidable, since the game has to generate the landscape and structure in order to make a map. Even on my slow computer, the freezing only lasts a few seconds and no more. This is just a warning that one should heed.

A small known "half-bug" is that, sometimes, maps and compasses may overlap in destination with previous purchases. In other words, one map bought at one time and another bought at a different time may both lead to the same place, resulting in wasted emeralds. This is due to the generation of explorer maps. If users bought a map/compass, but refrain from exploring the destination, the destination will not be considered explored. Thus, maps and compasses would still point to the closest unexplored area. This is not really a bug, but more so a feature of explorer maps. I cannot resolve this half-issue, anyways. Just avoid stockpiling maps and compasses and actually use them to explore.

There is also a very rare bug. Sometimes, if users buy a map, it may result in a blank, unusable map. This happens when no destination structure is found at all, such as when the user has used world generation settings like single biome worlds, which prevent certain structures from spawning at all. This is not an issue that I can resolve.

Uninstall
To uninstall, please run the command /function bm_travelermaps:uninstall.


Compatibility
This data pack prepends a map to the beginning of the list of trades of the wandering trader. Thus, it is compatible with all other data packs that change the trader's base trades, appends, or prepends other trades to the trade list. Remember to load this data pack AFTER any data packs that change the trader's trades, rather than append/prepend trades.

However, it is not compatible by default with Regional Wandering Traders Data Pack, as their code structure overwrites the trader's trades multiple times before stopping.

For the versions that are compatible with the Regional Wandering Traders Data Pack, please load this data pack after Regional Wandering Traders. Do not load any other data packs that append nor prepend any new trades to the wandering trader before this data pack. You must load those after this data pack. The creation of explorer maps is very intensive and complicated, so this data pack needs to reserve a specific spot in the trader's trade data in order to copy the map data there. Loading other data packs that append or prepend trades before this data pack would disrupt the copying.


Technical Details (Spoilers!)
When a wandering trader is eligible to sell maps, there is a 75% chance of the loot being a map, with the probabilities for each structure listed in the list above. A map is generated and copied into the trader's list of trades. This always causes the game to freeze, due to the how explorer maps are generated and cannot be changed. The remaining 25% is a chance for loot to be a Mysterious Compass, which would lead users to a nearby ruined portal. An explorer map is generated for a ruined portal, then copied into the compass data, allowing the lodestone compass to be usable. Once in the nether at any time, the Mysterious Compass will shake and fizzle (with your imagination), converting into either a Wither or Piglin Compass, leading users to either a fortress or a bastion remnant. Both are equally likely.

Compasses still use explorer map generation to generate the destination coordinates, thus causing freezing. I tried various experimental methods of triangulation with commands, which does not cause the freezing of explorer maps and is extremely fast to calculate. However, Minecraft's scoreboard has limited precision. This causes the triangulation to become inaccurate for destinations at either very long distance away (>1500 blocks) or at very short range (<20 blocks). I tried my hardest to implement a non-freezing algorithm to lead users to nether structures, but the limited precision of the in-game mathematical commands is the main reason why faster, more user-friendly structure-finding algorithms were scrapped. I am sorry that this data pack has to rely on the slow explorer map generation in the end. Minecraft's commands are inefficient and limited.

The optimised version uses a hidden advancement which triggers the functions to enable the wandering trader to sell maps upon the player interacting with it. However, due to the limitation of minecraft advancements, the functions trigger one tick after when the advancement is awarded. Thus, the game would show players the trader's old trades without the option to trade the map visible. However, the trader is able to sell the map, but the opened menu would be outdated. Thus, players using the optimised version must interact with the trader a second time to see the trade.

The data pack reserves the very first trading slot as the location to which to copy the map data. However, Regional Wandering Traders overwrites that slot multiple times before stopping. For compatibility, instead of copying the map data to the first trading slot, the functions instead copies the map data to the 7th slot to avoid overwriting.
CreditThanks to Expert Coder and vdvman1 from the Minecraft Commands Discord Server and CerbonXD from Planet Minecraft for providing me help in making this data pack!
CompatibilityMinecraft 1.15
toMinecraft 1.18
Tags

4 Update Logs

Final Update : by BarryMeyers 11/18/2022 3:09:47 amNov 18th, 2022

Notable Changes:
  • Updated the lore description of the maps.
  • Changed the conversion sound of the Mysterious Compass into another louder sound.
  • More optimisations. Added fully-optimised versions of this data pack as a download option. It is different from the classic version.
  • Added compatibility with Regional Wandering Traders data pack as a download option.
This data pack is now complete. I will no longer update this data pack nor make any more new ones. I will soon graduate university and have lost interest in making data packs.
LOAD MORE LOGS

Create an account or sign in to comment.

1
02/23/2022 9:43 pm
Level 11 : Journeyman Network
peA_sh0ter
peA_sh0ter's Avatar
Hello! I am making a structure data, and would love it if you could help me make these kinds of maps! They are amazing and could really help me make it better, if you are willing to help me. Have a good day!







P.S Regional Wandering Traders compatibility would be great!
1
03/13/2022 11:24 pm
Level 24 : Expert Explorer
BarryMeyers
BarryMeyers's Avatar
Hello there! Sorry for the late reply. I would love to collaborate with you once I am able. Send me a DM on Planet Minecraft and we can talk. I would prefer communication over Discord, so DM me for the info.

Currently, it is midterm season for me at Uni, so I am unable to update the Datapack.The code for the compatibility with Regional Wandering Traders and the final optimisation update is done, but I have yet to fully test them. Once I have the time to properly test, optimise, and debug the code, then I will release the final update to this data pack.

I apologise for the delays!
1
01/06/2022 11:54 pm
Level 3 : Apprentice Explorer
MiziraBuildz
MiziraBuildz's Avatar
Hello there, I’m trying to really spruce up my play through of my world, and I hate having to use some seed website to find structures.
However, I see that this would conflict with my current use of the Regional Wandering Traders datapack. Your description states that this is available only via request, so is that still available as an option?
2
01/24/2022 1:58 pm
Level 24 : Expert Explorer
BarryMeyers
BarryMeyers's Avatar
My apologies for the late reply. I am currently busy with university. However, your request is noted. Once I have the free time to update the data pack (I have another optimisation update planned), I will change the data pack to be compatible with that. Do not worry, I am busy, but not dead.
1
01/26/2022 2:50 pm
Level 3 : Apprentice Explorer
MiziraBuildz
MiziraBuildz's Avatar
Perfectly understandable. No worries, take as long as you need to!
1
09/27/2021 8:22 am
Level 24 : Expert Modder
CerbonXD
CerbonXD's Avatar
Berry, i made a datapack like your datapack but only to find Ruined portals. I managed to fix the freezing im my datapack simple changing the zoom of the map from 4 to 2.

I had some problems with my datapack and i would like to know if you can help me.

1 - My map for some reason don't locate the closest structure.

2 - If i'm at x = 50000 and z = 4000 for example the map will still locate the closest structure from spawn. ( That is a problem in your datapack too).



Just another thing, why don't you get rid of the "search_radius" like that i guess you will not have the problem of the map come blank.
1
09/27/2021 2:43 pmhistory
Level 24 : Expert Explorer
BarryMeyers
BarryMeyers's Avatar
Both questions are due to the way exploration maps are generated. The game would begin to generate the world in a spiral, starting from the spawn, gradually increasing the radius until the specific structure is found. Then, the game would generate the map. That is why the maps always generate the closest structure from spawn, rather than from the player. For my data pack, this is not an issue, as the intention is to sell maps to unexplored areas, rather than searching for nearby structures. I hope this explanation helps. It is very inefficient, in my opinion, compared to the /locate command, which just looks for the coordinates of the structures.

Nonetheless, you are lucky that I still saved the data pack files for my scrapped triangulation function. In testing, it managed to successfully locate the nearest ruined portal nearly instantly. However, it cannot be used to generate a map, because the exploration map generation is independent. Nonetheless, you can use this function with a compass to lead players to nearby ruined portals, which was what I did before scrapping the function. If this function satisfies your needs, feel free to message me and I will give you my scrapped function.

As for your optimisation suggestions, I will implement them right now and credit you. Thank you for the suggestions. :)
1
09/27/2021 8:25 pm
Level 24 : Expert Modder
CerbonXD
CerbonXD's Avatar
You're welcome. I would like to see this triangulation function, if you can send me would be good.
1
09/16/2021 4:26 pmhistory
Level 84 : Elite Wizard
McMeddon
McMeddon's Avatar
this is awesome!
2
09/16/2021 5:56 pm
Level 24 : Expert Explorer
BarryMeyers
BarryMeyers's Avatar
I am glad that you enjoy it. Any comments on it? You can expect the full completed data pack by the end of this weekend.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome