MidnightControls 1.4.0 - Many Improvements and Fixes

- EMI compat! (Switch page keybinds & more)
- Expose more keybindings
- Fix Compatibility with Quilt Creative Extension
- Improve Auto Switch mode (Automatically switch gamepad on connection changes)
- Fix triggers not working on some (slightly broken) controllers
- Fix #57 (Broken stack pickup)
- Fix #56 (Unused language strings)
- Fix #52 (Rebound perspective button blocking actions)
- Fix #46 (Button overlap with Crawl mod)
- Fix #59 (D-Pad can switch EMI buttons when in Inventories)
This commit is contained in:
Motschen
2022-07-05 21:15:31 +02:00
parent 71ee3d8e0a
commit 735b9e8718
22 changed files with 238 additions and 89 deletions

View File

@@ -22,8 +22,10 @@ public class SodiumCompat {
i = (direction ? ((max > i) ? ++i : 0) : (i > 0 ? --i : max));
var dimensions = accessor.getControls().get(i).getDimensions();
InputManager.INPUT_MANAGER.targetMouseX = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterX());
InputManager.INPUT_MANAGER.targetMouseY = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterY());
int x = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterX());
int y = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterY());
InputManager.queueMousePosition(x,y);
InputManager.INPUT_MANAGER.updateMousePosition(client);
MidnightControlsClient.get().input.actionGuiCooldown = 5;
if (MidnightControlsConfig.debug) MidnightControls.get().log(i+" "+accessor.getControls().size()+" | " + dimensions.getCenterX() + " " + dimensions.getCenterY());
}