Alternate Current 是一种高效且非位置相关的红石粉实现。其主要重点在于通过优化电力计算并减少发出的形状更新与方块更新数量,来降低由红石粉引起的卡顿。作为这些更改的附带效果,红石粉网络的方块更新顺序变得可预测且直观,而非以往那种基于位置且混乱的状态。
性能
在保持高程度的原版一致性的同时,使用 Alternate Current 后红石粉的 MSPT(每刻毫秒数)贡献可降低多达 30 倍。其代码修改数量极少,侵入性最小,因此它是原版红石粉的一个轻松即插即用替代品。
请查看 GitHub 页面 以了解 Alternate Current 改进的详细解释。
为什么红石粉会如此卡顿?
导致红石粉卡顿的两个主要原因是不必要的更新和不必要的计算,这两者都源于红石粉递归更新的特性。一根红石导线在确定最终值之前,可能会将其电力等级更新六次以上,每次都会执行昂贵的计算并发出大量的形状更新和方块更新。此外,许多形状更新和方块更新完全是多余的。
Alternate Current 如何解决这个问题?
Alternate Current 通过在更新电力等级之前对整个网络进行电力计算来解决这些问题。每根导线只会从非导线组件检查一次电力,并从其他导线检查两次电力。系统会识别网络内的电源,并从此处扩散电力。这使得计算更加高效,更新顺序也更加直观。形状更新和方块更新仅在达到最终电力等级时才会发出,且每根导线不会发出任何冗余更新。
Alternate Current is an efficient and non-locational redstone dust implementation. Its main focus lies in reducing the lag caused by redstone dust, by optimizing the power calculations and reducing the number of shape and block updates emitted. As a side effect of these changes the block update order of redstone dust networks is predictable and intuitive rather than locational and chaotic.
Performance
MSPT contributions of redstone dust are up to 30 times lower with Alternate Current, all the while maintaining a high level of Vanilla parity. Its low number of code modifications make it minimally invasive, so it's an easy drop-in replacement for Vanilla redstone dust.
Check out the GitHub page for a detailed explanation of Alternate Current's improvements.
Why is redstone dust so laggy?
There are two main reasons why redstone dust is laggy: unnecessary updates and unnecessary calculations, both of which are caused by the fact that redstone dust updates recursively. A redstone wire can update its power level over half a dozen times before settling on the final value, doing expensive calculations and emitting copious amounts of shape and block updates each time. On top of that, many shape and block updates are completely redundant.
How does Alternate Current fix that?
Alternate Current fixes these issues by doing power calculations of the entire network before updating the power levels. Each wire will check power from non-wire components just once and power from other wires just twice. Power sources within the network are identified, and the power is spread from there. This makes the calculations more efficient and the update order more intuitive. Shape and block updates are only emitted when the final power level is reached, and each wire emits no redundant updates.
下载 Alternate Current
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternate Current
下载 Alternate Current
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternate Current
下载 Alternate Current
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternate Current
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternate Current
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternate Current
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternate Current
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Alternate Current
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
已更新至 Minecraft 26.3
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
评论 0
登录后参与评分
还没有评论,来抢沙发吧