From 0120a7f1e7c6648dbcfe53356c5584011a9f24c8 Mon Sep 17 00:00:00 2001 From: Zengyj Date: Fri, 24 Nov 2023 17:03:28 +0800 Subject: [PATCH 1/3] Backport safety mode for free runner from 1.19.x --- src/main/java/mekanism/common/CommonPlayerTickHandler.java | 2 +- src/main/java/mekanism/common/MekanismLang.java | 1 + src/main/java/mekanism/common/item/gear/ItemFreeRunners.java | 1 + src/main/resources/assets/mekanism/lang/zh_cn.json | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/mekanism/common/CommonPlayerTickHandler.java b/src/main/java/mekanism/common/CommonPlayerTickHandler.java index 22e61d45127..79ae63d0e04 100644 --- a/src/main/java/mekanism/common/CommonPlayerTickHandler.java +++ b/src/main/java/mekanism/common/CommonPlayerTickHandler.java @@ -317,7 +317,7 @@ private FallEnergyInfo getFallAbsorptionEnergyInfo(LivingEntity base) { ItemStack feetStack = base.getItemBySlot(EquipmentSlot.FEET); if (!feetStack.isEmpty()) { if (feetStack.getItem() instanceof ItemFreeRunners boots) { - if (boots.getMode(feetStack) == FreeRunnerMode.NORMAL) { + if (boots.getMode(feetStack) != FreeRunnerMode.DISABLED) { return new FallEnergyInfo(StorageUtils.getEnergyContainer(feetStack, 0), MekanismConfig.gear.freeRunnerFallDamageRatio, MekanismConfig.gear.freeRunnerFallEnergyCost); } diff --git a/src/main/java/mekanism/common/MekanismLang.java b/src/main/java/mekanism/common/MekanismLang.java index 529a07f3b79..a1bb61e2f6b 100644 --- a/src/main/java/mekanism/common/MekanismLang.java +++ b/src/main/java/mekanism/common/MekanismLang.java @@ -617,6 +617,7 @@ public enum MekanismLang implements ILangEntry { //Free runner modes FREE_RUNNER_MODE_CHANGE("free_runner", "mode_change"), FREE_RUNNER_NORMAL("free_runner", "normal"), + FREE_RUNNER_SAFETY("free_runner","safety"), FREE_RUNNER_DISABLED("free_runner", "disabled"), //Jetpack Modes JETPACK_MODE_CHANGE("jetpack", "mode_change"), diff --git a/src/main/java/mekanism/common/item/gear/ItemFreeRunners.java b/src/main/java/mekanism/common/item/gear/ItemFreeRunners.java index 0f4200f083e..ab0967dcaca 100644 --- a/src/main/java/mekanism/common/item/gear/ItemFreeRunners.java +++ b/src/main/java/mekanism/common/item/gear/ItemFreeRunners.java @@ -132,6 +132,7 @@ public boolean supportsSlotType(ItemStack stack, @Nonnull EquipmentSlot slotType public enum FreeRunnerMode implements IIncrementalEnum, IHasTextComponent { NORMAL(MekanismLang.FREE_RUNNER_NORMAL, EnumColor.DARK_GREEN), + SAFETY(MekanismLang.FREE_RUNNER_SAFETY,EnumColor.ORANGE), DISABLED(MekanismLang.FREE_RUNNER_DISABLED, EnumColor.DARK_RED); private static final FreeRunnerMode[] MODES = values(); diff --git a/src/main/resources/assets/mekanism/lang/zh_cn.json b/src/main/resources/assets/mekanism/lang/zh_cn.json index d0c25772fc8..17455576389 100644 --- a/src/main/resources/assets/mekanism/lang/zh_cn.json +++ b/src/main/resources/assets/mekanism/lang/zh_cn.json @@ -724,6 +724,7 @@ "fluid_container.mekanism.empty": "倒空", "fluid_container.mekanism.fill": "填充", "free_runner.mekanism.disabled": "禁用", + "free_runner.mekanism.safety": "安全性", "free_runner.mekanism.mode_change": "自由助跑器模式更改为:%1$s", "free_runner.mekanism.normal": "正常", "frequency.mekanism.delete_confirm": "是否确实要删除此频率?该操作是无法撤销的。", From ffc493d27095322b881b2518219e21e189bafd93 Mon Sep 17 00:00:00 2001 From: Zengyj Date: Tue, 28 Nov 2023 08:43:25 +0800 Subject: [PATCH 2/3] Update mapping version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 4af158ac4f8..91bd120cf13 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ java_version=17 resource_pack_format=8 data_pack_format=9 minecraft_version=1.18.2 -mappings_version=2022.05.22-1.18.2 +mappings_version=2022.11.06-1.18.2 mappings_channel=parchment loader_version_range=[40,) forge_version=40.1.46 From 5702f466641afd103c4fff56a1d5c4117b9b0918 Mon Sep 17 00:00:00 2001 From: zeng-git <95841646+zeng-github01@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:34:47 +0800 Subject: [PATCH 3/3] Fix localization --- src/datagen/generated/mekanism/assets/mekanism/lang/en_us.json | 1 + .../main/java/mekanism/client/lang/MekanismLangProvider.java | 1 + src/main/resources/assets/mekanism/lang/zh_cn.json | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/datagen/generated/mekanism/assets/mekanism/lang/en_us.json b/src/datagen/generated/mekanism/assets/mekanism/lang/en_us.json index c3468ce43c5..1050165522a 100644 --- a/src/datagen/generated/mekanism/assets/mekanism/lang/en_us.json +++ b/src/datagen/generated/mekanism/assets/mekanism/lang/en_us.json @@ -725,6 +725,7 @@ "fluid_container.mekanism.fill": "Fill", "free_runner.mekanism.disabled": "Disabled", "free_runner.mekanism.mode_change": "Free runner mode changed to: %1$s", + "free_runner.mekanism.safety": "Safety", "free_runner.mekanism.normal": "Regular", "frequency.mekanism.delete_confirm": "Are you sure you want to delete this frequency? This can't be undone.", "frequency.mekanism.format": "Frequency: %1$s", diff --git a/src/datagen/main/java/mekanism/client/lang/MekanismLangProvider.java b/src/datagen/main/java/mekanism/client/lang/MekanismLangProvider.java index ebb9082fd4f..48770dcd294 100644 --- a/src/datagen/main/java/mekanism/client/lang/MekanismLangProvider.java +++ b/src/datagen/main/java/mekanism/client/lang/MekanismLangProvider.java @@ -1114,6 +1114,7 @@ private void addMisc() { //Free runner modes add(MekanismLang.FREE_RUNNER_MODE_CHANGE, "Free runner mode changed to: %1$s"); add(MekanismLang.FREE_RUNNER_NORMAL, "Regular"); + add(MekanismLang.FREE_RUNNER_SAFETY, "Safety"); add(MekanismLang.FREE_RUNNER_DISABLED, "Disabled"); //Jetpack Modes add(MekanismLang.JETPACK_MODE_CHANGE, "Jetpack mode changed to: %1$s"); diff --git a/src/main/resources/assets/mekanism/lang/zh_cn.json b/src/main/resources/assets/mekanism/lang/zh_cn.json index 17455576389..12288a915f4 100644 --- a/src/main/resources/assets/mekanism/lang/zh_cn.json +++ b/src/main/resources/assets/mekanism/lang/zh_cn.json @@ -724,7 +724,7 @@ "fluid_container.mekanism.empty": "倒空", "fluid_container.mekanism.fill": "填充", "free_runner.mekanism.disabled": "禁用", - "free_runner.mekanism.safety": "安全性", + "free_runner.mekanism.safety": "安全", "free_runner.mekanism.mode_change": "自由助跑器模式更改为:%1$s", "free_runner.mekanism.normal": "正常", "frequency.mekanism.delete_confirm": "是否确实要删除此频率?该操作是无法撤销的。",