Skip to content

Editing

VoidLeech edited this page Jan 25, 2025 · 2 revisions

Editing the data pack

We recommend making a new datapack that overrides functions/predicates and adds to tags rather than editing the data pack file itself if you just want to make your stuff work with the pack; see the Minecraft Wiki on Tag Json Format. Note that in 1.21.1, the file paths for tags got changed from what had been the standard, so the wiki might have the wrong path depending on the version you're wanting to edit. You can always open up the pack or pop into the respective branch to see what the proper path is. If you want to PR then clone and edit all you want.

Supporting new blocks

Blocks that have to count as path are tagged paths_are_roads:paths. It is recommended that you copy your changes/additions to the item tag of the same name as well, so you can search for which blocks count as paths in-game.
Blocks that have to count as path markers are tagged paths_are_roads:path_markers. There is an item tag for these as well.

Supporting new entities

Entities that will be sped up by paths without question must be tagged paths_are_roads:unconditional_user. Other entities have requirements and so are tagged paths_are_roads:X, and adding an arbitrary entity to these will generally do nothing for them, as the conditions are specific to how the saddling, taming or riding otherwise is implemented. For example, with the paths_are_roads:needs_saddle/bool_issaddled tag, the entity's nbt data must contain a bool named IsSaddled set to true. The saddle/taming subtags all work like this, and you can easily figure out in which category a mob fits using /data get entity.

Adding new conditions (like the mod specific ones for the paths_are_roads:unique_requirement/X tags) is possible but will require copying and overriding the paths_are_roads:check_if_should_check_for_path function, adding your functionality to it, and adding the tag for your new condition to the paths_are_roads:path_user tag.

It is recommended to add the spawn egg (or another item uniquely identifying the entity) of any affected entities to a paths_are_roads:path_user/X tag, replacing X with the source (mod id) of the entity, so a user can search for affected mobs. The existing tags identify exactly which mod adds the (ability to ride) an entity.

Changing the speed boost

The speed boost is defined in the paths_are_roads:increase_speed function. The number of interest is the 0.4 on line 3, and corresponds to 40% extra speed.

Clone this wiki locally