const $IProperties = Java.loadClass('net.minecraft.world.item.Item$Properties');
const $HammerItem = Java.loadClass('net.teamsolar.simplest_hammers.item.custom.HammerItem');
const $ExcavatorItem = Java.loadClass('net.teamsolar.simplest_excavators.item.custom.ExcavatorItem');
const $KnifeItem = Java.loadClass('vectorwing.farmersdelight.common.item.KnifeItem');
const $OverGearedTiers = Java.loadClass('net.stirdrem.overgeared.item.ModToolTiers');
const $Tiers = Java.loadClass("net.minecraft.world.item.Tiers");

StartupEvents.registry('item', event => {

  event.create('primitive_tongs', 'sword')
    .maxStackSize(1)
    .displayName("Primitive Tongs")
    .maxDamage(16)
    .attackDamageBaseline(1)
    .attackDamageBonus(-2)
    .texture('fantasia:item/primitive_tongs');

  event.create('heated_iron_plate')
    .displayName('Heated Iron Plate')
    .maxStackSize(64)
    .texture('fantasia:item/heated_iron_plate');

  event.create('heated_steel_plate')
    .displayName('Heated Steel Plate')
    .maxStackSize(64)
    .texture('fantasia:item/heated_steel_plate');

  event.create('smithing_glove', 'sword')
    .maxStackSize(1)
    .displayName("Smithing Glove")
    .maxDamage(16)
    .attackDamageBaseline(1)
    .attackDamageBonus(-2)
    .texture('fantasia:item/smithing_glove');

  event.create('stone_smithing_hammer', 'sword')
    .displayName("Stone Smithing Hammer")
    .maxDamage(131)
    .texture('fantasia:item/tools/stone/stone_smithing_hammer')
    .tier('stone')
    .attackDamageBaseline(1)
    .attackDamageBonus(-1)
    .speedBaseline(-2.8)
    .unstackable();

  event.createCustom('steel_knife',
    () => new $KnifeItem($OverGearedTiers.STEEL, 0.5, -2.0, new $IProperties()))
    .displayName("Steel Knife");

  event.createCustom('steel_cleaver',
    () => new $KnifeItem($OverGearedTiers.STEEL, 0.5, -2.0, new $IProperties()))
    .displayName("Steel Cleaver");

  event.createCustom('steel_hammer',
    () => new $HammerItem($OverGearedTiers.STEEL, 5, -3.2, new $IProperties().durability(750)))
    .displayName("Steel Excavating Hammer");

  event.createCustom('steel_excavator',
    () => new $ExcavatorItem($OverGearedTiers.STEEL, 2.5, -3.2, new $IProperties().durability(750)))
    .displayName("Steel Excavator");

  event.create('stone_tip')
    .maxStackSize(64)
    .displayName("Stone Sharpened Tip")
    .texture('fantasia:item/tools/stone/stone_tip');

  event.create('stone_hammer_head')
    .maxStackSize(64)
    .displayName("Stone Excavating Hammer Head")
    .texture('fantasia:item/tools/stone/stone_hammer_head');

  event.create('iron_hammer_head')
    .maxStackSize(64)
    .displayName("Iron Excavating Hammer Head")
    .texture('fantasia:item/tools/iron/iron_hammer_head');

  event.create('steel_hammer_head')
    .maxStackSize(64)
    .displayName("Steel Excavating Hammer Head")
    .texture('fantasia:item/tools/steel/steel_hammer_head');

  event.create('diamond_hammer_head')
    .maxStackSize(64)
    .displayName("Diamond Excavating Hammer Head")
    .texture('fantasia:item/tools/diamond/diamond_hammer_head');

  event.create('iron_excavator_head')
    .maxStackSize(64)
    .displayName("Iron Excavator Head")
    .texture('fantasia:item/tools/iron/iron_excavator_head');

  event.create('steel_excavator_head')
    .maxStackSize(64)
    .displayName("Steel Excavator Head")
    .texture('fantasia:item/tools/steel/steel_excavator_head');

  event.create('diamond_excavator_head')
    .maxStackSize(64)
    .displayName("Diamond Excavator Head")
    .texture('fantasia:item/tools/diamond/diamond_excavator_head');

  event.create('iron_cleaver_blade')
    .maxStackSize(64)
    .displayName("Iron Cleaver Blade")
    .texture('fantasia:item/tools/iron/iron_cleaver_blade');

  event.create('steel_cleaver_blade')
    .maxStackSize(64)
    .displayName("Steel Cleaver Blade")
    .texture('fantasia:item/tools/steel/steel_cleaver_blade');

  event.create('diamond_cleaver_blade')
    .maxStackSize(64)
    .displayName("Diamond Cleaver Blade")
    .texture('fantasia:item/tools/diamond/diamond_cleaver_blade');

  // IRON SPEARHEAD

  event.create('iron_spearhead')
    .maxStackSize(64)
    .displayName("Iron Spearhead")
    .texture('fantasia:item/tools/iron/iron_spearhead');

  // IRON CURVED BLADE

  event.create('iron_curved_blade')
    .maxStackSize(64)
    .displayName("Iron Curved Blade")
    .texture('fantasia:item/tools/iron/iron_curved_blade');

  // LONGSWORD BLADE

  event.create('iron_longsword_blade')
    .maxStackSize(64)
    .displayName("Iron Longsword Blade")
    .texture('fantasia:item/tools/iron/iron_longsword_blade');

  // IRON BLADE

  event.create('iron_blade')
    .maxStackSize(64)
    .displayName("Iron Blade")
    .texture('fantasia:item/tools/iron/iron_blade');

  // GREATSWORD BLADE

  event.create('iron_greatsword_blade')
    .maxStackSize(64)
    .displayName("Iron Greatsword Blade")
    .texture('fantasia:item/tools/iron/iron_greatsword_blade');

  // MISC IRON HEADS

  event.create('iron_battle_hammer_head')
    .maxStackSize(64)
    .displayName("Iron Battle Hammer Head")
    .texture('fantasia:item/tools/iron/iron_battle_hammer_head');

  event.create('iron_battleaxe_head')
    .maxStackSize(64)
    .displayName("Iron Battleaxe Head")
    .texture('fantasia:item/tools/iron/iron_battleaxe_head');

  event.create('iron_flanged_mace_head')
    .maxStackSize(64)
    .displayName("Iron Flanged Mace Head")
    .texture('fantasia:item/tools/iron/iron_flanged_mace_head');

  event.create('iron_halberd_head')
    .maxStackSize(64)
    .displayName("Iron Halberd Head")
    .texture('fantasia:item/tools/iron/iron_halberd_head');

  event.create('iron_warhammer_head')
    .maxStackSize(64)
    .displayName("Iron Warhammer Head")
    .texture('fantasia:item/tools/iron/iron_warhammer_head');

  // steel SPEARHEAD

  event.create('steel_spearhead')
    .maxStackSize(64)
    .displayName("Steel Spearhead")
    .texture('fantasia:item/tools/steel/steel_spearhead');

  // steel CURVED BLADE

  event.create('steel_curved_blade')
    .maxStackSize(64)
    .displayName("Steel Curved Blade")
    .texture('fantasia:item/tools/steel/steel_curved_blade');

  // LONGSWORD BLADE

  event.create('steel_longsword_blade')
    .maxStackSize(64)
    .displayName("Steel Longsword Blade")
    .texture('fantasia:item/tools/steel/steel_longsword_blade');

  // GREATSWORD BLADE

  event.create('steel_greatsword_blade')
    .maxStackSize(64)
    .displayName("Steel Greatsword Blade")
    .texture('fantasia:item/tools/steel/steel_greatsword_blade');

  // MISC steel HEADS

  event.create('steel_battle_hammer_head')
    .maxStackSize(64)
    .displayName("Steel Battle Hammer Head")
    .texture('fantasia:item/tools/steel/steel_battle_hammer_head');

  event.create('steel_battleaxe_head')
    .maxStackSize(64)
    .displayName("Steel Battleaxe Head")
    .texture('fantasia:item/tools/steel/steel_battleaxe_head');

  event.create('steel_flanged_mace_head')
    .maxStackSize(64)
    .displayName("Steel Flanged Mace Head")
    .texture('fantasia:item/tools/steel/steel_flanged_mace_head');

  event.create('steel_halberd_head')
    .maxStackSize(64)
    .displayName("Steel Halberd Head")
    .texture('fantasia:item/tools/steel/steel_halberd_head');

  event.create('steel_warhammer_head')
    .maxStackSize(64)
    .displayName("Steel Warhammer Head")
    .texture('fantasia:item/tools/steel/steel_warhammer_head');

  event.create('steel_blade')
    .maxStackSize(64)
    .displayName("Steel Blade")
    .texture('fantasia:item/tools/steel/steel_blade');

  // Diamond SPEARHEAD

  event.create('diamond_spearhead')
    .maxStackSize(64)
    .displayName("Diamond Spearhead")
    .texture('fantasia:item/tools/diamond/diamond_spearhead');

  // Diamond CURVED BLADE

  event.create('diamond_curved_blade')
    .maxStackSize(64)
    .displayName("Diamond Curved Blade")
    .texture('fantasia:item/tools/diamond/diamond_curved_blade');

  // LONGSWORD BLADE

  event.create('diamond_longsword_blade')
    .maxStackSize(64)
    .displayName("Diamond Longsword Blade")
    .texture('fantasia:item/tools/diamond/diamond_longsword_blade');

  // GREATSWORD BLADE

  event.create('diamond_greatsword_blade')
    .maxStackSize(64)
    .displayName("Diamond Greatsword Blade")
    .texture('fantasia:item/tools/diamond/diamond_greatsword_blade');

  // MISC Diamond HEADS

  event.create('diamond_battle_hammer_head')
    .maxStackSize(64)
    .displayName("Diamond Battle Hammer Head")
    .texture('fantasia:item/tools/diamond/diamond_battle_hammer_head');

  event.create('diamond_battleaxe_head')
    .maxStackSize(64)
    .displayName("Diamond Battleaxe Head")
    .texture('fantasia:item/tools/diamond/diamond_battleaxe_head');

  event.create('diamond_flanged_mace_head')
    .maxStackSize(64)
    .displayName("Diamond Flanged Mace Head")
    .texture('fantasia:item/tools/diamond/diamond_flanged_mace_head');

  event.create('diamond_halberd_head')
    .maxStackSize(64)
    .displayName("Diamond Halberd Head")
    .texture('fantasia:item/tools/diamond/diamond_halberd_head');

  event.create('diamond_warhammer_head')
    .maxStackSize(64)
    .displayName("Diamond Warhammer Head")
    .texture('fantasia:item/tools/diamond/diamond_warhammer_head');

  event.create('diamond_blade')
    .maxStackSize(64)
    .displayName("Diamond Blade")
    .texture('fantasia:item/tools/diamond/diamond_blade');

  event.create('armor_upgrade_template')
    .maxStackSize(64)
    .displayName("Armorer's Template")
    .texture('fantasia:item/armor_upgrade_template');

  event.create('grease_ball')
    .displayName('Grease Ball')
})

