修复提及 Lightspeed Agent 的启动错误
如果 Java 停止运行并显示 Error opening zip file or JAR manifest missing 或 agent library failed Agent_OnLoad,且名称包含 lightspeed-bootstrap-agent-*.jar,你可以从启动器中修复它。
- 打开实例的 JVM 参数。PCL2:版本设置 → 设置 → 高级启动选项。Prism(Windows、Linux、macOS):编辑实例 → 设置 → Java。如果实例继承全局设置,请同时检查全局 Java 设置。
- 删除指向
lightspeed-bootstrap-agent-*.jar的整个-javaagent:参数,包括周围的引号。移除其-Dlightspeed.agent.owner=…和-Dlightspeed.bootstrapCacheDir=…条目。保留内存设置和其他模组的 agents。 - 清除指向
pack-compiler.cmd或pack-compiler.sh的 Lightspeed 预启动命令。在 Prism 中,这位于“设置 → 自定义命令”。在 PCL2 中,它位于“高级启动选项”。 - 更新 LightSpeedRe。如果你停留在旧版本构建上,请在实例的
config/lightspeed-common.toml中设置installBootstrapAgent = false。完全退出并重新打开启动器后再启动游戏。
启动报错修复(简体中文)
- 在 PCL2 的「版本设置 → 高级启动选项」或 Prism 的「编辑实例 → 设置 → Java」打开 JVM 参数。如果实例沿用全局参数,也检查启动器的全局 Java 设置。
- 删除指向
lightspeed-bootstrap-agent-*.jar的整条-javaagent:参数和它两边的引号,并移除这一组的-Dlightspeed.agent.owner=…、-Dlightspeed.bootstrapCacheDir=…。保留内存参数和其他模组的 Agent。 - 若启动前命令引用 Lightspeed 的
pack-compiler.cmd或pack-compiler.sh,只清空该命令。升级模组,或在旧版的config/lightspeed-common.toml中设置installBootstrapAgent = false,然后完全关闭并重新打开启动器。
整合包作者应在分发前清理导出配置里的这些本机设置。
这是 Lightspeed 模组的高版本(1.20.1+)移植版。
它移除了已经在 Minecraft 原版 1.20.1 中实现的模型烘焙优化,仅保留资源包缓存功能,从而加快启动速度。
(目前仅计划支持 Forge 1.20.1 和 NeoForge 1.21.1 的移植。)
自 1.2.0 版本起,此模组引入了高并发加载以提高启动速度。如果您在使用此模组时遇到任何问题,请尝试在配置文件中禁用相关选项。
项目起源与 AI 使用
正如我在回复 Alextwicle 时所说,我想明确说明我在该项目中如何使用 AI。Issue #34
LightSpeedRe 基于 CCr4ft3r 的 LightSpeed。在 1.2.0 版本之前,我手动移植并维护该项目,使其功能和代码与上游保持一致。
我从 1.2.0 版本开始在开发中使用 AI 工具,并为 2.0.0 版本彻底重构了该项目。我将在未来的开发中继续使用 AI 工具。如果您非常关注 AI 的使用,或者更倾向于使用未借助 AI 开发的软件,您可能需要使用 1.2.0 之前的版本,或者选择其他项目。
本项目保留了原始的提交历史、作者署名和适用的许可证。感谢 CCr4ft3r 创建 LightSpeed 并为本项目奠定基础。
Fix a startup error mentioning the Lightspeed Agent
If Java stops with Error opening zip file or JAR manifest missing or agent library failed Agent_OnLoad and names lightspeed-bootstrap-agent-*.jar, you can fix it from the launcher.
- Open the instance’s JVM arguments. PCL2: Version Settings → Settings → Advanced Launch Options. Prism (Windows, Linux, macOS): Edit Instance → Settings → Java. Check global Java settings too if the instance inherits them.
- Delete the whole
-javaagent:argument that points tolightspeed-bootstrap-agent-*.jar, including surrounding quotes. Remove its-Dlightspeed.agent.owner=…and-Dlightspeed.bootstrapCacheDir=…entries. Keep memory settings and other mods’ agents. - Clear a Lightspeed pre-launch command that points to
pack-compiler.cmdorpack-compiler.sh. In Prism, this is under Settings → Custom Commands. In PCL2, it is under Advanced Launch Options. - Update LightSpeedRe. If you are staying on an older build, set
installBootstrapAgent = falsein the instance’sconfig/lightspeed-common.toml. Fully quit and reopen the launcher before launching again.
启动报错修复(简体中文)
- 在 PCL2 的「版本设置 → 高级启动选项」或 Prism 的「编辑实例 → 设置 → Java」打开 JVM 参数。如果实例沿用全局参数,也检查启动器的全局 Java 设置。
- 删除指向
lightspeed-bootstrap-agent-*.jar的整条-javaagent:参数和它两边的引号,并移除这一组的-Dlightspeed.agent.owner=…、-Dlightspeed.bootstrapCacheDir=…。保留内存参数和其他模组的 Agent。 - 若启动前命令引用 Lightspeed 的
pack-compiler.cmd或pack-compiler.sh,只清空该命令。升级模组,或在旧版的config/lightspeed-common.toml中设置installBootstrapAgent = false,然后完全关闭并重新打开启动器。
Modpack authors should clear these local settings from exported profiles. 整合包作者应在分发前清理导出配置里的这些本机设置。
Full guide and repair script · 完整中文教程与修复脚本
This is a high-version (1.20.1+) port of the Lightspeed mod.
It removes the model-baking optimizations that were already implemented in vanilla Minecraft 1.20.1, keeping only the resource-pack cache feature, which speeds up launch times.
(Currently, only ports for Forge 1.20.1 and NeoForge 1.21.1 are planned.)
Since version 1.2.0+, this mod introduces high-concurrency loading to improve startup speed. If you encounter any issues while using this mod, please try disabling the related option in the configuration file.
Project Origins and AI Use
As I said in my reply to Alextwicle, I want to be explicit about how I use AI in this project. Issue #34
LightSpeedRe is based on CCr4ft3r’s LightSpeed. Before version 1.2.0, I ported and maintained the project by hand, keeping its features and code in line with upstream.
I started using AI tools in development with version 1.2.0 and completely refactored the project for version 2.0.0. I’ll continue using AI tools in future development. If AI use is a major concern for you, or if you prefer to use only software developed without AI, you may want to use a version earlier than 1.2.0 or choose another project.
This project retains the original commit history, author credits, and applicable licenses. Thanks to CCr4ft3r for creating LightSpeed and laying the groundwork for this project.
下载 LightSpeedRe - 启动优化
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LightSpeedRe - 启动优化
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LightSpeedRe - 启动优化
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LightSpeedRe - 启动优化
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LightSpeedRe - 启动优化
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LightSpeedRe - 启动优化
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LightSpeedRe - 启动优化
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LightSpeedRe - 启动优化
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
English
- 修复在禁用 Mipmap 降级(例如 Forge 默认
allowMipmapLowering = false)且资源包包含非 2 次幂纹理时,地形出现黑色或深色 mipmap 条带的问题:SpriteLoaderMipmapMixin现在使用传入SpriteLoader.Preparations的确切 mipmap 层级和拼接后的精灵表来派发并行 mipmap 生成,而不是重新计算原版的 2 次幂截断逻辑。 - 修复在 Iris/Oculus 调试模式下恢复缓存的着色器程序二进制文件时出现的 OpenGL
GL_INVALID_VALUE(ObjectLabel: unknown shader object)错误:为二进制恢复的ShaderInstance阶段分配轻量级的未编译 OpenGL 着色器句柄,并在Program#close()时释放一次,同时不破坏零编译恢复路径。 - 修复陈旧
.lspiPackImage 生成文件的堆积问题:在PackImageFile#write()原子式推进.current后立即修剪过时的生成文件;在cleanupGenerations中隔离每个文件的IOException失败,防止 Windows 上的锁定生成文件导致删除其他过时文件的操作中止,并在内存映射前验证 PackImage 校验和、头部信息和指纹。
中文
- 修复禁用 Mipmap 降级(例如 Forge 默认
allowMipmapLowering = false)且整合包包含非 2 次幂纹理时远近景地表出现灰黑带的问题:SpriteLoaderMipmapMixin改为直接沿用传入SpriteLoader.Preparations的实际mipLevel与精灵表派发并行 Mipmap,不再按原版公式重新截断层级,确保高阶 Mipmap 完整生成并上传。 - 修复开启 Iris/Oculus 调试模式时,命中着色器二进制缓存引发 OpenGL
GL_INVALID_VALUE(ObjectLabel: unknown shader object)报错的问题:为二进制恢复命中的ShaderInstance阶段分配轻量的未编译 OpenGL 着色器对象句柄,并在Program#close()时单次释放,完整保留零编译缓存命中路径。 - 修复 Bootstrap 缓存
.lspi旧代镜像文件持续堆积的问题:在PackImageFile#write()原子更新.current指针后立即回收旧代;将cleanupGenerations改为逐文件隔离IOException,避免 Windows 上首个被占用旧代中断其余旧文件清理;并在内存映射前完成摘要、文件头与指纹校验。
English
- Fix shader binary cache collisions on multi-stage programs (including Oculus/Iris geometry and tessellation shaders): preserve
Shader#attachToProgram()for non-deferred shaders, hook atGlStateManager#glLinkProgramto key cached binaries by all attached OpenGL shader stage types and sources, explicit attribute bindings, separable state, vertex format, shader class, and driver profile, bump the shader snapshot schema to v3, and persist post-title compiled shaders cleanly on shutdown. - Enable single-JAR mod pack indexing and prewarming for custom mod locators (such as AutoModpack and other
AbstractJarFileModLocator/IModLocatorproviders) on Forge 1.20.1 and NeoForge 1.21.1, and implementIndexedPackResourceson ForgeFilePackResourcesso empty directory listings across external ZIP resource packs short-circuit immediately. - Harden Forge 47.4.16+ compatibility by qualifying
ObjectHolderRegistryMixinhandler descriptors and adding EventBus 6.2.33ListenerListcapacity growth support in the 1.20.1 Bootstrap Agent.
中文
- 修复多阶段着色器(含 Oculus/Iris 几何着色器与曲面细分着色器)的二进制缓存键串用问题:对非延迟着色器完整保留
Shader#attachToProgram(),在GlStateManager#glLinkProgram边界直接采集全部已挂接阶段的 OpenGL 类型与源码、显式属性绑定、可分离状态、顶点格式、着色器实现类及驱动信息生成 v3 缓存键,并在客户端退出时自动持久化标题界面后编译的着色器。 - 为 Forge 1.20.1 与 NeoForge 1.21.1 扩展单 JAR 模组资源索引与预热范围,支持
AbstractJarFileModLocator及第三方单 JAR 模组定位器(如 AutoModpack 等);同时为 Forge 端FilePackResources接入IndexedPackResources,跳过外置.zip资源包的空目录查询。 - 加固 Forge 47.4.16+ 兼容:为
ObjectHolderRegistryMixin指定精确方法描述符,并在 1.20.1 Bootstrap Agent 中补充 EventBus 6.2.33 的ListenerList扩容补丁。
English
- Add lazy directory-range indexing in
ResourcePathIndex, compact indexing forVanillaPackResources, shared ZIP overlay indexing onSharedZipFileAccess, and empty sub-pack short-circuiting acrossFallbackResourceManager,DelegatingPackResources, andCompositePackResources. - Remove lock contention in
MultiPackResourceManagerresource listing caches on 1.21.1+ and reuse cachedFileToIdConverter.listMatchingResourceStackslookups during initial reload. - Avoid materializing the full blockstate hash table in
ModelLocationSets.IndexedLocationSetduring bulk block population and subsequent item/standalone additions, optimizeStateVariantSupportlookups for large blockstate tables, switchBitSetVoxelUnionto word-level bit operations, makeObjectHolderDispatchupdates incremental, and narrowFontWarmupSnapshotprovider probing. - Check the lock-free early mod index before the Agent fallback in Forge
PathResourcePackMixinto avoid redundant archive view creation, and add NeoForge 1.21.1SecureJarHandler(Jar$JarModuleDataProvider) direct path lookup support in the Bootstrap Agent.
中文
- 为
ResourcePathIndex新增懒建目录区间索引,为原版VanillaPackResources新增紧凑索引,将 ZIP 索引下沉至SharedZipFileAccess供 overlay 共享,并在FallbackResourceManager、DelegatingPackResources与CompositePackResources中跳过空命名空间与空目录子包调用。 - 消除 1.21.1+
MultiPackResourceManager资源列表缓存的ConcurrentHashMap桶锁竞争,并复用首次重载期间的FileToIdConverter.listMatchingResourceStacks查询。 - 避免
ModelLocationSets.IndexedLocationSet在批量写入方块状态及追加物品/独立模型时构建完整方块状态哈希表;优化大状态集方块的StateVariantSupport查找、将BitSetVoxelUnion改为字级位运算、使ObjectHolderDispatch增量追加更新,并缩减FontWarmupSnapshot提供方探测次数。 - 调整 Forge
PathResourcePackMixin优先走零分配早期索引以避免 Agent 模式下重复创建归档视图,并在 Bootstrap Agent 中补齐 NeoForge 1.21.1SecureJarHandler(Jar$JarModuleDataProvider)的直接路径读取补丁。
Lightspeed 2.0.11
发布与打包
- 在 Forge 1.20.1、NeoForge 1.21.1、Fabric 1.20.1、Fabric 1.21.1、Fabric 26.1.2、NeoForge 26.1.2、Fabric 26.2 和 NeoForge 26.2 上发布覆盖全部 8 个目标版本的完整发行。
- 在 NeoForge 26.1.2 和 NeoForge 26.2 的元数据中声明兼容的 Minecraft 版本范围(
[26.1.2,26.2)和[26.2,26.3)),而非单一版本约束。 - 包含所有 2.0.10 的启动缓存、加载器原生包索引、光影快照、mipmap 快速路径以及基于
.lsc摘要的持久化改进。
Lightspeed 2.0.10
启动与资源加载
- 在 Forge 1.20.1 和 NeoForge 1.21.1 上启用加载器原生的单 JAR 整合包索引功能,无需 JVM Agent;将早期的 ZIP 预索引移至非主线程并复用解码缓冲区,并在到达标题画面时释放启动注册表与归档句柄。
- 将
UnionFileSystem的构建移出UnionFileSystemProvider监视锁,并为 Forge/NeoForgeModWorkManager工作池采用 FIFO 调度策略,同时保留模组的拓扑顺序。 - 在
VanillaPackResources中,以仅用于启动阶段的直接查找缓存替换每次查找时ResourceLocation.toString()带来的开销。 - 通过内容摘要比较跳过重写未更改的
.lsc缓存文件,仅清理过期文件,并移除逐文件的fsync调用。
渲染、资产与运行时开销
- 添加并行 Mipmap 生成以及快速路径的 Mipmap / 不透明精灵处理(包括 Sodium/Embeddium 兼容性)。
- 在 Forge 1.20.1、NeoForge 1.21.1、Fabric 1.20.1 和 Fabric 1.21.1 上添加感知 GLSL
#moj_import的光影程序二进制快照功能。 - 在字体预热过程中移除磁盘/SHA-256 快照开销,同时保留预分配大小的反向数组预热过程。
- 移除对
Material和ResourceLocationhashCode()的装箱 Mixin 注入,消除GlobalCache.add的监视锁竞争及每条目清理任务风暴,并减少StateDefinition和多部分Selector的启动分配。 - 将可选的
NativeImageSnapshot载荷校验和切换为硬件加速的 CRC32C,使用零拷贝读取视图并在启动后释放堆内存。 - 在 Fabric 元数据中声明兼容的 Minecraft SemVer 范围(
~1.20.1、~1.21.1)。
- 协调资源缓存持久化读取与启动关闭。
- 修复持久化资源缓存读取与启动线程池关停之间的竞态。
- 修复了 JAR 文件名中包含 URI 保留字符时的资源缓存标识问题。
- 修复了在 Forge 1.20.1 上,Enhanced Block Entities Reloaded 在延迟块实体渲染器下告示牌的渲染问题。
- 将共享实现与原生版本/加载器绑定整合至公共模块。
- 修正了发布版 JAR 及其运行时依赖的原生 Forge Gradle 启动问题。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧