Function Compiler
模组属性评比

距离显示结果还剩5票~

路过的这位少侠,你觉得这款Mod怎么样,可否愿意来评一评它呢?登录并评比
更新日志
  • 暂无日志..

历史编辑记录更多
    管理组申请

      暂无管理组..

    编辑组申请

      暂无编辑组..

    开发组申请

      暂无开发组..

    活跃
    开源

    Function Compiler

    0.0

    无人问津

    昨日指数: 7
    昨日平均指数: 71.797

    1200

    总浏览

    --

    资料填充率


    如何下载?
    • Function Compiler

      注意:该模组处于早期开发阶段,不建议在开发环境以外使用它。

      该模组允许服务器在加载时将数据包中的函数编译为 Java 字节码,从而提高性能,因为编译后的代码可以一次性运行所有内容,而不是逐个运行命令。
      为提高性能,该模组将不遵守 maxCommandChainLength 游戏规则,否则编译后的代码将需要检查运行的命令数量,这可能会很慢。

      使用方法

      将 Mod 与所有依赖项一起放在 Fabric 服务器上,Mod 会自动尝试优化所有支持的函数和命令。

      如果您遇到任何崩溃问题,请在问题跟踪器上报告,并暂时关闭 Mod 直到问题得到解决。

      支持的命令

      当然,该模组不可能支持所有命令,因此它只会为只包含受支持命令的函数生成代码,目前不会编译带有宏的函数

      它无法编译宏,因为任何值都可以以任何方式解释,而这很难使用编译时已知的东西来实现。

      以下展示了各个版本支持命令的变化。

      0.1.0-alpha.1 新增:

      execute as
      execute if entity
      execute if score
      execute run
      function (注:不能含有参数)
      kill
      scoreboard players add
      scoreboard players operation =
      scoreboard players operation +=
      scoreboard players operation -=
      scoreboard players operation *=
      scoreboard players remove
      scoreboard players reset (不能设定对象)
      scoreboard players set
      tag add
      tag remove

      0.1.0-alpha.2 新增:

      execute unless entity
      execute unless score
      scoreboard players operation /=
      scoreboard players operation %=
      scoreboard players operation <
      scoreboard players operation >
      scoreboard players operation ><

      0.1.0-alpha.4 :

      execute at

      0.1.0-alpha.5 :

      execute positioned <pos>
      注: 还支持了选择器参数 scores。

      0.1.0-alpha.6 :

      execute align
      gamemode
      注: 还支持了选择器参数 gamemode, team, type。

      0.1.0-alpha.7 :

      attribute <target> <attribute> base set
      execute store result score
      scoreboard players get

      0.2.0-alpha.3 :

      scoreboard players reset
      还支持了选择器 x_rotation, y_rotation。

      支持的选择器

      并非所有选择器都受支持,目前只支持选择器 UUID, 玩家名称, @e, @a, @s;支持选择器参数 gamemode, limit, tag, team, type, scores。

      随着模组更新,支持的命令与选择器可能还会增加,此处的列表仅供参考。

      工作原理

      该模组的工作原理是使用 Java 的类加载器,在运行时生成函数的字节码并加载它们,如有意愿,可以在这里查看源文件。

    短评加载中..