Alternative Chunkloading
适用于 Minecraft 1.7.10 的 Forge 模组,用于阻止所谓的“幽灵加载”(ghost loading)或“级联加载”(cascade loading)区块。
技术背景
它利用了 ChunkProviderServer 实例上的一个原版开关,以在请求方块或实体时停止自动加载区块。这样,区块只能被显式加载。
添加了两个用于按需加载区块的实验性选项。 这可用于防止模组(以及核心 Minecraft 本身)在请求某个方块的区块时自动加载该区块。这也意味着会出现“幽灵加载”或“级联加载”区块的情况。 然而,这仅能略微提升性能。具体效果高度依赖于你使用的其他模组及其使用方式。
基本上,对于一个模组来说,如果它需要位置 XYZ 处的方块,它会调用 getBlock()、getTileEntity() 或 getEntity。默认情况下,这些方法会加载包含该方块或实体的区块。通常这并不是预期的行为,在某些情况下可能会导致卡顿。例如,AE2 或 Ender IO 导管或其他任何多方块结构都可能是导致此类行为的原因。甚至是 Minecraft 本身的草方块,它希望将草延伸到附近的泥土方块上。
在 ChunkProviderServer 类中有一个名为 loadChunkOnProvideRequest 的配置字段,默认为 true。在 WorldEvent.Load 事件中将每个实例设置为 false,仅在通过例如 loadChunk(x, y, z) 显式加载时才加载区块。
配置
如果 disableChunkLoadingOnRequest 为 true(默认为 true),则模组会将原版开关(见上文)设置为 false。
考虑切换到 我维护的 Chicken Chunks 分支。我添加了一个修复程序,在请求方块之前先加载区块(这是一般应该采用的做法)。
如果你不知道自己在做什么,请将 autoLoadChunksOnTicketCreation 设置为 true(默认为 true)!
这会延续区块加载票证的功能。因此,每当模组创建区块加载票证时,区块也会被加载(Forge 本身不会自动执行此操作)。
兼容性
基本上所有模组都应像以前一样工作。我已经使用它超过一年了,没有发现副作用。整体性能略有提升,而在同时加载/卸载大量区块时(例如向一个方向飞行时),TPS 可能会略有增加。
已修补的模组
直接或通过 mixin 修补的模组。大多数修复即使在没有安装 Alternative Chunkloading 的情况下也能受益,因为它们现在使用了普遍推荐的方式。
- Flood Lights
- Minecraft (Mixin: load chunk before generating a nether portal)
已知有问题的模组
- Dimensional Doors (可以作为变通办法列入黑名单)
对依赖原版行为的模组的说明
请记住,这种方式下,那些依赖在仅请求方块时就自动加载区块功能的模组或玩家用法(例如允许您构建超长管道的科技类模组)将不再起作用。你现在需要确保包含相关内容的每个区块都被加载。
区块加载器
FTB Utilities 或 Server Utilities 等模组应像以前一样工作。但是,所有使用方块的区块加载器可能都需要代码修复。考虑使用 我维护的 Chicken Chunks 分支。
Alternative Chunkloading
A forge mod for Minecraft 1.7.10 that stops so called "ghost loading" or "cascade loading" of chunks.
Technical background
It make use of a vanilla toggle on each ChunkProviderServer instance to stop automatic chunkloading whenever a block or entity is requested. Those chunks can then only be loaded explicitely.
Two experimental options for loading chunks on request has been added. This can be used to prevent Mods (and core Minecraft itself) from loading chunks whenever a block is requested there. This also means "ghost loading" or "cascade loading" chunks. However, this will help with performance just slightly. It hightly depends on what other mods you use and how you use the mods.
Basically for a Mod, if it needs a Block at Position XYZ, it calls getBlock() or getTileEntity() or getEntity. By default, this methods will load the chunk where the block or entity is loaced in. Often this is not expected and in some cases can cause lags. G.g. AE2 or Ender IO Conduits or any other multiblock structure can be a cause for such a behavior. Even Minecraft's Grass block that wants to extend its Grass to nearby dirt blocks.
There is one configruation field in the ChunkProviderServer class called loadChunkOnProvideRequest that is true by default. Setting this to false on each instance on WorldEvent.Load event only loads chunks when explicitely loaded via e.g. loadChunk(x, y, z).
Configuration
If disableChunkLoadingOnRequest is true (default is true) then the mod sets the vanilla toggle (see above) to false.
Think about switching to my fork of Chicken Chunks. I added a fix to load the chunk before requesting the block (that's how it should be done in general).
Also set autoLoadChunksOnTicketCreation to true (default ist true) if you don't know what you do!
This continues functionality of chunk loading tickers. So anytime whenever a chunk loading ticket is created by a Mod, the chunks will be also loaded (Forge itself doesn't that automatically).
Compatibility
Basically all mods should work like before. I'm using this since over a year now now without bad side-effects. The general performance is slightly better while the TPS may increase slightly when loading/unloading many chunks at the same time (like when flying into one direction).
Patched mods
Mods that has been patched directly or via mixin. The most fixes does even have benefit without Alternative Chunkloading installed as they now use the generally prefered way.
- Flood Lights
- Minecraft (Mixin: load chunk before generating a nether portal)
Known problematic mods
- Dimensional Doors (can be blacklisted as workaround)
Note for mods that relay on the vanilla behavior
Remember that this way mods or players usages that relay on the feature to automatically load a chunk when just requesting a block (like technic mods that allows you very long pipelines for example) will not work anymore. You now need to ensure that each chunk wich contains relevant things to be chunkloaded.
Chunkloaders
Mods, like FTB Utilities or Server Utilities should work like before. But all chunkloaders that uses a block will probably need a fix in the code. Think about using my fork of Chicken Chunks.
下载 Alternative Chunkloading
下载 Alternative Chunkloading
下载 Alternative Chunkloading
下载 Alternative Chunkloading
下载 Alternative Chunkloading
下载 Alternative Chunkloading
完整更新日志:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
原版世界生成优化模组
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
缓冲的原始输入和线程化的事件轮询
评论 0
登录后参与评分
还没有评论,来抢沙发吧