[RevJS]Revelationary JS
模组属性评比

距离显示结果还剩5票~

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

历史编辑记录更多
    管理组

      暂无管理组..

    编辑组

      暂无编辑组..

    最近参与编辑
    活跃
    开源
    [RevJS]

    Revelationary JS

    0.0

    无人问津

    昨日指数: 10
    昨日平均指数: 67.753

    2117

    总浏览

    --

    资料填充率


    如何下载?
    • Revelationary JS

      使用 KubeJS 调用 Revelationary API 以创建可被隐藏的方块和物品。

      Revelationary Wiki

      例子

      服务端脚本

      ServerEvents.revelation(event => {
          event.registerFromJson({
              "block_states": {
                  "minecraft:grass": "minecraft:beacon",
                  "minecraft:tall_grass": "minecraft:obsidian",
                  "minecraft:tall_grass[half=upper]": "minecraft:netherite_block"
              },
              "items": {
                  "minecraft:nether_star": "minecraft:gunpowder"
              },
              "advancement": "minecraft:nether/root"
          })

          event.register("minecraft:adventure/root", revBuilder => {
              revBuilder
                  .cloakBlockState("minecraft:grass", "minecraft:beacon")
                  .cloakItem("minecraft:nether_star", "minecraft:gunpowder")
                  .cloakItem("minecraft:diamond_ore", "minecraft:stone")
                  .replaceItemName("minecraft:nether_star", "block.minecraft.poppy")
                  .replaceItemName("minecraft:diamond_ore", "Probably Stone?")
                  .replaceItemName("minecraft:grass", "block.minecraft.dandelion")
                  .replaceItemName("minecraft:gold_ore", "Since Gold Ore is not in the items tag above, you should never see this")
                  .replaceBlockName("minecraft:grass", "block.minecraft.dandelion")
          })
          
          let count = 0;
          event.onReveal((doneAdvancements, revealedBlocks, revealedItems, isJoinPacket) => {
              console.log("Hey " + (++count))
          })
      })


      启动脚本

      // 注册一个被隐藏的方块
      StartupEvents.registry("block", event => {
          event
              .create("revjs:example_block", "cloaked")
              .cloakAdvancement("story/smelt_iron")
              .cloakedBlockTranslation("I'm stone stairs!")
              // Or just 'cloakBlock("stone_stiars")'
              .blockStateCloak(Block.id("revjs:example_block"), Block.id("stone_stairs", { "facing": "west" }))
              .onCloak((cloakedBlock, cloakAdvancement, cloakBlock) => { })
              .onUnCloak((cloakedBlock, cloakAdvancement, cloakBlock) => { })
      })

      // 注册一个被隐藏的物品
      StartupEvents.registry("item", event => {
          event
              .create("revjs:example_item", "cloaked")
              .cloakAdvancement("story/smelt_iron")
              .cloakedItemTranslation("I'm diamond!")
              .cloakItem("diamond")
              .onCloak((cloakedItem, cloakAdvancement, cloakItem) => { })
              .onUnCloak((cloakedItem, cloakAdvancement, cloakItem) => { })
      })

    短评加载中..