Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.18]Backport safety mode for free runner from 1.19.x #7939

Open
wants to merge 3 commits into
base: 1.18.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/mekanism/common/CommonPlayerTickHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/mekanism/common/MekanismLang.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public boolean supportsSlotType(ItemStack stack, @Nonnull EquipmentSlot slotType

public enum FreeRunnerMode implements IIncrementalEnum<FreeRunnerMode>, 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();
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/mekanism/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@
"fluid_container.mekanism.empty": "倒空",
"fluid_container.mekanism.fill": "填充",
"free_runner.mekanism.disabled": "禁用",
"free_runner.mekanism.safety": "安全性",
zeng-github01 marked this conversation as resolved.
Show resolved Hide resolved
"free_runner.mekanism.mode_change": "自由助跑器模式更改为:%1$s",
"free_runner.mekanism.normal": "正常",
"frequency.mekanism.delete_confirm": "是否确实要删除此频率?该操作是无法撤销的。",
Expand Down