mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 23:25:10 +01:00
Completely rewritten joystick input
- Joystick input is now processed using polar coordinates, resulting in better accuracy and fixing tons of issues (Fixes #135, #138, #186 & #180) - Camera movement is now way smoother by including the previous stick values in the calculation (Fixes #217 & #167) - updateMappings() is now called asyncronously (Closes #219)
This commit is contained in:
@@ -432,6 +432,7 @@ public class TouchscreenOverlay extends Screen {
|
||||
if (result instanceof BlockHitResult blockHit && firstHitResult instanceof BlockHitResult firstBlock && blockHit.getBlockPos().equals(firstBlock.getBlockPos())) {
|
||||
if (MidnightControlsConfig.debug) System.out.println(blockHit.getBlockPos().toString());
|
||||
if (client.interactionManager.updateBlockBreakingProgress(blockHit.getBlockPos(), blockHit.getSide())) {
|
||||
client.particleManager.addBlockBreakingParticles(blockHit.getBlockPos(), blockHit.getSide());
|
||||
client.player.swingHand(Hand.MAIN_HAND);
|
||||
} else client.interactionManager.cancelBlockBreaking();
|
||||
firstHitResult = TouchUtils.getTargettedObject(mouseX, mouseY);
|
||||
|
||||
Reference in New Issue
Block a user