package ru.dbotthepony.mc.otm.datagen.loot

import net.minecraft.world.item.Items
import net.minecraft.world.level.storage.loot.entries.LootItem
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets
import ru.dbotthepony.mc.otm.datagen.modLootTable
import ru.dbotthepony.mc.otm.registry.game.MItems

fun addAdvancementLoot(lootTables: LootTables) {
	lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("research_all_android")) {
		lootPool {
			add(LootItem.lootTableItem(MItems.ExopackUpgrades.INVENTORY_UPGRADE_HUGE))
		}
	}

	lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("tritanium_block3")) {
		lootPool { item(Items.WHITE_DYE) { setCount(8) } }
		lootPool { item(Items.ORANGE_DYE) { setCount(8) } }
		lootPool { item(Items.MAGENTA_DYE) { setCount(8) } }
		lootPool { item(Items.LIGHT_BLUE_DYE) { setCount(8) } }
		lootPool { item(Items.YELLOW_DYE) { setCount(8) } }
		lootPool { item(Items.LIME_DYE) { setCount(8) } }
		lootPool { item(Items.PINK_DYE) { setCount(8) } }
		lootPool { item(Items.GRAY_DYE) { setCount(8) } }
		lootPool { item(Items.LIGHT_GRAY_DYE) { setCount(8) } }
		lootPool { item(Items.CYAN_DYE) { setCount(8) } }
		lootPool { item(Items.PURPLE_DYE) { setCount(8) } }
		lootPool { item(Items.BLUE_DYE) { setCount(8) } }
		lootPool { item(Items.BROWN_DYE) { setCount(8) } }
		lootPool { item(Items.GREEN_DYE) { setCount(8) } }
		lootPool { item(Items.RED_DYE) { setCount(8) } }
		lootPool { item(Items.BLACK_DYE) { setCount(8) } }
	}

	lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("tritanium_block4")) {
		lootPool { item(Items.WHITE_DYE) { setCount(64) } }
		lootPool { item(Items.ORANGE_DYE) { setCount(64) } }
		lootPool { item(Items.MAGENTA_DYE) { setCount(64) } }
		lootPool { item(Items.LIGHT_BLUE_DYE) { setCount(64) } }
		lootPool { item(Items.YELLOW_DYE) { setCount(64) } }
		lootPool { item(Items.LIME_DYE) { setCount(64) } }
		lootPool { item(Items.PINK_DYE) { setCount(64) } }
		lootPool { item(Items.GRAY_DYE) { setCount(64) } }
		lootPool { item(Items.LIGHT_GRAY_DYE) { setCount(64) } }
		lootPool { item(Items.CYAN_DYE) { setCount(64) } }
		lootPool { item(Items.PURPLE_DYE) { setCount(64) } }
		lootPool { item(Items.BLUE_DYE) { setCount(64) } }
		lootPool { item(Items.BROWN_DYE) { setCount(64) } }
		lootPool { item(Items.GREEN_DYE) { setCount(64) } }
		lootPool { item(Items.RED_DYE) { setCount(64) } }
		lootPool { item(Items.BLACK_DYE) { setCount(64) } }
	}
}
