跳到正文

JavaScriptJS

作者:yiran1457

allow kubejs write js file

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

English

Added the following to KubeJS‘s JsonIO:

  • writeAndCreateDirectories – Creates parent directories when writing a JSON file
  • findJsonInDirectory – Can be used to find paths of all JSON files in a directory
  • read(path,reader) – Get all files under the path directory and execute the reader function.
    reader:(path,file,json)=>{}

Added JSIO:

  • getAllowSuffix – Check allowed file suffixes for operations
  • read – Read a file and return a List<String>
  • exists – Check if a file exists
  • write – Write to a file and create parent directories
  • delete – Delete a file
  • findJSInDirectory – Can be used to find paths of all JS files in a directory

中文

向KubeJS的JsonIO里面添加了

  • writeAndCreateDirectories – 在写json文件的时候创建其所属的文件夹
  • findJsonInDirectory – 可以查询一个目录下面的所有json文件的路径
  • read(path,reader) – 获取path文件夹下面的全部文件,并执行reader函数
    reader:(path,file,json)=>{}

添加了JSIO

  • getAllowSuffix – 查询允许操作的文件后缀名
  • read – 读取一个文件返回List<String>
  • exists – 检测一个文件是否存在
  • write – 写入一个文件,并创建其所属的文件夹
  • delete – 删除文件
  • findJSInDirectory – 可以查询一个目录下面的所有js文件的路径

常见问题

JavaScriptJS 支持哪些 Minecraft 版本?

JavaScriptJS 支持 Minecraft Java 版 1.19–1.21.1,共 13 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

JavaScriptJS 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

yiran1457 的其他作品

查看全部 →