I have slept
该模组在多人游戏模式下跳过夜晚后,会重置所有玩家的睡眠计数器,确保未睡觉的玩家不会生成幻翼。
该模组仅在服务端运行。客户端无需安装该模组即可生效。
该模组的作用是什么?
在 Minecraft 的多人游戏模式中,playersSleepingPercentage 游戏规则允许一定比例的玩家睡觉以跳过夜晚。然而,即使夜晚被跳过,未参与睡觉的玩家的睡眠计数器也不会改变。这会导致一种情况:尽管夜晚已被跳过,但未参与睡觉的玩家在随后的夜晚仍会被幻翼袭击。
该模组通过在夜晚被跳过之后重置所有玩家的睡眠计数器来解决这个问题,确保没有人会被幻翼骚扰。它通过确保所有玩家在跳过夜晚后的睡眠状态正确同步,使多人游戏体验更加流畅。
如何使用?
该模组与 playersSleepingPercentage 游戏规则无缝配合。要使用它,只需使用以下命令设置跳过夜晚所需的玩家睡觉比例:
/gamerule playersSleepingPercentage <value>
例如,将其设置为 50 意味着当一半玩家睡觉时,夜晚将被跳过。一旦夜晚被跳过,该模组会自动重置所有玩家的睡眠计数器,包括那些没有睡觉的玩家,确保后续夜晚中不会有人生成幻翼。无需额外配置——只需设置百分比,模组将自动处理其余部分!
此外,该模组引入了一个新的游戏规则 doBetterServerSleep,允许你启用或禁用睡眠计数器重置功能。默认情况下,此功能已启用。要切换它,请使用以下命令:
/gamerule doBetterServerSleep <true|false>
设置为 true 以启用睡眠计数器重置,或设置为 false 以禁用它。
许可证
代码基于 MIT 许可证分发,你也可以自由地将其用于专有项目中。
I have slept
This mod resets all players' sleep counters after skipping the night in multiplayer mode, ensuring no phantoms spawn for those who didn't sleep.
This mod works on the server side only. Clients do not need to install the mod for it to function.
What does this mod do?
In Minecraft's multiplayer mode, the playersSleepingPercentage gamerule allows a percentage of players to sleep in
order to skip the night. However, even when the night is skipped, the sleep counter for players who didn't sleep remains
unchanged. This leads to a situation where players who didn't participate in skipping the night will still be targeted
by phantoms in subsequent nights, despite the night being skipped.
This mod fixes that by resetting the sleep counters for all players after the night is skipped, ensuring no one is haunted by phantoms. It makes multiplayer gameplay smoother by ensuring that all players’ sleep statuses are properly synced after skipping the night.
How to use?
This mod works seamlessly with the playersSleepingPercentage gamerule. To use it, simply set the percentage of players
required to sleep in order to skip the night by using the following command:
/gamerule playersSleepingPercentage <value>
For example, setting it to 50 means that when half of the players are sleeping, the night will be skipped. Once the
night is skipped, this mod will automatically reset the sleep counters for all players, including those who didn't
sleep, ensuring phantoms won't spawn for anyone in the following nights. No additional configuration is needed—just set
the percentage, and the mod will take care of the rest!
Additionally, the mod introduces a new gamerule called doBetterServerSleep, which allows you to enable or disable the
sleep counter reset feature. By default, this feature is enabled. To toggle it, use the following command:
/gamerule doBetterServerSleep <true|false>
Set it to true to enable the sleep counter reset, or false to disable it.
License
Code is distributed under MIT license, feel free to use it in your proprietary projects as well.
下载 I have slept
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 I have slept
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 I have slept
下载 I have slept
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 I have slept
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 I have slept
下载 I have slept
下载 I have slept
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 I have slept
下载 I have slept
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
更改
- 更新了构建流程;无游戏内内容变更
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
一个基于构建器的 Minecraft 配置库!
模组
为你的终界增添新生物群系、神秘仪式和全新生物
模组
? 使用命令保存和加载玩家或他人的背包/套装。
模组
更多生物群系,更多生物,更多工具,为炽热的维度
模组
如果游戏能告知重要的刷新点,会怎样?
评论 0
登录后参与评分
还没有评论,来抢沙发吧