
Server Utilities
Features a number of utilities for data pack creators including a player ID system, function tags for detecting server events, inventory clearing and restoring system, systems for maintaining player data across username changes, and more!
Список изменений
Changes
- Now compatible with 1.21.5.
- Moved all internal functions to an
internalfolder, so that player-accessible functions can be more easily accessed. - Added text fixing macros to update text components stored in NBT.
Text-fixing macros
Minecraft's text component format received a considerable update in 1.21.5. Minecraft's "Data Fixer-Upper" is generally useful for updating NBT fields that the game knows to interpret as text components. But if you have stored JSON text components in custom NBT locations, these will not be updated automatically.
Therefore, I have developed function macros (available only on 1.21.5+) to fix older stored text.
server_utils:fix_text/block
Updates JSON text components in block NBT. It runs at the current block location (~ ~ ~).
Usage: function server_utils:fix_text/block {path:"foo.bar"}
Where foo.bar is the NBT path.
server_utils:fix_text/entity
Updates JSON text components in entity NBT. It runs as the current entity (@s).
Usage: function server_utils:fix_text/entity {path:"foo.bar"}
Where foo.bar is the NBT path.
server_utils:fix_text/storage
Updates JSON text components in storage NBT.
Usage: function server_utils:fix_text/storage {path:"foo.bar",storage:"namespaced:id"}
Where foo.bar is the NBT path and namespaced:id is the ID of a command storage.
Issues
While there was an attempt, I ultimately decided not to properly support snapshot 25w02a. This should not affect most players.