//No Nether Portal

onForgeEvent('net.minecraftforge.event.world.BlockEvent$PortalSpawnEvent', event => {
    event.setCanceled(true)
})

//New Items


//Tool Tiers
events.listen('item.registry.tool_tiers', event => {
event.add("battleaxe", (tier) => {   
    tier.speed = 100,
    tier.level = 3,
    tier.attackDamageBonus = 7
})
event.add("pinksword", (tier) => {   
    tier.speed = 1,
    tier.level = 3,
    tier.attackDamageBonus = 13
})
event.add("sign", (tier) => {   
    tier.speed = 1,
    tier.level = 1,
    tier.attackDamageBonus = -2,
    tier.repairIngredient = 'minecraft:planks'
})

})

//Basic Items

events.listen('item.registry', event => {
event.create('basic_wand').displayName('Basic Wand').maxStackSize(1)
event.create('advanced_wand').displayName('Advanced Wand').maxStackSize(1)
//event.create('hell_bucks').displayName('Hellbucks')
event.create('netherrack_dust').displayName('Netherrack Dust')
event.create('soul_dust').displayName('Soul Dust')
event.create('quartz_cobalt_wand').displayName('Quartz Cobalt Wand').maxStackSize(1)
event.create('aqua_ball').displayName('Aqua Ball')
event.create('spawner_shard').displayName('Spawner Shard').maxStackSize(1)
event.create('activated_spawner_shard').displayName('Activated Spawner Shard').glow(true).maxStackSize(1)
event.create('summoner_wand').displayName('Summoner Wand').glow(true).maxStackSize(1)
event.create('blood_diamond').displayName('Blood Diamond')
event.create('magical_dust').displayName('Magical Dust')
event.create('sphere_generator').displayName('Sphere Generator')

//Custom Foods (.effect('custom effect', duration, level))
event.create('instant_health_stew').food(food => {food.hunger(6).saturation(0.5).effect('minecraft:instant_health', 2, 4, 1.0).eaten(e => {console.log(e.player + " ate " + e.item); e.server.runCommandSilent(`give ${e.player} minecraft:bowl`)})}).displayName('Instant Health Stew').maxStackSize(16).glow(true)
event.create('regeneration_stew').food(food => {food.hunger(6).saturation(0.5).effect('minecraft:regeneration', 200, 2, 1.0).eaten(e => {console.log(e.player + " ate " + e.item); e.server.runCommandSilent(`give ${e.player} minecraft:bowl`)})}).displayName('Regeneration Stew').maxStackSize(16).glow(true)
event.create('apple').food(food => {food.hunger(4).saturation(0.4).effect('minecraft:poison', 60, 1, 1.0)}).displayName('"Apple"').maxStackSize(16)

//Surpoters Items

event.create('battleaxe').displayName("Moody's Battleaxe").type('axe').unstackable().tier('battleaxe').maxDamage(500); //
event.create('pink_sword').displayName("§dAkeihra's Sword Of Pink Gorgeousness").type('sword').unstackable().tier('pinksword').maxDamage(250);
event.create('purple_sword').displayName("§5Purple Sword Of Purple Goodness").type('sword').unstackable().tier('pinksword').maxDamage(250);
event.create('stick').displayName("Shiny Stick").glow(true);
event.create('sign').displayName("§4Supreme Sign").type('sword').unstackable().tier('sign').maxDamage(64).attackSpeed(3);

//const ur_item = event.create('sign').displayName("Supreme Sign").type('sword').unstackable().tier('sign').maxDamage(64);
//ur_item.attackSpeedBaseline = 5;


//event.create('patreon:battleaxe').displayName('Moodys Battleaxe').type('axe').maxDamage(500).attackDamage(20).attackSpeed(14).miningSpeed(1000).tooltip('Im a custom item, Hello').unstackable()
//vent.create('seabuck_coffee').food(food => {food.hunger(2).saturation(2).effect('minecraft:speed', 100, 9, 1.0).eaten(e => {console.log(e.player + " ate " + e.item); e.server.runCommandSilent(`give ${e.player} minecraft:glass_bottle`)})}).displayName('Seabucks Coffee').maxStackSize(8)
//event.create('cooked_apple').food(food => {food.hunger(6).saturation(1)}).displayName('Cooked Apple').maxStackSize(64)

})

//New Blocks

events.listen('block.registry', event => {

event.create('unpowered_starmetal_ore').displayName('Unpowered Starmetal Ore').material('rock').hardness(1.0).requiresTool(true)
event.create('aqua_bricks').displayName('Aqua Bricks').material('rock').hardness(1.0).requiresTool(true)
//event.create('infuser').displayName('Infuser').material('rock').hardness(1.2).requiresTool(true)

})

// New Fluids
events.listen('fluid.registry', event => {
event.create('starmetal').textureThick(0xE4DFD5).displayName('Molten Starmetal').bucketColor(0x08083A).textureThick(0x08083A)
event.create('organic_fluid').textureThick(0x86A774).displayName('Organic Water').bucketColor(0x86A774) 
//event.create('starmetal').textureThick(0xE4DFD5).displayName('Molten Starmetal').bucketColor(0x08083A).textureStill('kubejs:fluid/starmetal').textureFlowing('kubejs:fluid/starmetal_flowing')
//event.create('weak_enriching_fluid').textureThick(0xD79113).displayName('Weak Enriching Water').bucketColor(0xD79113)
//event.create('strong_enriching_fluid').textureThick(0x808080).displayName('Strong Enriching Water').bucketColor(0x808080)
//event.create('nether_enriching_fluid').textureThick(0x580704).displayName('Nether Enriching Water').bucketColor(0x580704)
//event.create('end_enriching_fluid').textureThick(0xD9E0A4).displayName('End Enriching Water').bucketColor(0xD9E0A4)
//event.create('ore_fluid').textureThick(0x44DCFF).displayName('Ore Forming Water').bucketColor(0x44DCFF)
//event.create('creosote_fluid').textureThick(0x7F2300).displayName('Strong Creosote Oil').bucketColor(0x7F2300)

})