onEvent('block.loot_tables', event => {
event.build('kubejs:lootblock_builder', table => {		
table.pool(pool => {
    pool.rolls = 2
	Ingredient.of(['@adchimneys', '@additional_lights']).filter(Ingredient.of(['/additional_lights:soul_wand/']).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 = 3
	Ingredient.of(['@masonry', '@chineseworkshop', '@ceramics']).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/']).not()).stacks.forEach(stack => {
            pool.addEntry({
              "type": "minecraft:item",
			  "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 32.0,
                "max": 48.0,
                "type": "minecraft:uniform"
              }
            }
          ],
              "name": stack.id
            })
		})
	})
table.pool(pool => {
    pool.rolls = 3
	Ingredient.of(['@mcwbridges', '@mcwdoors', '@mcwroofs', '@mcwtrpdoors', '@mcwwindows']).filter(Ingredient.of(['mcwroofs:roofing_hammer', 'mcwwindows:hammer', '/mcwdoors:print_.+/', '/mcwtrpdoors:print_.+/']).not()).stacks.forEach(stack => {
            pool.addEntry({
              "type": "minecraft:item",
			  "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 4.0,
                "max": 18.0,
                "type": "minecraft:uniform"
              }
            }
          ],
              "name": stack.id
            })
		})
	})
})
})