关于 SF-Cargo
SF-Cargo 是一个轻量级独立货运网络插件,灵感来源于类 Slimefun 风格的货运管理。它仅提供货运系统:管理器、连接器、输入节点和输出节点,而不包含 Slimefun 的其他机器、指南、研究、能源或物品生态等内容。
构建紧凑的存储网络,按通道路由物品,并在 Paper 和 Folia 服务器上安全地通过连接的货运节点传输材料。可以将此插件视为物品运输管道的更优版本。
插件功能
SF-Cargo 专注于提供一组小巧且对服务器友好的功能集:
- 货运管理器(Cargo Managers):发现并协调已连接的货运网络
- 货运连接器(Cargo Connectors):将网络沿直线延伸最多 6 格距离
- 货运输入节点(Cargo Input Nodes):从附加的容器中提取物品
- 货运输出节点(Cargo Output Nodes):向支持的存储方块中插入物品
- 每个网络支持 16 个货运通道
- 输入过滤器支持白名单/黑名单行为
- 智能填充和轮询移动选项
- 可点击的管理器列表及传送链接
- 面向管理员的工作线程 TPS 诊断
- 兼容 Folia 的库存处理,并支持回退至 Paper
Folia 与 Paper 支持
SF-Cargo 在其专属的工作线程上协调货运逻辑,而所有实时世界和库存访问都会安全地调度回所属的 Folia 区域。在普通的 Paper 服务器上,库存工作会回退到主服务器线程执行。
这使插件符合 Folia 的线程规则,同时避免在主游戏循环中进行不必要的操作。
安全性与防刷设计
SF-Cargo 基于物品安全性保守构建。
在输入节点移除物品之前,插件会检查目标容量,仅提取实际能容纳的数量。移动过程由内存中的日志追踪,允许在正常运行中断期间完成部分移动或进行回滚。
如果回滚需要完成,而相关区块已不再加载,SF-Cargo 可能会临时加载该区块,完成待处理的回滚,然后释放它。这仅用于完成已开始但尚未结束的移动,而非让未加载的货运网络继续运行。
输出节点目前仅限于常规存储类容器:
- 箱子 (Chests)
- 陷阱箱 (Trapped chests)
- 桶 (Barrels)
- 潜影盒 (Shulker boxes)
- 漏斗 (Hoppers)
- 投掷器 (Droppers)
- 发射器 (Dispensers)
潜影盒无法被插入到其他潜影盒中。
管理员工具
SF-Cargo 包含简单实用的管理员命令:
/sfcargo give <manager|connector|input|output>
/sfcargo reload
/sfcargo list
/sfcargo tps
/sfcargo list 显示已知的货运管理器、所有者、UUID、位置以及可点击的传送链接。
/sfcargo tps 显示货运循环健康状况、排队的库存移动、运输等待时间和日志状态,以便管理员判断插件是否跟得上节奏,或者库存工作是否在 Folia/Paper 调度中积压。
数据恢复
货运方块记录存储在 plugins/SF-Cargo/blocks.yml 中。放置的货运头块还会附带一个小型 SF-Cargo 标记,这样即使 YAML 文件丢失,标记过的方块在被破坏时仍能掉落正确的 SF-Cargo 物品。重新放置该物品即可再次注册。
旧的设置如过滤器、通道、所有权和管理器 UUID 不会从标记中恢复。
范围说明
SF-Cargo 不是 Slimefun,也不包含完整的 Slimefun 体验。它仅是一个独立的货运管理插件。
如果您想要完整的 Slimefun 游戏体验,请安装官方的 Slimefun4 插件。
以下是关于如何使用它的教程视频。
About SF-Cargo
SF-Cargo is a lightweight standalone cargo-network plugin inspired by Slimefun-style cargo management. It provides just the cargo system: managers, connectors, input nodes, and output nodes, without the rest of Slimefun’s machines, guide, research, energy, or item ecosystem.
Build compact storage networks, route items by channel, and move materials safely across connected cargo nodes on Paper and Folia servers. Think of this plugin as a far better version of item transport pipes
What’s in the Plugin
SF-Cargo focuses on a small, server-friendly feature set:
Cargo Managers that discover and coordinate connected cargo networks
Cargo Connectors that extend networks up to 6 blocks apart in straight lines
Cargo Input Nodes that pull items from attached inventories
Cargo Output Nodes that insert items into supported storage blocks
16 cargo channels per network
Input filters with whitelist/blacklist behavior
Smart-fill and round-robin movement options
Clickable admin manager list with teleport links
Worker-loop TPS diagnostics for admins
Folia-safe inventory handling with Paper fallback support
Folia And Paper Support
SF-Cargo coordinates cargo logic on its own worker loop, while all live world and inventory access is scheduled safely back to the owning Folia region. On regular Paper servers, inventory work falls back to the main server thread.
This keeps the plugin compatible with Folia’s threading rules while still avoiding unnecessary work on the main game loop.
Safety And Anti-Dupe Design
SF-Cargo is built conservatively around item safety.
Before an input node removes items, the plugin checks destination capacity and only withdraws the amount that can actually fit. Moves are tracked by an in-memory journal, allowing partial moves to complete or roll back during normal runtime interruptions.
If a rollback needs to finish and the relevant chunk is no longer loaded, SF-Cargo may temporarily load that chunk, finish the pending rollback, and then release it. This is only used to finish already-started moves, not to keep unloaded cargo networks running.
Output nodes are currently limited to normal storage-style containers:
Chests
Trapped chests
Barrels
Shulker boxes
Hoppers
Droppers
Dispensers
Shulker boxes cannot be inserted into other shulker boxes.
Admin Tools
SF-Cargo includes simple admin commands:
/sfcargo give <manager|connector|input|output>
/sfcargo reload
/sfcargo list
/sfcargo tps
/sfcargo list shows known cargo managers, owners, UUIDs, locations, and clickable teleport links.
/sfcargo tps shows cargo loop health, queued inventory moves, transport wait time, and journal status so admins can tell whether the plugin is keeping up or whether inventory work is backing up behind Folia/Paper scheduling.
Recovery
Cargo block records are stored in plugins/SF-Cargo/blocks.yml. Placed cargo heads also receive a small SF-Cargo marker so that if the YAML file is lost, marked blocks can still drop the correct SF-Cargo item when broken. Re-place the item to register it again.
Old settings like filters, channels, ownership, and manager UUIDs are not recovered from the marker.
Scope Notice
SF-Cargo is not Slimefun and does not include the full Slimefun experience. It is only a standalone cargo management plugin.
If you want the complete Slimefun gameplay system, install the official Slimefun4 plugin.
Here is a tutorial video on how to use it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧