SlashLoot
为自然生成的箱子、 barrels(木桶)、潜影盒和矿车提供每位玩家独立的战利品——仅限服务端,无需客户端安装。
每个打开自然生成容器的玩家都会获得自己专属的一份战利品。打开一个废弃矿井的箱子,你就获得你的那份;你的朋友打开同一个箱子,也会获得独立的一份。再也不用争抢地牢里的箱子了,也不会有人 arrive 后发现箱子已经被别人清空。
你自己放置的容器永远不会被修改——你建造的箱子、木桶和潜影盒的行为与原版完全一致。
适用于 Fabric、NeoForge 和 Forge 1.20.1。
仅限服务端——玩家无需安装任何内容
SlashLoot 完全在服务端运行。玩家使用原版 Fabric 或 NeoForge 连接即可:他们不需要安装该模组,当你更新时他们也不必跟随更新。SlashLoot 永远不会替换方块或其方块状态,因此容器始终是一个真实的 minecraft:chest(或木桶、潜影盒、矿车等)。数据包谓词、/data 查询、记分板选择器和结构保存都能继续识别普通的原版方块。
功能特性
- 自然生成容器的每位玩家独立战利品。每次打开 = 一次个人随机抽取。
- 跨服务器重启持久化。每位玩家的专属战利品按维度保存。
- 重新打开时状态稳定。如果关闭菜单时物品仍在里面,下次打开时它们依然存在。
- 玩家放置的容器不受影响——你建造的任何东西都保持完整的原版行为。
- 支持双格箱子。每半部分独立追踪每位玩家的战利品;打开任一半都会显示合并后的 54 格视图。
- 保留原版的盖子动画、音效和红石逻辑。箱子和潜影盒的盖子会动画,木桶会开启,带陷阱的箱子依然会发出红石信号。
- 细节上也忠于原版。锁定的箱子/木桶/潜影盒保持锁定状态,前方被方块阻挡的潜影盒保持关闭,重命名的容器在个人菜单中仍显示其名称,打开容器会推进原版的战利品进度和统计信息,附近的猪灵在守卫容器时依然会生气——所有这些行为都与原版完全一致,尽管每次打开都是通过 SlashLoot 自己的菜单进行的。
- 该关闭时自动关闭。走开,或者在你查看副本时真实容器被销毁,菜单会自动关闭——符合原版的距离/有效性行为。
- 可配置。支持按维度和战利品表设置黑名单,以兼容冒险地图——被列入黑名单的容器将回退到普通的原版共享战利品。
- 与其他模组兼容良好。Cobblemon 的金库宝箱(所有七种真实颜色变体)开箱即用地被识别为真正的每位玩家独立容器;任何其他未被识别的模组容器也可以全局启用,可选的调试日志会明确告诉你 SlashLoot 对每个容器的判定结果。
- 自我维护。当容器被破坏时,存储的战利品会被清理,后台修剪过程仅在容器真正消失时才移除条目——绝不会仅仅因为配置或黑名单更改而移除。
- 管理员命令用于检查和清除个人战利品,以备不时之需。
支持的容器类型
- 箱子、带陷阱的箱子、木桶、潜影盒
- 箱型矿车、漏斗矿车、船载箱子
- 双格箱子(合并的 54 格视图)
- Cobblemon 金库宝箱(所有真实颜色变体——故意保留了 Gimmighoul 模仿箱不进行处理)
安装方法
- 将与你 Minecraft 版本及加载器匹配的 JAR 文件放入服务端的
mods/ 文件夹。
- 对于 Fabric,将对应版本的 Fabric API 放入同一文件夹。NeoForge 和 Forge 无需额外操作。
- 重启服务器。
就这样。客户端使用未修改的游戏连接——他们端无需安装任何东西。
支持的版本
共 25 个 JAR 文件——13 个 Fabric,11 个 NeoForge,1 个 Forge。请选择与你的服务器 Minecraft 版本及加载器匹配的那个——文件命名为 slashloot-<version>+mc<band>-<loader>.jar。Fabric 构建需要指定版本的 Fabric API;NeoForge 和 Forge 构建除加载器外无需其他依赖。
Forge 仅支持 1.20.1。 相同的 -forge JAR 也可在 NeoForge 1.20.1 上运行,因此 1.20.1 NeoForge 服务器也使用它。
NeoForge 的支持范围略有不同:NeoForge 没有自己的 1.20.5 版本线,也没有稳定的 21.6 / 21.7 / 21.9 构建,因此 MC 1.21.6–1.21.8 和 1.21.9–1.21.10 由 21.8 和 21.10 构建覆盖。26.1.2、26.2 和 26.3 系列同时提供 Fabric 和 NeoForge 构建。
| Minecraft |
Loader |
Fabric API (仅限 Fabric) |
| 1.20.1 |
Fabric |
0.92.2+1.20.1 |
| 1.20.1 |
Forge (也可在 NeoForge 1.20.1 上运行) |
— |
| 1.20.5–1.20.6 |
Fabric |
0.97.8+1.20.5 |
| 1.20.6 |
NeoForge |
— |
| 1.21 |
Fabric |
0.102.0+1.21 |
| 1.21.1 |
Fabric |
0.115.6+1.21.1 |
| 1.21–1.21.1 |
NeoForge |
— |
| 1.21.2–1.21.3 |
Fabric |
0.106.1+1.21.2 |
| 1.21.2–1.21.3 |
NeoForge |
— |
| 1.21.4 |
Fabric / NeoForge |
0.114.0+1.21.4 |
| 1.21.5 |
Fabric / NeoForge |
0.127.1+1.21.5 |
| 1.21.6–1.21.8 |
Fabric |
0.128.1+1.21.6 |
| 1.21.6–1.21.8 |
NeoForge |
— |
| 1.21.9–1.21.10 |
Fabric |
0.134.1+1.21.9 |
| 1.21.9–1.21.10 |
NeoForge |
— |
| 1.21.11 |
Fabric / NeoForge |
0.141.2+1.21.11 |
| 26.1.2 |
Fabric / NeoForge |
0.146.1+26.1.2 |
| 26.2 |
Fabric / NeoForge |
0.158.0+26.2 |
| 26.3 |
Fabric / NeoForge |
0.161.0+26.3 |
配置
首次启动时会创建 config/slashloot.json 文件:
{
"enabled": true,
"dimensionBlocklist": [],
"lootTableBlocklist": [],
"handleUnknownContainers": false,
"delegateContainerAnimation": true,
"playOpenCloseSounds": true,
"cleanupOnBreak": true,
"pruneIntervalTicks": 6000,
"pruneBatchSize": 256,
"debugLogging": false
}
enabled — 总开关。设为 false 时 SlashLoot 将失效;所有容器均表现为原版行为。
dimensionBlocklist — 维度黑名单(例如 "minecraft:the_nether"),这些维度中的容器将提供普通的共享原版战利品。
lootTableBlocklist — 战利品表黑名单(例如 "minecraft:chests/buried_treasure"),用于跳过特定战利品表。对于故意使用共享战利品的冒险地图很有用。
handleUnknownContainers — 处理 SlashLoot 未明确识别的模组容器。默认关闭:将未知模组容器留给原版处理是兼容性更佳的选择。(Cobblemon 的真正镀金箱子无论如何都会被识别——此选项仅影响没有内置识别机制的容器。)
delegateContainerAnimation — 将打开/关闭动画委托给真实容器,以便箱盖动画、木桶开启以及陷阱箱发出红石信号。除非与某模组冲突,否则请保持开启。
playOpenCloseSounds — 手动播放打开音效。仅在 delegateContainerAnimation 为 false 时使用(启用委托时,由原版播放该音效)。
cleanupOnBreak — 当容器被破坏时掉落其存储的战利品。
pruneIntervalTicks / pruneBatchSize — 后台清理任务,回收已不存在容器的条目记录。设为 0 可禁用此功能。
debugLogging — 日志记录。每行记录一个容器的位置、使用的战利品表,以及 SlashLoot 是否为其生成了独立实例或回退到原版,并附带原因。专为整合包兼容性测试设计。
缺失的配置项将采用默认值,因此旧版本的配置文件仍可正常使用。执行 /slashloot reload 可在不重启游戏的情况下重新读取配置文件。
管理员命令
所有命令均需权限等级 2(OP)。
| 命令 |
效果 |
/slashloot forget here |
清除当前视线方块处所有玩家的个人战利品 |
/slashloot forget at <x> <y> <z> |
同上,通过坐标指定 |
/slashloot forget player <player> |
清除指定玩家在当前维度中所有容器内的个人战利品 |
/slashloot forget all |
清除当前维度中存储的所有容器 |
/slashloot prune |
删除那些容器已不存在的条目记录 |
/slashloot stats |
显示当前维度中条目记录的统计数量 |
/slashloot reload |
重新读取 config/slashloot.json |
已知限制
- 漏斗无法从独立容器中抽取物品。 世界容器在设计上保持“未展开”状态,因此附着在其上的漏斗会看到空容器。玩家放置的容器不受影响——列入黑名单的容器也完全按照原版行为运作。
- 比较器输出读数为 0,原因同上。
- 装饰罐和可疑的沙/砾石 不在覆盖范围内——它们使用不同的(挖掘)机制。
- Cobblemon 的奇诺栗鼠伪装宝箱 有意不作为可 loot 的容器处理——它是伪装的宝可梦而非真正的储物箱,因此 SlashLoot 完全不干预它。
源码 & 链接
- GitHub(源码、问题反馈、架构深入解析):
- 许可证: CC-BY-4.0
SlashLoot
Per-player loot for naturally-generated chests, barrels, shulker boxes, and minecarts — server-side only, no client install required.
Every player who opens a naturally-generated container gets their own personal copy of the loot. Open a mineshaft chest and get your roll; your friend opens that same chest and gets a separate roll of their own. No more racing to dungeons, and nobody arrives to find an empty chest after someone else already cleared it out.
Containers you place yourself are never touched — chests, barrels, and shulker boxes you build behave exactly like vanilla.
Fabric, NeoForge, and Forge 1.20.1.
Server-side only — players install nothing
SlashLoot runs entirely on the server. Players connect with plain vanilla Fabric or NeoForge: they don't install the mod, and they don't have to update when you do. SlashLoot never replaces the block or its block-state, so the container always stays a real minecraft:chest (or barrel, shulker, minecart, etc.). Datapack predicates, /data queries, scoreboard selectors, and structure saves keep seeing ordinary vanilla blocks.
Features
- Per-player instanced loot for naturally-generated containers. One open = one personal roll.
- Persists across server restarts. Each player's personal loot is saved per-dimension.
- Stable on re-open. Close the menu with items still inside and they're there next time you open it.
- Player-placed containers untouched — full vanilla behavior for anything you build.
- Double-chest support. Each half tracks per-player loot independently; opening either half shows a combined 54-slot view.
- Vanilla lids, sounds and redstone. Chest and shulker lids animate, barrels open, and trapped chests still emit redstone.
- Vanilla-faithful in the small things too. Locked chests/barrels/shulkers stay locked, a shulker box blocked by a block in front of it stays closed, renamed containers keep their name in the personal menu, opening a container advances the vanilla loot advancement and stats, and nearby piglins still get angry at a guarded container — all exactly like vanilla, even though every open is running through SlashLoot's own menu.
- Menus close when they should. Walking away, or the real container being destroyed while you're looking at your copy of it, closes the menu — matching vanilla distance/validity behavior.
- Configurable. Per-dimension and per-loot-table blocklists for adventure-map compatibility — blocklisted containers fall back to ordinary vanilla shared loot.
- Plays nice with other mods. Cobblemon's Gilded Chests (all seven real color variants) are recognized out of the box as real per-player containers; any other unrecognized modded container can still be opted in broadly, and optional debug logging tells you exactly what SlashLoot decided for each one.
- Self-maintaining. Stored loot is cleaned up when a container is destroyed, and the background pruning pass only ever removes an entry once its container is actually gone — never just because a config or blocklist changed.
- Admin commands to inspect and wipe personal loot when you need to.
Container coverage
- Chests, trapped chests, barrels, shulker boxes
- Chest minecarts, hopper minecarts, chest boats
- Double chests (combined 54-slot view)
- Cobblemon Gilded Chests (all real color variants — the Gimmighoul mimic chest is deliberately left untouched)
Installation
- Drop the JAR matching your Minecraft version and loader into your server's
mods/ folder.
- On Fabric, drop the matching Fabric API version into the same folder. NeoForge and Forge need nothing extra.
- Restart the server.
That's it. Clients connect with an unmodified game — nothing to install on their end.
Supported versions
25 JARs — 13 Fabric, 11 NeoForge, 1 Forge. Pick the one matching your server's Minecraft version and loader — files are named slashloot-<version>+mc<band>-<loader>.jar. Fabric builds need Fabric API at the listed version; NeoForge and Forge builds need nothing beyond the loader.
Forge is 1.20.1 only. The same -forge JAR also runs on NeoForge 1.20.1, so 1.20.1 NeoForge servers use it too.
NeoForge coverage differs slightly: NeoForge has no 1.20.5 line of its own, and no stable 21.6 / 21.7 / 21.9 builds, so MC 1.21.6–1.21.8 and 1.21.9–1.21.10 are covered by the 21.8 and 21.10 builds. The 26.1.2, 26.2 and 26.3 bands ship for both loaders.
| Minecraft |
Loader |
Fabric API (Fabric only) |
| 1.20.1 |
Fabric |
0.92.2+1.20.1 |
| 1.20.1 |
Forge (also runs on NeoForge 1.20.1) |
— |
| 1.20.5–1.20.6 |
Fabric |
0.97.8+1.20.5 |
| 1.20.6 |
NeoForge |
— |
| 1.21 |
Fabric |
0.102.0+1.21 |
| 1.21.1 |
Fabric |
0.115.6+1.21.1 |
| 1.21–1.21.1 |
NeoForge |
— |
| 1.21.2–1.21.3 |
Fabric |
0.106.1+1.21.2 |
| 1.21.2–1.21.3 |
NeoForge |
— |
| 1.21.4 |
Fabric / NeoForge |
0.114.0+1.21.4 |
| 1.21.5 |
Fabric / NeoForge |
0.127.1+1.21.5 |
| 1.21.6–1.21.8 |
Fabric |
0.128.1+1.21.6 |
| 1.21.6–1.21.8 |
NeoForge |
— |
| 1.21.9–1.21.10 |
Fabric |
0.134.1+1.21.9 |
| 1.21.9–1.21.10 |
NeoForge |
— |
| 1.21.11 |
Fabric / NeoForge |
0.141.2+1.21.11 |
| 26.1.2 |
Fabric / NeoForge |
0.146.1+26.1.2 |
| 26.2 |
Fabric / NeoForge |
0.158.0+26.2 |
| 26.3 |
Fabric / NeoForge |
0.161.0+26.3 |
Configuration
A config/slashloot.json file is created on first launch:
{
"enabled": true,
"dimensionBlocklist": [],
"lootTableBlocklist": [],
"handleUnknownContainers": false,
"delegateContainerAnimation": true,
"playOpenCloseSounds": true,
"cleanupOnBreak": true,
"pruneIntervalTicks": 6000,
"pruneBatchSize": 256,
"debugLogging": false
}
enabled — master switch. false makes SlashLoot inert; every container behaves like vanilla.
dimensionBlocklist — dimensions (e.g. "minecraft:the_nether") served as ordinary shared vanilla loot.
lootTableBlocklist — loot tables (e.g. "minecraft:chests/buried_treasure") to skip. Useful for adventure maps with intentionally shared loot.
handleUnknownContainers — instance modded containers SlashLoot doesn't specifically recognise. Off by default: leaving unknown modded containers to vanilla is the compatible choice. (Cobblemon's real Gilded Chests are recognized either way — this only affects containers with no built-in recognition.)
delegateContainerAnimation — forward open/close to the real container so lids animate, barrels open, and trapped chests emit redstone. Leave on unless a mod conflicts.
playOpenCloseSounds — manual open sound. Only used when delegateContainerAnimation is false (with delegation on, vanilla plays it).
cleanupOnBreak — drop a container's stored loot when it's destroyed.
pruneIntervalTicks / pruneBatchSize — background sweep that reclaims entries for containers that no longer exist. 0 disables it.
debugLogging — log one line per container with its position, loot table, and whether SlashLoot instanced it or fell back to vanilla, with the reason. Built for modpack compatibility testing.
Missing keys take their defaults, so a config from an older version keeps working. /slashloot reload re-reads the file without a restart.
Admin commands
All require permission level 2 (op).
| Command |
Effect |
/slashloot forget here |
Wipe every player's personal loot at the block you're looking at |
/slashloot forget at <x> <y> <z> |
Same, by coordinate |
/slashloot forget player <player> |
Wipe a player's personal loot at every container in the current dim |
/slashloot forget all |
Wipe every stored container in the current dimension |
/slashloot prune |
Drop stored entries whose container no longer exists |
/slashloot stats |
Stored entry counts for the current dimension |
/slashloot reload |
Re-read config/slashloot.json |
Known limitations
- Hoppers don't pull from instanced containers. The world container is left "unrolled" by design, so a hopper attached to one sees an empty container. Player-placed containers are unaffected — and so are blocklisted ones, which behave exactly as in vanilla.
- Comparator output reads 0 from those same containers, for the same reason.
- Decorated pots and suspicious sand/gravel are not covered — they use a different (brushing) mechanic.
- The Cobblemon Gimmighoul mimic chest is intentionally not a lootable container — it's a Pokémon in disguise, not real storage, so SlashLoot leaves it entirely alone.
Source & links
- GitHub (source, issues, architecture deep-dive):
- License: CC-BY-4.0
评论 0
登录后参与评分
还没有评论,来抢沙发吧