const $HorseArmorItem = Java.loadClass('net.minecraft.world.item.HorseArmorItem')
const $Properties = Java.loadClass('net.minecraft.world.item.Item$Properties')

StartupEvents.registry('item', event => {
	// The texture for this item has to be placed in kubejs/assets/kubejs/textures/item/test_item.png
	// If you want a custom item model, you can create one in Blockbench and put it in kubejs/assets/kubejs/models/item/test_item.json
	event.create('caramel')
	.food(food => {food
		.hunger(6)
		.saturation(6)// This value does not directly translate to saturation points gained
		// The real value can be assumed to be:
		// min(hunger * saturation * 2 + saturation, foodAmountAfterEating)
		.fastToEat()// Like dried kelp
	})
	
	event.create('smiley_caramel')
	.food(food => {food
		.hunger(6)
		.saturation(6)// This value does not directly translate to saturation points gained
		// The real value can be assumed to be:
		// min(hunger * saturation * 2 + saturation, foodAmountAfterEating)
		.effect('speed', 600, 0, 1)
		.alwaysEdible()// Like golden apples
		.fastToEat()// Like dried kelp
	})
	
	event.create('carameliser','sword')
	.attackDamageBaseline(10000.0)
	
	event.create('utility')
	.displayName("Dev Utility Item")
	
	event.create('trophy')
	.displayName("Trophy")
	
	event.create('carryocc')
	.displayName("Carryocc Helmet")	
	
	event.create('necromium_upgrade_smithing_template')
	.displayName("Smithing Template")

	event.create('valkyrum_upgrade_smithing_template')
	.displayName("Smithing Template")
	
	event.create('rotten_flesh_burger')
	.food(food => {food
		.hunger(12)
		.saturation(1)
		.effect('minecraft:hunger', 20, 0, 0.8)
	})
	
	/*event.create('bronze_horse_armor')
	.displayName("Bronze Horse Armor")	*/
	
	event.createCustom('bronze_horse_armor', () => new 
	$HorseArmorItem['(int,net.minecraft.resources.ResourceLocation,net.minecraft.world.item.Item$Properties)']
	(11, 'kubejs:textures/entity/horse/armor/horse_armor.png', (new $Properties()).stacksTo(1)))
	
	event.create('blueberry_pie_slice')
	.displayName("Slice of Blueberry Pie")
	
	// Fish Slices
	event.create('lanternfish_slice')
	.displayName("Raw Lanternfish Slice")
	.food(food => {food
		.hunger(1)
		.saturation(0.1)
		.effect('minecraft:glowing', 200, 0, 1)
	    .fastToEat(true)
	})

	event.create('cooked_lanternfish_slice')
	.food(food => {food
		.hunger(3)
		.saturation(0.5)
		.effect('minecraft:glowing', 200, 0, 1)
	    .fastToEat(true)
	})

	event.create('piranha_slice')
	.displayName("Raw Piranha Slice")
	.food(food => {food
		.hunger(1)
		.saturation(0.1)
	    .fastToEat(true)
	})

	event.create('cooked_piranha_slice')
	.food(food => {food
		.hunger(4)
		.saturation(0.6)
	    .fastToEat(true)
	})
	
	event.create('catfish_slice')
	.displayName("Raw Catfish Slice")
	event.create('cooked_catfish_slice')
	
	event.create('aerglow_fish_slice')
	.displayName("Raw Aerglow Fish Slice")
	event.create('cooked_aerglow_fish_slice')
	
	event.create('lionfish_slice')
	.displayName("Raw Lionfish Slice")
	event.create('cooked_lionfish_slice')
	
	
	
	
})
