SimpleChestLocker

这个模组诞生于我未能找到一款适用于我和朋友们游玩的 SMP 服务器的服务端简易箱子锁定模组。它实现了其应有的功能:锁定箱子。
命令用法:
- 基础命令:/scl
- /scl lock: 锁定玩家注视的箱子。
- /scl unlock: 解锁玩家注视的箱子。
- /scl trust <player>: 将玩家注视的箱子信任给指定玩家。
- /scl untrust <player>: 从玩家注视的箱子中移除对指定玩家的信任。
- /scl players: 列出玩家注视的箱子的受信任玩家列表。
- /scl label
- /scl rename
- /scl unlabel: 移除玩家注视的箱子的标签。
- /scl list: 列出所有已锁定的容器及其索引、类型和坐标。
- /scl gui: 打开一个 GUI 来管理你的已锁定容器。
- /scl help: 显示所有命令用法。
不要被名字误导!
它也适用于桶以及任何实现了 Inventory 接口的模组容器!
远程管理
每个容器都会在 /scl list 中显示一个索引(Container 0, Container 1, ...)。你可以使用该索引 或标签 作为目标,在命令中远程管理容器——即使跨越维度也可以。例如:
- /scl unlock 2
- /scl label storage 0
- /scl trust PlayerName 2
- /scl untrust PlayerName storage
当箱子/桶被锁定时:
- 它将免疫爆炸伤害。
- 它将免疫活塞移动。
- 它将免疫漏斗传输。
- 未被信任的玩家将无法打开该箱子。
这些免疫效果均可在配置文件中切换启用或禁用。
移除箱子方块将会移除与该箱子关联的所有锁定信息。
客户端覆盖层
自版本 2.2.0 起可用。
该模组完全基于服务端运行,但如果你也在 客户端 安装它,你将获得用于锁定容器的便捷视觉覆盖层:
- 在每个锁定容器前方绘制一个挂锁图标,让你一眼就能识别出锁定的箱子和桶。
- 当你拥有该容器或为受信任玩家时,图标会变为开锁状态的挂锁。
- 当你瞄准锁图标时,容器的标签会以浮动形式显示在其前方。
- 标签仅对所有者和受信任玩家可见。
- 它适用于任何锁定容器,包括模组容器。
在客户端安装该模组是 可选的 —— 其余功能在使用仅服务端版本时仍可正常工作。
黑名单方块
自版本 2.1.1 起可用。
如果有些容器你不希望玩家进行锁定,可以在配置文件中将其加入黑名单。
使用 blockBlacklist 选项并添加你希望防止被锁定的方块 ID:
"blockBlacklist": [
"example:block",
"example:block2"
]
每个条目必须是格式为 namespace:block_name 的有效方块 ID。列入此列表的任何方块都无法使用 SimpleChestLocker 进行锁定。
维护状态
Minecraft 1.21.11 现已进入维护模式。 此版本的模组不再计划新增功能。未来针对 1.21.11 的更新将仅限于修复错误。如果发现 bug,请在 GitHub 上报告。
计划中的更新:
可配置的免疫效果(已在 2.0.0 中添加)支持模组容器(已在 2.0.0 中添加)26.2 移植版正在路上。(2.1.0)
不计划提供 Forge/NeoForge 移植版。
P.S.: 尚未用 Quilt 测试该模组,但它应该可以正常工作。
SimpleChestLocker

This mod was born with me not being able to find a server-side, simple chest locking mod for a SMP server me and my friends were playing on. It does the thing it's supposed to, locking chests.
Commands usage:
- Base command: /scl
- /scl lock: Locks the chest the player is looking at.
- /scl unlock: Unlocks the chest the player is looking at.
- /scl trust <player>: Trusts a player with the chest the player is looking at.
- /scl untrust <player>: Untrusts a player from the chest the player is looking at.
- /scl players: Lists players trusted with the chest the player is looking at.
- /scl label
- /scl rename
- /scl unlabel: Removes the label from the chest the player is looking at.
- /scl list: Lists all of your locked containers with their index, type, and coordinates.
- /scl gui: Opens a GUI to manage your locked containers.
- /scl help: Shows all command usage.
Don't let the name confuse you!
It works for barrels and any modded container that implements the Inventory interface!
Remote management
Every container gets an index shown in /scl list (Container 0, Container 1, ...). You can use that index or a label as the target in commands to manage a container remotely—even across dimensions. For example:
- /scl unlock 2
- /scl label storage 0
- /scl trust PlayerName 2
- /scl untrust PlayerName storage
When a chest/barrel is locked:
- It will be immune to explosions.
- It will be immune to piston moving.
- It will be immune to hopper transfer.
- Players that are not trusted with that chest won't be able to open it.
Each of these immunities can be toggled in the config.
Removing the chest block will remove all the lock information associated with that chest.
Client-side overlay
Available since version 2.2.0.
The mod is fully server-side, but if you also install it on your client, you get a handy visual overlay for locked containers:
- A padlock icon is drawn in front of every locked container, so you can spot locked chests and barrels at a glance.
- The icon switches to an unlocked padlock when you're the owner or a trusted player.
- When you aim at the lock icon, the container's label appears floating in front of it.
- The label is only visible to the owner and trusted players.
- It works for any locked container, including modded ones.
Installing the mod on the client is optional — everything else keeps working with the server-only version.
Blacklisting blocks
Available since version 2.1.1.
If there are containers you don't want players to lock, you can blacklist them in the config.
Use the blockBlacklist option and add the block IDs you want to prevent from being locked:
"blockBlacklist": [
"example:block",
"example:block2"
]
Each entry must be a valid block ID in the format namespace:block_name. Any block included in this list cannot be locked using SimpleChestLocker.
Maintenance status
Minecraft 1.21.11 is now in maintenance mode. No new features are planned for this version of the mod. Future updates for 1.21.11 will be limited to bug fixes only. If you find a bug, please report it on GitHub.
Planned updates:
Configurable immunity(added in 2.0.0)Support for modded containers(added in 2.0.0)A 26.2 port is on the way.(2.1.0)
A Forge/NeoForge port is not planned.
P.S.: Haven't tested the mod with Quilt but it should work.
下载 SimpleChestLocker
下载 SimpleChestLocker
下载 SimpleChestLocker
下载 SimpleChestLocker
下载 SimpleChestLocker
下载 SimpleChestLocker
- 添加了客户端侧覆盖层:锁定的容器现在会显示一个挂锁图标,而当你拥有者或被信任时,会显示一个打开的挂锁
- 当你瞄准容器时,容器标签会出现(仅限所有者/被信任者)
- 修复了将单个箱子转换为双箱后,/scl list 中丢失锁的问题
- 破坏双箱的一半现在会在剩余的一半上保留锁
- 可选:在客户端安装模组以启用覆盖层
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧