
一款基于聊天栏/控制台的 Minecraft 计算器,具备对“物品堆叠”概念的识别能力。你可以对物品堆进行数学运算,从而确定你的建筑项目需要多少组材料。
语法
/abacus <公式>
示例:
/abacus 1+1 --> 结果: 2
/abacus 1+1*5 --> 结果: 6
/abacus 10*10/100 --> 结果: 1
/abacus 0.5*0.5 --> 结果: 0.25
/abacus 2*(3+2) --> 结果: 10
支持的运算
运算符:+(加法)、-(减法)、*(乘法)、/(除法)、\(整除)、%(取模/余数)、^(幂运算)。
随机运算符
还有一个特殊的运算符用于生成随机数。示例:
/abacus 1d6
将生成 1 到 6 之间的随机数。
/abacus 10d6
将生成 10 个介于 1 到 6 之间的随机数之和。
未来的版本可能会增加一个控制范围的函数。
支持 Minecraft “堆叠”(stack)概念
可以对以“堆叠”(64 个物品)或“部分堆叠”(16 个物品)为单位的数量进行计算,并输出描述堆叠数量的结果。以下所有示例均针对完整堆叠给出。部分堆叠的操作完全相同,只需将单位 's' 替换为 'p' 即可。
如果你希望结果以堆叠为单位表示,只需在公式前加上 's':
/abacus s 64 * 1结果:1组和0个单独物品。
/abacus s 32 * 2 结果:1 组 和 0 个 物品。
如果您希望将数量表示为组的倍数,请在数量后添加 's':
/abacus 1s + 0 结果:64
/abacus 1s + 1s 结果:128
当然,你可以同时使用两者,因此以下操作虽然有些荒谬,但确实可行:
/abacus s300s 结果: 300 组 和 0 个单独物品.
更重要的是,你可以做类似这样的操作:你要制作 300 个“某物”,你已经算出每个需要 5 组方块再加 28 个……那么总共需要多少材料来制作全部 300 个呢?
/abacus s (5s + 28) * 300结果:1631组和16个单个物品。
你可以混合使用部分堆叠和完整堆叠,但这样做时需要小心,因为这可能会让你对实际情况产生误解。一种可能出现这种情况的场景是雪球。雪球可以在部分堆叠中最多存放 16 个,而雪块则最多可以堆叠 64 个。假设你有 30 组雪球,你可以通过以下方法计算出能够合成多少组雪块。
/abacus s30p / 4
结果:7组和32个单个物品。
支持的分组符号
(), <>, [], {}
这意味着这是一个有效的表达式:
[1+1)*5+15]
逗号分组
可以一次性评估多个由逗号分隔的表达式:
/abacus 1+1,2+2,3+3结果:2,4,6
权限节点
abacus.* - 授予所有权限(由于目前只有一个权限,这基本上没什么用)。默认为 op。 abacus.abacus - 授予对 abacus 命令的访问权限。默认为 true。
计划中的功能/变更
我正在考虑一个用于计算复杂物品所需材料的想法。可能的语法如下:
/abacus 30 wooden stairs 结果: 30 wooden stairs requires 48 planks or 12 logs.
特别是楼梯,因为我经常算错建造一段楼梯所需的材料。:)
我还没有完全确定如何实现这一通用方法。欢迎提供建议。:)

A chat/console based calculator for Minecraft with awareness of the concept of a "Minecraft stack of items". You can perform math operations on stacks to determine how many stacks of a material you need for your building projects.
Syntax
/abacus <formula>
Examples:
/abacus 1+1 --> Result: 2
/abacus 1+1*5 --> Result: 6
/abacus 10*10/100 --> Result: 1
/abacus 0.5*0.5 --> Result: 0.25
/abacus 2*(3+2) --> Result: 10
Supported Operations
Operators: + (addtion), - (subtraction), * (multiplication), / (division), \ (integer division), % (modulus/remainder), ^ (power operator).
Random Operator
There is also a special operator that generates random numbers. Examples:
/abacus 1d6
will produce a random number between 1 and 6.
/abacus 10d6
will produce the sum of 10 random numbers between 1 and 6.
A future release may add a function to control the range.
Minecraft "stack" Aware
Can perform calculations on quantities that are in the unit "stacks" (64 items) or "partial stacks" (16 items) and produce results describing the number of stacks. All the examples below are given for full stacks. Partial stack operations are identical, except that you use 'p' as the unit instead of 's'.
If you want the result expressed in terms of stacks, simply precede the formula with an 's':
/abacus s 64 * 1 Result: 1 stacks and 0 individual items.
/abacus s 32 * 2 Result: 1 stacks and 0 individual items.
If you want to include a quantity that is a number of stacks, append an 's' to the quantity:
/abacus 1s + 0 Result: 64
/abacus 1s + 1s Result: 128
You can use both, of course, so the following, while silly, works:
/abacus s300s Result: 300 stacks and 0 individual items.
More importantly, you can do this sort of thing: You're making 300 'somethings', you've already worked out that each one takes 5 stacks of blocks plus 28 more...how many to make all 300?
/abacus s (5s + 28) * 300 Result: 1631 stacks and 16 individual items.
You can mix partial and full stacks, although I'd be careful in doing so, you can potentially mislead yourself as to what is going on. One situation where this might come up is with snowballs. Snowballs are stackable in partial stacks of 16, but snow blocks are in stacks of 64. Supposing you had 30 stacks of snowballs, you could do something like this to find out how many stacks of snow blocks you could make.
/abacus s30p / 4 Result: 7 stacks and 32 individual items.
Supported Grouping symbols
(), <>, [], {}
That means this is a valid expression:
[(1+1)*5+15]
Comma Grouping
Can evaluate multiple expressions "in one go" that are separated by commas:
/abacus 1+1,2+2,3+3 Result: 2,4,6
Permission Nodes
abacus.* - grants all permissions (as there is only one right now, this is largely useless). Defaults to op. abacus.abacus - grants access to the abacus command. Defaults to true.
Planned Features/Changes
I'm playing with an idea for computing the required materials for complex items. A potential syntax might be:
/abacus 30 wooden stairs Result: 30 wooden stairs requires 48 planks or 12 logs.
Stairs in particular is on my radar, since I frequently miscalculate the materials required for a stairway. :)
I haven't fully decided on an approach on how to do this generically yet. Suggestions welcome. :)
下载 Abacus
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Abacus
下载 Abacus
下载 Abacus
下载 Abacus
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Abacus
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Abacus
1.2.0 更新内容
- 更改输出格式,使大数字完整显示而不使用指数形式。
- 基于 spigot-api-1.8.8-R0.1 构建
1.1.1 更新内容
- 修复:在某些公式中,减法后紧跟的加法会被错误地解释为减法。
- 已在 CraftBukkit 1.7.2-R0.2 上测试通过
1.1.0 更新内容
- 新增:支持“括号表示乘法”语法:3(1+1) 现在会按预期进行计算。
- 修复:在某些公式中,减法被误解析为负数,导致计算结果错误。
- 已在 CraftBukkit 1.5.2-R1.0 上测试通过
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
评论 0
登录后参与评分
还没有评论,来抢沙发吧