Cleaned up some code
This commit is contained in:
@ -7,7 +7,6 @@ import net.minecraft.client.option.KeyBinding;
|
||||
import net.minecraft.client.util.InputUtil;
|
||||
import net.minecraft.text.Text;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import wtf.hak.survivalfabric.utils.MathUtils;
|
||||
|
||||
public class Zoom {
|
||||
|
||||
@ -20,7 +19,7 @@ public class Zoom {
|
||||
|
||||
public static void register() {
|
||||
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
||||
if(ZOOM_BIND.isPressed())
|
||||
if (ZOOM_BIND.isPressed())
|
||||
SHOULD_ZOOM = true;
|
||||
else {
|
||||
SHOULD_ZOOM = false;
|
||||
@ -43,7 +42,7 @@ public class Zoom {
|
||||
// Clamp the zoom level so the FOV stays within [1, 110]
|
||||
float zoomFov = getZoomFov();
|
||||
if (zoomFov < 1) {
|
||||
ZOOM_STEP = Math.round((1 - INITIAL_ZOOM) / ZOOM_STEP_VALUE)+1;
|
||||
ZOOM_STEP = Math.round((1 - INITIAL_ZOOM) / ZOOM_STEP_VALUE) + 1;
|
||||
} else if (zoomFov > 110) {
|
||||
ZOOM_STEP = Math.round((110 - INITIAL_ZOOM) / ZOOM_STEP_VALUE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user