Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EnnuiL committed Feb 2, 2022
1 parent f01a4b1 commit 6f22b8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public static boolean throwUnregisteredKeyException(KeyBinding key) {
public static boolean isEnabled(KeyBinding key) {
if (quiltKeys.containsKey(key)) {
return quiltKeys.get(key);
} else {
return throwUnregisteredKeyException(key);
}

return throwUnregisteredKeyException(key);
}

public static void setEnabled(KeyBinding key, boolean enabled) {
Expand All @@ -101,9 +101,9 @@ public static void setEnabled(KeyBinding key, boolean enabled) {

((KeyBindingAccessor) key).callReset();
KeyBinding.updateKeysByCode();
} else {
throwUnregisteredKeyException(key);
}

throwUnregisteredKeyException(key);
}

public static Map<KeyBinding, Boolean> getAllKeyBindings(boolean includeVanilla) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public abstract class KeyBindingEntryMixin extends KeyBindingListWidget.Entry im
@Unique
private static InputUtil.Key quilt$changedBoundKey;

@Shadow(remap = false)
@Shadow(aliases = "field_2742", remap = false)
@Final
KeyBindingListWidget field_2742;

Expand All @@ -92,10 +92,10 @@ private void collectConflictTooltips(MatrixStack matrices, int index, int y, int
if (!boundKey.equals(this.quilt$previousBoundKey) || quilt$changedBoundKey != null) {
this.quilt$conflictTooltips.clear();

if (quilt$changedBoundKey == null) {
quilt$changedBoundKey = boundKey;
} else if (quilt$changedBoundKey.equals(boundKey)) {
if (quilt$changedBoundKey != null && quilt$changedBoundKey.equals(boundKey)) {
quilt$changedBoundKey = null;
} else {
quilt$changedBoundKey = boundKey;
}

if (!this.binding.isUnbound()) {
Expand Down

0 comments on commit 6f22b8f

Please sign in to comment.