请注意,此描述针对的是最新模组版本,旧版本可能已不再维护!!!
一个完全在服务端运行的模组,新增命令等功能!
数据包制作者或地图制作者可能会觉得很有用
命令
Eval
/eval <表达式>
-
允许你输入任意数学表达式,命令将计算并返回结果
-
支持部分函数:
min(n1,n2,...)、avg(n1,n2,...)、len(n1,n2,...)、abs(n1,n2,...)、floor(n1,n2,...)等 -
你可以在表达式中使用分数,格式如下:
<name>?<objective> -
你可以在表达式中使用存储数据,格式如下:
$storage$path$ -
你可以使用命令
position和rotation上下文,配合px、py、pz以及rx、ry
所有函数和变量的完整列表
min(n1, n2, ...)
max(n1, n2, ...)
sum(n1, n2, ...)
avg(n1, n2, ...)
len(n1, n2, ...)
abs(v)
floor(v)
ceil(v)
round(v)
sqrt(v)
pow(base, exp)
sin(rad)
cos(rad)
tan(rad)
log(v, base)
ln(v)
clamp(v, min, max)
lerp(a, b, t)
smoothstep(edge0, edge1, v)
map(v, inMin, inMax, outMin, outMax)
rand(min, max)
rand(min, max, seed)
dot(x1, y1, z1, x2, y2, z2)
euler_dot(pitch1, yaw1, pitch2, yaw2)
"pi"
"tau"
"e"
"rx"
"ry"
"px"
"py'
"pz"
字符串
/string <set|append|concat|tojson|length> <...>
- 允许你通过存储来操作字符串
此命令为新增功能,目前仍在测试中,其语法或实现方式未来可能会发生变化。
Raycast(射线检测)
/raycast <step count> <step length> run <command>
- 召唤一个带有标签 "BUC.raycast" 的标记实体
- 将其向前移动 <step length> 的距离,共执行 <step count> 次
- 在每一步执行 <command>
Distance(距离)
/distance <origin pos> <target pos> <scale>
- 返回命令执行位置与目标位置之间的距离乘以缩放系数后的结果
Check(检查)
/check <blocks|intersect|collision>
- /check blocks <distance> <blockstate>
- /check intersection <selector>
- /check collision <entity> <block filter>
/check blocks 返回在立方体区域内找到的匹配方块数量
/check intersection 返回选中的实体中有多少个碰撞箱与命令执行位置相交
/check collision 返回该实体相交的方块数量
Motion(运动)
/motion <set/add> <selector> <strength> <with|to|at>
- 沿命令执行方向施加运动速度
with允许输入三维方向向量to允许输入三维位置坐标at允许输入二维旋转角度
/motion multiply <target> <factor> <axes>
- 将目标的运动速度乘以指定系数,并仅作用于指定的轴
治疗
/heal <选择器> <数量>
- 为目标实体恢复指定量的生命值
Ignite
/ignite <设置/添加> <持续时间> <选择器>
- 使选中的实体在指定时间内着火
Entitify
/entitify <位置> <方块显示实体/掉落物方块> [保留/移除] [标签(s)]
- 将目标位置的方块转换为实体
- 可以添加多个标签:/entitify ~ ~ ~ block_display keep tag","another tag
(感谢 json 格式支持:
Tags:["+ <tag> +"])
重复执行
/repeat <数量> <延迟> run <命令>
- 执行 <命令> <数量> 次
- 在每次执行前(包括第一次)等待 <延迟> 刻
多命令
/multicommand <commands>
- 按顺序执行列出的命令
- 命令必须包裹在
<c></c>标签中,否则解析器将无法识别它们- 示例:
/multicommand <c:你可以像这样添加注释>say 1</c> <c>say 2</c:注释也可以放在末尾>
- 示例:
执行扩展功能
...如果文本
... 如果文本 <输入> <运算符> <目标> ...
- 文本操作
- 除此之外没有太多其他内容
完整运算符列表
endswith(以...结尾)
startswith(以...开头)
contains(包含)
exact(精确匹配)
ignorecase(忽略大小写)
matches(正则匹配)
...如果 计算结果
... 如果
eval <表达式>...
- 计算表达式的值
- 如果结果小于 0,则测试失败;如果大于 0,则测试成功
- 允许使用语句,就像在
/eval中一样- 示例:
/eval 1=0将返回 0,因为该语句为假 - 示例:
/eval 0<=-10 || 1=1将返回 1,这是因为 OR(或)运算符以及第二个为真的语句
- 示例:
...位于 closest_ground 上方
... 位于 closest_ground 上方 <range> ...
- 将命令的位置上下文吸附到范围内最近的朝上的表面
- 不使用高度图,因此可以在表面下方工作
...位于 closest_ground_down 上方
... positioned over closest_ground_down <range> ...
- 将命令的位置上下文吸附到前一个位置上下文下方指定范围内的最近朝上表面
- 不使用高度图,因此可以在表面下方工作
...位于 closest_view 上方
... positioned over closest_view <filter> <range> ...
- 执行射线投射,并将位置上下文更改为符合 <filter> 类型的首个方块碰撞点
- 使用 "*" 可禁用过滤器
...位于 closest_view_entity 上方
... 位于
closest_view_entity<targets> <range> <align> ...
- 执行射线投射,并将位置上下文更改为与选择器匹配的第一个碰撞实体
- 如果
<align>为 true,则使用实体的确切位置;如果为 false,则使用碰撞点
- 该模组还添加了一个名为
PlayerName的玩家 NBT 标签,其中仅包含玩家的名称
未来将添加更多功能,欢迎通过 GitHub Issues 提出建议
请注意,本描述针对的是模组的最新版本,旧版本可能不再维护!!!
我知道我在开头也说过同样的话——我又不是 NPC
keep in mind, the description is of the latest mod version, older versions might not be maintained!!!
fully serverside mod adding new commands and more!
datapackers or mapmakers may find this useful
commands
Eval
/eval <expression>
- allows you to input any mathematical expression, the command will calculate it and return its result
- has support for some functions:
min(n1,n2,...),avg(n1,n2,...),len(n1,n2,...),abs(n1,n2,...),floor(n1,n2,...), etc... - you can use scores in expressions like so:
<name>?<objective> - you can use storages in expressions like so:
$storage$path$ - you can use the command position and rotation context with
pxpypzandrxry
full list of functions and variables
min(n1, n2, ...)
max(n1, n2, ...)
sum(n1, n2, ...)
avg(n1, n2, ...)
len(n1, n2, ...)
abs(v)
floor(v)
ceil(v)
round(v)
sqrt(v)
pow(base, exp)
sin(rad)
cos(rad)
tan(rad)
log(v, base)
ln(v)
clamp(v, min, max)
lerp(a, b, t)
smoothstep(edge0, edge1, v)
map(v, inMin, inMax, outMin, outMax)
rand(min, max)
rand(min, max, seed)
dot(x1, y1, z1, x2, y2, z2)
euler_dot(pitch1, yaw1, pitch2, yaw2)
"pi"
"tau"
"e"
"rx"
"ry"
"px"
"py'
"pz"
String
/string <set|append|concat|tojson|length> <...>
- allows you to manipulate strings through storages
this command is new, and is currently being tested for bugs, syntax or implementation may change in the future
Raycast
/raycast <step count> <step length> run <command>
- summons a marker entity with the tag "BUC.raycast"
- moves it forward by <step length>, <step count> times
- runs <command> at each step
Distance
/distance <origin pos> <target pos> <scale>
- returns the distance between the command pos and the target position multiplied by the scale
Check
/check <blocks|intersect|collision>
- /check blocks <distance> <blockstate>
- /check intersection <selector>
- /check collision <entity> <block filter>
/check blocks returns how many matching blocks it found in a cuboid area
/check intersection returns how many of the selected entities hitboxes are intersecting with the position the command is executed at
/check collision returns how many blocks the entity is intersecting with
Motion
/motion <set/add> <selector> <strength> <with|to|at>
- applies motion in the direction of the executed command
withallows a 3d direction inputtoallows a 3d position inputatallows a 2d rotation input
/motion multiply <target> <factor> <axes>
- multiplies the motion of the target by the factor, masked to the set axes
Heal
/heal <selector> <amount>
- heals entities by set amount of health
Ignite
/ignite <set/add> <duration> <selector>
- sets the selected entities on fire for the specified duration
Entitify
/entitify <pos> <block_display/falling_block> [keep/remove] [tag(s)]
- turns the block at the target pos into an entity
- multiple tags can be added: /entitify ~ ~ ~ block_display keep tag","another tag
(thanks to json formatting:
Tags:["+ <tag> +"])
Repeat
/repeat <amount> <delay> run <command>
- runs <command> <amount> times
- waits <delay> ticks before each execution, including the first one
MultiCommand
/multicommand <commands>
- runs listed commands in order
- commands must be encased in <c></c> tags, otherwise the parser wont recognize them
- example:
/multicommand <c:you can do comments like this>say 1</c> <c>say 2</c:comments can be at the end too>
- example:
Execute expansions
...if text
... if text <inрut> <operator> <target> ...
- text operations
- theres not much else to it
full list of operators
endswith
startswith
contains
exact
ignorecase
matches
...if eval
... if eval <expression> ...
- evaluates the expression
- if the result is < 0 test fails, if > 0 test succeeds
- statements are allowed, as they are in /eval
- example:
/eval 1=0would return 0, since the statement is false - example:
/eval 0<=-10 || 1=1would return 1, because of the OR operator, and the second, true, statement
- example:
...positioned over closest_ground
... positioned over closest_ground <range> ...
- snaps the commands position context to the closest up-facing surface within range
- doesnt use heightmaps, meaning works under surfaces
...positioned over closest_ground_down
... positioned over closest_ground_down <range> ...
- snaps the commands position context to the closest up-facing surface within range below the previous position context
- doesnt use heightmaps, meaning works under surfaces
...positioned over closest_view
... positioned over closest_view <filter> <range> ...
- performs a raycast and changes the position context to the first block collision of type conforming to <filter>
- filter can be disabled by using "*"
...positioned over closest_view_entity
... positioned over closest_view_entity <targets> <range> <align> ...
- performs a raycast and changes the position context to the first entity collision matching the selector
- if <align> is true, it will use the entities exact position, if false itll use the collision point
- the mod also adds new player NBT called PlayerName which simply contains the players name
more features will be added in the future, feel free to suggest features via github issues
keep in mind, the description is of the latest mod version, older versions might not be maintained!!!
i know i said the same thing at the start im not an NPC
下载 Basically Util Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Basically Util Commands
下载 Basically Util Commands
下载 Basically Util Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Basically Util Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Basically Util Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Basically Util Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Basically Util Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Basically Util Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Basically Util Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
修复了兼容性问题,在 26.x 版本中实际上不可用
修复了射线检测标记丢弃和执行顺序问题(现在你可以通过销毁标记来中断射线检测)
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧