Dropt 是一个方块掉落物替换模组,允许定义复杂的掉落条件和替换规则。
Dropt 的规则可以使用 ZenScript、JSON 或 DroptAPI 进行定义。
* * * * *
功能
性能:
- 使用基于方块状态的规则缓存,显著提升性能
匹配依据:
- 方块(元数据、元数据通配符、多个元数值)(白名单/黑名单)
- 掉落的物品(元数据、元数据通配符、多个元数值、Oredict)(白名单/黑名单)
- 采集者类型(玩家、非玩家、任意)
- 采集者手持物品(元数据、元数据通配符)(白名单/黑名单)
- 采集者游戏阶段(需要 GameStages 模组)
- 采集者玩家名称
- 生物群系(白名单/黑名单)
- 维度(白名单/黑名单)
- 垂直范围
替换策略:
- 添加到现有掉落物中
- 替换所有掉落物
- 如果选中掉落项,则替换所有掉落物
- 替换所有匹配的掉落物品(替换匹配中定义的物品)
- 如果选中掉落项,则替换所有匹配的掉落物品(替换匹配中定义的物品)
掉落选择策略:
- 可重复(可以选择同一个掉落项多次)
- 唯一(只能选择一个掉落项一次)
基于以下因素确定掉落选择数量:
- 固定值
- 定义范围内的随机值
- 经由锋利魔咒修改
基于以下因素进行掉落选择:
- 经由锋利魔咒修改的权重值
- 最低锋利魔咒等级
- 精准采集要求(必需、排除、任意)
基于以下因素确定掉落数量:
- 固定值
- 定义范围内的随机值
- 经由锋利魔咒修改
掉落物:
- 可以为每个掉落项定义掉落列表
- 可以使用元数据通配符定义掉落物
- 可以作为 Oredict 条目定义掉落物
- 可以定义要掉落的经验值(经由锋利魔咒修改的范围)
- 可以定义带有 NBT 数据的掉落物
性能
Dropt 在加载规则时解析所有字符串,以减少匹配过程中不必要的字符串解析和字符串拼接。匹配过程中会使用一些字符串等价性测试。它使用简单的线性搜索将规则缓存到列表中,下面的分析输出是在最坏情况下的结果,即要匹配的规则位于一个包含 10 万+ 规则的列表末尾。
- [INFO] 在 118 毫秒内注入了 103573 条规则
- [INFO] 在 532 毫秒内解析了 103575 条规则
- [INFO] 从 103575 条规则中缓存了 1 条规则,耗时 56 毫秒,blockState: minecraft:stone[variant=stone]
- [INFO] 搜索了 1 条规则,耗时 1 毫秒
- [INFO] 修改掉落物耗时 0 毫秒
- [INFO] 搜索了 1 条规则,耗时 1 毫秒
- [INFO] 修改掉落物耗时 0 毫秒
要在你的机器上复现此分析,请参阅配置选项。
命令
/dropt reload - 在运行时重新加载配置
/dropt hand - 复制手持物品的字符串以便快速粘贴到 .json 文件中;同时有助于处理冗长的 NBT 标签
/dropt verbose - 将所有被破坏方块的资源位置和元数值记录到控制台
配置
Dropt 使用放置在 [instance]/config/dropt 文件夹中的 .json 配置文件。只要文件具有 .json 扩展名,文件名并不重要,你可以拥有任意数量的文件。
日志
.json 语法中的任何错误都会通过 Forge 日志报告。在游戏内重新加载时,错误将报告到聊天控制台。
所有错误也会记录到日志文件中:[instance]/dropt.log。
可以为每条规则启用额外的调试输出,并将其转储到日志文件中。有关更多信息,请参阅 文档。
* * * * *
所需模组
相关模组
* * * * *
本模组严禁转载至任何模组重托管网站。#StopModReposts
Dropt is a block drop replacement mod that allows defining complex drop conditions and replacement rules.
Dropt rules can be defined using ZenScript, JSON, or the DroptAPI.
* * * * *
Features
Performance:
- uses rule caching per block state to significantly improve performance
Matches based on:
- block (meta, meta wildcard, multiple meta values) (whitelist/blacklist)
- items dropped (meta, meta wildcard, multiple meta values, oredict) (whitelist/blacklist)
- harvester type (player, non-player, any)
- harvester held item (meta, meta wildcard) (whitelist/blacklist)
- harvester game stages (requires gamestages mod)
- harvester player name
- biome (whitelist/blacklist)
- dimension (whitelist/blacklist)
- vertical range
Replacement strategies:
- add to existing drops
- replace all drops
- replace all drops if drop selected
- replace all matched dropped items (replace items defined in match)
- replace all matched dropped items if drop selected (replace items defined in match)
Drop strategies:
- repeat (can select the same drop more than once)
- unique (can select a drop only once)
Drop selection count based on:
- fixed value
- random value in defined range
- fortune modified
Drop selection based on:
- fortune modified weight value
- minimum fortune level
- silk touch requirement (required, excluded, any)
Drop quantity based on:
- fixed value
- random value in defined range
- fortune modified
Drops:
- can define drop list per drop
- can define drops with meta wildcard
- can define drops as oredict entry
- can define xp to drop (fortune modified range)
- can define drops with NBT data
Performance
Dropt parses all strings when the rules are loaded to reduce unnecessary string parsing and string concatenation during matching. Some string equivalency testing is used during matching. It uses a simple linear search to cache rules in lists and the profiling output below is the result of a worst-case scenario in which the rule to match is at the end of a 100k+ rule list.
- [INFO] Injected 103573 rules in 118 ms
- [INFO] Parsed 103575 rules in 532 ms
- [INFO] Cached 1 rules from 103575 rules in 56 ms, blockState: minecraft:stone[variant=stone]
- [INFO] Searched 1 rules in 1 ms
- [INFO] Modified drops in 0 ms
- [INFO] Searched 1 rules in 1 ms
- [INFO] Modified drops in 0 ms
To reproduce the profiling on your machine, see the config options.
Commands
/dropt reload - reload configuration during runtime
/dropt hand - copy the held item's string for quick pasting into the .json file; also assists with lengthy NBT tags
/dropt verbose - log the resource location and meta value for all broken blocks to the console
Configuration
Dropt uses .json configuration files placed in the [instance]/config/dropt folder. Filenames are not important so long as they have the .json extension and you can have as many files as you like.
Logging
Any errors in the .json syntax are reported via the Forge log. When reloading in-game, errors will be reported to the chat console.
All errors are also logged to the log file: [instance]/dropt.log.
Additional debug output can be enabled per-rule and will be dumped to the log file. See the docs for more information.
* * * * *
Required Mods
Related Mods
* * * * *
This mod may NOT be reposted to any mod rehosting websites. #StopModReposts
下载 Dropt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dropt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dropt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dropt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dropt
下载 Dropt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dropt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dropt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dropt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Dropt
查看
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
原版世界生成优化模组
模组
新增 50+ 个独特生物群系,为你的世界增添新树木、花卉等更多元素!
模组
基于 GTCEu 1.12.2 的现代 GregTech
模组
让你能够在世界中的任何位置定位结构。
模组
简单的原版生物群系更新,包含有趣的怪物、方块等更多内容!
模组
? 使用命令保存和加载玩家或他人的背包/套装。
评论 0
登录后参与评分
还没有评论,来抢沙发吧