From 86b05c7eca0755321e0a4939ed61f35548e15bca Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Sun, 31 Dec 2023 10:37:20 +0800 Subject: [PATCH 1/7] allow localization for 3 custom items --- kubejs/assets/kubejs/lang/en_us.json | 3 +++ kubejs/startup_scripts/item_registry.js | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kubejs/assets/kubejs/lang/en_us.json b/kubejs/assets/kubejs/lang/en_us.json index 0538b809b2..22a34d8166 100644 --- a/kubejs/assets/kubejs/lang/en_us.json +++ b/kubejs/assets/kubejs/lang/en_us.json @@ -11,6 +11,9 @@ "item.kubejs.scavengers_delight": "Scavenger's Delight", "item.kubejs.alchemists_delight": "Alchemist's Delight", + "item.kubejs.fisher_foliot": "Fisher Foliot", + "item.kubejs.miner_marid_irradiated": "Irradiated Ore Miner Marid", + "item.kubejs.meat_ingot": "Meat Ingot", "item.kubejs.altered_recipe_indicator": "Altered Recipe", "item.kubejs.disabled_recipe_indicator": "Disabled Recipe", "item.kubejs.observatory_lens": "Observatory Lens", diff --git a/kubejs/startup_scripts/item_registry.js b/kubejs/startup_scripts/item_registry.js index adcb13379f..ac6f599658 100644 --- a/kubejs/startup_scripts/item_registry.js +++ b/kubejs/startup_scripts/item_registry.js @@ -502,15 +502,13 @@ onEvent('item.registry', (event) => { .group('KubeJS') .texture('kubejs:item/magic_lamp') .maxStackSize(1) - .maxDamage(500) - .displayName('Fisher Foliot'); + .maxDamage(500); event .create('miner_marid_irradiated') .group('KubeJS') .texture('kubejs:item/magic_lamp') .maxStackSize(1) - .maxDamage(50) - .displayName('Irradiated Ore Miner Marid'); + .maxDamage(50); // Custom Foods event @@ -519,6 +517,5 @@ onEvent('item.registry', (event) => { .texture('kubejs:item/meat_ingot') .food((food) => { food.hunger(8).saturation(0.5).effect('upgrade_aquatic:vibing', 2400, 1, 1.0); - }) - .displayName('Meat Ingot'); + }); }); From f6438a493369f08baea67bcd1abccbd297dbc7d7 Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Sun, 21 Jan 2024 22:30:34 +0800 Subject: [PATCH 2/7] allow localization for multiblock gamestage error message --- kubejs/assets/enigmatica/lang/en_us.json | 2 ++ kubejs/startup_scripts/multiblock_gamestages.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kubejs/assets/enigmatica/lang/en_us.json b/kubejs/assets/enigmatica/lang/en_us.json index 7f7846db5f..1d92c02ac8 100644 --- a/kubejs/assets/enigmatica/lang/en_us.json +++ b/kubejs/assets/enigmatica/lang/en_us.json @@ -42,6 +42,8 @@ "desc.immersiveengineering.info.mineral.horodric_digsite": "Horodric Digsite", "desc.immersiveengineering.info.mineral.naqada": "Naqada", + "desc.enigmatica.ie_multiblock_error": "Invalid structure or missing gamestage. Double check the structure and/or obtain the appropriate Machinery Schematic to be able to form this multiblock.", + "ars_nouveau.school.blood": "Blood", "advancements.enigmatica.husbandry.tame_all_animals.title": "Zoology", diff --git a/kubejs/startup_scripts/multiblock_gamestages.js b/kubejs/startup_scripts/multiblock_gamestages.js index a40774a6f7..cc6d6c6bc6 100644 --- a/kubejs/startup_scripts/multiblock_gamestages.js +++ b/kubejs/startup_scripts/multiblock_gamestages.js @@ -31,7 +31,7 @@ onEvent('ie.multiblock.form', (event) => { if (!event.getEntity().stages.has(requiredGameStage.get(name))) { event.cancel(); if (!event.getEntity().getServer()) { - let error_message = `Invalid structure or missing gamestage. Double check the structure and/or obtain the appropriate Machinery Schematic to be able to form this multiblock.`; + let error_message = Text.translate('desc.enigmatica.base.ie_multiblock_error'); event.getEntity().tell(error_message); } } From 16940f19ac20f13b903eb343029166b556be86ff Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Sun, 21 Jan 2024 22:32:29 +0800 Subject: [PATCH 3/7] allow localization for custom Amadron entries --- kubejs/assets/enigmatica/lang/en_us.json | 11 +++++ .../recipetypes/pneumaticcraft/amadron.js | 40 ++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/kubejs/assets/enigmatica/lang/en_us.json b/kubejs/assets/enigmatica/lang/en_us.json index 1d92c02ac8..e384b3c210 100644 --- a/kubejs/assets/enigmatica/lang/en_us.json +++ b/kubejs/assets/enigmatica/lang/en_us.json @@ -43,6 +43,17 @@ "desc.immersiveengineering.info.mineral.naqada": "Naqada", "desc.enigmatica.ie_multiblock_error": "Invalid structure or missing gamestage. Double check the structure and/or obtain the appropriate Machinery Schematic to be able to form this multiblock.", + "desc.enigmatica.amadron.atum_mineral": "Atum Mineral Survey", + "desc.enigmatica.amadron.atum_mineral.lore": "A collection of minerals from Atum.", + "desc.enigmatica.amadron.undergarden_mineral": "Undergarden Mineral Survey", + "desc.enigmatica.amadron.undergarden_mineral.lore": "A collection of minerals from the Undergarden.", + "desc.enigmatica.amadron.nether_botanical": "Nether Botanical Survey", + "desc.enigmatica.amadron.nether_botanical.lore": "A collection of botanical samples from the Nether.", + "desc.enigmatica.amadron.end_botanical": "End Botanical Survey", + "desc.enigmatica.amadron.end_botanical.lore": "A collection of botanical samples from the End.", + "desc.enigmatica.amadron.end_mineral": "End Mineral Survey", + "desc.enigmatica.amadron.end_mineral.lore": "A collection of minerals from the End.", + "desc.enigmatica.": "", "ars_nouveau.school.blood": "Blood", diff --git a/kubejs/server_scripts/enigmatica/kubejs/base/recipetypes/pneumaticcraft/amadron.js b/kubejs/server_scripts/enigmatica/kubejs/base/recipetypes/pneumaticcraft/amadron.js index d740534be4..b8b91a4d83 100644 --- a/kubejs/server_scripts/enigmatica/kubejs/base/recipetypes/pneumaticcraft/amadron.js +++ b/kubejs/server_scripts/enigmatica/kubejs/base/recipetypes/pneumaticcraft/amadron.js @@ -10,7 +10,13 @@ onEvent('recipes', (event) => { type: 'ITEM', id: 'pneumaticcraft:reinforced_chest', amount: 1, - nbt: `{display:{Name:'[{"text":"Atum Mineral Survey"}]',Lore:['[{"text":"A collection of minerals from Atum.","color":"gold"}]']},BlockEntityTag:{LootTable:"enigmatica:chests/amadron_mineral_survey_atum_combo"}}` + nbt: JSON.stringify({ + display: { + Name: { translate: 'desc.enigmatica.amadron.atum_mineral' }, + Lore: [{ translate: 'desc.enigmatica.amadron.atum_mineral.lore', color: 'gold' }] + }, + BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_mineral_survey_atum_combo' } + }) }, level: 0, maxStock: 5, @@ -24,7 +30,13 @@ onEvent('recipes', (event) => { type: 'ITEM', id: 'pneumaticcraft:reinforced_chest', amount: 1, - nbt: `{display:{Name:'[{"text":"Undergarden Mineral Survey"}]',Lore:['[{"text":"A collection of minerals from the Undergarden.","color":"gold"}]']},BlockEntityTag:{LootTable:"enigmatica:chests/amadron_mineral_survey_undergarden_combo"}}` + nbt: JSON.stringify({ + display: { + Name: { translate: 'desc.enigmatica.amadron.undergarden_mineral' }, + Lore: [{ translate: 'desc.enigmatica.amadron.undergarden_mineral.lore', color: 'gold' }] + }, + BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_mineral_survey_undergarden_combo' } + }) }, level: 0, maxStock: 5, @@ -38,7 +50,13 @@ onEvent('recipes', (event) => { type: 'ITEM', id: 'pneumaticcraft:reinforced_chest', amount: 1, - nbt: `{display:{Name:'[{"text":"Nether Botanical Survey"}]',Lore:['[{"text":"A collection of botanical samples from the Nether.","color":"gold"}]']},BlockEntityTag:{LootTable:"enigmatica:chests/amadron_botanical_survey_nether_combo"}}` + nbt: JSON.stringify({ + display: { + Name: { translate: 'desc.enigmatica.amadron.nether_botanical' }, + Lore: [{ translate: 'desc.enigmatica.amadron.nether_botanical.lore', color: 'gold' }] + }, + BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_botanical_survey_nether_combo' } + }) }, level: 0, maxStock: 5, @@ -52,7 +70,13 @@ onEvent('recipes', (event) => { type: 'ITEM', id: 'pneumaticcraft:reinforced_chest', amount: 1, - nbt: `{display:{Name:'[{"text":"End Botanical Survey"}]',Lore:['[{"text":"A collection of botanical samples from the End.","color":"gold"}]']},BlockEntityTag:{LootTable:"enigmatica:chests/amadron_botanical_survey_end_combo"}}` + nbt: JSON.stringify({ + display: { + Name: { translate: 'desc.enigmatica.amadron.end_botanical' }, + Lore: [{ translate: 'desc.enigmatica.amadron.end_botanical.lore', color: 'gold' }] + }, + BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_botanical_survey_end_combo' } + }) }, level: 0, maxStock: 5, @@ -66,7 +90,13 @@ onEvent('recipes', (event) => { type: 'ITEM', id: 'pneumaticcraft:reinforced_chest', amount: 1, - nbt: `{display:{Name:'[{"text":"The End Mineral Survey"}]',Lore:['[{"text":"A collection of minerals from the The End.","color":"gold"}]']},BlockEntityTag:{LootTable:"enigmatica:chests/amadron_mineral_survey_the_end_combo"}}` + nbt: JSON.stringify({ + display: { + Name: { translate: 'desc.enigmatica.amadron.end_mineral' }, + Lore: [{ translate: 'desc.enigmatica.amadron.end_mineral.lore', color: 'gold' }] + }, + BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_mineral_survey_the_end_combo' } + }) }, level: 0, maxStock: 5, From cb87ec02892aea2f86ac3c2dd58fcbc6a854830e Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Sun, 21 Jan 2024 23:03:57 +0800 Subject: [PATCH 4/7] zh_cn localization++ --- kubejs/assets/enigmatica/lang/zh_cn.json | 12 ++++++++++++ kubejs/assets/kubejs/lang/zh_cn.json | 3 +++ 2 files changed, 15 insertions(+) diff --git a/kubejs/assets/enigmatica/lang/zh_cn.json b/kubejs/assets/enigmatica/lang/zh_cn.json index 48cd49bcb0..86636ce091 100644 --- a/kubejs/assets/enigmatica/lang/zh_cn.json +++ b/kubejs/assets/enigmatica/lang/zh_cn.json @@ -34,6 +34,18 @@ "desc.immersiveengineering.info.mineral.horodric_digsite": "沙民遗迹", "desc.immersiveengineering.info.mineral.naqada": "奈布矿脉", "ars_nouveau.school.blood": "血", + "desc.enigmatica.ie_multiblock_error": "结构无效或者缺少对应游戏阶段。请检查结构是否正确,所需的机械蓝图是否已经获得。", + "desc.enigmatica.amadron.atum_mineral": "阿图姆矿物勘测", + "desc.enigmatica.amadron.atum_mineral.lore": "一批来自阿图姆的矿物。", + "desc.enigmatica.amadron.undergarden_mineral": "深园矿物勘测", + "desc.enigmatica.amadron.undergarden_mineral.lore": "一批来自深园的矿物。", + "desc.enigmatica.amadron.nether_botanical": "下界植物勘测", + "desc.enigmatica.amadron.nether_botanical.lore": "一批来自下界的植物样本。", + "desc.enigmatica.amadron.end_botanical": "末地植物勘测", + "desc.enigmatica.amadron.end_botanical.lore": "一批来自末地的植物样本。", + "desc.enigmatica.amadron.end_mineral": "末地矿物勘测", + "desc.enigmatica.amadron.end_mineral.lore": "一批来自末地的矿物。", + "desc.enigmatica.": "", "advancements.enigmatica.husbandry.tame_all_animals.title": "动物大师", "advancements.enigmatica.husbandry.tame_all_animals.description": "驯服所有可驯服的动物!", "block.naturesaura.infused_iron_block": "灌注耀阳金属块", diff --git a/kubejs/assets/kubejs/lang/zh_cn.json b/kubejs/assets/kubejs/lang/zh_cn.json index 7d6a4354a3..daf5d68f9f 100644 --- a/kubejs/assets/kubejs/lang/zh_cn.json +++ b/kubejs/assets/kubejs/lang/zh_cn.json @@ -9,6 +9,9 @@ "item.kubejs.blacksmiths_delight": "铁匠快乐包", "item.kubejs.scavengers_delight": "拾荒者快乐包", "item.kubejs.alchemists_delight": "炼金术师快乐包", + "item.kubejs.fisher_foliot": "渔夫魔精", + "item.kubejs.miner_marid_irradiated": "辐照掘矿者魔王", + "item.kubejs.meat_ingot": "肉锭", "item.kubejs.altered_recipe_indicator": "已改变的配方", "item.kubejs.disabled_recipe_indicator": "已禁用的配方", "item.kubejs.observatory_lens": "观星透镜", From f4b74c04b7dcfa38e1e182fbc2d26dc124548e35 Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Sun, 21 Jan 2024 23:08:12 +0800 Subject: [PATCH 5/7] correction on previous translation maybe I should ask Niels to update Crowdin --- kubejs/assets/kubejs/lang/zh_cn.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kubejs/assets/kubejs/lang/zh_cn.json b/kubejs/assets/kubejs/lang/zh_cn.json index daf5d68f9f..b949ba8b0c 100644 --- a/kubejs/assets/kubejs/lang/zh_cn.json +++ b/kubejs/assets/kubejs/lang/zh_cn.json @@ -751,7 +751,7 @@ "fluid.kubejs.molten_niotic": "熔融钻石水晶", "fluid.kubejs.molten_nitro": "熔融下界水晶", "fluid.kubejs.molten_spirited": "熔融富生水晶", - "fluid.kubejs.pink_ender_slime": "熔融粉红末影史莱姆", + "fluid.kubejs.pink_ender_slime": "熔融粉红末影黏液", "fluid.kubejs.molten_hardened_glass": "熔融硬化玻璃", "fluid.kubejs.molten_signalum_glass": "熔融信素玻璃", "fluid.kubejs.molten_lumium_glass": "熔融流明玻璃", @@ -771,11 +771,11 @@ "item.kubejs.molten_niotic_bucket": "熔融钻石水晶桶", "item.kubejs.molten_nitro_bucket": "熔融下界水晶桶", "item.kubejs.molten_spirited_bucket": "熔融富生水晶桶", - "item.kubejs.pink_ender_slime_bucket": "熔融粉红末影史莱姆", - "item.kubejs.molten_hardened_glass_bucket": "熔融硬化玻璃", - "item.kubejs.molten_signalum_glass_bucket": "熔融信素玻璃", - "item.kubejs.molten_lumium_glass_bucket": "熔融流明玻璃", - "item.kubejs.molten_enderium_glass_bucket": "熔融末影玻璃", + "item.kubejs.pink_ender_slime_bucket": "熔融粉红末影黏液桶", + "item.kubejs.molten_hardened_glass_bucket": "熔融硬化玻璃桶", + "item.kubejs.molten_signalum_glass_bucket": "熔融信素玻璃桶", + "item.kubejs.molten_lumium_glass_bucket": "熔融流明玻璃桶", + "item.kubejs.molten_enderium_glass_bucket": "熔融末影玻璃桶", "item.kubejs.blaze_larva": "烈焰蜜蜂幼体", "item.kubejs.clay_larva": "黏土蜜蜂幼体", "item.kubejs.ghast_larva": "恶魂蜜蜂幼体", From 091414775783c758db8a249f009f69c7f930b14f Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Mon, 22 Jan 2024 13:34:00 +0800 Subject: [PATCH 6/7] fix name/lore format in nbt --- .../recipetypes/pneumaticcraft/amadron.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kubejs/server_scripts/enigmatica/kubejs/base/recipetypes/pneumaticcraft/amadron.js b/kubejs/server_scripts/enigmatica/kubejs/base/recipetypes/pneumaticcraft/amadron.js index b8b91a4d83..21e5bab8ec 100644 --- a/kubejs/server_scripts/enigmatica/kubejs/base/recipetypes/pneumaticcraft/amadron.js +++ b/kubejs/server_scripts/enigmatica/kubejs/base/recipetypes/pneumaticcraft/amadron.js @@ -12,8 +12,8 @@ onEvent('recipes', (event) => { amount: 1, nbt: JSON.stringify({ display: { - Name: { translate: 'desc.enigmatica.amadron.atum_mineral' }, - Lore: [{ translate: 'desc.enigmatica.amadron.atum_mineral.lore', color: 'gold' }] + Name: '[{ "translate": "desc.enigmatica.amadron.atum_mineral" }]', + Lore: ['[{ "translate": "desc.enigmatica.amadron.atum_mineral.lore", "color": "gold" }]'] }, BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_mineral_survey_atum_combo' } }) @@ -32,8 +32,8 @@ onEvent('recipes', (event) => { amount: 1, nbt: JSON.stringify({ display: { - Name: { translate: 'desc.enigmatica.amadron.undergarden_mineral' }, - Lore: [{ translate: 'desc.enigmatica.amadron.undergarden_mineral.lore', color: 'gold' }] + Name: '[{ "translate": "desc.enigmatica.amadron.undergarden_mineral" }]', + Lore: ['[{ "translate": "desc.enigmatica.amadron.undergarden_mineral.lore", "color": "gold" }]'] }, BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_mineral_survey_undergarden_combo' } }) @@ -52,8 +52,8 @@ onEvent('recipes', (event) => { amount: 1, nbt: JSON.stringify({ display: { - Name: { translate: 'desc.enigmatica.amadron.nether_botanical' }, - Lore: [{ translate: 'desc.enigmatica.amadron.nether_botanical.lore', color: 'gold' }] + Name: '[{ "translate": "desc.enigmatica.amadron.nether_botanical" }]', + Lore: ['[{ "translate": "desc.enigmatica.amadron.nether_botanical.lore", "color": "gold" }]'] }, BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_botanical_survey_nether_combo' } }) @@ -72,8 +72,8 @@ onEvent('recipes', (event) => { amount: 1, nbt: JSON.stringify({ display: { - Name: { translate: 'desc.enigmatica.amadron.end_botanical' }, - Lore: [{ translate: 'desc.enigmatica.amadron.end_botanical.lore', color: 'gold' }] + Name: '[{ "translate": "desc.enigmatica.amadron.end_botanical" }]', + Lore: ['[{ "translate": "desc.enigmatica.amadron.end_botanical.lore", "color": "gold" }]'] }, BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_botanical_survey_end_combo' } }) @@ -92,8 +92,8 @@ onEvent('recipes', (event) => { amount: 1, nbt: JSON.stringify({ display: { - Name: { translate: 'desc.enigmatica.amadron.end_mineral' }, - Lore: [{ translate: 'desc.enigmatica.amadron.end_mineral.lore', color: 'gold' }] + Name: '[{ "translate": "desc.enigmatica.amadron.end_mineral" }]', + Lore: ['[{ "translate": "desc.enigmatica.amadron.end_mineral.lore", "color": "gold" }]'] }, BlockEntityTag: { LootTable: 'enigmatica:chests/amadron_mineral_survey_the_end_combo' } }) From 9d35be5c7a22456641b8adfde144e798400d6de5 Mon Sep 17 00:00:00 2001 From: ZZZank <3410764033@qq.com> Date: Mon, 22 Jan 2024 14:22:24 +0800 Subject: [PATCH 7/7] fix lang key name --- kubejs/startup_scripts/multiblock_gamestages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubejs/startup_scripts/multiblock_gamestages.js b/kubejs/startup_scripts/multiblock_gamestages.js index cc6d6c6bc6..d89d0f94aa 100644 --- a/kubejs/startup_scripts/multiblock_gamestages.js +++ b/kubejs/startup_scripts/multiblock_gamestages.js @@ -31,7 +31,7 @@ onEvent('ie.multiblock.form', (event) => { if (!event.getEntity().stages.has(requiredGameStage.get(name))) { event.cancel(); if (!event.getEntity().getServer()) { - let error_message = Text.translate('desc.enigmatica.base.ie_multiblock_error'); + let error_message = Text.translate('desc.enigmatica.ie_multiblock_error'); event.getEntity().tell(error_message); } }