package ru.dbotthepony.mc.otm.datagen.blocks

import ru.dbotthepony.mc.otm.datagen.models.MatteryBlockModelProvider
import ru.dbotthepony.mc.otm.registry.MBlocks

fun addBlockModels(provider: MatteryBlockModelProvider) {
	with(provider) {
		resourceCubeAll(MBlocks.TRITANIUM_ORE)
		resourceCubeAll(MBlocks.TRITANIUM_RAW_BLOCK)
		resourceCubeAll(MBlocks.DEEPSLATE_TRITANIUM_ORE)
		resourceCubeAll(MBlocks.TRITANIUM_INGOT_BLOCK)

		colored(MBlocks.COBBLESTONE_GENERATOR, listOf("0", "particle"))
		colored(MBlocks.ESSENCE_STORAGE, listOf("0", "particle"))
		colored(MBlocks.ITEM_MONITOR, listOf("0", "particle"))
		colored(MBlocks.MATTER_RECONSTRUCTOR, listOf("0", "particle"))
		colored(MBlocks.ENERGY_SERVO, listOf("0", "particle"))

		colored("matter_capacitor_bank", listOf("1", "particle"), "mattercapacitorbank_frame")
		colored("battery_bank", listOf("0", "particle"), "batterybank_frame")

		colored("android_charger", "_base", listOf("0", "particle"))
		colored("android_charger", "_middle", listOf("0", "particle"))
		colored("android_charger", "_top", listOf("0", "particle"))

		colored("chemical_generator", "_idle", listOf("0", "particle"))
		colored("chemical_generator", "_working", listOf("0", "particle"))

		colored("storage_power_supplier", listOf("0", "particle"))
		colored("matter_panel", listOf("texture", "particle"))
		colored("drive_viewer", "_idle", listOf("texture", "particle"))
		colored("drive_viewer", "_working", listOf("texture", "particle"))

		coloredMachineCombined("plate_press", "plate_press2", listOf("0", "particle"))
		coloredMachineCombined("twin_plate_press", "plate_press2", listOf("0", "particle"))

		coloredMachineCombined("matter_recycler", listOf("0", "particle"))
		coloredMachineCombined("matter_scanner", listOf("texture", "particle"))
		coloredMachineCombined("matter_bottler", listOf("texture", "particle"))
		coloredMachineCombined("matter_decomposer", listOf("texture", "particle"))
		coloredMachineCombined("matter_recycler", listOf("0", "particle"))

		colored("matter_replicator", "_idle", mapOf("1" to "matter_replicator_base", "particle" to "matter_replicator_base", "texture" to "matter_replicator_offline"))
		colored("matter_replicator", "_error", mapOf("1" to "matter_replicator_base", "particle" to "matter_replicator_base", "texture" to "matter_replicator_halted"))
		colored("matter_replicator", "_working", mapOf("1" to "matter_replicator_base", "particle" to "matter_replicator_base", "texture" to "matter_replicator"))

		colored("powered_smoker", "_idle", mapOf("0" to "powered_smoker_base", "1" to "powered_smoker_interior_0", "particle" to "powered_smoker_base"))
		colored("powered_smoker", "_error", mapOf("0" to "powered_smoker_base", "1" to "powered_smoker_interior_2", "particle" to "powered_smoker_base"))
		colored("powered_smoker", "_working", mapOf("0" to "powered_smoker_base", "1" to "powered_smoker_interior_1", "particle" to "powered_smoker_base"))

		colored("powered_furnace", "_idle", mapOf("0" to "electric_furnace_offline", "particle" to "electric_furnace_offline"))
		colored("powered_furnace", "_error", mapOf("0" to "electric_furnace_offline", "particle" to "electric_furnace_offline"))
		colored("powered_furnace", "_working", mapOf("0" to "electric_furnace", "particle" to "electric_furnace"))

		colored("powered_blast_furnace", "_idle", mapOf("texture" to "induction_furnace_offline", "particle" to "induction_furnace_offline"))
		colored("powered_blast_furnace", "_error", mapOf("texture" to "induction_furnace_offline", "particle" to "induction_furnace_offline"))
		colored("powered_blast_furnace", "_working", mapOf("texture" to "induction_furnace", "particle" to "induction_furnace"))

		colored("android_station", "_idle", mapOf("1" to "android_station_base", "particle" to "android_station_base"))
		colored("android_station", "_working", mapOf("2" to "android_station_base", "particle" to "android_station_base"))

		val energyCounter = setOf(
			"down", "east", "north", "south",
			"north_down", "north_east", "north_west",
			"south_down", "south_east", "south_west",
			"up", "west",
		)

		for (model in energyCounter) {
			colored("energy_counter_$model", listOf("texture", "particle"), "energy_counter")
		}
	}
}
