/*
StartupEvents.registry('block', (e) => {
    e.create('arrzenhanced:titanium_ore')
    .displayName('Titanium Ore')
    .mapColor('stone')
    .soundType('stone')
    .hardness(3.0)
    .resistance(6.0)
    .requiresTool(true)
    .tagBlock('minecraft:mineable/pickaxe')
    .tagBlock('minecraft:needs_diamond_tool')
    .tagBoth('forge:ores/titanium')
    .textureAll('arrzenhanced:block/titanium_ore')
    // .setLootTableJson(getOreLootTable('arrzenhanced:titanium_ore', 'palladium:raw_titanium'))

    let z = e.create('arrzenhanced:deepslate_titanium_ore')
    .displayName('Deepslate Titanium Ore')
    .mapColor('deepslate')
    .soundType('deepslate')
    .hardness(5.0)
    .resistance(6.0)
    .requiresTool(true)
    .tagBlock('minecraft:mineable/pickaxe')
    .tagBlock('minecraft:needs_diamond_tool')
    .tagBoth('forge:ores/titanium')
    .textureAll('arrzenhanced:block/deepslate_titanium_ore')
    // .setLootTableJson(getOreLootTable('arrzenhanced:deepslate_titanium_ore', 'palladium:raw_titanium'))
    // .lootTable = getOreLootTable('arrzenhanced:deepslate_titanium_ore', 'palladium:raw_titanium')

    e.create('arrzenhanced:nether_titanium_ore')
    .displayName('Nether Titanium Ore')
    .mapColor('nether')
    .soundType('nether_ore')
    .hardness(5.0)
    .resistance(6.0)
    .requiresTool(true)
    .tagBlock('minecraft:mineable/pickaxe')
    .tagBlock('minecraft:needs_diamond_tool')
    .tagBoth('forge:ores/titanium')
    .textureAll('arrzenhanced:block/nether_titanium_ore')
    // .setLootTableJson(getOreLootTable('arrzenhanced:nether_titanium_ore', 'palladium:raw_titanium'))

    e.create('arrzenhanced:titanium_block')
    .displayName('Block of Titanium')
    .mapColor('metal')
    .soundType('metal')
    .hardness(5.0)
    .resistance(12.0)
    .requiresTool(true)
    .tagBlock('minecraft:mineable/pickaxe')
    .tagBlock('minecraft:needs_diamond_tool')
    .tagBoth('forge:storage_blocks/titanium')
    .tagBlock('minecraft:beacon_base_blocks')
    .textureAll('arrzenhanced:block/titanium_block')
})
*/

StartupEvents.registry('item', (e) => {
    e.create('arrzenhanced:titanium_ingot')
    .displayName('Titanium Ingot')
    .texture('arrzenhanced:item/titanium_ingot')
    .tag('forge:ingots/titanium')
    .tag('hertz:high_value')
    .rarity('RARE')
})

var getOreLootTable = (block, item) => { return {
    "type": "minecraft:block",
    "pools": [
        {
            "rolls": 1,
            "entries": [
            {
                "type": "minecraft:alternatives",
                "children": [
                {
                    "type": "minecraft:item",
                    "name": item,
                    "conditions": [
                    {
                        "condition": "minecraft:match_tool",
                        "predicate": {
                        "enchantments": [
                            {
                            "enchantment": "minecraft:silk_touch",
                            "levels": {
                                "min": 1
                            }
                            }
                        ]
                        }
                    }
                    ]
                },
                {
                    "type": "minecraft:item",
                    "name": block
                }
                ]
            }
            ],
            "conditions": [
                {
                    "condition": "minecraft:survives_explosion"
                }
            ]
        }
    ]
}
}