package ru.dbotthepony.mc.otm.datagen.lang

import ru.dbotthepony.mc.otm.registry.*

private fun decoratives(provider: MatteryLanguageProvider) {
	with(provider.englishColors) {
		add(MRegistry.VENT, "%s Vent")
		add(MRegistry.VENT_ALTERNATIVE, "%s Alternative Vent")

		add(MRegistry.TRITANIUM_BLOCK, "%s Tritanium Block")
		add(MRegistry.TRITANIUM_STAIRS, "%s Tritanium Stairs")
		add(MRegistry.TRITANIUM_SLAB, "%s Tritanium Slab")
		add(MRegistry.TRITANIUM_WALL, "%s Tritanium Wall")
		add(MRegistry.FLOOR_TILES, "%s Floor Tiles")
		add(MRegistry.FLOOR_TILES_STAIRS, "%s Floor Tiles Stairs")
		add(MRegistry.FLOOR_TILES_SLAB, "%s Floor Tiles Slab")
		add(MRegistry.UNREFINED_FLOOR_TILES, "Unrefined %s Floor Tiles")

		add(MRegistry.INDUSTRIAL_GLASS, "%s Stained Industrial Glass")
		add(MRegistry.INDUSTRIAL_GLASS_PANE, "%s Stained Industrial Glass Pane")

		add(MRegistry.CARGO_CRATES, "%s Cargo Crate")
		add(MRegistry.DECORATIVE_CRATE, "%s Container Block")
	}

	with (provider.english) {
		for ((color, name) in provider.englishColors.dyeClassMapped) {
			add(MItems.CARGO_CRATE_MINECARTS[color]!!, "Minecart with $name Cargo Crate")
			add(MEntityTypes.CARGO_CRATE_MINECARTS[color]!!, "Minecart with $name Cargo Crate")

			add(MRegistry.TRITANIUM_PRESSURE_PLATE.getBlock(color), "$name Tritanium Pressure Plate")
			add(MRegistry.TRITANIUM_PRESSURE_PLATE.getBlock(color), "description0", "Activates only if player steps on it")
			add(MRegistry.TRITANIUM_PRESSURE_PLATE.getBlock(color), "description1", "High blast resistance")

			add(MBlocks.TRITANIUM_DOOR[color]!!, "$name Tritanium Door")
			add(MBlocks.TRITANIUM_DOOR[color]!!, "description0", "High blast resistance door with redstone latch...")
			add(MBlocks.TRITANIUM_DOOR[color]!!, "description1", "...feeling safe now?")
			add(MBlocks.TRITANIUM_DOOR[color]!!, "description2", "This one is painted $name")

			add(MBlocks.TRITANIUM_TRAPDOOR[color]!!, "$name Tritanium Trapdoor")
			add(MBlocks.TRITANIUM_TRAPDOOR[color]!!, "description0", "High blast resistance door with redstone latch...")
			add(MBlocks.TRITANIUM_TRAPDOOR[color]!!, "description1", "...feeling safe now?")
			add(MBlocks.TRITANIUM_TRAPDOOR[color]!!, "description2", "This one is painted $name")
		}

		add(MRegistry.TRITANIUM_PRESSURE_PLATE.block, "Tritanium Pressure Plate")
		add(MRegistry.TRITANIUM_PRESSURE_PLATE.block, "description0", "Activates only if player steps on it")
		add(MRegistry.TRITANIUM_PRESSURE_PLATE.block, "description1", "High blast resistance")
	}

	with(provider.english) {
		add(MItems.CARGO_CRATE_MINECARTS[null]!!, "Minecart with Cargo Crate")
		add(MEntityTypes.CARGO_CRATE_MINECARTS[null]!!, "Minecart with Cargo Crate")

		add(MRegistry.CARGO_CRATES.block, "Cargo Crate")
		add(MRegistry.TRITANIUM_BLOCK.block, "Tritanium Block")
		add(MRegistry.TRITANIUM_STAIRS.block, "Tritanium Stairs")
		add(MRegistry.TRITANIUM_SLAB.block, "Tritanium Slab")
		add(MRegistry.TRITANIUM_WALL.block, "Tritanium Wall")

		add(MRegistry.INDUSTRIAL_GLASS.block, "Industrial Glass")
		add(MRegistry.INDUSTRIAL_GLASS_PANE.block, "Industrial Glass Pane")

		add(MRegistry.DECORATIVE_CRATE.block, "Rusty Container Block")

		add(MRegistry.VENT.block, "Vent")
		add(MRegistry.VENT_ALTERNATIVE.block, "Alternative Vent")


		for ((block, colors) in MRegistry.TRITANIUM_STRIPED_BLOCK.blocksWithColor) {
			val (base, stripe) = colors

			val baseName = provider.englishColors.dyeClassMapped[base]!!
			val stripeName = provider.englishColors.dyeClassMapped[stripe]!!

			add(block, "$baseName Colored $stripeName Striped Tritanium Block")
		}

		for ((block, colors) in MRegistry.TRITANIUM_STRIPED_STAIRS.blocksWithColor) {
			val (base, stripe) = colors

			val baseName = provider.englishColors.dyeClassMapped[base]!!
			val stripeName = provider.englishColors.dyeClassMapped[stripe]!!

			add(block, "$baseName Colored $stripeName Striped Tritanium Stairs")
		}

		for ((block, colors) in MRegistry.TRITANIUM_STRIPED_SLAB.blocksWithColor) {
			val (base, stripe) = colors

			val baseName = provider.englishColors.dyeClassMapped[base]!!
			val stripeName = provider.englishColors.dyeClassMapped[stripe]!!

			add(block, "$baseName Colored $stripeName Striped Tritanium Slab")
		}

		for ((block, colors) in MRegistry.TRITANIUM_STRIPED_WALL.blocksWithColor) {
			val (base, stripe) = colors

			val baseName = provider.englishColors.dyeClassMapped[base]!!
			val stripeName = provider.englishColors.dyeClassMapped[stripe]!!

			add(block, "$baseName Colored $stripeName Striped Tritanium Wall")
		}
	}
}

private fun sounds(provider: MatteryLanguageProvider) {
	with(provider.english) {
		sound("rifle_shot", "Plasma rifle fires")
		sound("plasma_weapon_overheat", "Plasma weapon overheats")
		sound("player_become_android", "Player became android")

		sound(MSoundEvents.CARGO_CRATE_OPEN, "Cargo crate opened")
	}
}

private fun misc(provider: MatteryLanguageProvider) {
	with(provider.english) {
		gui("help.slot_filters", "Hold CTRL to setup slot filters")
		gui("help.slot_charging", "Hold ALT to switch slot charging")

		misc("needs_no_power", "Requires no power to operate")

		gui("lock_holo_screen", "Lock contents")
		gui("lock_holo_screen.tip", "Locking and unlocking contents is only possible in creative.\nWhen locked, text boundaries are removed.")

		gui("ticks", "Ticks")

		gui("power_cost_per_use", "Power cost per use: %s")
		gui("power_cost_per_tick", "Power cost per tick: %s")

		gui("cancel", "Cancel")
		gui("confirm", "Confirm")

		gui("recipe.ticks", "%s Ticks")

		gui("exopack", "Exopack Inventory")

		gui("exopack.customize", "Customize Exopack appearance")
		gui("exopack.customization", "Exopack appearance settings")

		gui("exopack.go_back", "Open vanilla inventory")
		gui("exopack.go_in", "Open Exopack inventory")
		gui("exopack.toggle_visibility", "Visibile on player")
		gui("exopack.toggle_glow", "Glows in dark")
		gui("exopack.change_color", "Customize color")
		gui("exopack.change_color2", "Remove color")
		gui("exopack.go_curios", "Open Curios inventory")

		gui("exopack.probe1", "This little device feels unnatural to touch, it is almost certainly resilient to any possible attempt to break it open.")
		gui("exopack.probe2", "There is fingerprint reader built into one of sides which gently glow when touched.")
		gui("exopack.probe3", "It seems this box will unlock once you strongly press fingerprint reader, and you feel what's inside will affect you without any way back!")

		gui("exopack.already_activated", "You already have an Exopack!")

		gui("exopack_upgrades.no_exopack", "This piece of technology seems to be of no use to you.... Or does it?!")

		gui("exopack_upgrades.already_activated", "Upgrade is already active!")
		gui("exopack_upgrades.slots_upgrade", "Using this will permanently grant %s slots in your Exopack inventory.")
		gui("exopack_upgrades.crafting_upgrade", "Using this will permanently grant 3x3 crafting grid in your Exopack inventory.")
		gui("exopack_upgrades.smelting_upgrade", "Using this will permanently grant smelter in your Exopack inventory.")

		gui("crude_battery.replace_in_world", "Simplistic nature of this battery allows to replace your energy source in the field without using Android Station.")
		gui("crude_battery.replace_in_world_warning", "This operation is very unstable and can cause extreme damage to your systems!")

		gui("power_supplier.active_nodes", "Currently demanding nodes: %s")

		misc("battery.single_use", "Single use battery, can not be recharged.")

		misc("exopack_upgrades.slots_upgraded", "Your Exopack has permanently gained %s slots")
		misc("exopack_upgrades.crafting_upgraded", "Your Exopack has permanently gained 3x3 crafting grid")
		misc("exopack_upgrades.smelting_installed", "Your Exopack has permanently gained smelting module")

		misc("exopack.granted1", "As you keep pressing on the fingerprint reader, probe disappears.")
		misc("exopack.granted2", "After a moment, you are getting pierced into back multiple times...")
		misc("exopack.granted3", "As pain signals ease away, you find a new 'friend' on your back: the Exopack.")
		misc("exopack.granted4", "This device provides access to personal pocket dimension in 4th space.")
		misc("exopack.granted5", "Scavenge for or craft modules to upgrade your Exopack.")
		misc("exopack.granted6", "The Exopack itself also exists in 4th dimension, it does not prevent wearing armor.")
		misc("exopack.granted7", "However, despite existing in 4th dimension, items stored in it are still dropped upon unfortunate event.")

		misc("dumping_matter_registry", "Dumping matter registry to %s")
		misc("dumped_matter_registry", "Dumped matter registry to %s")

		misc("iteration", "Iteration %s")
		misc("death_reason", "Decommissioned!")

		misc("item.blackhole_immunity", "Negates spacetime dilating effect of singularities")

		misc("suffix.merge", "%s %s")

		misc("suffix.none", "%s %s")
		misc("suffix.kilo", "%s k%s")
		misc("suffix.mega", "%s M%s")
		misc("suffix.giga", "%s G%s")
		misc("suffix.tera", "%s T%s")
		misc("suffix.peta", "%s P%s")
		misc("suffix.exa", "%s E%s")
		misc("suffix.zetta", "%s Z%s")
		misc("suffix.yotta", "%s Y%s")

		misc("suffix.deci", "%s d%s")
		misc("suffix.centi", "%s c%s")
		misc("suffix.milli", "%s m%s")
		misc("suffix.micro", "%s μ%s")
		misc("suffix.nano", "%s n%s")
		misc("suffix.pico", "%s p%s")
		misc("suffix.femto", "%s f%s")
		misc("suffix.atto", "%s a%s")
		misc("suffix.zepto", "%s z%s")
		misc("suffix.yocto", "%s y%s")

		misc("suffix_raw.kilo", "k")
		misc("suffix_raw.mega", "M")
		misc("suffix_raw.giga", "G")
		misc("suffix_raw.tera", "T")
		misc("suffix_raw.peta", "P")
		misc("suffix_raw.exa", "E")
		misc("suffix_raw.zetta", "Z")
		misc("suffix_raw.yotta", "Y")
		misc("suffix_raw.deci", "d")
		misc("suffix_raw.centi", "c")
		misc("suffix_raw.milli", "m")
		misc("suffix_raw.micro", "μ")
		misc("suffix_raw.nano", "n")
		misc("suffix_raw.pico", "p")
		misc("suffix_raw.femto", "f")
		misc("suffix_raw.atto", "a")
		misc("suffix_raw.zepto", "z")
		misc("suffix_raw.yocto", "y")

		misc("item.power.infinite.storage", "Stored energy: ∞ / ∞")
		misc("item.power.infinite.throughput", "Max I/O: ∞ / ∞")
		misc("item.power.passed", "Passed energy: %s")
		misc("item.power.received", "Received energy: %s")
		misc("item.power.average", "Average throughput: %s/t")
		misc("item.power.last_20_ticks", "Last second: %s")
		misc("item.power.last_tick", "Last tick: %s")

		gui("power.passed", "Total passed energy:")
		gui("power.average", "Average throughput per tick:")
		gui("power.last_20_ticks", "Last second:")
		gui("power.last_tick", "Last tick:")

		misc("item.power.storage", "Stored energy: %s / %s")
		misc("item.power.storage0", "Stored energy: %s")
		misc("item.power.throughput", "Max I/O: %s / %s")
		misc("item.power.throughput_mono", "Max I/O: %s")
		misc("item.power.infinity", "∞ MtJ")

		misc("item.worker.work_ticks_mono", "Work ticks: %s")
		misc("item.worker.work_ticks", "Work ticks: %s / %s")

		misc("item.block.stored_battery", "Battery: %s")

		misc("item.pattern.stored", "Stored patterns: %s / %s")
		misc("item.pattern.infinite.stored", "Stored patterns: %s")
		misc("item.pattern.line", "%s [%s%%]")
		misc("item.pattern.research", "Researched: %s%%")
		misc("item.pattern.research.item_count", "Items: %s / %s")
		misc("item.pattern.research.advance", "Progress per item: %s%%")


		misc("item.matter.infinite", "Stored matter: ∞ / ∞")
		misc("item.matter.normal", "Stored matter: %s / %s")

		misc("gui.matter_task.total", "Total: %s")
		misc("gui.matter_task.required", "Left to be done: %s")
		misc("gui.matter_task.in_progress", "In progress: %s")
		misc("gui.matter_task.finished", "Finished: %s")

		misc("pill.warning", "WARNING: This will INSTANTLY decommission you upon ingestion!")
		misc("pill.android", "Take this pill and lose what is holding you back.")

		misc("pill.humane", "Take this pill and wake up in bed none the wiser.")

		misc("pill.oblivion", "Items and Experience spent on research is fully refunded.")
		misc("pill.message_oblivion", "All android features are removed and all research refunded.")

		misc("pill.heal", "Instantly restores 4 hearts upon ingestion, provides 2 min Absorption V and 8 seconds Regeneration III.")
		misc("pill.heal_android", "Does nothing to androids.")

		misc("pill.message", "Nothing happened, but you feel... exhausted?.. Maybe get rest.")
		misc("pill.message_finish", "§kONE OF US ONE OF US ONE OF US")

		gui("power.percentage_level", "Energy level: %s%%")
		gui("level", "%s / %s")
		gui("diff", "%s (%s / %s)")
		gui("power.name", "MtJ")
		gui("fluid.name", "B")
		gui("fluid.level", "%s / %s of %s")

		gui("empty", "Empty")

		gui("power.burn_time", "Burn time left: %s ticks")

		gui("progress_widget", "Progress: %s%%")
		gui("progress_widget_stuck", "The machine can not work, check configuration")

		gui("total_raw", "Total:")

		gui("matter.percentage_level", "Matter level: %s%%")
		gui("matter.format", "Matter: %s")
		gui("matter.format_and_complexity", "%s / Complexity: %s")
		gui("matter.format_and_complexity2", "%s (%s) / Complexity: %s (%s)")
		gui("matter.name", "MtU")

		gui("filter.is_whitelist", "Is Whitelist")
		gui("filter.match_nbt", "Match NBT")
		gui("filter.match_tag", "Match Tag")

		gui("android_research", "Research Tree")

		gui("pattern.percentage_level", "Fill level: %s%%")
		gui("pattern.format", "Stored patterns: %s / %s")

		gui("redstone.ignored", "Redstone mode: Ignored")
		gui("redstone.low", "Redstone mode: Low")
		gui("redstone.high", "Redstone mode: High")

		gui("redstone.ignored.description", "Redstone signal does not affect machine's function")
		gui("redstone.low.description", "Machine work if no redstone signal is present")
		gui("redstone.high.description", "Machine work only if any redstone signal is present")

		misc("3d2d.gravitation_stabilizer.mass", "Singularity mass: %s")
		misc("3d2d.gravitation_stabilizer.strength", "Gravitation strength: %s")

		misc("android_station.research.low_power", "Android Station is low on power! Can't research!")
		misc("android_station.research.researched", "Researched!")
		misc("android_station.research.can_be_researched", "Ready to research!")
		misc("android_station.research.can_not_be_researched", "Can't research!")
		misc("android_station.research.xp_cost", "Experience cost: %s levels")
		misc("android_station.research.item", "Requires %s x%s")
		misc("android_station.research.missing_predecessors", "%s needs to be researched first")

		misc("android_station.research.confirm", "Confirm researching %s")
		misc("android_station.research.research_will_be_blocked", "Next research will be blocked:")

		misc("android_station.low_power_0", "Not enough power; Can't swap parts")
		misc("android_station.low_power_1", "Low power; Can't research")
		misc("android_station.power_ok", "Power OK")

		misc("filter.yes", "Yes")
		misc("filter.no", "No")

		misc("matter_bottler.switch_mode", "Switch work mode")

		misc("item.quantum_battery.creative", "Fill this to win Minecraft.")
		misc("item.quantum_battery.creative2", "See ya after millions of stars burn out.")
		misc("item.quantum_battery.creative_power", "Stored energy: %s / ∞")

		misc("item.quantum_link_id", "Quantum link ID: %s")
		misc("item.quantum_description", "This item is sharing its contents with other similar items using quantum entanglement")
	}
}

private fun death(provider: MatteryLanguageProvider) {
	with(provider.english) {
		death("otm_become_android", "%1\$s lost their humanity")
		death("otm_become_humane", "%1\$s regained their humanity")
		death("otm_event_horizon", "%1\$s never crossed the event horizon")
		death("otm_hawking_radiation", "%1\$s discovered Hawking radiation")
		death("otm_emp", "%1\$s electronics' fried")
		death("otm_cosmic_rays", "%1\$s electronics' got scrambled by cosmic radiation")
		death("otm_android_discharge", "%1\$s ran out of power")

		death("otm_become_android.player", "%1\$s lost their humanity whilst %2\$s tried to reason with them")
		death("otm_become_humane.player", "%1\$s gained their humanity whilst %2\$s tried to reason with them")
		death("otm_event_horizon.player", "%1\$s tried to cross the event horizon whilst trying to escape %2\$s")
		death("otm_hawking_radiation.player", "%1\$s disintegrated whilst fighting %2\$s")
		death("otm_emp.player", "%2\$s blew fuzes of %1\$s")
		death("otm_emp.player.item", "%2\$s blew fuzes of %1\$s using %3\$s")

		death("otm_explosive_hammer", "%1\$s's fun time with hammer is over")
		death("otm_hammer_nail", "%1\$s got nailed")
		death("otm_hammer_nail" + ".player", "%1\$s got nailed by %\$2")
		death("otm_hammer_nail" + ".player.item", "%1\$s got nailed by %2\$s using %3\$s")

		death("otm_exopack_probe", "%1\$s couldn't handle spinal surgery")
		death("otm_exopack_probe.player", "%1\$s couldn't handle spinal surgery whilst fighting %2\$s")
	}
}

private fun blocks(provider: MatteryLanguageProvider) {
	with(provider.english) {
		add(MBlocks.ANDROID_STATION, "Android Station")
		add(MBlocks.ANDROID_CHARGER, "Wireless Android Charger")
		add(MBlocks.BATTERY_BANK, "Battery Bank")
		add(MBlocks.MATTER_DECOMPOSER, "Matter Decomposer")
		add(MBlocks.MATTER_CAPACITOR_BANK, "Matter Capacitor Bank")
		add(MBlocks.MATTER_CABLE, "Matter Network Cable")
		add(MBlocks.PATTERN_STORAGE, "Pattern Storage")
		add(MBlocks.MATTER_SCANNER, "Matter Scanner")
		add(MBlocks.MATTER_PANEL, "Pattern Monitor")
		add(MBlocks.MATTER_REPLICATOR, "Matter Replicator")
		add(MBlocks.MATTER_BOTTLER, "Matter Bottler")
		add(MBlocks.DRIVE_VIEWER, "Drive Viewer")
		add(MBlocks.BLACK_HOLE, "Local Anomalous Spacetime Dilation Singular Point")
		add(MBlocks.COBBLESTONE_GENERATOR, "Cobblestone Generator")
		add(MBlocks.ESSENCE_STORAGE, "Essence Storage")
		add(MBlocks.ESSENCE_STORAGE, "desc", "Allows to store and retrieve experience levels")
		add(MBlocks.MATTER_RECONSTRUCTOR, "Matter Reconstructor")
		add(MBlocks.MATTER_RECONSTRUCTOR, "desc", "Repairs tools using matter")

		add(MBlocks.FLUID_TANK, "Fluid Tank")
		add(MBlocks.FLUID_TANK, "named", "Fluid Tank (%s)")

		add(MBlocks.ENGINE, "Ship Engine")
		add(MBlocks.ENGINE, "desc", "Unfortunately, it doesn't seem to be functional anymore.")
		add(MBlocks.HOLO_SIGN, "Holo Sign")

		add(MBlocks.TRITANIUM_INGOT_BLOCK, "Tritanium Plating Block")

		add(MBlocks.ENERGY_COUNTER, "Energy Counter")
		add(MBlocks.ENERGY_COUNTER, "facing", "Input facing: %s")
		add(MBlocks.ENERGY_COUNTER, "switch", "Switch input facing")
		add(MBlocks.ENERGY_COUNTER, "limit", "I/O Limit. -1 means no limit")

		add(MBlocks.CHEMICAL_GENERATOR, "Chemical Generator")
		add(MBlocks.DRIVE_RACK, "Condensation Drive Rack")
		add(MBlocks.ITEM_MONITOR, "Item Monitor")
		add(MBlocks.PLATE_PRESS, "Plate Press")
		add(MBlocks.TWIN_PLATE_PRESS, "Twin Plate Press")

		add(MBlocks.POWERED_FURNACE, "Electric Furnace")
		add(MBlocks.POWERED_SMOKER, "Microwave Oven")
		add(MBlocks.POWERED_BLAST_FURNACE, "Induction Furnace")

		add(MBlocks.MATTER_RECYCLER, "Matter Recycler")
		add(MBlocks.ENERGY_SERVO, "Energy Servo")
		add(MBlocks.ENERGY_SERVO, "desc", "Charges, Discharges or Exchanges energy of items")

		add(MBlocks.CARBON_FIBRE_BLOCK, "Carbon Fibre Block")
		add(MBlocks.METAL_JUNK, "Metal Junk Block")
		add(MBlocks.METAL_JUNK, "desc", "Useless junk, or is it?")
		add(MBlocks.METAL_MESH, "Metal Mesh")

		add(MBlocks.TRITANIUM_STRIPED_BLOCK, "Tritanium Striped Block")
		add(MBlocks.TRITANIUM_STRIPED_STAIRS, "Tritanium Striped Stairs")
		add(MBlocks.TRITANIUM_STRIPED_SLAB, "Tritanium Striped Slab")
		add(MBlocks.TRITANIUM_STRIPED_WALL, "Tritanium Striped Wall")
		add(MBlocks.TRITANIUM_ORE, "Tritanium Ore")
		add(MBlocks.DEEPSLATE_TRITANIUM_ORE, "Deepslate Tritanium Ore")
		add(MBlocks.TRITANIUM_RAW_BLOCK, "Raw Tritanium Block")

		add(MBlocks.STORAGE_CABLE, "Storage Cable")
		add(MBlocks.STORAGE_POWER_SUPPLIER, "Storage Power Supplier")
		add(MBlocks.STORAGE_BUS, "Storage Bus")
		add(MBlocks.STORAGE_IMPORTER, "Storage Importer")
		add(MBlocks.STORAGE_EXPORTER, "Storage Exporter")

		add(MBlocks.GRAVITATION_STABILIZER, "Spacetime Normalizer")
		add(MBlocks.GRAVITATION_STABILIZER_LENS, "Spacetime Normalizer Lens")
		add(MBlocks.GRAVITATION_STABILIZER, "desc", "Reduces spacetime distortion effects of singularities")
		add(MBlocks.GRAVITATION_STABILIZER, "desc2", "Keep in mind the effect of multiple stabilizers produce exponentially increasing result")
		add(MBlocks.GRAVITATION_STABILIZER, "desc3", "Too weak gravitation field will cause singularity to 'evaporate' really fast!")

		add(MBlocks.PHANTOM_ATTRACTOR, "Phantom Attractor")
		add(MBlocks.PHANTOM_ATTRACTOR, "desc", "Attracts Phantoms when it is night time")

		add(MBlocks.LABORATORY_LAMP, "Laboratory Lamp")
		add(MBlocks.LABORATORY_LAMP, "description", "Provides directional light with redstone switch")
		add(MBlocks.LABORATORY_LAMP_INVERTED, "Laboratory Lamp (Inverted Signal)")
		add(MBlocks.DANGER_STRIPE_BLOCK, "Danger Stripes")
		add(MBlocks.METAL_BEAM, "Metal Beam")

		add(MBlocks.TRITANIUM_DOOR[null]!!, "Tritanium Door")
		add(MBlocks.TRITANIUM_DOOR[null]!!, "description0", "High blast resistance door with redstone latch...")
		add(MBlocks.TRITANIUM_DOOR[null]!!, "description1", "...feeling safe now?")

		add(MBlocks.TRITANIUM_TRAPDOOR[null]!!, "Tritanium Trapdoor")
		add(MBlocks.TRITANIUM_TRAPDOOR[null]!!, "description0", "High blast resistance door with redstone latch...")
		add(MBlocks.TRITANIUM_TRAPDOOR[null]!!, "description1", "...feeling safe now?")

		add(MBlocks.TRITANIUM_BARS, "Tritanium Bars")

		for (block in MBlocks.TRITANIUM_ANVIL)
			add(block, "Tritanium Anvil")
	}
}

private fun items(provider: MatteryLanguageProvider) {
	with(provider.english) {
		add(MItems.PROCEDURAL_BATTERY, "Mythical Battery")
		add(MItems.PROCEDURAL_BATTERY, "desc", "These batteries are found in dungeons with randomized stats")

		add(MItems.EXPLOSIVE_HAMMER, "Explosive Hammer")
		add(MItems.EXPLOSIVE_HAMMER, "desc", "For those who feel bored")
		add(MItems.EXPLOSIVE_HAMMER, "primed", "Primed!")
		add(MItems.EXPLOSIVE_HAMMER, "not_primed0", "Not primed")
		add(MItems.EXPLOSIVE_HAMMER, "not_primed1", "Prime at crafting table with little of gunpowder and nugget payload")

		add(MItems.EXOPACK_PROBE, "Exopack Probe")
		add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_CREATIVE, "Creative Exopack Inventory Upgrade")
		add(MItems.ExopackUpgrades.CRAFTING_UPGRADE, "Exopack Crafting Upgrade")
		add(MItems.ExopackUpgrades.SMELTING_UPGRADE, "Exopack Smelting Module")

		add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_WITHER, "Superdense Packing Upgrade")
		add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_WITHER, "description", "Utilizes similar principle that exhibit Nether Stars")

		add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_ENDER_DRAGON, "Ender Link Pocket Dimension Upgrade")
		add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_ENDER_DRAGON, "description", "Allows to store items in portable pocket dimension")

		add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL, "Indescribable Exopack Inventory Upgrade")
		add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL, "description", "They normally generate in dungeons with appropriate NBT tag attached")

		add(MItems.ESSENCE_CAPSULE, "Essence Capsule")
		add(MItems.ESSENCE_DRIVE, "Essence Memory Holotape")
		add(MItems.ESSENCE_SERVO, "Essence Servo")
		add(MItems.ESSENCE_SERVO, "desc", "Allows to 'pump' essence involving fleshy humanoids")
		add(MItems.ESSENCE_SERVO, "desc2", "Can be used standalone, or as tool inside Essence Servo")

		add(MItems.NUTRIENT_PASTE, "Nutrient Paste")

		add(MItems.FLUID_CAPSULE, "Fluid Capsule")
		add(MItems.FLUID_CAPSULE, "named", "Fluid Capsule (%s)")

		add(MItems.BLACK_HOLE_SCANNER, "Singularity Scanner")
		add(MItems.BLACK_HOLE_SCANNER, "desc", "Scans singularities for their properties")
		add(MItems.BLACK_HOLE_SCANNER, "desc2", "Hold in hand to determine mass of singularities")

		add(MItems.GRAVITATION_FIELD_LIMITER, "Spacetime Distortion Limiter")
		add(MItems.GRAVITATION_FIELD_SENSOR, "Spacetime Sensor")
		add(MItems.PORTABLE_GRAVITATION_STABILIZER, "Portable Spacetime Normalizer")

		add(MItems.BATTERY_CRUDE, "Crude Battery")
		add(MItems.BATTERY_BASIC, "Basic Battery")
		add(MItems.BATTERY_NORMAL, "Battery")
		add(MItems.BATTERY_DENSE, "Dense Battery")
		add(MItems.BATTERY_CAPACITOR, "Capacitor Battery")
		add(MItems.BATTERY_CREATIVE, "Creative Battery")

		add(MItems.QUANTUM_BATTERY, "Quantum Battery")
		add(MItems.QUANTUM_CAPACITOR, "Quantum Capacitor")
		add(MItems.QUANTUM_BATTERY_CREATIVE, "Quantum Creative Battery")

		add(MItems.TRITANIUM_SWORD, "Tritanium Sword")
		add(MItems.TRITANIUM_PICKAXE, "Tritanium Pickaxe")
		add(MItems.TRITANIUM_SHOVEL, "Tritanium Shovel")
		add(MItems.TRITANIUM_AXE, "Tritanium Axe")
		add(MItems.TRITANIUM_HOE, "Tritanium Hoe")
		add(MItems.TRITANIUM_SHEARS, "Tritanium Shears")
		add(MItems.TRITANIUM_SHIELD, "Tritanium Shield")

		add(MItems.TRITANIUM_HELMET, "Tritanium Helmet")
		add(MItems.TRITANIUM_CHESTPLATE, "Tritanium Chestplate")
		add(MItems.TRITANIUM_PANTS, "Tritanium Leggings")
		add(MItems.TRITANIUM_BOOTS, "Tritanium Boots")

		add(MItems.SIMPLE_TRITANIUM_HELMET, "Simple Tritanium Helmet")
		add(MItems.SIMPLE_TRITANIUM_CHESTPLATE, "Simple Tritanium Chestplate")
		add(MItems.SIMPLE_TRITANIUM_PANTS, "Simple Tritanium Leggings")
		add(MItems.SIMPLE_TRITANIUM_BOOTS, "Simple Tritanium Boots")

		add(MItems.TRITANIUM_DUST, "Tritanium Dust")
		add(MItems.TRITANIUM_INGOT, "Tritanium Ingot")
		add(MItems.TRITANIUM_NUGGET, "Tritanium Nugget")
		add(MItems.MATTER_IO_PORT, "Matter IO Port")
		add(MItems.MATTER_TRANSFORM_MATRIX, "Matter Transformation Matrix")
		add(MItems.ENERGY_BUS, "Energy Bus")
		add(MItems.ELECTRIC_PARTS,  "Electric Parts")
		add(MItems.MACHINE_FRAME, "Machine Frame")
		add(MItems.TRITANIUM_PLATE,  "Tritanium Plate")
		add(MItems.IRON_PLATE, "Iron Plate")
		add(MItems.GOLD_PLATE, "Gold Plate")
		add(MItems.COPPER_WIRING,  "Copper Wiring")
		add(MItems.GOLD_WIRING, "Gold Wiring")
		add(MItems.PORTABLE_CONDENSATION_DRIVE_CASING, "Portable Condensation Drive Casing")
		add(MItems.PORTABLE_DENSE_CONDENSATION_DRIVE_CASING, "Portable Dense Condensation Drive Casing")
		add(MItems.CIRCUIT_PLATING, "Circuit Plating")
		add(MItems.BASIC_CONTROL_CIRCUIT, "Basic Control Circuit")
		add(MItems.ADVANCED_CONTROL_CIRCUIT, "Advanced Control Circuit")
		add(MItems.QUANTUM_TRANSCEIVER, "Quantum Transceiver")
		add(MItems.ELECTROMAGNET, "Electromagnet")
		add(MItems.MIRROR_COMPOUND, "Mirror Compound")
		add(MItems.MIRROR, "Mirror")
		add(MItems.MIRROR, "description", "I can clearly see my own reflection in this mirror")
		add(MItems.REINFORCED_TRITANIUM_PLATE, "Reinforced Tritanium Plate")
		add(MItems.REINFORCED_TRITANIUM_PLATE, "description", "An armor plate, reinforced to withstand great kinetic forces")
		add(MItems.CARBON_MESH, "Carbon Mesh")

		add(MItems.GRAVITATIONAL_DISRUPTOR, "Spacetime Equalizer")

		add(MItems.GRAVITATIONAL_DISRUPTOR, "description", "Once within close proximity of massive spacetime dilation anomaly, equalizes spacetime in it's radius")
		add(MItems.GRAVITATIONAL_DISRUPTOR, "description2", "Allows collapse of singularities")
		add(MItems.GRAVITATIONAL_DISRUPTOR, "description3", "Doesn't destroy any of mass singularity had acquired, which result in violent explosion of matter!")
		add(MItems.GRAVITATIONAL_DISRUPTOR, "description4", "The explosion %s be contained by %s. Do not even attempt to contain it.")
		add(MItems.GRAVITATIONAL_DISRUPTOR, "description4_clarification", "can not")
		add(MItems.GRAVITATIONAL_DISRUPTOR, "description4_clarification2", "anything")

		add(MItems.MATTER_DUST, "Matter Dust")
		add(MItems.MATTER_DUST, "desc", "This item is product of failed decomposition or replication attempt")
		add(MItems.MATTER_DUST, "desc2", "Throw into matter recycler to get some of it's value back!")
		add(MItems.MATTER_DUST, "desc3", "Do not smell, throw at strangers or pour on donuts")

		add(MItems.PILL_ANDROID, "Android Pill")
		add(MItems.PILL_HUMANE, "Humane Pill")
		add(MItems.PILL_OBLIVION, "Android Factory Reset Pill")
		add(MItems.PILL_HEAL, "Medical Pill")

		add(MItems.MATTER_CAPACITOR_PARTS, "Matter Capacitor Parts")
		add(MItems.MATTER_CAPACITOR_BASIC, "Basic Matter Capacitor")
		add(MItems.MATTER_CAPACITOR_NORMAL, "Matter Capacitor")
		add(MItems.MATTER_CAPACITOR_DENSE, "Dense Matter Capacitor")
		add(MItems.MATTER_CAPACITOR_CREATIVE, "Creative Matter Capacitor")

		add(MItems.ENERGY_SWORD, "High-Frequency Blade")
		add(MItems.ENERGY_SWORD, "desc", "Needs power to operate")
		add(MItems.ENERGY_SWORD, "desc2", "Deals extra damage to androids when empowered")
		add(MItems.ENERGY_SWORD, "desc3", "Always strikes surrounding enemies with full damage if empowered")
		add(MItems.ENERGY_SWORD, "desc4", "Does not benefit from Sweeping Edge enchantment")

		add(MItems.PORTABLE_CONDENSATION_DRIVE, "Portable Condensation Drive")
		add(MItems.PORTABLE_DENSE_CONDENSATION_DRIVE, "Portable Dense Condensation Drive")
		add(MItems.PLASMA_RIFLE, "Plasma Repeater")
		add(MItems.TRITANIUM_ORE_CLUMP, "Raw Tritanium")
		add(MItems.PATTERN_DRIVE_NORMAL, "Pattern Drive")
		add(MItems.PATTERN_DRIVE_CREATIVE, "Creative Pattern Drive")

		add(MItems.PATTERN_DRIVE_CREATIVE2, "Omni-Present Pattern Drive")
		add(MItems.PATTERN_DRIVE_CREATIVE2, "description1", "Creative-only item")
		add(MItems.PATTERN_DRIVE_CREATIVE2, "description2", "Holds pattern for every item that have matter value")

		add(MItems.ZPM_BATTERY, "Zero Point Module")
		add(MItems.ZPM_BATTERY, "description", "Can be found in hands of those who travel between dimensions, if they ever reached different reality of origin of these constructs...")

		add(MItems.CreativeUpgrades.SPEED, "Creative Speed Upgrade")
		add(MItems.CreativeUpgrades.ENERGY_CONSUMPTION, "Creative Energy Consumption Upgrade")
		add(MItems.CreativeUpgrades.ENERGY_STORAGE, "Creative Energy Storage Upgrade")
		add(MItems.CreativeUpgrades.ENERGY_STORAGE_FLAT, "Creative Energy Storage Upgrade (Flat)")
		add(MItems.CreativeUpgrades.ENERGY_STORAGE_FLAT_SMALL, "Creative Energy Storage Upgrade (Flat Small)")
		add(MItems.CreativeUpgrades.MATTER_STORAGE, "Creative Matter Storage Upgrade")
		add(MItems.CreativeUpgrades.MATTER_STORAGE_FLAT, "Creative Matter Storage Upgrade (Flat)")
		add(MItems.CreativeUpgrades.MATTER_STORAGE_FLAT_SMALL, "Creative Matter Storage Upgrade (Flat Small)")
		add(MItems.CreativeUpgrades.ENERGY_THROUGHPUT, "Creative Energy Throughput Upgrade")
		add(MItems.CreativeUpgrades.ENERGY_THROUGHPUT_FLAT, "Creative Energy Throughput Upgrade (Flat)")
		add(MItems.CreativeUpgrades.ENERGY_THROUGHPUT_FLAT_SMALL, "Creative Energy Throughput Upgrade (Flat Small)")
		add(MItems.CreativeUpgrades.FAILSAFE, "Creative Failsafe Upgrade")
		add(MItems.CreativeUpgrades.FAILURE, "Creative Failure Upgrade")
		add(MItems.CreativeUpgrades.PROCESSING_ITEMS, "Creative Item Processing Upgrade")
	}
}

private fun stats(provider: MatteryLanguageProvider) {
	with(provider.english) {
		stat("health_regenerated", "Damage Regenerated by Nanobots")
		stat("damage_absorbed", "Damage Absorbed by Nanobots")
		stat("power_consumed", "MtJ Burnt as Android")
	}
}

private fun research(provider: MatteryLanguageProvider) {
	with(provider.english) {
		add("android_research.status.requires", "Requires %s to be researched")
		add("android_research.status.blocks", "Locks %s")
		add("android_research.status.blocked_by", "Locked by %s")
		add("android_research.status.requires_item", "Requires %s")
		add("android_research.status.requires_item_multiple0", "Requires %s x%s (missing %s)")
		add("android_research.status.requires_item_multiple1", "Requires %s x%s")

		add("android_research.status.requires_item_any", "Requires any of %s")
		add("android_research.status.requires_item_multiple_any0", "Requires any of %s x%s (missing %s)")
		add("android_research.status.requires_item_multiple_any1", "Requires any of %s x%s")
	}
}

private fun androidFeatures(provider: MatteryLanguageProvider) {
	with(provider.english) {
		add(AndroidFeatures.AIR_BAGS, "Air Bags")
		add(AndroidFeatures.SHOCKWAVE, "Shockwave")
		add(AndroidFeatures.NIGHT_VISION, "Night Vision")
		add(AndroidFeatures.NANOBOTS_ARMOR, "Nanobots Armor")
		add(AndroidFeatures.ITEM_MAGNET, "Item Magnet")
		add(AndroidFeatures.STEP_ASSIST, "Step Assist")
		add(AndroidFeatures.JUMP_BOOST, "Jump Boost")
		add(AndroidFeatures.ENDER_TELEPORTER, "Ender Teleporter")
	}
}

private fun gui(provider: MatteryLanguageProvider) {
	with(provider.english) {
		gui("quicksearch", "Quick search...")

		gui("color_picker", "Color Picker")

		gui("color.short.red", "R")
		gui("color.short.green", "G")
		gui("color.short.blue", "B")
		gui("color.short.hue", "H")
		gui("color.short.saturation", "S")
		gui("color.short.value", "V")

		gui("color.full.red", "Red")
		gui("color.full.green", "Green")
		gui("color.full.blue", "Blue")
		gui("color.full.hue", "Hue")
		gui("color.full.saturation", "Saturation")
		gui("color.full.value", "Value")

		gui("item_monitor.refill_source.desc", "Controls from where to take items for slot auto refill")
		gui("item_monitor.refill_source.system", "System only. Crafting grid will be auto refilled only from storage system. This is the behavior you see in AE2 and Refined Storage")
		gui("item_monitor.refill_source.inventory", "Inventory only. Crafting grid will be auto refilled only from player's inventory")
		gui("item_monitor.refill_source.system_first", "System first. Crafting grid will be auto refilled from storage system, or from player's inventory if system has no appropriate item")
		gui("item_monitor.refill_source.inventory_first", "Inventory first. Crafting grid will be auto refilled from player's inventory, or from storage system if inventory has no appropriate item")
		gui("item_monitor.refill_source.do_not", "Do not auto refill")

		gui("item_monitor.result_target.desc", "Controls behavior of crafting")
		gui("item_monitor.result_target.all_system", "All system. Both crafting remainder and crafting result go to storage system")
		gui("item_monitor.result_target.mixed", "Mixed. Crafting result goes to player's inventory, remainder goes to storage system")
		gui("item_monitor.result_target.all_inventory", "All inventory. Both crafting remainder and crafting result go to player's inventory")

		gui("item_monitor.amount.desc", "Controls how much items to craft when quickcrafting")
		gui("item_monitor.amount.one", "Exactly one item")
		gui("item_monitor.amount.stack", "Exactly one stack. This is the behavior you see in AE2 and Refined Storage")
		gui("item_monitor.amount.full", "Stack of ingredients. Craft until reaching stack size of one of ingredients. If at least one of inputs is not stackable then 'one stack' mode is used instead")

		gui("stored_amount", "Exact amount stored: %s")

		gui("sides.item_config", "Item Configuration")
		gui("sides.energy_config", "Energy Configuration")
		gui("sides.fluid_config", "Fluid Configuration")

		gui("sides.pull_help", "Hold Shift to cycle pull mode")
		gui("sides.push_help", "Hold Ctrl to cycle push mode")

		gui("sides.top", "Top")
		gui("sides.bottom", "Bottom")
		gui("sides.front", "Front")
		gui("sides.back", "Back")
		gui("sides.left", "Left")
		gui("sides.right", "Right")

		gui("side_mode.disabled", "Disabled")
		gui("side_mode.input", "Input only")
		gui("side_mode.output", "Output only")
		gui("side_mode.input_output", "Input/Output")
		gui("side_mode.battery", "Battery")

		gui("side_mode.pull", "Pull")
		gui("side_mode.push", "Push")

		gui("upgrades", "Upgrades")
		gui("upgrades.current", "Active upgrades:")
		gui("upgrade.speed", "Operation speed: %s%%")
		gui("upgrade.processing_items", "Items processed per cycle: +%s")
		gui("upgrade.energy_storage_flat", "Energy capacity: +%s")
		gui("upgrade.matter_storage_flat", "Matter capacity: +%s")
		gui("upgrade.energy_storage", "Energy capacity: +%s%%")
		gui("upgrade.matter_storage", "Matter capacity: +%s%%")
		gui("upgrade.energy_consumed", "Energy consumption: %s%%")
		gui("upgrade.energy_throughput_flat", "Energy throughput: +%s")
		gui("upgrade.energy_throughput", "Energy throughput: +%s%%")
		gui("upgrade.failsafe", "Failure chance: %s%%")

		gui("upgrade_type.list", "Upgrade classification:")
		gui("upgrade_type.allowed", "Allowed upgrades:")
		gui("upgrade_type.allowed_none", "No possible upgrades at the moment.")
		gui("upgrade_type.speed", "Speed")
		gui("upgrade_type.processing", "Processing")
		gui("upgrade_type.matter_storage", "Matter Storage")
		gui("upgrade_type.energy_storage", "Energy Storage")
		gui("upgrade_type.energy_consumption", "Energy Consumption")
		gui("upgrade_type.energy_throughput", "Energy Throughput")
		gui("upgrade_type.failsafe", "Failsafe")

		gui("balance_inputs", "Balance input slots")

		gui("sorting.default", "Default sorting")
		gui("sorting.name", "Sort by name")
		gui("sorting.id", "Sort by ID")
		gui("sorting.modid", "Sort by Namespace (mod) ID")
		gui("sorting.count", "Sort by amount")
		gui("sorting.ascending", "Ascending")
		gui("sorting.descending", "Descending")
		gui("sorting.matter_value", "Matter value")
		gui("sorting.matter_complexity", "Replication complexity")

		gui("matter_panel.increase_by", "+%s")
		gui("matter_panel.decrease_by", "-%s")
		gui("matter_panel.send", "Send")
		gui("matter_panel.close", "Close")
		gui("matter_panel.cancel_task", "Cancel task")
		gui("matter_panel.cancel", "Cancel")
		gui("matter_panel.label", "Replication request")
		gui("matter_panel.task", "Ongoing replication task")
		gui("matter_panel.task_line", "%s: %s | %s / %s")

		gui("matter_panel.tasks", "Tasks")
		gui("matter_panel.patterns", "Patterns")

		gui("matter_panel.number_input", "Input replication task count")

		gui("matter_panel.matter_stored", "Matter stored: %s")
		gui("matter_panel.matter_required", "Matter required: %s")
		gui("matter_panel.complexity", "Total complexity: %s")

		gui("experience", "%s experience points")
		gui("experience_levels", "%s experience levels")

		gui("experience.store", "Store %s experience levels")
		gui("experience.store_all", "Store all experience levels")
		gui("experience.dispense", "Dispense %s experience levels")
		gui("experience.dispense_all", "Dispense all experience levels")
		gui("experience.set_exact", "Set your experience level to %s")

		gui("essence_capsule", "(Almost) Everything you ever knew is within")
		gui("essence_capsule2", "This item can be recycled at Essence Servo")

		gui("slot_filter.filtered", "This slot is filtered for automation")
		gui("slot_filter.forbidden", "This slot is forbidden for automation mechanisms")
		gui("slot_filter.hint", "To remove slot filter press Ctrl + LMB")

		gui("tooltip.enum.active", "> %s")
	}
}

private fun jade(provider: MatteryLanguageProvider) {
	with(provider.english) {
		jadeloc("matter_storage", "Matter Storage")
		jadeloc("mattery_energy", "Energy Storage")
		jadeloc("mattery_worker", "Machine Job Progress")
		jadeloc("matter_bottler", "Matter Bottler Mode")
		jadeloc("matter_reconstructor", "Matter Reconstructor Progress")

		jade("mode", "Mode: %s")

		jade("matter_bottler.mode.fill", "Filling")
		jade("matter_bottler.mode.drain", "Emptying")
	}
}

fun AddEnglishLanguage(provider: MatteryLanguageProvider) {
	decoratives(provider)
	sounds(provider)
	misc(provider)
	death(provider)

	blocks(provider)
	items(provider)
	stats(provider)

	androidFeatures(provider)
	research(provider)
	gui(provider)

	jade(provider)

	with(provider.english) {
		add("itemGroup.otm", "Overdrive That Matters")
		add("itemGroup.otm_decorative", "Overdrive That Matters Decorative")
	}
}
