Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit 96ff936

Browse files
committed
Update to 1.21.2-3
1 parent 52a1d50 commit 96ff936

10 files changed

Lines changed: 59 additions & 30 deletions

File tree

build.gradle

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
2-
id 'fabric-loom' version '1.6-SNAPSHOT'
2+
id 'fabric-loom' version '1.8-SNAPSHOT'
33
id 'maven-publish'
4+
id "com.modrinth.minotaur" version "2.+"
45
}
56

67
version = project.mod_version
@@ -10,8 +11,24 @@ base {
1011
archivesName = project.archives_base_name
1112
}
1213

14+
modrinth {
15+
token = System.getenv("MODRINTH_TOKEN")
16+
projectId = "simpleautoswitch"
17+
versionNumber = project.mod_version
18+
versionType = "release"
19+
uploadFile = remapJar
20+
gameVersions = [project.minecraft_version]
21+
loaders = ["fabric", "quilt"]
22+
dependencies {
23+
required.project "fabric-api"
24+
optional.project "modmenu"
25+
}
26+
}
27+
28+
1329
repositories {
1430
maven { url = "https://maven.terraformersmc.com/" }
31+
gradlePluginPortal()
1532
}
1633

1734
dependencies {

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ org.gradle.parallel=true
44

55
# Fabric Properties
66
# check these on https://fabricmc.net/develop
7-
minecraft_version=1.21
8-
yarn_mappings=1.21+build.1
9-
loader_version=0.15.11
7+
minecraft_version=1.21.3
8+
yarn_mappings=1.21.3+build.2
9+
loader_version=0.16.7
1010

1111
# Mod Properties
1212
mod_version=1.1.0
1313
maven_group=xyz.ryhon.simpleautoswitch
1414
archives_base_name=simple-autoswitch
1515

1616
# Dependencies
17-
fabric_version=0.100.1+1.21
18-
modmenu_version=11.0.0-beta.1
17+
fabric_version=0.106.1+1.21.3
18+
modmenu_version=12.0.0-beta.1

gradle/wrapper/gradle-wrapper.jar

130 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.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 5 additions & 2 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 & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package xyz.ryhon.simpleautoswitch.mixin;
2+
3+
import net.minecraft.entity.player.PlayerInventory;
4+
import net.minecraft.client.Mouse;
5+
import xyz.ryhon.simpleautoswitch.SimpleAutoswitch;
6+
7+
import org.spongepowered.asm.mixin.Mixin;
8+
import org.spongepowered.asm.mixin.injection.At;
9+
import org.spongepowered.asm.mixin.injection.Inject;
10+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
11+
12+
@Mixin(Mouse.class)
13+
public abstract class MouseMixin {
14+
@Inject(at = @At("TAIL"), method = "onMouseScroll")
15+
private void scrollInHotbar(long window, double horizontal, double vertical, CallbackInfo info) {
16+
PlayerInventory lv = ((Mouse)(Object)this).client.player.getInventory();
17+
18+
if(lv.selectedSlot != SimpleAutoswitch.previousSlot)
19+
{
20+
SimpleAutoswitch.tempDisabled = true;
21+
SimpleAutoswitch.previousSlot = lv.selectedSlot;
22+
}
23+
}
24+
}

src/main/java/xyz/ryhon/simpleautoswitch/mixin/PlayerInventoryMixin.java

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
accessWidener v2 named
22

33
accessible method net/minecraft/client/network/ClientPlayerInteractionManager syncSelectedSlot ()V
4-
accessible method net/minecraft/entity/LivingEntity getEquipmentChanges ()Ljava/util/Map;
4+
accessible method net/minecraft/entity/LivingEntity getEquipmentChanges ()Ljava/util/Map;
5+
accessible field net/minecraft/client/Mouse client Lnet/minecraft/client/MinecraftClient;

src/main/resources/simple-autoswitch.mixins.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"required": true,
33
"package": "xyz.ryhon.simpleautoswitch.mixin",
4-
"compatibilityLevel": "JAVA_17",
4+
"compatibilityLevel": "JAVA_21",
55
"mixins": [
6-
"PlayerInventoryMixin"
6+
"MouseMixin"
77
],
88
"injectors": {
99
"defaultRequire": 1

0 commit comments

Comments
 (0)