KubeJS Chest Item

Quick rating

Community listing page, reviews may not be monitored by the author.

KubeJS Chest Item

No reviews yet

Added KubeJS compatibility for Chest Curio Item

Mod Loaders
Minecraft

About

Description

This mod allows using KubeJS scripts to create some new chest curios.

Supported item types:

  • Normal Curios
StartupEvents.registry('item', event => {
    event.create('item_id', 'chest_item:item_base')
        .displayName('itemName')
        .maxStackSize(1)
        .addAttribute(
            'minecraft:generic.max_health',
            'chest_item:item_max_health',
            0.2,
            'add_multiplied_base'
        )
        .texture('modid:item/texture')
})
  • Shadow Curios
StartupEvents.registry('item', event => {
    event.create('item_id', 'chest_item:item_black_shadow')
        .displayName('itemName')
        .maxStackSize(1)
       .addAttribute(
            'chest_item:shadow_shield',
            'chest_item:item_shadow_shield',
            4,
            'add_value'
        )
        .texture('modid:item/texture')
  • Augments
StartupEvents.registry('item', event => {
    event.create('item_id', 'chest_item:reinforced_item')
        .displayName('itemName')
        .loot(false)  // Should I add it to the loot table
        .valueSan(2)  //Rationality value
        .addAttribute(
            'minecraft:generic.max_health',
            'chest_item:item_shadow_shield',
            -0.1,
            'add_multiplied_total'
        )
        .maxStackSize(1)
        .texture('modid:item/texture')
})
  • Mother Evil Curios
StartupEvents.registry('item', event => {
    event.create('item_id', 'chest_item:evil_mother')
        .displayName('itemName')
        .valueSan(-3)  //Rationality value
        .maxStackSize(1)
        .texture('modid:item/texture')
})
  • Bottles (and associated Faiths)
StartupEvents.registry('item', event => {
    event.create('bottle_id', 'chest_item:memory')
        .displayName('bottle')
        .setMemoryString("kubejs","memory_id")
        .maxStackSize(1)
        .texture('modid:item/texture')
})
//You must create an additional item
//This ID must correspond to the above code
StartupEvents.registry('item', event => {
    event.create('memory_id', 'chest_item:memory_tooltip')
        .displayName('memoryName')
        .setComponent("Large characters")
        .setComponentText("small characters")
        .setColor(0xffffff)
        .maxStackSize(1)
        .texture('modid:item/texture')
})

This mod also adds some predicate methods to check whether the player is wearing the relevant curios, augments or Faiths:

  if (ChestKubeJSHandler.has(player,Item.of('modid:item'))) {
      //Your specific implementation method
  }
  if (ChestKubeJSHandler.hasReinforced(player,Item.of('modid:item'))){
      //Your specific implementation method
  }
  if (ChestKubeJSHandler.hasMemory(player, "modid:item")) {
      //Your specific implementation method
  }