Skip to content

Commit

Permalink
Merge pull request #66 from LogicalGeekBoy/wifi-left-patch-1
Browse files Browse the repository at this point in the history
Support 1.21.3
  • Loading branch information
LogicalGeekBoy authored Oct 27, 2024
2 parents bd66a20 + 5682061 commit ec59744
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
}

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
org.gradle.jvmargs=-Xmx4G

# Fabric Properties from the Fabric insaller
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.5
minecraft_version=1.21.3
yarn_mappings=1.21.3+build.2
loader_version=0.16.7

# Fabric API
fabric_version=0.105.0+1.21.1
fabric_version=0.106.1+1.21.3

# Mod Properties
mod_version = 0.0.26
mod_version = 0.0.27
maven_group = com.logicalgeekboy.logical_zoom
archives_base_name = logical_zoom
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class LogicalZoom implements ClientModInitializer {
private static boolean originalSmoothCameraEnabled;
private static final MinecraftClient mc = MinecraftClient.getInstance();

public static final double zoomLevel = 0.23;
public static final float zoomLevel = (float) 0.23;

@Override
public void onInitializeClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
@Mixin(GameRenderer.class)
public class LogicalZoomMixin {

@Inject(method = "getFov(Lnet/minecraft/client/render/Camera;FZ)D", at = @At("RETURN"), cancellable = true)
public void getZoomLevel(CallbackInfoReturnable<Double> callbackInfo) {
@Inject(method = "getFov(Lnet/minecraft/client/render/Camera;FZ)F", at = @At("RETURN"), cancellable = true)
public void getZoomLevel(CallbackInfoReturnable<Float> callbackInfo) {
if(LogicalZoom.isZooming()) {
double fov = callbackInfo.getReturnValue();
float fov = callbackInfo.getReturnValue();
callbackInfo.setReturnValue(fov * LogicalZoom.zoomLevel);
}

Expand Down

0 comments on commit ec59744

Please sign in to comment.