这个模组有什么作用?
在 Minecraft 中,当你远离区块时,这些区块将停止模拟。之后当你返回时,作物可能完全没有生长,幼崽动物仍保持幼崽状态,而你正在烹饪的食物也还在继续烹饪。
本模组通过在被卸载一段时间后重新进入模拟距离时立即对方块和实体进行模拟来解决这一问题。这就像它们一直都在被模拟一样!
这也适用于跳过夜晚的情况。你无需等待铁锭烧制完成或作物生长,只需跳过夜晚即可加速这一过程!
具体是如何工作的?
每当一个区块、实体或方块实体被计算时,它会保存当前时间,并检查自上次计算以来过去了多久。如果时间差足够大,我的模组就会开始对其进行模拟以追赶进度。
但如果它必须模拟所有错过的时间,会不会导致游戏卡顿?
只要你聪明地使用就不会!Unloaded Activity 不会为每一个错过的刻重复运行计算函数,而是直接根据错过的刻数来计算方块的最终状态。因此,如果一个方块错过了 24000 个刻(1 个 Minecraft 日),它不需要尝试计算 24000 次,而是会做一些简单的数学运算然后直接得出结果。
这种方法速度更快,但代价是需要以这种新方式重新实现计算逻辑。这就是为什么某些模组作物的生长可能会不正确,甚至完全不生长。如果你发现某个模组方块的模拟行为不正确,你可以将该方块加入模组的黑名单中,但也请创建一个错误报告!
随机/降水计算怎么办?
具有随机/降水计算的方块带有随机性。为了模拟这些方块,模组会从 二项分布 中采样一个随机数,然后使用它来更新方块的状态。然而,有时成功的概率会发生变化。这时我们需要从 负二项分布 中采样随机数以模拟每次成功所持续的时间。
不受支持的方块和实体
并非原版 Minecraft 中的所有事物都得到支持。以下是那些不受支持的内容及其原因:
-
所有红石相关方块
红石逻辑对我来说太复杂了,而且即使我尝试支持它,也很可能会破坏大量现有的红石装置。 -
酿造台
酿造台只有一个原料槽位。因此,Unloaded Activity 只能模拟一种原料,然后就不得不停止。我认为酿造台的酿造速度已经足够快,无需特别支持。除非你在开启酿造台后立即乘坐鞘翅飞走或睡觉,否则你几乎不会注意到缺乏支持的问题。 -
营火
与酿造台的原因相同。 -
掉落物消失
我觉得这会破坏游戏体验。如果你在远离基地的地方死亡,你将无法取回你的物品,即使你知道它们的确切位置。 -
蜂箱
这个方块与其他受支持的方块不同,因为它需要实体(蜜蜂)自行工作才能发挥作用。我也还没有深入研究过它,所以未来可能会提供支持。 -
嗅探兽蛋
嗅探兽蛋利用计划内的计算来孵化。由于计划内计算的工作方式,很难准确地复制其行为。对我来说,添加一个设置使嗅探兽蛋使用随机计算而非计划内计算,然后以此方式支持它会更简单。 -
干凝胶怪
与嗅探兽蛋的原因相同。
对于任何其他未在此列出且不受支持的方块或实体,我只是单纯地忘记了。所以如果我漏掉了什么,请告诉我!
支持的模组
Farmer's Delight
Farmer's Delight 中的每一种作物都受到支持,但仅限作物。模组中的其他内容不会由 Unloaded Activity 进行模拟。
Farmer's Delight Refabricated 也应该能正常工作,因为他们仅进行了少量更改以使其适用于 Fabric。然而,[Deprecated] Farmer's Delight [Fabric] 与 Unloaded Activity 不兼容,并在加入世界时会崩溃。
Supplementaries
Supplementaries 中仅支持亚麻。模组中的其他内容均不受支持,不会由 Unloaded Activity 进行模拟。
No Man's Land
支持来自 No Man's Land 的萌芽石英岩和果实树叶。此支持仅在 Unloaded Activity 的 1.21.1 版本上预设存在。如果 No Man's Land 决定更新到更新的 Minecraft 版本,或者有非官方移植到更新版本,Unloaded Activity 将不会模拟其相关内容。
水龙头仅在 No Man's Land v1.5.12 和 Unloaded Activity v0.7.3 上受支持。这是因为自 No Man's Land v1.6.0 起,水龙头现在是一个方块实体。
目前我还没有一套完善的机制来模拟模组中的 BlockEntities(方块实体),除了通过 mixins 的方式,因此我只能限制自己仅模拟原版方块实体。一旦我着手添加该模拟系统,tap(敲击/交互)功能将再次得到支持。
Immersive Engineering
Immersive Engineering 中仅支持大麻(hemp)。整合包中的其他内容均不受支持,Unloaded Activity 不会对其进行模拟。
Biomes O' Plenty
Biomes O' Plenty 中仅支持高草(high grass)。整合包中的其他内容均不受支持,Unloaded Activity 不会对其进行模拟。
Neapolitan
Neapolitan 中的所有作物均完全受支持,除了一种情况。对于原版的藤蔓(vine),Unloaded Activity 仅支持其向上和向下生长。它不会模拟原版藤蔓向侧面生长的行为。
灵感来源
这个想法来自 DigiDigger 的一个视频,他在视频中讨论了《泰拉瑞亚》是如何处理其所有图块的。 尽管该视频关于《泰拉瑞亚》实际运作方式的描述并不完全准确,但他提到的一个优化思路让我觉得可以在 Minecraft 中实现。 他讨论这一优化的时间戳是 5:11。
反馈 / 建议
如果你对本模组有任何反馈或建议,欢迎加入我的 Discord 服务器!
What does this mod do?
In Minecraft, when you go far away from chunks, they'll stop being simulated. Later when you return, stuff like crops will not have grown at all, baby animals will still be babies, and the items you were cooking will still be cooking.
This mod changes that by simulating blocks and entities once they get within simulation distance to catch up after being unloaded for a period of time. It'll be as if they've always been simulated!
This also works when you're skipping the night. Instead of waiting for your iron to cook, or for your crops to grow, you can skip the night to speed up the process!
How exactly does it work?
Every time a chunk, entity, or block entity gets ticked, it will save the current time, and also check how long it's been since it was last ticked. If the difference is large enough, my mod will start simulating it to make it catch up.
But wont that lag the game if it has to simulate all that missed time?
Not if you're smart! Instead of repeatedly running the tick function for every tick that was missed, Unloaded Activity will instead directly calculate the state of the block given the amount of ticks missed. So if a block missed 24000 ticks (1 Minecraft day), instead of trying to tick it 24000 times, it will do a little bit of math and be done.
This is way faster, but comes at the cost of needing to re-implement the tick logic in this new way. This is why some modded crops may grow incorrectly, or not at all. If you find a modded block that simulates incorrectly, you can blacklist that block from the mod, but also please create a bug report!
What about random/precipitation ticks?
Blocks with random/precipitation ticks have randomness to them. To simulate these blocks, the mod will sample a random number from a binomial distribution and then use that to update the state of the block. However, sometimes the probability of success changes. Then we need to sample random numbers from a negative binomial distribution to simulate the duration of each success.
Unsupported blocks and entities
Not everything in vanilla Minecraft is supported. Here's which ones are unsupported and the reason for it:
-
Every redstone related block
Redstone logic is too complicated for me, and even if I were to try to support it, I would most likely break a lot of existing redstone contraptions. -
Brewing stands
Brewing stands only has 1 ingredient slot. Because of this, Unloaded Activity would only be able to simulate 1 ingredient before having to stop, and I think brewing stands are quick enough to not need to be supported. Unless you immediately fly away with an elytra or sleep after turning on a brewing stand, you wouldn't really notice the lack of support. -
Campfires
Same reason as brewing stands. -
Dropped items despawning
I feel like this would ruin the game. If you die far away from your base you'd have no way of retrieving your items, even if you knew exactly where they were. -
Beehives
This block is unlike any other blocks that's supported, since this block requires entities (bees) to do their own stuff to work. I also haven't looked into it too much yet, so it might get supported in the future. -
Sniffer egg
Sniffer eggs makes use of scheduled ticks to hatch. Because of how scheduled ticks work, it would be hard to accurately replicate its behavior. It would be easier for me to add a setting to make Sniffer eggs work with random ticks instead of scheduled ticks, and then support it that way. -
Dried ghast
Same reason as sniffer eggs.
For any other blocks or entities that aren't supported and that aren't listed here, I've simply just forgotten about. So please let me know if I've forgotten anything!
Supported mods
Farmer's Delight
Every crop in Farmer's Delight is supported, but ONLY the crops. Anything else in the mod will not be simulated by Unloaded Activity.
Farmer's Delight Refabricated should work as well since they only do minor changes to make it work for Fabric. However, [Deprecated] Farmer's Delight [Fabric] is not compatible with Unloaded Activity and will crash upon joining a world.
Supplementaries
Only the flax is supported in Supplementaries. Anything else in the mod is unsupported and will not be simulated by Unloaded Activity.
No Man's Land
Supports budding quartzite, and fruit leaves from No Man's Land. This support is only preset on the 1.21.1 version on Unloaded Activity. If No Man's Land decides to update to a newer Minecraft version, or if there's an unofficial port to a newer version, Unloaded Activity will not simulate its things.
The taps are only supported on No Man's Land v1.5.12 and Unloaded Activity v0.7.3. This is because since No Man's Land v1.6.0, taps are now a BlockEntity.
I currently don't have a proper system for simulating BlockEntities outside of mixins, so I've been limiting myself to just simulating vanilla BlockEntities. Once I get around to adding that system, taps will be supported once again.
Immersive Engineering
Only the hemp is supported in Immersive Engineering. Anything else in the mod is unsupported and will not be simulated by Unloaded Activity.
Biomes O' Plenty
Only the high grass is supported in Biomes O' Plenty. Anything else in the mod is unsupported and will not be simulated by Unloaded Activity.
Neapolitan
Every crop in Neapolitan is fully supported, except for one. For the vanilla vine, Unloaded Activity only supports it growing upwards and downwards. It does not simulate the vanilla vine growing sideways.
Inspiration
I got this idea from a video by DigiDigger where he talks about how Terraria handles all of its tiles. Even though the video isn't really accurate to how Terraria actually works, he did bring up an optimization which I feel like could be implemented in Minecraft. The timestamp where he talks about this optimization is at 5:11.
Feedback / Suggestions
If you got any feedback or suggestions for this mod, feel free to join my discord server!
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unloaded Activity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
修复
- 修复在 (Neo)Forge 1.21.11 及以下版本中的 mixin 问题
- 在 (Neo)Forge 1.21.11 及以下版本中,熔炉和实体现在已正确模拟
重要提示!
此版本仅适用于 1.19.2、1.20.1、1.21.1、1.21.11 和 26.x,因为我计划放弃对其他所有版本的支持。如果您使用的版本未在此列出,请通过我的 Discord 服务器联系我,我会确保继续支持您的版本。
用于模拟 BlockEntities 和 Entities 的新系统
这将使其他开发者更容易为他们的模组化 BlockEntities 和 Entities 添加支持,因为他们不再需要在我的模组中重写接口的某个方法。(WIKI 即将推出)
支持使用“游戏时间”进行时间模拟
“game time”类似于“day time”,但区别在于当玩家跳过夜晚时它不会发生跳跃,并且在 advance_time gamerule 为 false 时会继续保持。
这可以通过新的配置选项 “simulationClock”(在游戏中执行 /unloadedactivity config simulationClock)进行修改。
有效值为:
- DAY_TIME
- GAME_TIME
- SYSTEM_TIME
Trial spawner 支持 (1.21+)
现在支持 Trial spawner 冷却机制。
正确支持 Lithium
Furnaces 现在获得了 Lithium 的休眠 BlockEntity 优化功能,同时仍能与 Unloaded Activity 兼容。此前,Unloaded Activity 会直接禁用该优化。
修复
- 修复了如果未安装 neapolitan,
neapolitan:banana_frond标签报错的问题。 - 修复 NeoForge 上 26.1.2 版本的版本范围问题。(这会导致专用服务器启动失败。不清楚为什么客户端不受影响)
快照说明
之所以这是快照版,是因为我仍有部分内容想要添加,并打算加入对几个模组化 BlockEntities 和 Entities 的支持以测试新的模拟系统。请报告您发现的任何错误或异常现象!
支持 No Man's Land 1.6.0 及以上版本。
注意:No Man's Land 已不再支持水龙头(Taps)。这是因为它们现在已成为一个方块实体(BlockEntity)。 目前我还没有一个完善的系统来模拟非 Mixin 的方块实体,因此我只是局限于模拟原版方块实体。一旦我着手添加该系统,水龙头将再次获得支持。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧