TakeASeat
这是一个 Minecraft 模组,允许你通过右键点击坐在(可自定义列表中的)方块上,并且还可以设置各种限制条件,以决定玩家是否可以坐下。
完全在服务器端运行。
功能
- 可自定义可以坐下的方块列表,包括来自模组的方块。
- 如果满足以下条件,你可以阻止玩家坐下:
- 玩家会窒息
- 玩家手中持有物品
- 玩家距离过远(可配置距离)
- 座位方块比玩家高(是的,再也不用传送到村庄房屋天花板上了)
- 玩家与座位之间存在阻挡方块。(对于展示服务器来说非常有用,可以防止玩家穿墙进入区域)
所有这些选项都可以通过编辑配置文件手动开启/关闭或修改。
配置
配置文件位于 config/takeaseat.json,可编辑的值如下:
完整配置列表(点击展开)
| 键名 | 描述 | 默认值 | 类型 |
|---|---|---|---|
| allowedBlockId | 允许玩家右键点击并坐下的方块 ID 列表。 | [](空) | 字符串数组 |
| allowedBlockTag | 允许玩家右键点击并坐下的方块标签列表,详见 此处 获取完整列表。 | ["minecraft:stairs", "minecraft:slabs"] | 字符串数组 |
| stairsOffset | 是否在玩家坐在楼梯上时为其添加偏移量,使其位置略微靠前;该选项在 90 度转弯的楼梯上效果不佳。 | false | 布尔值 |
| ensurePlayerWontSuffocate | 如果方块上方存在可窒息方块,则不允许玩家坐下。 注意:此选项仅适用于可窒息方块(通常为完整的 1x1 方块),而不适用于其他非窒息/实心方块,如楼梯 或透明方块。 |
true | 布尔值 |
| mustBeEmptyHandToSit | 玩家坐下时是否必须双手不持有物品。 | true | boolean |
| blockMustBeLowerThanPlayer | 此选项确保玩家点击的方块(座位)高度不能超过玩家自身最多 0.5 米。
可用于防止玩家通过楼梯攀爬至房屋天花板。 | true | boolean |
| mustNotBeObstructed | 此选项进一步限制玩家,确保玩家与座位之间不存在任何固体方块。(固体方块指该方块不具有可碰撞区域)
这可能会产生误判,有时需要玩家靠近座位才能坐下,但对于不希望访客坐在其他无法到达区域的展示服务器来说,这一设置非常有用。 | false | boolean |
| maxDistance | 玩家必须靠近到多远(以方块/米为单位)才能坐下
值小于或等于 0 表示没有最大距离限制。 | 0 | double |
错误/建议
如果您有任何建议或错误报告,请随时在此处 打开一个 GitHub issue!
许可证
本项目采用 MIT 许可证。
你可能还想查看 SvrUtil 以获取一些服务器命令和轻微调整!
TakeASeat
This is a Minecraft mod that allows you to sit on a (customizable list of) block by right-clicking, and it also allows you to set various restrictions as for whether the player can sit.
Works purely server-side.
Features
- Customizable list of blocks you can sit on, including modded blocks.
- You can prevent the player from sitting if:
-
- The player would suffocate
-
- The player's hand is not empty
-
- The player is too far away (Configurable distance)
-
- The seat block is higher than the player (Yes, no more teleporting to the village house ceiling)
-
- A block is in the way between the player and the seat. (Useful for exhibition server to prevent people clipping into areas)
These can all be manually turned on/off or changed by editing the config file.
Config
The config file is located in config/takeaseat.json, editable value as follows:
Full config list (Click to Open)
| Key | Description | Default Value | Type |
|---|---|---|---|
| allowedBlockId | A list of block id that player can right click and sit on | [] (Empty) | String Array |
| allowedBlockTag | A list of block tags that player can right click and sit on, see here for list | ["minecraft:stairs", "minecraft:slabs"] | String Array |
| stairsOffset | Whether to put a offset to the player when sitting on a stairs so that they sits slightly more forward, does not work well with 90 degree turn stairs. | false | boolean |
| ensurePlayerWontSuffocate | Do not allow player to sit if there's a suffocatable block on top. Note that this only applies to suffocatable block, usually a full 1x1 block and not other non-suffocatable/solid block like stairs or light block. |
true | boolean |
| mustBeEmptyHandToSit | Whether the player must not be holding any item on both hand to sit. | true | boolean |
| blockMustBeLowerThanPlayer | This ensures the block (seat) the player clicked must not be higher than the player by at most 0.5 meter. Useful to prevent player from climbing to house ceiling made with stairs. |
true | boolean |
| mustNotBeObstructed | This further restricts player by ensuring no solid block exist between the player and the seat. (Solid block implies the block must not have a collidable area) This could create false positives, sometimes requiring player to get closer to the seat before being able to sit, but is useful on exhibition server that don't want visitors to sit on otherwise inaccessible areas. |
false | boolean |
| maxDistance | Distance in block/meter that the player must get closer to before being able to sit Value less than or equals to 0 means there's no max distance. |
0 | double |
Bugs/Suggestions
If you have any suggestions or bug report, don't hesitate to open an GitHub issue here!
License
This project is licensed under the MIT License.
You may also want to check out SvrUtil for some server commands and slight tweaks!
下载 TakeASeat
下载 TakeASeat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TakeASeat
下载 TakeASeat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TakeASeat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TakeASeat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TakeASeat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TakeASeat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TakeASeat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TakeASeat
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
更新到 Minecraft 26.3
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧