Skip to content

Commit

Permalink
Added translation key for KeyBinds, fixed(?) crash with old configs
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMasrozYTLIVE committed Jul 29, 2024
1 parent 55c80de commit 8c90e46
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn_mappings=1.21+build.9
loader_version=0.15.11

# Mod Properties
mod_version = 1.21-1.2
mod_version = 1.21-1.2.1
maven_group = com.just_s
archives_base_name = ctp-mod

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/net/just_s/ctpmod/CTPMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

import net.minecraft.client.MinecraftClient;

import java.lang.reflect.Field;
import java.util.List;
import java.util.Objects;

@Environment(EnvType.CLIENT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.gui.registry.api.GuiProvider;
import me.shedaniel.autoconfig.gui.registry.api.GuiRegistryAccess;
import me.shedaniel.autoconfig.util.Utils;
import me.shedaniel.clothconfig2.api.AbstractConfigListEntry;
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
Expand All @@ -13,7 +11,6 @@
import net.fabricmc.api.Environment;
import net.minecraft.text.Text;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

Expand Down
8 changes: 5 additions & 3 deletions src/main/java/net/just_s/ctpmod/config/Point.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
@Setter
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class Point {
@ConfigEntry.Gui.Tooltip
private String name;
@ConfigEntry.Gui.Tooltip
private int startPeriod;
@ConfigEntry.Gui.Tooltip
private int endPeriod;
@ConfigEntry.Gui.Tooltip
private ModifierKeyCode keybind;
private ModifierKeyCode keybind = ModifierKeyCode.unknown();

public Point(String name, int startPeriod, int endPeriod) {
this(name, startPeriod, endPeriod, ModifierKeyCode.unknown());
}

@Override
public String toString() {
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/ctpmod/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"text.autoconfig.ctpmod.option.Point.startPeriod": "Start Period Time",
"text.autoconfig.ctpmod.option.Point.startPeriod.@Tooltip": "Amount of seconds before rejoining server",
"text.autoconfig.ctpmod.option.Point.endPeriod": "End Period Time",
"text.autoconfig.ctpmod.option.Point.endPeriod.@Tooltip": "Amount of seconds after rejoining should not be executed"
"text.autoconfig.ctpmod.option.Point.endPeriod.@Tooltip": "Amount of seconds after rejoining should not be executed",
"text.autoconfig.ctpmod.option.Point.keybind": "KeyBind"
}

0 comments on commit 8c90e46

Please sign in to comment.