Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Siphalor/amecs-api
Minecraft library mod that allows the usage of modifier keys like Shift on all keybindings
https://github.com/Siphalor/amecs-api
fabricmc fabricmc-mod minecraft minecraft-fabric minecraft-fabric-mod minecraft-mod
Last synced: 13 days ago
JSON representation
Minecraft library mod that allows the usage of modifier keys like Shift on all keybindings
- Host: GitHub
- URL: https://github.com/Siphalor/amecs-api
- Owner: Siphalor
- License: apache-2.0
- Created: 2020-03-15T13:47:13.000Z (over 4 years ago)
- Default Branch: 1.15
- Last Pushed: 2024-08-21T02:45:25.000Z (3 months ago)
- Last Synced: 2024-10-15T06:22:09.306Z (about 1 month ago)
- Topics: fabricmc, fabricmc-mod, minecraft, minecraft-fabric, minecraft-fabric-mod, minecraft-mod
- Language: Java
- Homepage:
- Size: 574 KB
- Stars: 5
- Watchers: 4
- Forks: 10
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fabric - Amecs' API - Allows to define modifier keys (control, shift, alt) for keybindings. `Apache-2.0` (Uncategorized / Uncategorized)
README
# Amecs API (or Amecs' API)
![supported Minecraft versions: 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19](https://img.shields.io/badge/support%20for%20MC-1.14%20%7C%201.15%20%7C%201.16%20%7C%201.17%20%7C%201.18%20%7C%201.19-%2356AD56?style=for-the-badge)
[![latest maven release](https://img.shields.io/maven-metadata/v?color=0f9fbc&metadataUrl=https%3A%2F%2Fmaven.siphalor.de%2Fde%2Fsiphalor%2Famecsapi-1.15%2Fmaven-metadata.xml&style=flat-square)](https://maven.siphalor.de/de/siphalor/amecsapi-1.15/)
This library mod provides modifier keys for Minecraft keybindings as well as some related keybinding utilities
**
[Amecs](https://github.com/Siphalor/amecs) ·
[Discord](https://discord.gg/6gaXmbj)
**## Usage
If you're not a modder you're probably looking for [Amecs](https://github.com/Siphalor/amecs).
If you **are** a modder then you can use Amecs with the following in your build.gradle:
```groovy
repositories {
maven {
url "https://maven.siphalor.de/"
name "Siphalor's Maven"
}
}// VERSION: Check the badge above for the latest version
// MINECRAFT_VERSION: The major Minecraft version you're developing for (e.g. 1.15 for 1.15.2)
dependencies {
include(modImplementation("de.siphalor:amecsapi-MINECRAFT_VERSION:VERSION"))
}
```## Features
If you want to see some example of how to use this library, you can take a look at the [testmod](./src/testmod/java/de/siphalor/amecs/testmod).
### Modifier Keys
Modifier keys can be set by the user for all keybindings, including Vanilla ones.
If you want to define a keybinding that uses modifier keys for its default value, you can extend the [`AmecsKeyBinding`](./src/main/java/de/siphalor/amecs/api/AmecsKeyBinding.java) class.
If you want to further integrate this library, check the [`KeyBindingUtils`](./src/main/java/de/siphalor/amecs/api/KeyBindingUtils.java) class.
### Priority Keybindings
Priority keybindings are keybindings that are executed before all other keybindings and are allowed to cancel further evaluation.
This has various use cases, for example:- Keybindings that work when not in-game
- Keybindings that work regardless if the chat or a GUI is openYou can make use of priority keybindings by implementing the [`PriorityKeyBinding`](src/main/java/de/siphalor/amecs/api/PriorityKeyBinding.java) interface.
Please always carefully check if your priority keybinding takes action in the right context.
For example, you oftentimes don't want to execute your priority keybinding when the chat is open.### Keybinding Descriptions
Keybinding descriptions are a way to provide a description for a keybinding that are shown as a tooltip when hovering over the keybinding in the controls menu.
You can add descriptions by defining translations for the keybinding's translation key with the suffix `.amecsapi.description`.
## License
This mod is licensed under [the Apache 2.0 license](./LICENSE).