-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4429a46
commit 4eb348a
Showing
4 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
package the_fireplace.audiobook; | ||
|
||
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig; | ||
import me.sargunvohra.mcmods.autoconfig1u.serializer.JanksonConfigSerializer; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; | ||
import net.minecraft.client.options.KeyBinding; | ||
import net.minecraft.client.util.InputUtil; | ||
|
||
import java.awt.event.KeyEvent; | ||
|
||
public class Audiobook implements ClientModInitializer { | ||
public static final String MODID = "audiobook"; | ||
public static ModConfig config; | ||
public static KeyBinding audiobookKey; | ||
public static KeyBinding stopAudiobookKey; | ||
|
||
@Override | ||
public void onInitializeClient() { | ||
AutoConfig.register(ModConfig.class, JanksonConfigSerializer::new); | ||
config = AutoConfig.getConfigHolder(ModConfig.class).getConfig(); | ||
|
||
audiobookKey = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.audiobook.read_book", KeyEvent.VK_H, "key.categories.misc")); | ||
stopAudiobookKey = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.audiobook.stop_book", InputUtil.UNKNOWN_KEY.getCode(), "key.categories.misc")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"key.audiobook.read_book": "Read/Cancel Audiobook" | ||
"key.audiobook.read_book": "Read Audiobook", | ||
"key.audiobook.stop_book": "Cancel Narration" | ||
} |