|
11 | 11 | import net.minecraft.client.player.LocalPlayer; |
12 | 12 | import net.minecraft.client.resources.language.I18n; |
13 | 13 | import net.minecraft.network.chat.Component; |
14 | | -import net.minecraft.util.LazyLoadedValue; |
15 | 14 | import net.minecraft.world.InteractionHand; |
16 | 15 | import net.minecraft.world.entity.LivingEntity; |
17 | 16 | import net.minecraft.world.item.ShieldItem; |
18 | 17 | import net.minecraft.world.phys.EntityHitResult; |
19 | 18 | import net.minecraft.world.phys.HitResult; |
20 | | -import org.apache.commons.lang3.concurrent.LazyInitializer; |
| 19 | +import net.minecraft.resources.ResourceLocation; |
21 | 20 | import org.apache.logging.log4j.LogManager; |
22 | 21 | import org.apache.logging.log4j.Logger; |
23 | 22 | import org.lwjgl.glfw.GLFW; |
|
33 | 32 | public class AutoClicker { |
34 | 33 | public static final String MOD_ID = "autoclicker"; |
35 | 34 | public static final Logger LOGGER = LogManager.getLogger(MOD_ID); |
| 35 | + |
| 36 | + private static final KeyMapping.Category KEYBIND_CATEGORY = |
| 37 | + KeyMapping.Category.register(ResourceLocation.fromNamespaceAndPath(MOD_ID, "keybinding-title")); |
36 | 38 | public static final KeyMapping openConfig = |
37 | | - new KeyMapping("keybinding.open-gui", GLFW.GLFW_KEY_O, "category.autoclicker-fabric"); |
| 39 | + new KeyMapping("keybinding.open-gui", GLFW.GLFW_KEY_O, KEYBIND_CATEGORY); |
38 | 40 | public static final KeyMapping toggleHolding = |
39 | | - new KeyMapping("keybinding.toggle-hold", GLFW.GLFW_KEY_I, "category.autoclicker-fabric"); |
| 41 | + new KeyMapping("keybinding.toggle-hold", GLFW.GLFW_KEY_I, KEYBIND_CATEGORY); |
40 | 42 |
|
41 | 43 | private static final Supplier<Pair<Path, Path>> CONFIG_PATHS = Suppliers.memoize(() -> { |
42 | 44 | Path configDir = Paths.get(Minecraft.getInstance().gameDirectory.getPath() + "/config"); |
|
0 commit comments