Skip to content

Commit

Permalink
Backport 1.3.0 to 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
trainb0y committed Nov 19, 2023
1 parent d697c1e commit 1621df6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
org.gradle.jvmargs=-Xmx2G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.1
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.1
loader_version=0.14.22
fabric_kotlin_version=1.10.10+kotlin.1.9.10
fabric_api_version=0.89.1+1.20.2
fabric_api_version=0.83.0+1.20
# Mod Properties
mod_version=1.3.0
mod_version=1.3.0-backport
maven_group=io.github.trainb0y
archives_base_name=fabrizoom
# Dependencies
# check this on https://modmuss50.me/fabric.html
mod_menu_version=7.2.2
# todo remove snapshot once 1.20.2 gets an actual release
yacl_version=3.2.0+1.20.2+HEAD-SNAPSHOT+HEAD-SNAPSHOT
yacl_version=3.2.1+1.20
configurate_version=4.1.2
10 changes: 5 additions & 5 deletions src/main/java/io/github/trainb0y/fabrizoom/mixin/MouseMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class MouseMixin {

/** The amount the scroll wheel has moved */
@Shadow
private double eventDeltaVerticalWheel;
private double eventDeltaWheel;

/**
* Whether to apply changes to the mouse
Expand Down Expand Up @@ -95,22 +95,22 @@ private double modifyFinalCursorDeltaY(double l) {
/**
* Handle changing the zoom when the player scrolls while zooming
*
* @see MouseMixin#eventDeltaVerticalWheel
* @see MouseMixin#eventDeltaWheel
* @see ZoomLogic#changeZoomDivisor
*/
@Inject(
at = @At(
value = "FIELD",
target = "Lnet/minecraft/client/Mouse;eventDeltaVerticalWheel:D",
target = "Lnet/minecraft/client/Mouse;eventDeltaWheel:D",
ordinal = 7
),
method = "onMouseScroll(JDD)V",
cancellable = true
)
private void onMouseScroll(CallbackInfo ci) {
if (this.eventDeltaVerticalWheel == 0.0 || !ZoomLogic.isZooming() || !ConfigHandler.getValues().getZoomScroll()) return;
if (this.eventDeltaWheel == 0.0 || !ZoomLogic.isZooming() || !ConfigHandler.getValues().getZoomScroll()) return;

ZoomLogic.changeZoomDivisor(this.eventDeltaVerticalWheel > 0.0);
ZoomLogic.changeZoomDivisor(this.eventDeltaWheel > 0.0);
ci.cancel();
}
}
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
},
"recommends": {
"modmenu": "8.*.*",
"minecraft": "1.20.2"
"minecraft": "1.20.1"
}
}

0 comments on commit 1621df6

Please sign in to comment.