mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-13 23:25:10 +01:00
Re-enable camera movement API
This commit is contained in:
@@ -708,7 +708,7 @@ public class MidnightInput {
|
|||||||
// Handles the look direction.
|
// Handles the look direction.
|
||||||
if (MidnightControlsConfig.cameraMode == CameraMode.FLAT) handleFlatLook(storage);
|
if (MidnightControlsConfig.cameraMode == CameraMode.FLAT) handleFlatLook(storage);
|
||||||
else handleAdaptiveLook(storage);
|
else handleAdaptiveLook(storage);
|
||||||
|
MidnightControlsCompat.handleCamera(this.targetYaw, this.targetPitch);
|
||||||
}
|
}
|
||||||
private void handleFlatLook(AxisStorage storage) {
|
private void handleFlatLook(AxisStorage storage) {
|
||||||
if (storage.polarity != AxisStorage.Polarity.ZERO) {
|
if (storage.polarity != AxisStorage.Polarity.ZERO) {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import java.util.List;
|
|||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static eu.midnightdust.midnightcontrols.MidnightControls.log;
|
import static eu.midnightdust.midnightcontrols.MidnightControls.log;
|
||||||
|
import static eu.midnightdust.midnightcontrols.client.MidnightControlsClient.client;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a compatibility handler.
|
* Represents a compatibility handler.
|
||||||
@@ -171,11 +172,10 @@ public class MidnightControlsCompat {
|
|||||||
/**
|
/**
|
||||||
* Handles the camera movement.
|
* Handles the camera movement.
|
||||||
*
|
*
|
||||||
* @param client the client instance
|
|
||||||
* @param targetYaw the target yaw
|
* @param targetYaw the target yaw
|
||||||
* @param targetPitch the target pitch
|
* @param targetPitch the target pitch
|
||||||
*/
|
*/
|
||||||
public static void handleCamera(@NotNull MinecraftClient client, double targetYaw, double targetPitch) {
|
public static void handleCamera(double targetYaw, double targetPitch) {
|
||||||
MidnightControlsCompat.HANDLERS.forEach(handler -> handler.handleCamera(client, targetYaw, targetPitch));
|
MidnightControlsCompat.HANDLERS.forEach(handler -> handler.handleCamera(client, targetYaw, targetPitch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user