From d8f237090b7aa4f5d7887be2e227cdbe61cd440b Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Sun, 12 Nov 2023 23:04:09 +0800 Subject: [PATCH 1/4] makes tooltips localizable --- kubejs/assets/enigmatica/lang/en_us.json | 12 ++++++ .../expert/item_modifiers/tooltips.js | 39 ++++++------------- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/kubejs/assets/enigmatica/lang/en_us.json b/kubejs/assets/enigmatica/lang/en_us.json index 04301248dd..ce9754cd3c 100644 --- a/kubejs/assets/enigmatica/lang/en_us.json +++ b/kubejs/assets/enigmatica/lang/en_us.json @@ -123,5 +123,17 @@ "bountiful.decree.witch.name": "Witch", "bountiful.decree.druid.name": "Druid", + "tooltips.enigmatica.expert.disabled": "Disabled in Expert Mode.", + "tooltips.enigmatica.expert.soulpickaxe": "Capable of mining Iesnium.", + "tooltips.enigmatica.expert.seared_melter": "Use the Smeltery Controller instead.", + "tooltips.enigmatica.expert.apiary": "Crafting this will not return any bees contained in the ingredients.\nMake sure to remove them before crafting!", + "tooltips.enigmatica.expert.liquid_meat": "Liquid Meat can be obtained by \"processing\" cows.", + "tooltips.enigmatica.expert.pink_slime": "Pink Slime can be harvested from a Pink Wither using a Fluid Laser.", + "tooltips.enigmatica.expert.machinery_schematics": "Unlocks the ability to form the following structures:\n", + "tooltips.enigmatica.expert.medium_machinery_schematics": "- Automated Engineer's Workbench\n- Diesel Generator\n- Excavator\n- Fermenter\n- Metal Press\n- Mixer\n- Pumpjack\n- Refinery\n- Sawmill\n- Squeezer", + "tooltips.enigmatica.expert.heavy_machinery_schematics": "- Arc Furnace\n- Assembler\n- Coker Unit\n- Crusher\n- Distillation Tower\n- Lightning Rod\n- Sulfur Recovery Unit", + "tooltips.enigmatica.expert.some_assembly_required": "Some Assembly Required.", + "tooltips.enigmatica.expert.batteries_not_included": "Batteries Not Included.", + "tooltips.enigmatica.expert.": "", "": "" } diff --git a/kubejs/client_scripts/expert/item_modifiers/tooltips.js b/kubejs/client_scripts/expert/item_modifiers/tooltips.js index 94b2d92998..61efff1117 100644 --- a/kubejs/client_scripts/expert/item_modifiers/tooltips.js +++ b/kubejs/client_scripts/expert/item_modifiers/tooltips.js @@ -23,15 +23,16 @@ onEvent('item.tooltip', (event) => { if (global.isExpertMode == false) { return; } - const disabledInExpert = Text.of('Disabled in Expert Mode.').red(); + const id_prefix = 'tooltips.enigmatica.expert.'; + const disabledInExpert = Text.translate(`${id_prefix}disabled`).red(); const recipes = [ { items: ['bloodmagic:soulpickaxe'], - text: [Text.of('Capable of mining Iesnium.').color('#7e24b3')] + text: [Text.translate(`${id_prefix}soulpickaxe`).color('#7e24b3')] }, { items: ['tconstruct:seared_melter'], - text: [disabledInExpert, Text.of('Use the Smeltery Controller instead.').aqua()] + text: [disabledInExpert, Text.translate(`${id_prefix}seared_melter`).aqua()] }, { items: [ @@ -58,50 +59,34 @@ onEvent('item.tooltip', (event) => { { items: ['resourcefulbees:t2_apiary', 'resourcefulbees:t3_apiary', 'resourcefulbees:t4_apiary'], text: [ - Text.of('Crafting this will not return any bees contained in the ingredients.').red(), - Text.of('Make sure to remove them before crafting!').red() + Text.translate(`${id_prefix}apiary`).red() ] }, { items: ['industrialforegoing:mob_slaughter_factory'], text: [ disabledInExpert, - Text.of('Liquid Meat can be obtained by "processing" cows.').color('#6e2a2a'), - Text.of('Pink Slime can be harvested from a Pink Wither using a Fluid Laser.').color('#da07e6') + Text.translate(`${id_prefix}liquid_meat`).color('#6e2a2a'), + Text.translate(`${id_prefix}pink_slime`).color('#da07e6') ] }, { items: ['kubejs:medium_machinery_schematics'], text: [ - Text.of(`Unlocks the ability to form the following structures:`).blue(), - Text.of(`- Automated Engineer's Workbench`).aqua(), - Text.of(`- Diesel Generator`).aqua(), - Text.of(`- Excavator`).aqua(), - Text.of(`- Fermenter`).aqua(), - Text.of(`- Metal Press`).aqua(), - Text.of(`- Mixer`).aqua(), - Text.of(`- Pumpjack`).aqua(), - Text.of(`- Refinery`).aqua(), - Text.of(`- Sawmill`).aqua(), - Text.of(`- Squeezer`).aqua() + Text.translate(`${id_prefix}machinery_schematics`).blue(), + Text.translate(`${id_prefix}medium_machinery_schematics`).aqua() ] }, { items: ['kubejs:heavy_machinery_schematics'], text: [ - Text.of(`Unlocks the ability to form the following structures:`).blue(), - Text.of(`- Arc Furnace`).aqua(), - Text.of(`- Assembler`).aqua(), - Text.of(`- Coker Unit`).aqua(), - Text.of(`- Crusher`).aqua(), - Text.of(`- Distillation Tower`).aqua(), - Text.of(`- Lightning Rod`).aqua(), - Text.of(`- Sulfur Recovery Unit`).aqua() + Text.translate(`${id_prefix}machinery_schematics`).blue(), + Text.translate(`${id_prefix}heavy_machinery_schematics`).aqua() ] }, { items: [/kubejs:diy/], - text: [Text.of(`Some Assembly Required.`).green(), Text.of(`Batteries Not Included.`).darkRed()] + text: [Text.translate(`${id_prefix}some_assembly_required`).green(), Text.translate(`${id_prefix}batteries_not_included`).darkRed()] } ]; From 6f1a35ab47e1e2f4021e475bb61463c5724eb16c Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Sun, 12 Nov 2023 23:16:47 +0800 Subject: [PATCH 2/4] makes jei_description localizable --- kubejs/assets/enigmatica/lang/en_us.json | 8 +++++ .../expert/item_modifiers/jei_descriptions.js | 30 +++++++++---------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/kubejs/assets/enigmatica/lang/en_us.json b/kubejs/assets/enigmatica/lang/en_us.json index ce9754cd3c..e7c55b81dc 100644 --- a/kubejs/assets/enigmatica/lang/en_us.json +++ b/kubejs/assets/enigmatica/lang/en_us.json @@ -135,5 +135,13 @@ "tooltips.enigmatica.expert.some_assembly_required": "Some Assembly Required.", "tooltips.enigmatica.expert.batteries_not_included": "Batteries Not Included.", "tooltips.enigmatica.expert.": "", + + "descriptions.enigmatica.expert.soulpickaxe": "Capable of mining Iesnium.", + "descriptions.enigmatica.expert.nebu_hammer": "Capable of breaking down Godblocks into Atum Artifacts.", + "descriptions.enigmatica.expert.apiary": "Crafting this will not return any bees contained in the ingredients - make sure to remove them before crafting!", + "descriptions.enigmatica.expert.small_storage_part": "Crafting is disabled in Expert, begin with the 16k Storage Part.", + "descriptions.enigmatica.expert.small_fluid_storage_part": "Crafting is disabled in Expert, begin with the 1024k Fluid Storage Part.", + "descriptions.enigmatica.expert.stage_unlock": "Obtaining this item for the first time automatically unlocks a Game Stage.\nIf the stage does not unlock or gets revoked, simply Right-Click this item in the air to re-gain it.", + "descriptions.enigmatica.expert.": "", "": "" } diff --git a/kubejs/client_scripts/expert/item_modifiers/jei_descriptions.js b/kubejs/client_scripts/expert/item_modifiers/jei_descriptions.js index 32964604ac..f44a71b489 100644 --- a/kubejs/client_scripts/expert/item_modifiers/jei_descriptions.js +++ b/kubejs/client_scripts/expert/item_modifiers/jei_descriptions.js @@ -2,39 +2,36 @@ onEvent('jei.information', (event) => { if (global.isExpertMode == false) { return; } + const id_prefix = `descriptions.enigmatica.expert.`; const recipes = [ { items: ['bloodmagic:soulpickaxe'], - text: ['Capable of mining Iesnium.'] + text: ['tooltips.enigmatica.expert.soulpickaxe'] }, { items: ['atum:nebu_hammer', 'mythicbotany:alfsteel_pick', 'aiotbotania:alfsteel_aiot'], - text: ['Capable of breaking down Godblocks into Atum Artifacts.'] + text: [`${id_prefix}nebu_hammer`] }, { items: ['resourcefulbees:t2_apiary', 'resourcefulbees:t3_apiary', 'resourcefulbees:t4_apiary'], - text: [ - 'Crafting this will not return any bees contained in the ingredients - make sure to remove them before crafting!' - ] + text: [`${id_prefix}apiary`] }, { items: ['industrialforegoing:mob_slaughter_factory'], text: [ - // This works but doesn't provide color in JEI text. - // I just made it like this to be easily copied from tooltips script - Text.of('Disabled in Expert Mode.').red(), - Text.of('Liquid Meat can be obtained by "processing" cows.').color('#6e2a2a'), - Text.of('Pink Slime can be harvested from a Pink Wither using a Fluid Laser.').color('#da07e6') + 'tooltips.enigmatica.expert.disabled', + 'tooltips.enigmatica.expert.liquid_meat', + 'tooltips.enigmatica.expert.pink_slime' ] }, { items: ['refinedstorage:4k_storage_part', 'refinedstorage:1k_storage_part'], - text: ['Crafting is disabled in Expert, begin with the 16k Storage Part.'] + text: [`${id_prefix}small_storage_part`] }, { items: ['refinedstorage:256k_fluid_storage_part', 'refinedstorage:64k_fluid_storage_part'], - text: ['Crafting is disabled in Expert, begin with the 1024k Fluid Storage Part.'] + text: [`${id_prefix}small_fluid_storage_part`] }, { items: [ @@ -44,14 +41,14 @@ onEvent('jei.information', (event) => { 'bloodmagic:masterbloodorb', 'bloodmagic:soulgemlesser' ], - text: [ - 'Obtaining this item for the first time automatically unlocks a Game Stage.', - 'If the stage does not unlock or gets revoked, simply Right-Click this item in the air to re-gain it.' - ] + text: [`${id_prefix}stage_unlock`] } ]; recipes.forEach((recipe) => { + for (let i = 0; i < recipe.text.length; i++) { + recipe.text[i] = Text.translate(recipe.text[i]); + } recipe.items.forEach((item) => { event.add(item, recipe.text); }); @@ -60,6 +57,7 @@ onEvent('jei.information', (event) => { const disabledItems = [ 'pneumaticcraft:air_compressor', 'pneumaticcraft:advanced_air_compressor', + 'industrialforegoing:mob_slaughter_factory', 'integrateddynamics:energy_battery', 'integrateddynamics:mechanical_squeezer', 'integrateddynamics:mechanical_drying_basin', From 623baaa153dfebe7686d0d4f691723023a5a6302 Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Mon, 13 Nov 2023 18:13:46 +0800 Subject: [PATCH 3/4] makes jei description of base E6 localizable the process of moving is just horrible --- kubejs/assets/enigmatica/lang/en_us.json | 97 +++++- .../item_modifiers/jei_descriptions.js | 328 ++++++------------ 2 files changed, 194 insertions(+), 231 deletions(-) diff --git a/kubejs/assets/enigmatica/lang/en_us.json b/kubejs/assets/enigmatica/lang/en_us.json index e7c55b81dc..692c879fc4 100644 --- a/kubejs/assets/enigmatica/lang/en_us.json +++ b/kubejs/assets/enigmatica/lang/en_us.json @@ -143,5 +143,100 @@ "descriptions.enigmatica.expert.small_fluid_storage_part": "Crafting is disabled in Expert, begin with the 1024k Fluid Storage Part.", "descriptions.enigmatica.expert.stage_unlock": "Obtaining this item for the first time automatically unlocks a Game Stage.\nIf the stage does not unlock or gets revoked, simply Right-Click this item in the air to re-gain it.", "descriptions.enigmatica.expert.": "", + + "descriptions.enigmatica.base.cheese_slice": "Obtained by right-clicking a Wheel of Cheese.", + "descriptions.enigmatica.base.ham": "Obtained by killing Pigs or Hoglins with a knife.", + "descriptions.enigmatica.base.stardust": "Obtained by left-clicking a Starmetal Ingot in-world with a Starmetal Cutting Tool. See the Astral Tome for more information.", + "descriptions.enigmatica.base.construction_paste": "Obtained by breaking a Dense Construction Block with a Pickaxe.", + "descriptions.enigmatica.base.uraninite": "Uraninite Ore has been removed and does not spawn naturally. To obtain Uraninite, use the Powah Energizing Orb recipe.", + "descriptions.enigmatica.base.blizz": "The Blizz spawns naturally in cold biomes. Mechanical Dirt and Nocturnal Powder work wonders for farming them.", + "descriptions.enigmatica.base.blitz": "The Blitz spawns naturally in warm, dry biomes. Mechanical Dirt and Nocturnal Powder work wonders for farming them.", + "descriptions.enigmatica.base.basalz": "The Basalz spawns naturally in barren biomes, such as Badlands. Mechanical Dirt and Nocturnal Powder work wonders for farming them.", + "descriptions.enigmatica.base.emerald_ice": "Found naturally in Ice Starfields in the End, it can also be created from water placed next to Ancient Emerald Ice.", + "descriptions.enigmatica.base.dense_emerald_ice": "Found naturally in Ice Starfields in the End, it can also be created from Emerald Ice placed next to Ancient Emerald Ice.", + "descriptions.enigmatica.base.ancient_emerald_ice": "Found naturally in Ice Starfields in the End, it can convert adjacent water blocks to Emerald Ice and those to Dense Emerald Ice.", + "descriptions.enigmatica.base.habanero": "A very rare drop from farming Peppers.", + "descriptions.enigmatica.base.fusion_reactor": "The Fusion Reactor has been nerfed quite heavily.\nIt produces 60k-250k rf/t passively, but has potential for far higher output when paired with one or multiple Steam Turbines.", + "descriptions.enigmatica.base.infinity_tools": "Nine Quintillion is big. Really big. You just won't believe how vastly hugely mind-bogglingly big it is.", + "descriptions.enigmatica.base.infinity_tools_2": "Unless you plan on sitting here for a few centuries, filling this tool isn't possible through conventional means. Some say the answer lies in Nucleosynthesis instead.", + "descriptions.enigmatica.base.brown_mushroom": "Plant a Brown Mushroom on Rich Soil in darkness to grow mushroom colonies, which may be broken for a nice yield.", + "descriptions.enigmatica.base.red_mushroom": "Plant a Red Mushroom on Rich Soil in darkness to grow mushroom colonies, which may be broken for a nice yield.", + "descriptions.enigmatica.base.integratedtunnels_energy": "Max Energy Transfer Rate has been limited to 65,536 FE per tick.", + "descriptions.enigmatica.base.integratedtunnels_fluid": "Max Fluid Transfer Rate has been limited to 65,536 mb per tick.", + "descriptions.enigmatica.base.nautilus_shell": "Obtained by killing Nautilus, found in Warm Oceans.\n \nAlso obtained from Embedded Ammonite, found at any Y level under Oceans and Beaches.", + "descriptions.enigmatica.base.twisted_sapling": "Obtained by tossing Saplings through a Nether Portal from the Overworld", + "descriptions.enigmatica.base.warpstone": "Obtained by tossing Clay Blocks through a Nether Portal from the Overworld", + "descriptions.enigmatica.base.warped_cactus": "Obtained by tossing Cactus through a Nether Portal from the Overworld", + "descriptions.enigmatica.base.warped_coral": "Obtained by tossing any coral through a Nether Portal from the Overworld", + "descriptions.enigmatica.base.chiseled_abyssaline_bricks": "May be Charged by Right-Clicking with a Heart of the Sea. Used to power Abyssaline blocks.", + "descriptions.enigmatica.base.abyssaline": "Powered by placing next to a Charged Chiseled Abyssaline Bricks. Power is transmitted through to other Abyssaline blocks.", + "descriptions.enigmatica.base.acacia_totem": "Right-Click with an Axe to change the face.", + "descriptions.enigmatica.base.silk_fiber": "Obtained by killing Silk Moths which are spawned by Silk Moth Nests.", + "descriptions.enigmatica.base.universal_coralstone": "Obtained by placing Coralstone next to living coral and waiting. Requires Silk Touch to harvest.", + "descriptions.enigmatica.base.coralstone": "Place next to living coral and wait for it to infuse.", + "descriptions.enigmatica.base.dead_coralstone": "Obtained by breaking infused Coralstone without Silk Touch.", + "descriptions.enigmatica.base.quark_crystal": "Will grow up to four blocks tall if placed deep underground. Will emit particles while growing.\n \nMay sprout Corundum Clusters as well.", + "descriptions.enigmatica.base.quark_crystal_cluster": "Grows occasionally on Corundum Blocks when grown underground.", + "descriptions.enigmatica.base.bottled_cloud": "Obtained by Right-Clicking a Glass Bottle in the air between Y Levels 126 and 132.", + "descriptions.enigmatica.base.overworld_aura_bottle": "Obtained by Right-Clicking a Bottle and Cork in the air in the Overworld or Atum. This action removes Aura from the area.\n \nCan be automated using a Dispenser.", + "descriptions.enigmatica.base.end_aura_bottle": "Obtained by Right-Clicking a Bottle and Cork in the air in the End or The Undergarden. This action removes Aura from the area.\n \nCan be automated using a Dispenser.", + "descriptions.enigmatica.base.nether_aura_bottle": "Obtained by Right-Clicking a Bottle and Cork in the air in the Nether. This action removes Aura from the area.\n \nCan be automated using a Dispenser.", + "descriptions.enigmatica.base.quark_root_item": "Drops occasionally when breaking Cave Roots.\n \nCave Roots may be crafted and grown just like Vines, though they require low light to grow.", + "descriptions.enigmatica.base.quark_root": "May be crafted and grown just like Vines, though they require low light to grow.", + "descriptions.enigmatica.base.phantoplasm": "Drops from the Bellringer. Craft a Haunted Bell to summon.", + "descriptions.enigmatica.base.mossy_tooth": "Drops from Swampjaw. Craft a Fossil Bait to summon.", + "descriptions.enigmatica.base.fortunes_favor": "Drops from Dame Fortuna. Craft a Devil's Ante to summon.", + "descriptions.enigmatica.base.ectoplasm": "Drops from Wraiths in the sandy wastes of Atum.", + "descriptions.enigmatica.base.firework_rocket": "Shapeless Crafting: One paper and at least one gunpowder.", + "descriptions.enigmatica.base.firework_rocket_2": "Adding more gunpowder increases the duration of the rocket.\nUp to three gunpowder or up to seven firework stars can be added.", + "descriptions.enigmatica.base.firework_star": "Shapeless Crafting: One gunpowder and at least one dye.", + "descriptions.enigmatica.base.firework_star_2": "Up to eight dyes can be added.\nOne head, gold nugget, feather, or fire charge can be added to set a shape.\nA diamond and/or a glowstone dust can be added with any of the other ingredients.", + "descriptions.enigmatica.base.dragon_egg": "More eggs may be obtained by summoning the End Dragon again.\n \nTo summon, place an End Crystal on each of the cardinal directions of the End Portal in the End.", + "descriptions.enigmatica.base.leaf_pile": "Gathered with Shears.", + "descriptions.enigmatica.base.soul_shard": "Obtained by performing a Crystallization Ritual near undead mobs. The ritual can be found in the Ars Ecclesia.\n \nAlternatively obtained by killing undead mobs with a Reaper's Scythe.", + "descriptions.enigmatica.base.anputs_fingers_spores": "Found occasionally growing beneath Deadwood Trees. Requires darkness to grow.", + "descriptions.enigmatica.base.heater": "May be used to provide Heat for PneumaticCraft machines.", + "descriptions.enigmatica.base.logic_circuit": "Used in a Logic Unit to create advanced Redstone Logic.\n \nCrafted in an Engineer's Circuit Table. Requires Circuit Backplanes and Lead or Copper Wire. Vacuum Tubes are required for all operators except SET.", + "descriptions.enigmatica.base.hemolymph_sac": "Obtained by defeating the Warped Mosco.\n \nWarped Mosco are creatures of nightmare created when a Crimson Mosquito sucks the blood of a Mungus covered in Warped Fungus.", + "descriptions.enigmatica.base.hemolymph_sac_2": "Mungus may be summoned through the Altar of Birthing, while Crimson Mosquitos may be created by bringing a Fly into the Nether.", + "descriptions.enigmatica.base.gem_crystal_cluster": "Formed by dropping a Rock Crystal or Celestial Crystal in Liquid Starlight with an Illumination Powder.\n \nDifferent varieties form at different times of the day.", + "descriptions.enigmatica.base.celestial_crystal_cluster": "Formed by dropping a Rock Crystal or Celestial Crystal in Liquid Starlight with a Stardust.", + "descriptions.enigmatica.base.celestial_crystal_cluster_2": "If grown on Starmetal Ore, the growth rate is increased. The ore may revert during this process, so linking a Collector Crystal to it is important to convert it back.", + "descriptions.enigmatica.base.weak_tau": "Found in chests within the Demon Realm.", + "descriptions.enigmatica.base.strong_tau": "Produced by growing Tau near mobs.", + "descriptions.enigmatica.base.unholy_symbol": "Produced by chanting the Touch of Darkness at Pewter Inlay dropped on the ground.", + "descriptions.enigmatica.base.beehive": "Tiered Beehives have been depreciated. Use the Hive Upgrade items on nests found in the world instead. Tiered Beehives can be converted to Hive Upgrades in a crafting grid.", + "descriptions.enigmatica.base.flare": "Splash a Phantom with a Potion of Insomnia to convert it to a Flare.", + "descriptions.enigmatica.base.cloche": "Available Fertilizers:\n \nBone Meal: 1.25x\nFloral Fertilizer: 1.5x\nGreen Fertilizer: 1.5x\nFertilizer: 1.7x\nRed Fertilizer: 2.0x\nPhyto-Gro: 3.0x", + "descriptions.enigmatica.base.dragon_scale": "Only drops from Ender Dragons after the first one has been killed.", + "descriptions.enigmatica.base.dankstorage": "Sneak Right Click to upgrade a Dank installed in a Dock.", + "descriptions.enigmatica.base.dusty_mummbee_bee": "The Dusty Mummbee can be found inside the Pharaoh's Sarcophagus.", + "descriptions.enigmatica.base.slime_in_a_bucket": "Scoop up a small slime in an empty bucket.", + "descriptions.enigmatica.base.mysterious_worm": "Summons a Void Worm when tossed into the void in The End.\n \nPlace a Crimson Mosquito Larva inside a Capsid to obtain.", + "descriptions.enigmatica.base.capsid": "Dropped by Enderiophage.\n \nEnderiophage may be found in the wild in the End Midlands biome. They may also be called forth by consuming Otherworldly Honey.", + "descriptions.enigmatica.base.sanguine_amulet": "For crafting steps, refer to the Sanguine Items section under Rituals in the Ars Ecclesia.", + "descriptions.enigmatica.base.papyrus_plant": "Commonly found growing in Oasis Biomes in Atum. Grows like Sugar Cane on Strange Sand or Fertile Soil.", + "descriptions.enigmatica.base.infused_wood": "Made by dropping any Log into Liquid Starlight.", + "descriptions.enigmatica.base.thief_hood": "May be repaired with Rabbit Hide.", + "descriptions.enigmatica.base.gold_leaf": "Obtained by breaking Golden Leaves.", + "descriptions.enigmatica.base.golden_leaves": "Obtained by using Brilliant Fiber on leaves. Allow to spread for best effect.", + "descriptions.enigmatica.base.masterfulmachinery": "This structure will be difficult to build by hand.", + "descriptions.enigmatica.base.masterfulmachinery_2": "Use the included Building Gadgets patterns found in the \"building_gadgets_patterns\" folder of Enigmatica 6 instance folder.\n \nMay be rotated, but not mirrored.", + "descriptions.enigmatica.base.masterfulmachinery_3": "A note on the values shown in recipes for these machines:\n● Forge Energy is consumed per tick\n● Pneumatic Air is consumed per tick and must be over 10 bar\n● Astral Starlight is consumed per tick\n● Fluids are consumed or created per tick\n● Items are consumed or created at the end of a craft\n● Mana is consumed at the start of a craft or created at the end", + "descriptions.enigmatica.base.break_prevention": "When applied to a tool in an anvil, the tool will just stop working when durability runs out, instead of being destroyed.", + "descriptions.enigmatica.base.belt_of_levitation": "When equipped in the belt slot, hold the sneak key while airborne to float.", + "descriptions.enigmatica.base.refined_radiance": "Chromatic Compound absorbs light when dropped in the world, transforming into Refined Radiance. Charges slowly from ambient light, faster by consuming nearby light emitting blocks, and instantly when dropped onto an active beacon.", + "descriptions.enigmatica.base.shadow_steel": "Chromatic Compound absorbs darkness when dropped into the void, returning as Shadow Steel, floating back up out of the void shortly after falling into the depths.", + "descriptions.enigmatica.base.projectile_generator": "Valid Projectiles:\n● Snowballs\n● Eggs\n● Arrows\n● Fire Charges\n● Spectral Arrows", + "descriptions.enigmatica.base.projectile_generator_2": "● Ender Pearls\n● Llama Spit\n● Bottles o' Enchanting\n● Shulker Bullets\n● Tridents", + "descriptions.enigmatica.base.birth_spirit": "Obtained by manually breeding animals in high Aura areas.", + "descriptions.enigmatica.base.hose_pulley": "May be used to pump the following infinitely:\n \n● Lava\n● Water\n● Crude Oil\n● Virulent Mix\n● Chocolate\n● Liquid Chorus\n● Menril Resin\n● Blood\n● Slime\n● Enderslime\n● Skyslime", + "descriptions.enigmatica.base.honey_glazed_ham": "Obtained by right-clicking a placed Honey Glazed Ham with a Bowl.", + "descriptions.enigmatica.base.stuffed_pumpkin": "Obtained by right-clicking a placed Stuffed Pumpkin with a Bowl.", + "descriptions.enigmatica.base.roast_chicken": "Obtained by right-clicking a placed Roast Chicken with a Bowl.", + "descriptions.enigmatica.base.brewing_barrel": "Used for brewing various alcoholic beverages.\n \n● Beer\n● Cauim\n● Cider\n● Mead", + "descriptions.enigmatica.base.brewing_barrel_2": "● Sake\n● Tiswin\n● Vodka\n● Whiskey\n● Wine", + "descriptions.enigmatica.base.": "", + "": "" -} +} \ No newline at end of file diff --git a/kubejs/client_scripts/item_modifiers/jei_descriptions.js b/kubejs/client_scripts/item_modifiers/jei_descriptions.js index b068e2f1d1..0ad5ff5b27 100644 --- a/kubejs/client_scripts/item_modifiers/jei_descriptions.js +++ b/kubejs/client_scripts/item_modifiers/jei_descriptions.js @@ -1,75 +1,58 @@ onEvent('jei.information', (event) => { + const id_prefix = 'descriptions.enigmatica.base.'; + const recipes = [ { items: ['simplefarming:cheese_slice'], - text: ['Obtained by right-clicking a Wheel of Cheese.'] + text: [`${id_prefix}cheese_slice`] }, { items: ['farmersdelight:ham'], - text: ['Obtained by killing Pigs or Hoglins with a knife.'] + text: [`${id_prefix}ham`] }, { items: ['astralsorcery:stardust'], - text: [ - 'Obtained by left-clicking a Starmetal Ingot in-world with a Starmetal Cutting Tool. See the Astral Tome for more information.' - ] + text: [`${id_prefix}stardust`] }, { items: ['buildinggadgets:construction_paste'], - text: ['Obtained by breaking a Dense Construction Block with a Pickaxe.'] + text: [`${id_prefix}construction_paste`] }, { items: ['powah:uraninite', 'powah:uraninite_block'], - text: [ - 'Uraninite Ore has been removed and does not spawn naturally. To obtain Uraninite, use the Powah Energizing Orb recipe.' - ] + text: [`${id_prefix}uraninite`] }, { items: ['thermal:blizz_rod', 'thermal:blizz_spawn_egg'], - text: [ - 'The Blizz spawns naturally in cold biomes. Mechanical Dirt and Nocturnal Powder work wonders for farming them.' - ] + text: [`${id_prefix}blizz`] }, { items: ['thermal:blitz_rod', 'thermal:blitz_spawn_egg'], - text: [ - 'The Blitz spawns naturally in warm, dry biomes. Mechanical Dirt and Nocturnal Powder work wonders for farming them.' - ] + text: [`${id_prefix}blitz`] }, { items: ['thermal:basalz_rod', 'thermal:basalz_spawn_egg'], - text: [ - 'The Basalz spawns naturally in barren biomes, such as Badlands. Mechanical Dirt and Nocturnal Powder work wonders for farming them.' - ] + text: [`${id_prefix}basalz`] }, { items: ['betterendforge:emerald_ice'], - text: [ - 'Found naturally in Ice Starfields in the End, it can also be created from water placed next to Ancient Emerald Ice.' - ] + text: [`${id_prefix}emerald_ice`] }, { items: ['betterendforge:dense_emerald_ice'], - text: [ - 'Found naturally in Ice Starfields in the End, it can also be created from Emerald Ice placed next to Ancient Emerald Ice.' - ] + text: [`${id_prefix}dense_emerald_ice`] }, { items: ['betterendforge:ancient_emerald_ice'], - text: [ - 'Found naturally in Ice Starfields in the End, it can convert adjacent water blocks to Emerald Ice and those to Dense Emerald Ice.' - ] + text: [`${id_prefix}ancient_emerald_ice`] }, { items: ['simplefarming:habanero'], - text: ['A very rare drop from farming Peppers.'] + text: [`${id_prefix}habanero`] }, { items: ['mekanismgenerators:fusion_reactor_controller'], - text: [ - 'The Fusion Reactor has been nerfed quite heavily.', - 'It produces 60k-250k rf/t passively, but has potential for far higher output when paired with one or multiple Steam Turbines.' - ] + text: [`${id_prefix}fusion_reactor`] }, { items: [ @@ -81,9 +64,7 @@ onEvent('jei.information', (event) => { 'industrialforegoing:infinity_nuke', 'industrialforegoing:infinity_launcher' ], - text: [ - "Nine Quintillion is big. Really big. You just won't believe how vastly hugely mind-bogglingly big it is." - ] + text: [`${id_prefix}infinity_tools`] }, { items: [ @@ -95,21 +76,15 @@ onEvent('jei.information', (event) => { 'industrialforegoing:infinity_nuke', 'industrialforegoing:infinity_launcher' ], - text: [ - "Unless you plan on sitting here for a few centuries, filling this tool isn't possible through conventional means. Some say the answer lies in Nucleosynthesis instead." - ] + text: [`${id_prefix}infinity_tools_2`] }, { items: ['farmersdelight:brown_mushroom_colony', 'minecraft:brown_mushroom'], - text: [ - 'Plant a Brown Mushroom on Rich Soil in darkness to grow mushroom colonies, which may be broken for a nice yield.' - ] + text: [`${id_prefix}brown_mushroom`] }, { items: ['farmersdelight:red_mushroom_colony', 'minecraft:red_mushroom'], - text: [ - 'Plant a Red Mushroom on Rich Soil in darkness to grow mushroom colonies, which may be broken for a nice yield.' - ] + text: [`${id_prefix}red_mushroom`] }, { items: [ @@ -117,7 +92,7 @@ onEvent('jei.information', (event) => { 'integratedtunnels:part_importer_energy', 'integratedtunnels:part_exporter_energy' ], - text: ['Max Energy Transfer Rate has been limited to 65,536 FE per tick.'] + text: [`${id_prefix}integratedtunnels_energy`] }, { items: [ @@ -125,35 +100,31 @@ onEvent('jei.information', (event) => { 'integratedtunnels:part_importer_fluid', 'integratedtunnels:part_exporter_fluid' ], - text: ['Max Fluid Transfer Rate has been limited to 65,536 mb per tick.'] + text: [`${id_prefix}integratedtunnels_fluid`] }, { items: ['minecraft:nautilus_shell'], - text: [ - 'Obtained by killing Nautilus, found in Warm Oceans.', - ' ', - 'Also obtained from Embedded Ammonite, found at any Y level under Oceans and Beaches.' - ] + text: [`${id_prefix}nautilus_shell`] }, { items: ['architects_palette:twisted_sapling'], - text: ['Obtained by tossing Saplings through a Nether Portal from the Overworld'] + text: [`${id_prefix}twisted_sapling`] }, { items: ['architects_palette:warpstone'], - text: ['Obtained by tossing Clay Blocks through a Nether Portal from the Overworld'] + text: [`${id_prefix}warpstone`] }, { items: ['byg:warped_cactus'], - text: ['Obtained by tossing Cactus through a Nether Portal from the Overworld'] + text: [`${id_prefix}warped_cactus`] }, { - items: ['byg:warped_coral', 'byg:warped_coral_fan', 'byg:warped_coral'], - text: ['Obtained by tossing any coral through a Nether Portal from the Overworld'] + items: ['byg:warped_coral', 'byg:warped_coral_fan'], + text: [`${id_prefix}warped_coral`] }, { items: ['architects_palette:chiseled_abyssaline_bricks'], - text: ['May be Charged by Right-Clicking with a Heart of the Sea. Used to power Abyssaline blocks.'] + text: [`${id_prefix}chiseled_abyssaline_bricks`] }, { items: [ @@ -165,9 +136,7 @@ onEvent('jei.information', (event) => { 'architects_palette:abyssaline_bricks', 'architects_palette:abyssaline' ], - text: [ - 'Powered by placing next to a Charged Chiseled Abyssaline Bricks. Power is transmitted through to other Abyssaline blocks.' - ] + text: [`${id_prefix}abyssaline`] }, { items: [ @@ -176,23 +145,23 @@ onEvent('jei.information', (event) => { 'architects_palette:placid_acacia_totem', 'architects_palette:grinning_acacia_totem' ], - text: ['Right-Click with an Axe to change the face.'] + text: [`${id_prefix}acacia_totem`] }, { items: ['betterendforge:silk_fiber'], - text: ['Obtained by killing Silk Moths which are spawned by Silk Moth Nests.'] + text: [`${id_prefix}silk_fiber`] }, { items: [/upgrade_aquatic:(?!.*dead_coralstone|chiseled)(?=.*_coralstone$)/], - text: ['Obtained by placing Coralstone next to living coral and waiting. Requires Silk Touch to harvest.'] + text: [`${id_prefix}universal_coralstone`] }, { items: ['upgrade_aquatic:coralstone'], - text: ['Place next to living coral and wait for it to infuse.'] + text: [`${id_prefix}coralstone`] }, { items: ['upgrade_aquatic:dead_coralstone'], - text: ['Obtained by breaking infused Coralstone without Silk Touch.'] + text: [`${id_prefix}dead_coralstone`] }, { items: [ @@ -206,174 +175,123 @@ onEvent('jei.information', (event) => { 'quark:white_crystal', 'quark:black_crystal' ], - text: [ - 'Will grow up to four blocks tall if placed deep underground. Will emit particles while growing.', - ' ', - 'May sprout Corundum Clusters as well.' - ] + text: [`${id_prefix}quark_crystal`] }, { items: [/quark:\w+_crystal_cluster/], - text: ['Grows occasionally on Corundum Blocks when grown underground.'] + text: [`${id_prefix}quark_crystal_cluster`] }, { items: ['quark:bottled_cloud'], - text: ['Obtained by Right-Clicking a Glass Bottle in the air between Y Levels 126 and 132.'] + text: [`${id_prefix}bottled_cloud`] }, { items: [Item.of('naturesaura:aura_bottle', { stored_type: 'naturesaura:overworld' })], - text: [ - 'Obtained by Right-Clicking a Bottle and Cork in the air in the Overworld or Atum. This action removes Aura from the area.', - ' ', - `Can be automated using a Dispenser.` - ] + text: [`${id_prefix}overworld_aura_bottle`] }, { items: [Item.of('naturesaura:aura_bottle', { stored_type: 'naturesaura:end' })], - text: [ - 'Obtained by Right-Clicking a Bottle and Cork in the air in the End or The Undergarden. This action removes Aura from the area.', - ' ', - `Can be automated using a Dispenser.` - ] + text: [`${id_prefix}end_aura_bottle`] }, { items: [Item.of('naturesaura:aura_bottle', { stored_type: 'naturesaura:nether' })], - text: [ - 'Obtained by Right-Clicking a Bottle and Cork in the air in the Nether. This action removes Aura from the area.', - ' ', - `Can be automated using a Dispenser.` - ] + text: [`${id_prefix}nether_aura_bottle`] }, { items: ['quark:root_item'], - text: [ - 'Drops occasionally when breaking Cave Roots.', - ' ', - 'Cave Roots may be crafted and grown just like Vines, though they require low light to grow.' - ] + text: [`${id_prefix}quark_root_item`] }, { items: ['quark:root'], - text: ['May be crafted and grown just like Vines, though they require low light to grow.'] + text: [`${id_prefix}quark_root`] }, { items: ['meetyourfight:phantoplasm'], - text: ['Drops from the Bellringer. Craft a Haunted Bell to summon.'] + text: [`${id_prefix}phantoplasm`] }, { items: ['meetyourfight:mossy_tooth'], - text: ['Drops from Swampjaw. Craft a Fossil Bait to summon.'] + text: [`${id_prefix}mossy_tooth`] }, { items: ['meetyourfight:fortunes_favor'], - text: [`Drops from Dame Fortuna. Craft a Devil's Ante to summon.`] + text: [`${id_prefix}fortunes_favor`] }, { items: ['atum:ectoplasm'], - text: [`Drops from Wraiths in the sandy wastes of Atum.`] + text: [`${id_prefix}ectoplasm`] }, { items: ['minecraft:firework_rocket'], - text: [`Shapeless Crafting: One paper and at least one gunpowder.`] + text: [`${id_prefix}firework_rocket`] }, { items: ['minecraft:firework_rocket'], - text: [ - `Adding more gunpowder increases the duration of the rocket.`, - `Up to three gunpowder or up to seven firework stars can be added.` - ] + text: [`${id_prefix}firework_rocket_2`] }, { items: ['minecraft:firework_star'], - text: [`Shapeless Crafting: One gunpowder and at least one dye.`] + text: [`${id_prefix}firework_star`] }, { items: ['minecraft:firework_star'], - text: [ - `Up to eight dyes can be added.`, - `One head, gold nugget, feather, or fire charge can be added to set a shape.`, - `A diamond and/or a glowstone dust can be added with any of the other ingredients.` - ] + text: [`${id_prefix}firework_star_2`] }, { items: ['minecraft:dragon_egg'], - text: [ - `More eggs may be obtained by summoning the End Dragon again.`, - ` `, - `To summon, place an End Crystal on each of the cardinal directions of the End Portal in the End.` - ] + text: [`${id_prefix}dragon_egg`] }, { items: ['byg:leaf_pile'], - text: [`Gathered with Shears.`] + text: [`${id_prefix}leaf_pile`] }, { items: ['eidolon:soul_shard'], - text: [ - `Obtained by performing a Crystallization Ritual near undead mobs. The ritual can be found in the Ars Ecclesia.`, - ` `, - `Alternatively obtained by killing undead mobs with a Reaper's Scythe.` - ] + text: [`${id_prefix}soul_shard`] }, { items: ['atum:anputs_fingers_spores'], - text: [`Found occasionally growing beneath Deadwood Trees. Requires darkness to grow.`] + text: [`${id_prefix}anputs_fingers_spores`] }, { items: ['immersiveengineering:furnace_heater', 'mekanism:fuelwood_heater', 'mekanism:resistive_heater'], - text: [`May be used to provide Heat for PneumaticCraft machines.`] + text: [`${id_prefix}heater`] }, { items: ['immersiveengineering:logic_circuit'], - text: [ - `Used in a Logic Unit to create advanced Redstone Logic.`, - ` `, - `Crafted in an Engineer's Circuit Table. Requires Circuit Backplanes and Lead or Copper Wire. Vacuum Tubes are required for all operators except SET.` - ] + text: [`${id_prefix}logic_circuit`] }, { items: ['alexsmobs:hemolymph_sac', 'alexsmobs:warped_muscle'], - text: [ - `Obtained by defeating the Warped Mosco.`, - ` `, - `Warped Mosco are creatures of nightmare created when a Crimson Mosquito sucks the blood of a Mungus covered in Warped Fungus.` - ] + text: [`${id_prefix}hemolymph_sac`] }, { items: ['alexsmobs:hemolymph_sac', 'alexsmobs:warped_muscle'], - text: [ - `Mungus may be summoned through the Altar of Birthing, while Crimson Mosquitos may be created by bringing a Fly into the Nether.` - ] + text: [`${id_prefix}hemolymph_sac_2`] }, { items: ['astralsorcery:gem_crystal_cluster'], - text: [ - `Formed by dropping a Rock Crystal or Celestial Crystal in Liquid Starlight with an Illumination Powder.`, - ` `, - `Different varieties form at different times of the day.` - ] + text: [`${id_prefix}gem_crystal_cluster`] }, { items: ['astralsorcery:celestial_crystal_cluster'], - text: [`Formed by dropping a Rock Crystal or Celestial Crystal in Liquid Starlight with a Stardust.`] + text: [`${id_prefix}celestial_crystal_cluster`] }, { items: ['astralsorcery:celestial_crystal_cluster'], - text: [ - `If grown on Starmetal Ore, the growth rate is increased. The ore may revert during this process, so linking a Collector Crystal to it is important to convert it back.` - ] + text: [`${id_prefix}celestial_crystal_cluster_2`] }, { items: ['bloodmagic:weak_tau'], - text: [`Found in chests within the Demon Realm.`] + text: [`${id_prefix}weak_tau`] }, { items: ['bloodmagic:strong_tau'], - text: [`Produced by growing Tau near mobs.`] + text: [`${id_prefix}strong_tau`] }, { items: ['eidolon:unholy_symbol'], - text: [`Produced by chanting the Touch of Darkness at Pewter Inlay dropped on the ground.`] + text: [`${id_prefix}unholy_symbol`] }, { items: [ @@ -382,30 +300,19 @@ onEvent('jei.information', (event) => { 'resourcefulbees:t3_beehive', 'resourcefulbees:t4_beehive' ], - text: [ - `Tiered Beehives have been depreciated. Use the Hive Upgrade items on nests found in the world instead. Tiered Beehives can be converted to Hive Upgrades in a crafting grid.` - ] + text: [`${id_prefix}beehive`] }, { items: ['upgrade_aquatic:flare_spawn_egg'], - text: [`Splash a Phantom with a Potion of Insomnia to convert it to a Flare.`] + text: [`${id_prefix}flare`] }, { items: ['immersiveengineering:cloche'], - text: [ - `Available Fertilizers:`, - ` `, - `Bone Meal: 1.25x`, - `Floral Fertilizer: 1.5x`, - `Green Fertilizer: 1.5x`, - `Fertilizer: 1.7x`, - `Red Fertilizer: 2.0x`, - `Phyto-Gro: 3.0x` - ] + text: [`${id_prefix}cloche`] }, { items: ['quark:dragon_scale'], - text: [`Only drops from Ender Dragons after the first one has been killed.`] + text: [`${id_prefix}dragon_scale`] }, { items: [ @@ -416,154 +323,112 @@ onEvent('jei.information', (event) => { 'dankstorage:5_to_6', 'dankstorage:6_to_7' ], - text: [`Sneak Right Click to upgrade a Dank installed in a Dock.`] + text: [`${id_prefix}dankstorage`] }, { items: [Item.of('resourcefulbees:bee_jar', { Entity: 'resourcefulbees:dusty_mummbee_bee' })], - text: [`The Dusty Mummbee can be found inside the Pharaoh's Sarcophagus.`] + text: [`${id_prefix}dusty_mummbee_bee`] }, { items: ['quark:slime_in_a_bucket'], - text: [`Scoop up a small slime in an empty bucket.`] + text: [`${id_prefix}slime_in_a_bucket`] }, { items: ['alexsmobs:mysterious_worm'], - text: [ - `Summons a Void Worm when tossed into the void in The End.`, - ` `, - `Place a Crimson Mosquito Larva inside a Capsid to obtain.` - ] + text: [`${id_prefix}mysterious_worm`] }, { items: ['alexsmobs:capsid'], - text: [ - `Dropped by Enderiophage.`, - ` `, - `Enderiophage may be found in the wild in the End Midlands biome. They may also be called forth by consuming Otherworldly Honey.` - ] + text: [`${id_prefix}capsid`] }, { items: ['eidolon:sanguine_amulet', 'eidolon:sapping_sword'], - text: [`For crafting steps, refer to the Sanguine Items section under Rituals in the Ars Ecclesia.`] + text: [`${id_prefix}sanguine_amulet`] }, { items: ['atum:papyrus_plant'], - text: [ - `Commonly found growing in Oasis Biomes in Atum. Grows like Sugar Cane on Strange Sand or Fertile Soil.` - ] + text: [`${id_prefix}papyrus_plant`] }, { items: ['astralsorcery:infused_wood'], - text: [`Made by dropping any Log into Liquid Starlight.`] + text: [`${id_prefix}infused_wood`] }, { items: ['environmental:thief_hood'], - text: [`May be repaired with Rabbit Hide.`] + text: [`${id_prefix}thief_hood`] }, { items: ['naturesaura:gold_leaf'], - text: [`Obtained by breaking Golden Leaves.`] + text: [`${id_prefix}gold_leaf`] }, { items: ['naturesaura:golden_leaves'], - text: [`Obtained by using Brilliant Fiber on leaves. Allow to spread for best effect.`] + text: [`${id_prefix}golden_leaves`] }, { items: [/masterfulmachinery:\w+_controller/], - text: [`This structure will be difficult to build by hand.`] + text: [`${id_prefix}masterfulmachinery`] }, { items: [/masterfulmachinery:\w+_controller/], - text: [ - `Use the included Building Gadgets patterns found in the "building_gadgets_patterns" folder of Enigmatica 6 instance folder.`, - ` `, - 'May be rotated, but not mirrored.' - ] + text: [`${id_prefix}masterfulmachinery_2`] }, { items: [/masterfulmachinery:\w+_controller/], - text: [ - 'A note on the values shown in recipes for these machines:', - `● Forge Energy is consumed per tick`, - `● Pneumatic Air is consumed per tick and must be over 10 bar`, - `● Astral Starlight is consumed per tick`, - `● Fluids are consumed or created per tick`, - `● Items are consumed or created at the end of a craft`, - `● Mana is consumed at the start of a craft or created at the end` - ] + text: [`${id_prefix}masterfulmachinery_3`] }, { items: ['naturesaura:break_prevention'], - text: [ - `When applied to a tool in an anvil, the tool will just stop working when durability runs out, instead of being destroyed.` - ] + text: [`${id_prefix}break_prevention`] }, { items: ['ars_nouveau:belt_of_levitation'], - text: [`When equipped in the belt slot, hold the sneak key while airborne to float.`] + text: [`${id_prefix}belt_of_levitation`] }, { items: ['create:chromatic_compound', 'create:refined_radiance'], - text: [ - `Chromatic Compound absorbs light when dropped in the world, transforming into Refined Radiance. Charges slowly from ambient light, faster by consuming nearby light emitting blocks, and instantly when dropped onto an active beacon.` - ] + text: [`${id_prefix}refined_radiance`] }, { items: ['create:chromatic_compound', 'create:shadow_steel'], - text: [ - `Chromatic Compound absorbs darkness when dropped into the void, returning as Shadow Steel, floating back up out of the void shortly after falling into the depths.` - ] + text: [`${id_prefix}shadow_steel`] }, { items: ['naturesaura:projectile_generator'], - text: [`Valid Projectiles:`, ``, `● Snowballs`, `● Eggs`, `● Arrows`, `● Fire Charges`, `● Spectral Arrows`] + text: [`${id_prefix}projectile_generator`] }, { items: ['naturesaura:projectile_generator'], - text: [`● Ender Pearls`, `● Llama Spit`, `● Bottles o' Enchanting`, `● Shulker Bullets`, `● Tridents`] + text: [`${id_prefix}projectile_generator_2`] }, { items: ['naturesaura:birth_spirit'], - text: [`Obtained by manually breeding animals in high Aura areas.`] + text: [`${id_prefix}birth_spirit`] }, { items: ['create:hose_pulley'], - text: [ - `May be used to pump the following infinitely:`, - ` `, - `● Lava`, - `● Water`, - `● Crude Oil`, - `● Virulent Mix`, - `● Chocolate`, - `● Liquid Chorus`, - `● Menril Resin`, - `● Blood`, - `● Slime`, - `● Enderslime`, - `● Skyslime` - ] + text: [`${id_prefix}hose_pulley`] }, { items: ['farmersdelight:honey_glazed_ham'], - text: [`Obtained by right-clicking a placed Honey Glazed Ham with a Bowl.`] + text: [`${id_prefix}honey_glazed_ham`] }, { items: ['farmersdelight:stuffed_pumpkin'], - text: [`Obtained by right-clicking a placed Stuffed Pumpkin with a Bowl.`] + text: [`${id_prefix}stuffed_pumpkin`] }, { items: ['farmersdelight:roast_chicken'], - text: [`Obtained by right-clicking a placed Roast Chicken with a Bowl.`] + text: [`${id_prefix}roast_chicken`] }, { items: ['simplefarming:brewing_barrel'], - text: [`Used for brewing various alcoholic beverages.`, ` `, `● Beer`, `● Cauim`, `● Cider`, `● Mead`] + text: [`${id_prefix}brewing_barrel`] }, { items: ['simplefarming:brewing_barrel'], - text: [`● Sake`, `● Tiswin`, `● Vodka`, `● Whiskey`, `● Wine`] + text: [`${id_prefix}brewing_barrel_2`] } ]; @@ -590,6 +455,9 @@ onEvent('jei.information', (event) => { }); recipes.forEach((recipe) => { + for (let i = 0; i < recipe.text.length; i++) { + recipe.text[i] = Text.translate(recipe.text[i]); + } recipe.items.forEach((item) => { event.add(item, recipe.text); }); From ff1f030c318b5fc3b078fbad63991ed534adb176 Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Mon, 13 Nov 2023 18:25:17 +0800 Subject: [PATCH 4/4] prepare for tooltips tweaks --- .../client_scripts/item_modifiers/tooltips.js | 67 ++++++++++--------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/kubejs/client_scripts/item_modifiers/tooltips.js b/kubejs/client_scripts/item_modifiers/tooltips.js index 4cfa2616fc..43c4a1abf9 100644 --- a/kubejs/client_scripts/item_modifiers/tooltips.js +++ b/kubejs/client_scripts/item_modifiers/tooltips.js @@ -20,6 +20,7 @@ onEvent('item.tooltip', (event) => { .white() .color('#808080') //any hex color */ + const id_prefix = 'tooltips.enigmatica.base.' const recipes = [ { items: [ @@ -27,7 +28,7 @@ onEvent('item.tooltip', (event) => { 'integratedtunnels:part_importer_fluid', 'integratedtunnels:part_exporter_fluid' ], - text: [Text.of('Max Fluid Transfer Rate has been limited to 65,536 mb per tick.').red()] + text: [Text.translate('Max Fluid Transfer Rate has been limited to 65,536 mb per tick.').red()] }, { items: [ @@ -35,27 +36,27 @@ onEvent('item.tooltip', (event) => { 'integratedtunnels:part_importer_energy', 'integratedtunnels:part_exporter_energy' ], - text: [Text.of('Max Energy Transfer Rate has been limited to 65,536 FE per tick.').red()] + text: [Text.translate('Max Energy Transfer Rate has been limited to 65,536 FE per tick.').red()] }, { items: ['powah:charged_snowball', 'thermal:lightning_charge'], - text: [Text.of('Calls down a lightning bolt on impact.').gold()] + text: [Text.translate('Calls down a lightning bolt on impact.').gold()] }, { items: ['kubejs:altered_recipe_indicator'], - text: [Text.of('Recipe altered for Enigmatica 6: Expert. Refer to JEI.').gold()] + text: [Text.translate('Recipe altered for Enigmatica 6: Expert. Refer to JEI.').gold()] }, { items: ['kubejs:disabled_recipe_indicator'], - text: [Text.of('Recipe disabled for Enigmatica 6').gold()] + text: [Text.translate('Recipe disabled for Enigmatica 6').gold()] }, { items: ['tconstruct:crafting_station', 'tconstruct:part_builder', 'tconstruct:tinker_station'], - text: [Text.of('Craftable with any wood.').gold()] + text: [Text.translate('Craftable with any wood.').gold()] }, { items: ['tconstruct:scorched_anvil', 'tconstruct:tinkers_anvil'], - text: [Text.of('Craftable with any alloy blocks.').gold()] + text: [Text.translate('Craftable with any alloy blocks.').gold()] }, { items: [ @@ -72,15 +73,15 @@ onEvent('item.tooltip', (event) => { 'thermal:obsidian_glass', 'engineersdecor:panzerglass_block' ], - text: [Text.of('Immune to the Wither').color('#4F0D75')] + text: [Text.translate('Immune to the Wither').color('#4F0D75')] }, { items: ['modularrouters:blast_upgrade'], - text: [Text.of('Renders routers immune to the Wither').color('#4F0D75')] + text: [Text.translate('Renders routers immune to the Wither').color('#4F0D75')] }, { items: ['astralsorcery:illumination_wand'], - text: [Text.of('Renders blocks immune to the Wither').color('#4F0D75')] + text: [Text.translate('Renders blocks immune to the Wither').color('#4F0D75')] }, { items: [ @@ -89,51 +90,51 @@ onEvent('item.tooltip', (event) => { 'rftoolsbuilder:shield_block2', 'rftoolsbuilder:shield_block1' ], - text: [Text.of('Shield Projections are immune to the Wither').color('#4F0D75')] + text: [Text.translate('Shield Projections are immune to the Wither').color('#4F0D75')] }, { items: [/bloodmagic:quick_draw_anointment/], - text: [Text.of('Grants Quick-Draw on Bows and Crossbows').color('#7e24b3')] + text: [Text.translate('Grants Quick-Draw on Bows and Crossbows').color('#7e24b3')] }, { items: [/bloodmagic:fortune_anointment/], - text: [Text.of('Grants additional Fortune on Tools').color('#7e24b3')] + text: [Text.translate('Grants additional Fortune on Tools').color('#7e24b3')] }, { items: [/bloodmagic:holy_water_anointment/], - text: [Text.of('Grants bonus Smite damage on Melee Attacks.').color('#7e24b3')] + text: [Text.translate('Grants bonus Smite damage on Melee Attacks.').color('#7e24b3')] }, { items: [/bloodmagic:melee_anointment/], - text: [Text.of('Grants bonus damage on Melee Attacks').color('#7e24b3')] + text: [Text.translate('Grants bonus damage on Melee Attacks').color('#7e24b3')] }, { items: [/bloodmagic:bow_power_anointment/], - text: [Text.of('Grants bonus damage on Bows and Crossbows').color('#7e24b3')] + text: [Text.translate('Grants bonus damage on Bows and Crossbows').color('#7e24b3')] }, { items: [/bloodmagic:silk_touch_anointment/], - text: [Text.of('Grants Silk Touch').color('#7e24b3')] + text: [Text.translate('Grants Silk Touch').color('#7e24b3')] }, { items: [/bloodmagic:hidden_knowledge_anointment/], - text: [Text.of('Grants bonus Experience from block harvests.').color('#7e24b3')] + text: [Text.translate('Grants bonus Experience from block harvests.').color('#7e24b3')] }, { items: [/bloodmagic:smelting_anointment/], - text: [Text.of('Grants Auto Smelt').color('#7e24b3')] + text: [Text.translate('Grants Auto Smelt').color('#7e24b3')] }, { items: [/bloodmagic:looting_anointment/], - text: [Text.of('Grants additional Looting on Weapons').color('#7e24b3')] + text: [Text.translate('Grants additional Looting on Weapons').color('#7e24b3')] }, { items: [/bloodmagic:bow_velocity_anointment/], - text: [Text.of('Grants additional projectile velocity on Bows and Crossbows').color('#7e24b3')] + text: [Text.translate('Grants additional projectile velocity on Bows and Crossbows').color('#7e24b3')] }, { items: ['#enigmatica:burning_hot'], - text: [Text.of('Extremely hot!').darkRed()] + text: [Text.translate('Extremely hot!').darkRed()] }, { items: [ @@ -143,38 +144,38 @@ onEvent('item.tooltip', (event) => { 'resourcefulbees:t4_beehive' ], text: [ - Text.of(`Tiered Beehives have been depreciated.`).red(), - Text.of(`Use the Hive Upgrade items on nests found in the world instead.`).red(), - Text.of(`Tiered Beehives can be converted to Hive Upgrades in a crafting grid.`).red() + Text.translate(`Tiered Beehives have been depreciated.`).red(), + Text.translate(`Use the Hive Upgrade items on nests found in the world instead.`).red(), + Text.translate(`Tiered Beehives can be converted to Hive Upgrades in a crafting grid.`).red() ] }, { items: [/natures\w+:\w+_generator/], - text: [Text.of(`Aura Generator`).green()] + text: [Text.translate(`Aura Generator`).green()] }, { items: ['clockout:clockout_block'], - text: [Text.of(`Outputs redstone when the player is online.`).aqua()] + text: [Text.translate(`Outputs redstone when the player is online.`).aqua()] }, { items: ['kubejs:soggy_treasure_box'], - text: [Text.of(`The lock appears broken... What could be inside?`).darkAqua()] + text: [Text.translate(`The lock appears broken... What could be inside?`).darkAqua()] }, { items: [/masterfulmachinery:\w+_mana_port/], - text: [Text.of(`Compatible with Mana Spreaders and Sparks.`).green()] + text: [Text.translate(`Compatible with Mana Spreaders and Sparks.`).green()] }, { items: ['kubejs:amadron_survey_tools'], - text: [Text.of(`Tools used by Amadron Drones to gather rare resources.`).aqua()] + text: [Text.translate(`Tools used by Amadron Drones to gather rare resources.`).aqua()] }, { items: ['kubejs:monster_mash'], - text: [Text.of(`...It caught on in a flash...`).red()] + text: [Text.translate(`...It caught on in a flash...`).red()] }, { items: ['refinedstorage:silk_touch_upgrade'], - text: [Text.of('Does not work on spawners.').red()] + text: [Text.translate('Does not work on spawners.').red()] }, { items: [ @@ -182,7 +183,7 @@ onEvent('item.tooltip', (event) => { 'kubejs:crystalline_oak_leaves', 'kubejs:crystalline_dark_oak_wood' ], - text: [Text.of('Fireproof').gold()] + text: [Text.translate('Fireproof').gold()] } ];