Skip to content

Commit de06c7d

Browse files
olivi-rYaLTeR
authored andcommitted
Update to Minecraft 1.21.9
1 parent ee849e6 commit de06c7d

File tree

12 files changed

+40
-35
lines changed

12 files changed

+40
-35
lines changed

build-fabric.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'fabric-loom' version '1.10-SNAPSHOT'
2+
id 'fabric-loom' version '1.11-SNAPSHOT'
33
}
44

55
version = project.modVersion

gradle.properties

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ org.gradle.jvmargs=-Xmx3G
44
org.gradle.parallel=true
55
org.gradle.daemon=false
66

7-
modVersion=2.28
7+
modVersion=2.29
88
modJavaVersion=21
99
# Remember to update fabric.mod.json
10-
modCredits=Contributors: mezz, juliand665, panoskj, FabiClawZ, ErrorMikey.
10+
modCredits=Contributors: mezz, juliand665, panoskj, FabiClawZ, ErrorMikey, livInFear, Abelpro678.
1111
modDescription=A mod that enhances the inventory management by adding various additional functions to the usual mouse buttons.
1212

13-
forgeMcVersion=1.21.6
14-
forgeVersion=56.0.0
15-
forgeLoaderVersion=[56,)
13+
forgeMcVersion=1.21.9
14+
forgeVersion=59.0.0
15+
forgeLoaderVersion=[59,)
1616
forgeEventBusValidatorVersion=7.0-beta.7
1717

18-
neoMcVersion=1.21.6
19-
neoVersion=21.6.4-beta
18+
neoMcVersion=1.21.9
19+
neoVersion=21.9.6-beta
2020
neoLoaderVersion=[4,)
2121

22-
fabricMcVersion=1.21.6
23-
fabricLoaderVersion=0.16.14
24-
fabricApiVersion=0.127.0+1.21.6
25-
fabricModMenuVersion=15.0.0-beta.2
22+
fabricMcVersion=1.21.9
23+
fabricLoaderVersion=0.17.2
24+
fabricApiVersion=0.133.14+1.21.9
25+
fabricModMenuVersion=16.0.0-rc.1

gradle/wrapper/gradle-wrapper.jar

181 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/yalter/mousetweaks/ConfigScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public ConfigScreen(Screen previous) {
1919
protected void init() {
2020
Main.config.read();
2121

22-
this.addRenderableWidget(new StringWidget(0, 15, this.width, 9, this.title, this.font));
22+
this.addRenderableWidget(new StringWidget(this.width / 2 - this.font.width(this.title) / 2, 15, this.width, 9, this.title, this.font));
2323

2424
this.addRenderableWidget(CycleButton.onOffBuilder(Main.config.rmbTweak)
2525
.create(this.width / 2 - 155, this.height / 6, 150, 20,

src/main/java/yalter/mousetweaks/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ public static boolean onMouseDrag(Screen screen, double x, double y, MouseButton
244244
if (selectedSlotStack.isEmpty())
245245
return false;
246246

247-
boolean shiftIsDown = InputConstants.isKeyDown(mc.getWindow().getWindow(), GLFW.GLFW_KEY_LEFT_SHIFT)
248-
|| InputConstants.isKeyDown(mc.getWindow().getWindow(), GLFW.GLFW_KEY_RIGHT_SHIFT);
247+
boolean shiftIsDown = InputConstants.isKeyDown(mc.getWindow(), GLFW.GLFW_KEY_LEFT_SHIFT)
248+
|| InputConstants.isKeyDown(mc.getWindow(), GLFW.GLFW_KEY_RIGHT_SHIFT);
249249

250250
if (stackOnMouse.isEmpty()) {
251251
// Shift-LMB drag without item.

src/main/java/yalter/mousetweaks/fabric/MouseTweaksFabric.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ public void onInitializeClient() {
1212
Main.initialize();
1313

1414
ScreenEvents.BEFORE_INIT.register((client, screen, scaledWidth, scaledHeight) -> {
15-
ScreenMouseEvents.allowMouseClick(screen).register((_screen, x, y, eventButton) -> {
16-
MouseButton button = MouseButton.fromEventButton(eventButton);
15+
ScreenMouseEvents.allowMouseClick(screen).register((_screen, context) -> {
16+
MouseButton button = MouseButton.fromEventButton(context.button());
1717
if (button != null)
18-
return !Main.onMouseClicked(screen, x, y, button);
18+
return !Main.onMouseClicked(screen, context.x(), context.y(), button);
1919
return true;
2020
});
2121

22-
ScreenMouseEvents.allowMouseRelease(screen).register((_screen, x, y, eventButton) -> {
23-
MouseButton button = MouseButton.fromEventButton(eventButton);
22+
ScreenMouseEvents.allowMouseRelease(screen).register((_screen, context) -> {
23+
MouseButton button = MouseButton.fromEventButton(context.button());
2424
if (button != null)
25-
return !Main.onMouseReleased(screen, x, y, button);
25+
return !Main.onMouseReleased(screen, context.x(), context.y(), button);
2626
return true;
2727
});
2828

29-
ScreenMouseEvents.afterMouseScroll(screen).register((_screen, x, y, horiz, vert) ->
29+
ScreenMouseEvents.afterMouseScroll(screen).register((_screen, x, y, horiz, vert, consumed) ->
3030
Main.onMouseScrolled(screen, x, y, vert));
3131
});
3232
}

src/main/java/yalter/mousetweaks/fabric/mixin/MixinMouseHandler.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,27 @@
22

33
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
44
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
5+
56
import net.minecraft.client.MouseHandler;
67
import net.minecraft.client.gui.screens.Screen;
8+
import net.minecraft.client.input.MouseButtonEvent;
9+
710
import org.spongepowered.asm.mixin.Mixin;
811
import org.spongepowered.asm.mixin.injection.At;
912
import yalter.mousetweaks.Main;
1013
import yalter.mousetweaks.MouseButton;
1114

1215
@Mixin(MouseHandler.class)
1316
public abstract class MixinMouseHandler {
14-
@WrapOperation(method = "handleAccumulatedMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/Screen;mouseDragged(DDIDD)Z"))
15-
private boolean onMouseDragged(Screen screen, double x, double y, int activeButton, double dx, double dy, Operation<Boolean> operation) {
16-
MouseButton button = MouseButton.fromEventButton(activeButton);
17+
@WrapOperation(method = "handleAccumulatedMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/Screen;mouseDragged(Lnet/minecraft/client/input/MouseButtonEvent;DD)Z"))
18+
private boolean onMouseDragged(Screen screen, MouseButtonEvent event, double dx, double dy, Operation<Boolean> operation) {
19+
MouseButton button = MouseButton.fromEventButton(event.button());
1720
if (button != null) {
18-
if (Main.onMouseDrag(screen, x, y, button)) {
21+
if (Main.onMouseDrag(screen, event.x(), event.y(), button)) {
1922
return true;
2023
}
2124
}
2225

23-
return operation.call(screen, x, y, activeButton, dx, dy);
26+
return operation.call(screen, event, dx, dy);
2427
}
2528
}

0 commit comments

Comments
 (0)