Moxlib
A library of many helpful functions, tags and predicates, to improve the datapack developer's day.
截图
介绍
Moxlib
Moxvallix’s Datapack Creation Library
Moxlib aims to make Datapack creation fun and enjoyable.
With a predictable API, and a focus on data driven functionality, Moxlib serves
as an excellent foundation to any Datapack project.
Moxlib aims to run as little as possible on the tick function. Most functions
in the pack only run when they are called.
Another focus of the pack is instantaneous functions. Most of the functions
in the pack have been designed to run in a single tick, and do not use schedules,
or other timer based methods.
Moxlib is licensed under the GNU LGPL, meaning you are free to use it in your
own Datapacks, themselves under any license, but any changes you make to Moxlib must
be released under the terms of the LGPL. See LICENSE.md for full license.
Suggestions and contributions welcomed!
The API
Conventions
Any function outside of the moxlib:api folder is considered private, and is not supported.
Functions that take in data storage as an input, will read and write data at the same path
you would use to call the function.
Eg. /function moxlib:api/helpers/block/get writes to /data get storage moxlib:api/helpers/block/get
However, the test and tui modules are an exception, using more semantic language for their
respective tasks. See their individual documentations.
Functions will usually take in a target. Think of this as the main input. It is the piece of
data that the function will manipulate. Functions will occasionally ask for other data as well.
Functions, if they output anything, will write to output. Optionally, they might also record
their success to a success tag, although not all functions implement this.
Some functions and modules are marked as “experimental”. These require Moxlib Exp
to function.
Modules
Helpers
The helpers module contains small, miscellaneous, but helpful functions.
These functions are too small and specific to warrant a module of their own.
Data
The data module contains functions specifically for working with arrays of
NBT data.
Test
The test module contains functions for testing other functions.
Currently, it can only test to see that a function returned the correct value.
TUI
The TUI module allows for easy creation of data driven TUIs.
Math
The Math module provides some helpful math functions.
Player
The Player module exposes some helpful information about the player.
String
The String module provides functions to manipulate strings.
Dimension
Moxlib provides a dimension for storing and accessing blocks. (Requires Moxlib Exp)
常见问题
Moxlib 支持哪些 Minecraft 版本?
Moxlib 支持 Minecraft Java 版 1.19–1.21,共 13 个版本。下载时注意选择和你游戏版本一致的文件。
Moxlib 怎么安装?
新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。
GMDU 的其他作品
查看全部 →
Code of Copper
Programmable Copper Golems. Fully text-based programming language in a vanilla datapack.
Regex Library Datapack
A datapack library that provides a way to match substrings using regular expressions.
GolemScript
A programming language in a vanilla datapack.
Observer
Unit testing datapack for unit testing datapacks
评论
登录后评论和评分