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

import ru.dbotthepony.mc.otm.config.CablesConfig
import ru.dbotthepony.mc.otm.registry.*
import ru.dbotthepony.mc.otm.registry.game.AndroidFeatures
import ru.dbotthepony.mc.otm.registry.game.MBlocks
import ru.dbotthepony.mc.otm.registry.game.MEntityTypes
import ru.dbotthepony.mc.otm.registry.game.MItems
import ru.dbotthepony.mc.otm.registry.game.MSoundEvents

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

		add(MRegistry.COMPUTER_TERMINAL, "%s Computer Terminal")
		add(MRegistry.STAR_CHAIR, "%s Star Chair")
		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.mapped) {
			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(MBlocks.GRILL[color]!!, "$name Briefcase Grill")
		}

		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.englishColors) {
		addIntermediate(MBlocks.TRITANIUM_STRIPED_BLOCK, "Tritanium %s Striped Block")
		addIntermediate(MBlocks.TRITANIUM_STRIPED_STAIRS, "Tritanium %s Striped Stairs")
		addIntermediate(MBlocks.TRITANIUM_STRIPED_SLAB, "Tritanium %s Striped Slab")
		addIntermediate(MBlocks.TRITANIUM_STRIPED_WALL, "Tritanium %s Striped Wall")
	}

	with(provider.english) {
		misc("computer_terminal_tooltip", "Can be used as Redstone button, except it sends signal to block behind it, not under")
		misc("computer_terminal_tooltip1", "To setup how long it sends redstone signal, interact with it while sneaking")
		misc("decorative", "Decorative")

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

		add(MBlocks.GRILL[null]!!, "Briefcase Grill")

		add(MRegistry.CARGO_CRATES.block, "Cargo Crate")
		add(MRegistry.COMPUTER_TERMINAL.block, "Computer Terminal")
		add(MRegistry.STAR_CHAIR.block, "Star Chair")
		add(MRegistry.STAR_CHAIR.block, "desc", "For extensive stargazing.")
		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.mapped[base]!!
			val stripeName = provider.englishColors.mapped[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.mapped[base]!!
			val stripeName = provider.englishColors.mapped[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.mapped[base]!!
			val stripeName = provider.englishColors.mapped[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.mapped[base]!!
			val stripeName = provider.englishColors.mapped[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("projectile_parry", "Projectile parried")
		sound("jump_boost", "Jump boost")
		sound("shockwave", "Landing shockwave")

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

private fun misc(provider: MatteryLanguageProvider) {
	with(provider.english) {
		misc("misc.inert", "Inert")

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

		misc("pwr_alert1", "[%s]")
		misc("pwr_alert2", "PWR: ALERT")
		misc("pwr_alert3", "WARNING ERROR:")
		misc("pwr_alert4", "system_crash_log")
		// Error 06E has occurred at 0027F:C0082E2270273 in VXE VMMXDE
		// Error <Code> has occurred at <Server Block>:<RAM Address> in <Register?>
		misc("pwr_alert5", "Error %s has occurred at %s:%s in %s")

		gui("double_processing", "Processes two items at once")

		misc("painted.black", "Painted Black")
		misc("painted.blue", "Painted Blue")
		misc("painted.brown", "Painted Brown")
		misc("painted.cyan", "Painted Cyan")
		misc("painted.gray", "Painted Gray")
		misc("painted.green", "Painted Green")
		misc("painted.light_blue", "Painted Light Blue")
		misc("painted.light_gray", "Painted Light Gray")
		misc("painted.lime", "Painted Lime")
		misc("painted.magenta", "Painted Magenta")
		misc("painted.orange", "Painted Orange")
		misc("painted.pink", "Painted Pink")
		misc("painted.purple", "Painted Purple")
		misc("painted.red", "Painted Red")
		misc("painted.white", "Painted White")
		misc("painted.yellow", "Painted Yellow")

		gui("shift_for_more_info", "<Hold SHIFT for more info>")

		gui("help.slot_filters", "Hold CTRL to setup slot filters")
		gui("help.slot_charging", "Hold ALT to switch slot charging")

		gui("needs", "Needs %s")
		gui("needs_x", "Needs %s x%d")

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

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

		gui("holo_screen.resize_text", "Resize text automatically")
		gui("holo_screen.do_not_resize_text", "Do not resize text")

		gui("abc", "ABC")
		gui("use_standard_font", "Use standard font")
		gui("use_small_font", "Use small font")

		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("change_color", "Customize color")

		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("exopack_upgrades.ender_access_upgrade", "Using this will permanently grant Ender Chest access 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_upgrades.ender_access_installed", "Your Exopack has permanently gained access to Ender Chest contents")

		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.ronna", "%s R%s")
		misc("suffix.quetta", "%s Q%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_concise.none", "%s")
		misc("suffix_concise.kilo", "%sk")
		misc("suffix_concise.mega", "%sM")
		misc("suffix_concise.giga", "%sG")
		misc("suffix_concise.tera", "%sT")
		misc("suffix_concise.peta", "%sP")
		misc("suffix_concise.exa", "%sE")
		misc("suffix_concise.zetta", "%sZ")
		misc("suffix_concise.yotta", "%sY")
		misc("suffix_concise.ronna", "%sR")
		misc("suffix_concise.quetta", "%sQ")

		misc("suffix_concise.deci", "%sd")
		misc("suffix_concise.centi", "%sc")
		misc("suffix_concise.milli", "%sm")
		misc("suffix_concise.micro", "%sμ")
		misc("suffix_concise.nano", "%sn")
		misc("suffix_concise.pico", "%sp")
		misc("suffix_concise.femto", "%sf")
		misc("suffix_concise.atto", "%sa")
		misc("suffix_concise.zepto", "%sz")
		misc("suffix_concise.yocto", "%sy")

		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.ronna", "R")
		misc("suffix_raw.quetta", "Q")

		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.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.storage", "Stored matter: %s / %s")
		misc("item.matter.storage0", "Stored matter: %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", "Provides 8 seconds of Regeneration III.")
		misc("pill.heal_android", "Does nothing to androids.")

		misc("pill.not_normal", "Instantly kills fleshy creatures upon ingestion")
		misc("pill.suspicious_food.desc", "On closer inspection, this food doesn't seem right...")
		misc("pill.suspicious_food", "Suspicious %s")

		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_ticks", "Progress: %d / %d (%s%%)")
		gui("fuel_widget", "Fuel: %s%%")
		gui("fuel_widget_ticks", "Fuel: %d / %d (%s%%)")
		gui("progress_stuck", "The machine can not work, check configuration")

		gui("total_raw", "Total:")
		gui("total", "Total: %s")
		gui("total_approx", "Total: ~%s")

		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("flywheel.top", "When used as flywheel core:")
		gui("flywheel.storage", "* Storage: %s")
		gui("flywheel.receive_efficiency", "* Wind up efficiency: %s")
		gui("flywheel.momentum_loss_speed", "* Momentum loss speed factor: %s")

		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_afford", "Missing required items!")
		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_not_normal_pill", "%1\$s took meds")
		death("otm_not_normal_pill.item", "%1\$s took %2\$s")

		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) {
		addBlock(MBlocks.ANDROID_STATION.values, "Android Station")
		addBlock(MBlocks.ANDROID_STATION.values, "desc", "Grants access to android upgrades")
		
		addBlock(MBlocks.ANDROID_CHARGER.values, "Wireless Charger")
		addBlock(MBlocks.ANDROID_CHARGER.values, "desc", "Charges nearby androids and exopacks")
		
		addBlock(MBlocks.BATTERY_BANK.values, "Battery Bank")
		addBlock(MBlocks.BATTERY_BANK.values, "desc", "Provides a way to use battery items as ordinary energy storage cell")

		addBlock(MBlocks.MATTER_DECOMPOSER.values, "Matter Decomposer")
		addBlock(MBlocks.MATTER_DECOMPOSER.values, "desc", "Breaks down items into pure matter")

		addBlock(MBlocks.MATTER_CAPACITOR_BANK.values, "Matter Capacitor Bank")
		addBlock(MBlocks.MATTER_CAPACITOR_BANK.values, "desc", "Provides matter storage for system when matter capacitors are attached to it")

		add(MBlocks.MATTER_CABLE, "Matter Network Cable")

		add(MBlocks.PATTERN_STORAGE, "Pattern Storage")
		add(MBlocks.PATTERN_STORAGE, "desc", "Stores Patterns for system usage")

		addBlock(MBlocks.MATTER_SCANNER.values, "Matter Scanner")
		addBlock(MBlocks.MATTER_SCANNER.values, "desc", "Scans items into Patterns for future replication")

		addBlock(MBlocks.MATTER_PANEL.values, "Pattern Monitor")
		addBlock(MBlocks.MATTER_PANEL.values, "desc", "Allows to dispatch replication tasks")

		addBlock(MBlocks.MATTER_REPLICATOR.values, "Matter Replicator")
		addBlock(MBlocks.MATTER_REPLICATOR.values, "desc", "Executes replication tasks")

		addBlock(MBlocks.MATTER_BOTTLER.values, "Matter Bottler")
		addBlock(MBlocks.MATTER_BOTTLER.values, "desc", "Exchanges matter between matter holding items")

		addBlock(MBlocks.ESSENCE_STORAGE.values, "Essence Storage")
		addBlock(MBlocks.ESSENCE_STORAGE.values, "desc", "Allows to store and retrieve experience levels")

		addBlock(MBlocks.MATTER_RECONSTRUCTOR.values, "Matter Reconstructor")
		addBlock(MBlocks.MATTER_RECONSTRUCTOR.values, "desc", "Repairs tools using matter")

		addBlock(MBlocks.MATTER_RECYCLER.values, "Matter Recycler")
		addBlock(MBlocks.MATTER_RECYCLER.values, "desc", "Refines matter dust back into pure matter")

		add(MBlocks.MATTER_ENTANGLER, "Matter Entangler")

		add(MBlocks.ENERGY_CABLES[CablesConfig.E.CRUDE]!!, "Crude Energy Cable")
		add(MBlocks.ENERGY_CABLES[CablesConfig.E.REGULAR]!!, "Energy Cable")
		add(MBlocks.ENERGY_CABLES[CablesConfig.E.ADVANCED]!!, "Advanced Energy Cable")
		add(MBlocks.ENERGY_CABLES[CablesConfig.E.SUPERCONDUCTOR]!!, "Superconductive Energy Cable")

		addBlock(MBlocks.DRIVE_VIEWER.values, "Drive Viewer")

		add(MBlocks.BLACK_HOLE, "Local Anomalous Spacetime Dilation Singular Point")

		add(MBlocks.FLYWHEEL_SHAFT, "Flywheel Shaft")
		add(MBlocks.FLYWHEEL_SHAFT, "desc", "Placed between bearings, safe for decoration")

		add(MBlocks.FLYWHEEL_BEARING, "Flywheel Bearing")
		add(MBlocks.FLYWHEEL_BEARING, "desc", "Replaces top and bottom housing blocks in the center, safe for decoration")

		add(MBlocks.FLYWHEEL_BATTERY, "Flywheel Controller")
		add(MBlocks.FLYWHEEL_BATTERY, "desc", "Multiblock controller, requires housing, bearing, shaft, generator and core material of choice")
		add(MBlocks.FLYWHEEL_BATTERY, "desc2", "Can have arbitrary height, with bottom limit of 4 blocks tall")
		add(MBlocks.FLYWHEEL_BATTERY, "desc3", "Built as rectangular shape, with base surface of 5 by 5 blocks")
		add(MBlocks.FLYWHEEL_BATTERY, "desc4", "Uses Energy *Interface*s as I/O ports, which must be put at same level as generator blocks inside structure,")
		add(MBlocks.FLYWHEEL_BATTERY, "desc5", "replacing housing blocks")
		add(MBlocks.FLYWHEEL_BATTERY, "desc6", "Important: must replace housing block in wall in middle at same level where flywheel material start,")
		add(MBlocks.FLYWHEEL_BATTERY, "desc7", "in other words, controller is put one block above absolute bottom of structure")

		add(MBlocks.FLYWHEEL_HOUSING, "Flywheel Housing")
		add(MBlocks.FLYWHEEL_HOUSING, "desc", "5xNx5 multiblock casing, safe for decoration")

		add(MBlocks.GENERATOR_BLOCK, "Generator Block")
		add(MBlocks.GENERATOR_BLOCK, "desc", "Part of a multiblock, safe for decoration")

		add(MBlocks.MODULAR_FRAME, "Modular Frame")
		add(MBlocks.HEAVY_MODULAR_FRAME, "Heavy Modular Frame")

		add(MBlocks.ENERGY_INPUT_INTERFACE, "Energy Input Interface")
		add(MBlocks.ENERGY_OUTPUT_INTERFACE, "Energy Output Interface")

		add(MBlocks.ENERGY_INPUT_HATCH, "Energy Input Hatch")
		add(MBlocks.ITEM_INPUT_HATCH, "Item Input Hatch")
		add(MBlocks.MATTER_INPUT_HATCH, "Matter Input Hatch")
		add(MBlocks.ENERGY_OUTPUT_HATCH, "Energy Output Hatch")
		add(MBlocks.ITEM_OUTPUT_HATCH, "Item Output Hatch")
		add(MBlocks.MATTER_OUTPUT_HATCH, "Matter Output Hatch")

		add(MBlocks.BLACK_HOLE_GENERATOR, "Matter Acceleration Power Generator")
		add(MBlocks.TRITANIUM_HULL, "Tritanium Hull")
		add(MBlocks.TRITANIUM_HULL, "desc", "A sturdy part of a multiblock, safe for decoration")
		add(MBlocks.MATTER_INJECTOR, "Matter Injector")
		add(MBlocks.ANTIMATTER_INJECTOR, "Antimatter Injector")
		add(MBlocks.HIGH_ENERGY_PARTICLE_COLLECTOR, "High Energy Particle Collector")

		addBlock(MBlocks.COBBLESTONE_GENERATOR.values, "Cobblestone Generator")
		add(MBlocks.INFINITE_WATER_SOURCE, "Infinite Water Source")
		add(MBlocks.INFINITE_WATER_SOURCE, "desc", "Pushes water into all neighbour blocks")

		add(MBlocks.DEV_CHEST, "Dev Chest")
		add(MBlocks.DEV_CHEST, "desc", "Contains all items present in game")
		add(MBlocks.PAINTER, "Painting Table")

		add(MBlocks.LIQUID_XP, "Liquid XP")
		add(MItems.LIQUID_XP_BUCKET, "Liquid XP Bucket")

		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.HOLO_SIGN, "desc", "Multi-line, colored and glowing, text sign")

		add(MBlocks.TRITANIUM_INGOT_BLOCK, "Tritanium Plating Block")
		add(MBlocks.WITHERED_STEEL_BLOCK, "Withered Steel Block")
		add(MBlocks.ROFLITE_ALLOY_BLOCK, "Roflite Alloy Block")

		addBlock(MBlocks.ENERGY_COUNTER.values, "Energy Counter")
		addBlock(MBlocks.ENERGY_COUNTER.values, "desc", "Restricts energy flow direction;")
		addBlock(MBlocks.ENERGY_COUNTER.values, "desc2", "Allows to limit energy throughput;")
		addBlock(MBlocks.ENERGY_COUNTER.values, "desc3", "Collects statistics of passed energy;")
		addBlock(MBlocks.ENERGY_COUNTER.values, "desc4", "Displays flow activity on its monitor")

		add(MBlocks.ENERGY_COUNTER[null]!!, "facing", "Input facing: %s")
		add(MBlocks.ENERGY_COUNTER[null]!!, "switch", "Switch input facing")
		add(MBlocks.ENERGY_COUNTER[null]!!, "limit", "I/O Limit. -1 means no limit")
		add(MBlocks.ENERGY_COUNTER[null]!!, "display_this", "Display this information on block's screen")

		addBlock(MBlocks.CHEMICAL_GENERATOR.values, "Chemical Generator")
		addBlock(MBlocks.CHEMICAL_GENERATOR.values, "desc", "Generates power by burning solid fuels")

		add(MBlocks.DRIVE_RACK, "Condensation Drive Rack")
		addBlock(MBlocks.ITEM_MONITOR.values, "Item Monitor")
		addBlock(MBlocks.PLATE_PRESS.values, "Plate Press")
		addBlock(MBlocks.TWIN_PLATE_PRESS.values, "Twin Plate Press")

		addBlock(MBlocks.POWERED_FURNACE.values, "Electric Furnace")
		addBlock(MBlocks.POWERED_FURNACE.values, "desc", "Allows to smelt items using energy")
		addBlock(MBlocks.POWERED_SMOKER.values, "Microwave Oven")
		addBlock(MBlocks.POWERED_SMOKER.values, "desc", "Allows to process smoker recipes using energy")
		addBlock(MBlocks.POWERED_BLAST_FURNACE.values, "Induction Furnace")
		addBlock(MBlocks.POWERED_BLAST_FURNACE.values, "desc", "Allows to process blasting recipes using energy")

		addBlock(MBlocks.ENERGY_SERVO.values, "Energy Servo")
		addBlock(MBlocks.ENERGY_SERVO.values, "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 Grate")

		add(MBlocks.TRITANIUM_ORE, "Tritanium Ore")
		add(MBlocks.DEEPSLATE_TRITANIUM_ORE, "Deepslate Tritanium Ore")
		add(MBlocks.TRITANIUM_RAW_BLOCK, "Raw Tritanium Block")

		add(MBlocks.DILITHIUM_ORE, "Dilithium Ore")
		add(MBlocks.DEEPSLATE_DILITHIUM_ORE, "Deepslate Dilithium Ore")
		add(MBlocks.DILITHIUM_CRYSTAL_BLOCK, "Dilithium Crystal Block")

		add(MBlocks.STORAGE_CABLE, "Storage Cable")
		addBlock(MBlocks.STORAGE_POWER_SUPPLIER.values, "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.REDSTONE_LAMP_INVERTED, "Redstone Lamp (Inverted signal)")
		add(MBlocks.REINFORCED_REDSTONE_LAMP, "Reinforced Redstone Lamp")
		add(MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED, "Reinforced Redstone Lamp (Inverted signal)")

		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.METAL_BEAM_CENTER, "Metal Beam (Center)")

		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")
		add(MBlocks.METAL_RAILING, "Metal Railing")

		for ((color, blocks) in MBlocks.TRITANIUM_ANVIL.entries) {
			if (color == null) {
				for (block in blocks)
					add(block, "Tritanium Anvil")
			} else {
				for (block in blocks)
					add(block, "${provider.englishColors.mapped[color]} Tritanium Anvil")
			}
		}
	}
}

private fun items(provider: MatteryLanguageProvider) {
	with(provider.english) {
		add(MItems.REDSTONE_INTERACTOR, "Redstone Key")
		add(MItems.REDSTONE_INTERACTOR, "desc", "Allows to 'send' redstone signal out of any block")
		add(MItems.REDSTONE_INTERACTOR, "desc1", "In other words, allows to temporarily activate redstone mechanisms, such as opening Iron Doors")
		add(MItems.REDSTONE_INTERACTOR, "desc2", "Use while sneaking to set redstone timer")

		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 with little of gunpowder and iron nugget payload in your inventory by holding RMB")

		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.ENDER_UPGRADE, "Exopack Ender Access 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. Also grants access to Ender Chest contents.")

		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 absorb nearby experience orbs directly into essence storage")
		add(MItems.ESSENCE_SERVO, "desc2", "Can be used as a tool to pump essence manually")

		add(MItems.NUTRIENT_PASTE, "Nutrient Paste")
		add(MItems.IMPERFECT_BREAD, "Imperfect Bread")

		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.WITHERED_STEEL_SWORD, "Withered Steel Sword")

		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.DILITHIUM_CRYSTAL, "Dilithium Crystal")
		add(MItems.WITHERED_STEEL, "Withered Steel Ingot")
		add(MItems.ROFLITE_ALLOY_INGOT, "Roflite Alloy 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.ANTIMATTER_TRANSFORM_MATRIX, "Antimatter Transformation Matrix")
		add(MItems.ANTIMATTER_TRANSFORM_MATRIX, "desc", "Can be found in The End cities")
		add(MItems.ENERGY_BUS, "Energy Bus")
		add(MItems.ELECTRIC_PARTS, "Electric Parts")
		add(MItems.ELECTRIC_PARTS, "desc", "Capacitors, resistors, diodes, jumpers...")
		add(MItems.MECHANICAL_PARTS, "Mechanical Parts")
		add(MItems.MECHANICAL_PARTS, "desc", "Bearings, gears, fittings, axial shafts...")
		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.ELECTROMOTOR, "Electromotor")
		add(MItems.MIRROR_COMPOUND, "Mirror Compound")
		add(MItems.MIRROR, "Mirror")
		add(MItems.MIRROR, "desc", "I can clearly see my own reflection in this mirror")
		add(MItems.REINFORCED_TRITANIUM_PLATE, "Reinforced Tritanium Plate")
		add(MItems.REINFORCED_TRITANIUM_PLATE, "desc", "An armor plate, reinforced to withstand great kinetic forces")
		add(MItems.REINFORCED_IRON_PLATE, "Reinforced Iron Plate")
		add(MItems.REINFORCED_IRON_PLATE, "desc", "A sturdier and more durable Iron Plate")
		add(MItems.ARMOR_ASSEMBLY, "Armor assembly")
		add(MItems.CARBON_MESH, "Carbon Mesh")
		add(MItems.DISPLAY_SCREEN, "Display Screen")

		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.PILL_NOT_NORMAL, "Not/Normal 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.FALLING_SUN, "◄ Falling Sun ►")
		add(MItems.FALLING_SUN, "desc", "Prototype weapon, needs power to operate")
		add(MItems.FALLING_SUN, "desc2", "Deals extra damage to androids when empowered")
		add(MItems.FALLING_SUN, "desc3", "Always strikes surrounding enemies with full damage if empowered")
		add(MItems.FALLING_SUN, "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.TRITANIUM_ORE_CLUMP, "Raw Tritanium")
		add(MItems.PATTERN_DRIVE_NORMAL, "Pattern Drive")
		add(MItems.PATTERN_DRIVE_DOUBLE, "Double-Level Pattern Drive")
		add(MItems.PATTERN_DRIVE_TRIPLE, "Triple-Level Pattern Drive")
		add(MItems.PATTERN_DRIVE_QUAD, "Quad-Level Pattern Drive")
		add(MItems.PATTERN_DRIVE_CREATIVE, "Creative Pattern Drive")

		add(MItems.GOLD_DISK, "Gold Disk")
		add(MItems.GOLD_DISK, "single_item", "Gold Disk (%s)")

		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.MachineUpgrades.Basic.BLANK, "Basic Upgrade Template")
		add(MItems.MachineUpgrades.Basic.SPEED, "Basic Speed Upgrade")
		add(MItems.MachineUpgrades.Basic.ENERGY_CONSUMPTION, "Basic Energy Consumption Upgrade")
		add(MItems.MachineUpgrades.Basic.FAILSAFE, "Basic Failsafe Upgrade")
		add(MItems.MachineUpgrades.Basic.ENERGY_STORAGE, "Basic Energy Storage Upgrade")
		add(MItems.MachineUpgrades.Basic.MATTER_STORAGE, "Basic Matter Storage Upgrade")
		add(MItems.MachineUpgrades.Basic.PROCESSING_ITEMS, "Basic Item Processing Upgrade")

		add(MItems.MachineUpgrades.Normal.BLANK, "Upgrade Template")
		add(MItems.MachineUpgrades.Normal.SPEED, "Speed Upgrade")
		add(MItems.MachineUpgrades.Normal.ENERGY_CONSUMPTION, "Energy Consumption Upgrade")
		add(MItems.MachineUpgrades.Normal.FAILSAFE, "Failsafe Upgrade")
		add(MItems.MachineUpgrades.Normal.ENERGY_STORAGE, "Energy Storage Upgrade")
		add(MItems.MachineUpgrades.Normal.MATTER_STORAGE, "Matter Storage Upgrade")
		add(MItems.MachineUpgrades.Normal.PROCESSING_ITEMS, "Item Processing Upgrade")

		add(MItems.MachineUpgrades.Advanced.BLANK, "Advanced Upgrade Template")
		add(MItems.MachineUpgrades.Advanced.SPEED, "Advanced Speed Upgrade")
		add(MItems.MachineUpgrades.Advanced.ENERGY_CONSUMPTION, "Advanced Energy Consumption Upgrade")
		add(MItems.MachineUpgrades.Advanced.FAILSAFE, "Advanced Failsafe Upgrade")
		add(MItems.MachineUpgrades.Advanced.ENERGY_STORAGE, "Advanced Energy Storage Upgrade")
		add(MItems.MachineUpgrades.Advanced.MATTER_STORAGE, "Advanced Matter Storage Upgrade")
		add(MItems.MachineUpgrades.Advanced.PROCESSING_ITEMS, "Advanced Item Processing Upgrade")

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

		add(MItems.CHEST_UPGRADER, "Crate-r")
		add(MItems.CHEST_UPGRADER, "desc", "Replaces placed chests and barrels with cargo crates while keeping storage contents")
		add(MItems.CHEST_UPGRADER, "desc2", "Hold desired crates in the opposite hand")

		add(MItems.CONFIGURATOR, "Configurator")
		add(MItems.CONFIGURATOR, "desc", "Copies configuration from one block to another")
		add(MItems.CONFIGURATOR, "desc2", "Sneak-use on block to copy, use to paste")
		add(MItems.CONFIGURATOR, "desc3", "Use on air while sneaking to clear saved configuration")
		add(MItems.CONFIGURATOR, "desc_saved", "Saved configuration for: %s")

		add(MItems.BREAD_MONSTER_SPAWN_EGG, "Bread Monster Spawn Egg")
		add(MEntityTypes.BREAD_MONSTER, "Bread Monster")

		add(MItems.LOADER_SPAWN_EGG, "Loader Spawn Egg")
		add(MEntityTypes.LOADER, "Loader")
	}
}

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.SWIM_BOOSTERS, "Swim Boosters")
		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("exopack.accept_wireless_charge", "Accept wireless charging")
		gui("exopack.dont_accept_wireless_charge", "Do not accept wireless charging")

		gui("charge_androids", "Charge Androids")
		gui("dont_charge_androids", "Do not charge Androids")

		gui("charge_exopacks", "Charge Exopacks")
		gui("dont_charge_exopacks", "Do not charge Exopacks")

		gui("multiblock.formed", "Multiblock is formed: %s")

		gui("flywheel.current_loss_t", "Current energy loss per tick:")
		gui("flywheel.current_loss_s", "Current energy loss per second:")
		gui("flywheel.core_material", "Core material:")
		gui("flywheel.core_material_count", "(Core block count: %s)")

		gui("flow_direction_set", "Flow direction set to %s")
		gui("tick_timer_set", "Timer set to %s ticks")

		gui("config_copied", "Copied configuration for %s")
		gui("config_pasted", "Applied saved configuration")
		gui("config_cleared", "Configuration cleared")
		gui("config_missing", "No configuration to apply")

		gui("black_hole_generator.help0", "Generates energy using angular momentum of Singularities")
		gui("black_hole_generator.help1", "The stronger gravity Singularity has, the more power is generated!")
		gui("black_hole_generator.help2", "Using Spacetime Normalizers will reduce gravitation strength of Singularity, which will reduce power output.")
		gui("black_hole_generator.help3", "This machine is the only 'safe' way of disposing Singularities, by draining them dry by continuously injecting antimatter until Singularity lose all its mass")

		gui("black_hole_generator.injection_rate.mode", "Injection rate")
		gui("black_hole_generator.injection_rate.desc", "Amount of MtU injected each tick, from either injectors (or both)")
		gui("black_hole_generator.target_mass.mode", "Target mass")

		gui("black_hole_generator.sustain.mode", "Sustain")
		gui("black_hole_generator.sustain.desc", "Keep Singularity's mass at target level, injecting matter or antimatter when necessary")

		gui("black_hole_generator.matter_only.mode", "Inject matter only")
		gui("black_hole_generator.matter_only.desc", "Only inject matter into singularity. Way less power generated, but mass of Singularity will increase over time, as well as power output")

		gui("black_hole_generator.antimatter_only.mode", "Inject antimatter only")
		gui("black_hole_generator.antimatter_only.desc", "Only inject antimatter into singularity. Way more power generated, but mass of Singularity will decrease over time, as well as power output")

		gui("draw_multiblock_guide", "Draw building guide")
		gui("ago", "%s ago")

		gui("time.short.5s", "5s")
		gui("time.short.15s", "15s")
		gui("time.short.1m", "1m")
		gui("time.short.10m", "10m")
		gui("time.short.1h", "1h")
		gui("time.short.6h", "6h")
		gui("time.short.24h", "24h")

		gui("part_of_multiblock", "Part of multiblock structure, useless on its own")
		gui("quicksearch", "Quick search...")

		gui("painter.is_bulk", "Bulk painting")
		gui("painter.is_bulk.desc", "Input slot will be automatically refilled from your inventory")
		gui("painter.is_bulk.desc2", "Quick moving result will paint as many items as possible from your inventory")

		gui("energy_required", "Energy required: %s")

		gui("insert_priority", "Insert priority")
		gui("extract_priority", "Extract priority")
		gui("increase", "Increase")
		gui("decrease", "Decrease")

		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")
		gui("sides.energy_config", "Energy")
		gui("sides.fluid_config", "Fluid")

		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", "Operating speed: %s%%")
		gui("upgrade.speed_limit", "Operating speed: %s%% (limit)")
		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_consumed_limit", "Energy consumption: %s%% (limit)")
		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.sort_now", "Sort")
		gui("sorting.sort_settings", "Right click to show settings")
		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 quantity")
		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.is_providing_tasks", "Tasks are dispatched to replicators")
		gui("matter_panel.not_providing_tasks", "Tasks are NOT dispatched to replicators")
		gui("matter_panel.cancel_all", "Cancel all tasks")
		gui("matter_panel.cancel_all.desc", "Do you really want to cancel all replication tasks?")

		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_with_limit", "%s / %s experience points")
		gui("experience_levels", "%s experience levels")
		gui("experience_levels_with_limit", "%s / %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 Storage")
		gui("essence_capsule3", "Use to break free most of stored knowledge")
		gui("essence_capsule.digital", "Use to scan memories stored within")

		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")

		gui("debug.tags.help", "Hold Shift to display tags")
		gui("debug.tags.item.title", "Item tags:")
		gui("debug.tags.block.title", "Block tags:")
		gui("debug.tags.tag.entry", "  - %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")
	}
}

private fun maps(provider: MatteryLanguageProvider) {
	with(provider.english) {
		map("laboratory", "Laboratory Map")
		map("wreckage", "Wreckage Map")
	}
}

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)

	maps(provider)

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