0. ProbeJS v8.0
欢迎来到未来!由于 TypeScript 进行了重大更新,在 v7.7.2 中弃用了 ProbeJS 的类型结构,我们重写了模组和扩展程序以兼容新的 TypeScript 版本(并希望与前期的 TypeScript 版本向后兼容)。
然而,由于 TypeScript Native (tsgo) 尚未完全实现,模组中缺少一些功能。当 TypeScript Native 准备就绪时,模组将持续更新以添加缺失的功能。
v8.0 的新增内容:
- 兼容
tsgo的类型声明。TypeScript Native 是一款使用 Go 语言编写的全新 TypeScript 编译器,其速度比原版 TypeScript 快 10 倍,且内存占用更少。我们测试了tsgo,结果显示在 ATM10 上物品字面量补全时间不到 500ms,类/事件补全即时完成。 - 一个 GUI,允许你在游戏中轻松配置模组并显示转储进度。此外,由于
tsgo尚不支持语言插件,它还允许你将require()转换为Java.loadClass()。 - (希望)更正确的类型生成。随着类型解析的重写,之前版本中的大多数问题现已修复。
- 对智能体和 LLM 的密集支持。你现在可以让 DeepSeek 或 GPT 等 AI 生成 100% 正确的 KubeJS 代码!
1. 安装
- 获取 VSCode。并安装 Microsoft 发布的
Typescript (Native Preview)扩展。 - 安装模组,并且安装 ProbeJS VSCode 扩展。
- 在游戏中,使用
/probejs并点击转储按钮。 - 在 VSCode 中打开
.minecraft文件夹,你应该能看到片段和类型功能正常运行。 - 如果需要刷新生成的类型,请重新转储。如果 VSCode 未响应文件更改,请重启 VSCode 以强制刷新扩展和语言服务器。
0. ProbeJS v8.0
Welcome to the future! As TypeScript had experienced a major update that deprecated the typing structure of ProbeJS in v7.7.2, we rewrote the mod and the extension to be compatible with the new TypeScript version (and hopefully backward-compatible with the previous TypeScript versions.)
However, there are some features missing in the mod due to the TypeScript Native (tsgo) is not fully implemented yet, the mod will receive continuous updates to add the missing features when TypeScript Native is ready.
What's new in v8.0:
tsgocompatible type declarations. TypeScript Native is a new TypeScript compiler written in Go, which is 10x faster and use much less memory than the original TypeScript. We had testedtsgoand it showed less than 500ms item literal completion time and instant class/event completions on ATM10.- A GUI that allows you to configure the mod easily in-game and show the dumping progress. Also, it allows you to convert
require()toJava.loadClass()due totsgois not supporting language plugins yet. - (Hopefully) more correct typing generation. Most problems in the previous versions are now fixed as the type resolution is rewritten.
- Intensive support of agents and LLMs. You can make AIs like DeepSeek or GPT generate 100% correct KubeJS code now!
1. Installation
- Get VSCode. And install
Typescript (Native Preview)extension by Microsoft. - Install the mod, and install the ProbeJS VSCode Extension.
- In game, use
/probejsand click the dump button. - Open the
.minecraftfolder in VSCode, you should see snippets and typing functioning. - Re-dump in case of you want to refresh the generated typing. If VSCode is not responding to file changes, restart VSCode to force a refresh in extension and the language server.
下载 ProbeJS
下载 ProbeJS
下载 ProbeJS
下载 ProbeJS
下载 ProbeJS
下载 ProbeJS
下载 ProbeJS
- 添加了
Internal命名空间,便于进行 JSDoc 类型注解 - 为
GLFWInput绑定添加了类型 - 添加了 Parchment JSON 和 NeoForge 源码补丁处理,以解析方法的参数名称
- 此外,NeoForge 源码补丁处理会将源码中的 Javadoc 作为 JSDoc 注释添加
- 修改了 /give 命令,支持从标签中给予所有物品,以更好地集成 Kubedex
- 带有 @Nullable 注解的参数现在被标记为
T | null - 重新添加了
@item、@block... 注册表代码片段 - 添加了实验性的 agents.md 和 handoffs,用于通过 LLM(目前仅支持 Copilot Chat)实现 KubeJS 代码
ItemBuilder.component现在具有正确的类型
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧