ScreenJS
模组属性评比

距离显示结果还剩5票~

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

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

      暂无管理组..

    编辑组申请

      暂无编辑组..

    开发组申请

      暂无开发组..

    活跃
    开源

    ScreenJS

    0.0

    无人问津

    昨日指数: 6
    昨日平均指数: 104.191

    2721

    总浏览

    --

    资料填充率


    如何下载?
    • 这是一个用于创建菜单 (GUI) 的 KubeJS 拓展。

      功能:

      • 方块;

      • 方块实体;

      • 实体(计划中)。

      下面为示例: 

      StartupEvents.registry('block', event => {
          event.create('example_block', 'entity').material('wood').hardness(1.0).displayName('Example Block')
              .entity(builder => { // adds a BlockEntity onto this block
                  builder.ticker((level, pos, state, be) => { // a tick method, called on block entity tick
                          if (!level.isClientSide) { // ALWAYS check side, the tick method is called on both CLIENT and SERVER
                              if (level.getGameTime() % 20 === 0) {
                                  if (level.getBlockState(pos.above()) === Blocks.AIR.defaultBlockState()) {
                                      level.setBlock(pos.above(), Blocks.GLASS.defaultBlockState(), 3)
                                  } else {
                                      level.setBlock(pos.above(), Blocks.AIR.defaultBlockState(), 3)
                                  }
                              }
                              BE_LOGGER.info('aaa aaa')
                          }
                      }).saveCallback((level, pos, be, tag) => { // called on BlockEntity save, don't see why you would ever need these tbf, but they're here
                          tag.putInt("tagValueAa", be.getPersistentData().getInt('progress'))
                      }).loadCallback((level, pos, be, tag) => { // called on BlockEntity load, same as above
                          be.getPersistentData().putInt("progress", tag.getInt("tagValueAa"))
                      }).defaultValues(tag => tag = {
                          progress: 0,
                          example_value_for_extra_saved_data: '0mG this iz Crazyyy'
                      }) // adds a 'default' saved value, added on block entity creation (place etc)
                      // [1st param: CompoundTag consumer]
                      .addValidBlock('example_block') // adds a valid block this can attach to, useless in normal circumstances (except if you want to attach to multible blocks)
                      .hasGui() // if ScreenJS is installed, marks this blockentity as having a GUI, doesn't do anything otherwise
                      .itemHandler(27) // adds a basic item handler to this block entity, use something like PowerfulJS for more advanced functionality
                      // [1st param: slot count]
                      .energyHandler(10000, 1000, 1000) // adds a basic FE handler, same as above
                      // [1st param: max energy, 2nd param: max input, 3rd param: max output]
                      .fluidHandler(1000, stack => true) // adds a basic fluid handler
                      // [1st param: max amount, 2nd param: fluid filter]
              })
      })

    短评加载中..