onEvent('block.loot_tables', event => {

event.build('kubejs:fossilised_urn', table => {
	
var mc_potionType =
	[
	'minecraft:swiftness',
	'minecraft:strength',
	'minecraft:healing',
	'minecraft:harming',
	'minecraft:leaping',
	'minecraft:regeneration',
	'apotheosis:resistance',
	'minecraft:fire_resistance',
	'minecraft:water_breathing',
	'minecraft:invisibility',
	'minecraft:night_vision',
	'apotheosis:absorption',
	'undergarden:glowing',
	'minecraft:luck',
	'minecraft:slow_falling',
	'alexsmobs:knockback_resistance',
	'alexsmobs:lava_vision',
	'alexsmobs:speed_iii',
	'alexsmobs:poison_resistance',
	'alexsmobs:soulsteal',
	'alexsmobs:clinging',
	'apotheosis:haste',
	'apotheosis:knowledge',
	'ars_nouveau:mana_regen_potion',
	'bountifulbaubles:flight',
	'eidolon:anchored',
	'quark:resilience',
	'cyclic:swimspeed',
	'atmospheric:relief',
	'autumnity:extension',
	'upgrade_aquatic:restfulness',
	'upgrade_aquatic:repellence',
	'upgrade_aquatic:vibing',
	'infernalexp:luminous',
	'resourcefulbees:calming',
	'desolation:potion_of_cinder_soul',
	'abundance:supportive'
	]	
table.pool(pool => {
    pool.rolls = 2
	mc_potionType.forEach(pot => {
	const potnbt = `{Potion:"${pot}"}`
	Ingredient.of(['minecraft:splash_potion']).stacks.forEach(potion => {
            pool.addEntry({
          "type": "minecraft:item",
		  "weight": 81,
          "name": potion.id,
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 1
              }
            },
            {
              "function": "minecraft:set_nbt",
              "tag": potnbt
            }
			]
			})
		})
	})

            pool.addEntry({
				"type": "minecraft:item",
				"weight": 35,
				"name": 'potionofbees:splash_potion_of_bees',
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 1
              }
            }
			]
			})
            pool.addEntry({
          "type": "minecraft:item",
		  "weight": 28,
          "name": 'enigmaticlegacy:ultimate_potion_splash',
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 1,
                "max": 1
              }
            },
            {
              "function": "minecraft:set_nbt",
              "tag": '{EnigmaticPotion:"ultimate_night_vision"}'
            }
			]
			})
	})
})
})