promotional bannermobile promotional banner
premium banner
A simple KubeJS plugin that enables adding new blocks that adapt the third eye effect from Occultism.

Description

A simple KubeJS plugin that enables adding new blocks that adapt the third eye effect from Occultism.

Adds a new block registry type, and four new methods available only in that type.

The below example registers a block that looks like a stone block without the effect, and with the effect, looks like a gold ore. You can also set the block's harvesting tier so it may require a higher level of otherworld tool to harvest (the uncovered version).

By default, any newly registered otherworld block will use the loot tables from both the covered block and the uncovered block. If you wish to use a custom loot table json, you need to call useCustomLoot() in the registry event.

Example

StartupEvents.registry('block', event => {
    // Use the type 'otherworld' to register a otherworld block
    event.create('custom_otherworld_block', 'otherworld')
        .hardness(1)
        .resistance(1)
        .requiresTool(true)
        .tagBlock('minecraft:mineable/pickaxe')
        .tagBlock('minecraft:needs_iron_tool')
        // Additional methods provided by KOBB
        // Mandatory
        .uncoveredBlock('minecraft:gold_ore')
        .coveredBlock('minecraft:stone')
        .tier(1)
        // Optional
        .useCustomLoot()
})