Moxlib
Moxvallix 的数据包创建库
Moxlib 旨在让数据包的创作变得有趣且令人愉悦。
凭借可预测的 API 和对数据驱动功能的专注,Moxlib 成为任何数据包项目的优秀基础。
Moxlib 力求尽可能少地在 tick 函数上运行。数据包中的大多数函数仅在被调用时才会执行。
数据包的另一个重点是即时函数。数据包中的大多数函数都设计为在单个 tick 内运行,不使用调度器或其他基于计时器的方法。
Moxlib 根据 GNU LGPL 许可协议授权,这意味着您可以自由地在自己的数据包中使用它(您的数据包可采用任何许可证),但您对 Moxlib 所做的任何更改都必须根据 LGPL 条款发布。请参阅 LICENSE.md 获取完整许可信息。
欢迎提供建议和贡献!
API
约定
moxlib:api 文件夹之外的任何函数均被视为私有,且不受支持。
以数据存储作为输入的函数,将在与您调用函数时相同的路径下读取和写入数据。
例如:/function moxlib:api/helpers/block/get 会向 /data get storage moxlib:api/helpers/block/get 写入数据。
然而,test 和 tui 模块是例外情况,它们使用更具语义化的语言来处理各自的任务。请参阅其各自的文档。
函数通常会接收一个 target(目标)。可以将其视为主输入,即函数将要操作的数据片段。函数偶尔也会请求其他数据。
如果函数有输出,它们会将结果写入 output。此外,它们可能还会将成功状态记录到 success 标签中,尽管并非所有函数都实现了此功能。
部分函数和模块标记为“实验性”。这些需要 Moxlib Exp 才能正常运行。
模块
Helpers(辅助工具)
Helpers 模块包含一些小型、杂项但有用的函数。
这些函数过于细小和特定,不足以构成单独的模块。
Data(数据)
Data 模块包含专门用于处理 NBT 数据数组的函数。
Test(测试)
Test 模块包含用于测试其他函数的函数。
目前,它只能测试函数是否返回了正确的值。
TUI(文本用户界面)
TUI 模块允许轻松创建数据驱动的文本用户界面。
Math(数学)
Math 模块提供一些有用的数学函数。
Player(玩家)
Player 模块暴露了一些关于玩家的有用信息。
String(字符串)
String 模块提供用于操作字符串的函数。
Dimension(维度)
Moxlib 提供了一个维度,用于存储和访问方块。(需要 Moxlib Exp)
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
下载 Moxlib
下载 Moxlib
下载 Moxlib
下载 Moxlib
下载 Moxlib
下载 Moxlib
下载 Moxlib
下载 Moxlib
下载 Moxlib
[0.5.13] - 2024-06-19
已更改
- 整合包现在需要 Minecraft 1.21
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包
一个 Minecraft 光线投射库,能够精确检测玩家正在查看的方块,包括像台阶和楼梯这样的特殊方块形状。
数据包
> Fokus / Focus API - CoffeeG 的数据包/模组/插件库。
数据包
这是《Minecraft》的一款模组,旨在将游戏体验转变为更接近现实生活的样子。它包含了诸如需求管理(饥饿、健康、能量)、经济系统、工作以及与其他玩家互动的功能。
数据包
添加 Better Villages 与 Immersive Engineering 之间的兼容性
数据包
仅供我使用的整合包中一些自定义特效的小库。
数据包
性能极佳的 AFK/挂机检测 · 玩家在不移动鼠标 3 分钟后进入 AFK 状态(可配置)· 可通过丰富的插件进行扩展!
评论 0
登录后参与评分
还没有评论,来抢沙发吧