Working freelook
This commit is contained in:
+2
-2
@@ -26,7 +26,7 @@ public abstract class CameraMixin {
|
||||
@Inject(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/Camera;setRotation(FF)V", ordinal = 1, shift = At.Shift.AFTER))
|
||||
public void lockRotation(BlockView focusedBlock, Entity cameraEntity, boolean isThirdPerson, boolean isFrontFacing,
|
||||
float tickDelta, CallbackInfo ci) {
|
||||
if (FreelookMod.isFreeLooking && cameraEntity instanceof ClientPlayerEntity) {
|
||||
if (FreelookMod.isFreeLooking() && cameraEntity instanceof ClientPlayerEntity) {
|
||||
CameraOverriddenEntity cameraOverriddenEntity = (CameraOverriddenEntity) cameraEntity;
|
||||
|
||||
if (firstTime && SaturnClient.client.player != null) {
|
||||
@@ -38,7 +38,7 @@ public abstract class CameraMixin {
|
||||
cameraOverriddenEntity.freelook$getCameraPitch());
|
||||
|
||||
}
|
||||
if (!FreelookMod.isFreeLooking && cameraEntity instanceof ClientPlayerEntity) {
|
||||
if (!FreelookMod.isFreeLooking() && cameraEntity instanceof ClientPlayerEntity) {
|
||||
firstTime = true;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public class EntityMixin implements CameraOverriddenEntity {
|
||||
public void changeCameraLookDirection(double xDelta, double yDelta, CallbackInfo ci) {
|
||||
// noinspection ConstantValue// IntelliJ is incorrect here, this code block is
|
||||
// reachable
|
||||
if (FreelookMod.isFreeLooking && (Object) this instanceof ClientPlayerEntity) {
|
||||
if (FreelookMod.isFreeLooking() && (Object) this instanceof ClientPlayerEntity) {
|
||||
double pitchDelta = (yDelta * 0.15);
|
||||
double yawDelta = (xDelta * 0.15);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user