Fix getBoundKey() recursion (#896)

* Fix getBoundKey() recursion

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Change to underscore

Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
shedaniel 2020-07-20 19:35:29 +01:00 committed by modmuss50
parent ae75e3bdf9
commit 06ca070952
3 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-key-binding-api-v1"
version = getSubprojectVersion(project, "1.0.0")
version = getSubprojectVersion(project, "1.0.1")
dependencies {
testmodCompile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -53,6 +53,6 @@ public final class KeyBindingHelper {
* @return configured KeyCode
*/
public static InputUtil.KeyCode getBoundKeyOf(KeyBinding keyBinding) {
return ((KeyCodeAccessor) keyBinding).getKeyCode();
return ((KeyCodeAccessor) keyBinding).fabric_getKeyCode();
}
}

View file

@ -24,6 +24,6 @@ import net.minecraft.client.util.InputUtil;
@Mixin(KeyBinding.class)
public interface KeyCodeAccessor {
@Accessor
InputUtil.KeyCode getKeyCode();
@Accessor("keyCode")
InputUtil.KeyCode fabric_getKeyCode();
}