• 7/29/21 7:01 am
- 1.9k views • 0 today
- save_alt 26 downloads
- Compatibility
- Minecraft 1.17
- to version
- Minecraft 1.18
- Changes include
- Advancements
- Functions
2
This is a utility datapack designed to be used by other datapacks. This datapack requires Initia Nova's Relative Position Utility Datapack Version 1.1.0 or higher to be installed.
This datapack generates forceloaded dimension markers for the default minecraft dimensions, and includes support for custom dimensions. This datapack also includes a forceload removal function to safely remove chunk forceloads without interfering with other compatible datapacks.
Version:
Run "/function in.forceload:api/version" to get the current datapack version.
#version.major in.fl will be set to the major version
#version.minor in.fl will be set to the minor version
#version.patch in.fl will be set to the patch version
After calling this function, use the following lines of code to cleanup the scoreboard.
scoreboard players reset #version.major in.fl
scoreboard players reset #version.minor in.fl
scoreboard players reset #version.patch in.fl
Admin:
Admins receive error, diagnostic, and uninstall messages.
Use the following line of code to add an admin.
execute as <player name> run function in.forceload:_ui/add_admin
Use the following line of code to remove an admin.
execute as <player name> run function in.forceload:_ui/remove_admin
Forceload Removal:
To safely remove a forceload from a chunk, run "/function in.forceload:api/remove" at the given chunk.
The forceload will only be removed if there are no entities within the chunk from y=-2032 to y=2032 that have the "global.forceload" tag.
To prevent other datapacks from removing your forceloads using this method, tag an entity within the chunk build area with the "global.forceload" tag.
Configuration Settings:
#config.timeout in.fl
Set to 200 ticks by default.
This setting defines...
...how long the loading function will attempt to load dimension markers. An error will be displayed to admins if the loading function doesn't succeed before the timeout is finished.
...how long the forceload removal function will run after being called.
...how long the uninstall function will take to finish forceload removal.
If this setting is too low, loading and forceload removal functions may quit before completion.
#config.delay in.fl
Set to 5 ticks by default.
This setting defines...
...how long the loading function will attempt to clean up dimension markers after the first marker is located within a dimension.
...how long the removal function will wait after detecting a removal marker before checking for entities with the "global.forceload" tag.
If this setting is too low, entities may not all be loaded within a chunk before checks are made.
This setting should always be greater than 1, and less than #config.timeout in.fl
#config.diagnostics in.fl
Set to 10 entries by default.
This setting defines how many entries are stored in the diagnostics log. FIFO.
in:storage forceload.config.dimensions[]
This stores the dimension marker chunk locations for each dimension. Manually modifying this may affect other datapacks.
Support for Custom Dimensions:
Custom dimensions can be added to the loading function using the following steps.
Append {dimension:"<your namespaced dimension>",chunk:[321744,184246]} onto in:storage forceload.config.dimensions.
Copy the functions located at in.forceload/functions/overworld into your datapack, and modify them to your namespaced dimension.
Copy in.forceload/functions/rp_tag into your datapack, and modify it to your namespaced dimension.
Add the relevant functions to the tags located in in.forceload/tags/functions.
Add your rp_tag function to the tag located in in.relative_position/tags/functions.
This datapack generates forceloaded dimension markers for the default minecraft dimensions, and includes support for custom dimensions. This datapack also includes a forceload removal function to safely remove chunk forceloads without interfering with other compatible datapacks.
Version:
Run "/function in.forceload:api/version" to get the current datapack version.
#version.major in.fl will be set to the major version
#version.minor in.fl will be set to the minor version
#version.patch in.fl will be set to the patch version
After calling this function, use the following lines of code to cleanup the scoreboard.
scoreboard players reset #version.major in.fl
scoreboard players reset #version.minor in.fl
scoreboard players reset #version.patch in.fl
Admin:
Admins receive error, diagnostic, and uninstall messages.
Use the following line of code to add an admin.
execute as <player name> run function in.forceload:_ui/add_admin
Use the following line of code to remove an admin.
execute as <player name> run function in.forceload:_ui/remove_admin
Forceload Removal:
To safely remove a forceload from a chunk, run "/function in.forceload:api/remove" at the given chunk.
The forceload will only be removed if there are no entities within the chunk from y=-2032 to y=2032 that have the "global.forceload" tag.
To prevent other datapacks from removing your forceloads using this method, tag an entity within the chunk build area with the "global.forceload" tag.
Configuration Settings:
#config.timeout in.fl
Set to 200 ticks by default.
This setting defines...
...how long the loading function will attempt to load dimension markers. An error will be displayed to admins if the loading function doesn't succeed before the timeout is finished.
...how long the forceload removal function will run after being called.
...how long the uninstall function will take to finish forceload removal.
If this setting is too low, loading and forceload removal functions may quit before completion.
#config.delay in.fl
Set to 5 ticks by default.
This setting defines...
...how long the loading function will attempt to clean up dimension markers after the first marker is located within a dimension.
...how long the removal function will wait after detecting a removal marker before checking for entities with the "global.forceload" tag.
If this setting is too low, entities may not all be loaded within a chunk before checks are made.
This setting should always be greater than 1, and less than #config.timeout in.fl
#config.diagnostics in.fl
Set to 10 entries by default.
This setting defines how many entries are stored in the diagnostics log. FIFO.
in:storage forceload.config.dimensions[]
This stores the dimension marker chunk locations for each dimension. Manually modifying this may affect other datapacks.
Support for Custom Dimensions:
Custom dimensions can be added to the loading function using the following steps.
Append {dimension:"<your namespaced dimension>",chunk:[321744,184246]} onto in:storage forceload.config.dimensions.
Copy the functions located at in.forceload/functions/overworld into your datapack, and modify them to your namespaced dimension.
Copy in.forceload/functions/rp_tag into your datapack, and modify it to your namespaced dimension.
Add the relevant functions to the tags located in in.forceload/tags/functions.
Add your rp_tag function to the tag located in in.relative_position/tags/functions.
More like this
5234109
119




Have something to say?