onEvent('block.loot_tables', event => {
event.build('kubejs:lootblock_builder', table => {		
table.pool(pool => {
    pool.rolls = 2
	Ingredient.of(['@adchimneys', '@additional_lights', '@mcwdoors', '/engineersdecor:.+shingle.+/']).filter(Ingredient.of(['/additional_lights:soul_wand/', '/mcwdoors:print_.+/']).not()).stacks.forEach(stack => {
            pool.addEntry({
              "type": "minecraft:item",
			  "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2.0,
                "max": 4.0,
                "type": "minecraft:uniform"
              }
            }
          ],
              "name": stack.id
            })
		})
	})
table.pool(pool => {
    pool.rolls = 6
	Ingredient.of([
	'@masonry', '@chineseworkshop', '@ceramics', '/eidolon:smooth_stone.+/', '/eidolon:polished_planks.+/', 'eidolon:polished_wood_pillar', 'cyclic:mason_cobble', 'cyclic:mason_stone', 'cyclic:mason_steel', 'cyclic:mason_iron', 'cyclic:mason_plate', '/extcaves:bricks_ice.+/', '/extcaves:bricks_snow.+/', '/extcaves:.+lavastone.+/', '/mysticalworld:.+mud.+/', '/mysticalworld:.+mushroom.+/', '/mysticalworld:.+thatch.+/', '/mysticalworld:.+stone.+/', '/mysticalworld:.+iron.+/', '/mysticalworld:.+terracotta.+/', '/create:.+window.+/', '/create:.+granite.+/', '/create:.+diorite.+/', '/create:.+andesite.+/', '/create:.+limes.+/', '/create:.+dolomite.+/', '/create:.+gabbro.+/', '/create:.+scoria.+/', '/engineersdecor:.+dense.+/', '/engineersdecor:.+brick.+/', '/byg:.+dacite.+/', '/byg:.+mossy.+/', '/byg:.+red_rock.+/', '/byg:.+rocky.+/', '/byg:.+scoria.+/', '/byg:.+soap.+/', '/byg:.+sand.+/', '/byg:.+thatch.+/', '/quark:.+iron_plate.+/', '/quark:.+granite.+/', '/quark:.+diorite.+/', '/quark:.+andesite.+/', '/quark:.+jasper.+/', '/quark:.+slate.+/', '/quark:.+turf.+/', '/quark:.+thatch.+/', '/quark:.+shingles.+/', '/quark:.+sandy.+/', '/quark:.+snow.+/', '/quark:.+sandstone.+/', '/quark:.+blackstone.+/', '/quark:.+magma.+/', '/quark:.+quilted.+/', '/quark:.+cobblestone.+/', '/quark:.+dirt.+/', '/quark:.+basalt.+/', 'quark:sturdy_stone', '/quark:.+midori.+/'
	]).filter(Ingredient.of([
	'chineseworkshop:safe_debug_stick', 'ceramics:unfired_clay_plate', 'ceramics:clay_plate', 'ceramics:unfired_clay_bucket', '/ceramics:clay_bucket/', '/ceramics:clay_helmet/', '/ceramics:clay_chestplate/', '/ceramics:clay_leggings/', '/ceramics:clay_boots/', 'ceramics:terracotta_gauge', 'ceramics:porcelain_gauge', '/ceramics:.+cistern/', '/extcaves:.+stalagmite.+/', '/extcaves:.+stalactite.+/', 'extcaves:lavastone', '/extcaves:.+pebble.+/', '/extcaves:.+rockpile.+/', 'mysticalworld:stonepetal', 'mysticalworld:iron_dust', 'create:andesite_encased_shaft', 'create:andesite_casing', 'create:andesite_funnel', 'create:andesite_tunnel', 'create:andesite_alloy', 'byg:dacite', 'byg:podzol_dacite', 'byg:overgrown_dacite', 'byg:red_rock', 'byg:rocky_stone', 'byg:scoria_stone', 'byg:soapstone', 'byg:black_sand', 'byg:white_sand', 'byg:blue_sand', 'byg:purple_sand', 'byg:pink_sand', 'byg:nylium_soul_sand', 'byg:quartzite_sand', 'byg:end_sand', 'quark:jasper', 'quark:slate', 'quark:dirty_glass', 'quark:dirty_glass_pane', 'quark:dirty_shard'
	]).not()).stacks.forEach(stack => {
            pool.addEntry({
              "type": "minecraft:item",
			  "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 32.0,
                "max": 64.0,
                "type": "minecraft:uniform"
              }
            }
          ],
              "name": stack.id
            })
		})
	})
table.pool(pool => {
    pool.rolls = 4
	Ingredient.of(['@mcwbridges', '@mcwroofs', '@mcwtrpdoors', '@mcwwindows', '@blockcarpentry', '@framedblocks']).filter(Ingredient.of(['mcwroofs:roofing_hammer', 'mcwwindows:hammer', '/mcwtrpdoors:print_.+/', 'blockcarpentry:hammer', 'blockcarpentry:texture_wrench', 'blockcarpentry:chisel', 'blockcarpentry:paintbrush', 'framedblocks:framed_hammer', '/mcwroofs:tile_.+/']).not()).stacks.forEach(stack => {
            pool.addEntry({
              "type": "minecraft:item",
			  "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 12.0,
                "max": 16.0,
                "type": "minecraft:uniform"
              }
            }
          ],
              "name": stack.id
            })
		})
	})
})
})