Skip to content

Commit

Permalink
Update dependencies, remove legacy text functionality and bump mod ve…
Browse files Browse the repository at this point in the history
…rsion to 2.0.1.
  • Loading branch information
12emin34 committed Jul 19, 2024
1 parent d5b4e79 commit 39a8452
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import dev.architectury.registry.client.keymappings.KeyMappingRegistry;
import eu.midnightdust.lib.config.MidnightConfig;
import me._12emin34.moremousekeybinds.ModConstants;
import me._12emin34.moremousekeybinds.compat.ComponentHack;
import me._12emin34.moremousekeybinds.config.ModConfig;
import me._12emin34.moremousekeybinds.mixin.KeyMappingAccessor;
import net.fabricmc.api.EnvType;
Expand All @@ -20,7 +19,6 @@
@Environment(EnvType.CLIENT)
public class MoreMouseKeybindsClient {
public static final String MOD_ID = "moremousekeybinds";
static final boolean SHOULD_USE_LEGACY_TEXT = shouldUseLegacyText();
public static boolean shouldCancelSwingWhenCoolingDown = false;
public static boolean shouldCancelSwingWhenNoTarget = false;
public static boolean swingCancelledWhenCoolingDown = false;
Expand Down Expand Up @@ -91,11 +89,7 @@ public static void initClient() {
private static void sendToggleMessage(boolean optionToCheck, String message, Minecraft client) {
if (client.player == null) return;

if (SHOULD_USE_LEGACY_TEXT) {
client.player.displayClientMessage((Component) ComponentHack.literal(message + ((optionToCheck) ? "ON" : "OFF")), true);
} else {
client.player.displayClientMessage(Component.literal(message + ((optionToCheck) ? "ON" : "OFF")), true);
}
client.player.displayClientMessage(Component.literal(message + ((optionToCheck) ? "ON" : "OFF")), true);
}

private static void onStartTick(Minecraft client) {
Expand Down Expand Up @@ -158,15 +152,4 @@ private static void onEndTick(Minecraft client) {
}
}
}

private static boolean shouldUseLegacyText() {
try {
Class.forName("net.minecraft.class_2561").getMethod("method_43470", String.class);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
return true;
}
return false;
}
}

This file was deleted.

6 changes: 3 additions & 3 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
],
"depends": {
"fabricloader": ">=0.15.11",
"minecraft": "~1.20.5",
"minecraft": "~1.21",
"java": ">=21",
"architectury": ">=12.0.27",
"architectury": ">=13.0.4",
"fabric-api": "*",
"midnightlib": ">=1.5.5"
"midnightlib": ">=1.5.7"
}
}
26 changes: 13 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true

# Mod Properties
mod_version=2.0.0
mod_version=2.0.1
maven_group=me._12emin34
archives_name=MoreMouseKeybinds
enabled_platforms = fabric,neoforge

# Minecraft Properties
minecraft_version=1.20.6
minecraft_version=1.21

# Dependencies
architectury_api_version = 12.0.27
fabric_loader_version = 0.15.11
fabric_api_version = 0.98.0+1.20.6
neoforge_version = 20.6.3-beta
quilt_loader_version = 0.26.0-beta.1
quilted_fabric_api_version = 9.0.0-alpha.8+0.97.0-1.20.4
midnightlib_version=1.5.5
architectury_api_version = 13.0.4
fabric_loader_version = 0.16.0
fabric_api_version = 0.100.7+1.21
neoforge_version = 21.0.109-beta
quilt_loader_version = 0.26.4-beta.1
quilted_fabric_api_version = 11.0.0-alpha.3+0.100.7-1.21
midnightlib_version=1.5.7

# Dev environment mods
spark_version=1.10.65-fabric
lithium_version=mc1.20.6-0.12.3
ferrite_core_version=6.1.1-fabric
modmenu_version=10.0.0-beta.1
spark_version=1.10.73-fabric
lithium_version=mc1.21-0.12.7
ferrite_core_version=7.0.0-fabric
modmenu_version=11.0.1
6 changes: 3 additions & 3 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ logoFile = "icon.png"
[[dependencies.moremousekeybinds]]
modId = "neoforge"
type = "required"
versionRange = "[20.5,)"
versionRange = "[21,)"
ordering = "NONE"
side = "BOTH"

[[dependencies.moremousekeybinds]]
modId = "minecraft"
type = "required"
versionRange = "[1.20.5,)"
versionRange = "[1.21,)"
ordering = "NONE"
side = "BOTH"

[[dependencies.moremousekeybinds]]
modId = "architectury"
type = "required"
versionRange = "[12.0.27,)"
versionRange = "[13.0.4,)"
ordering = "AFTER"
side = "BOTH"

Expand Down

0 comments on commit 39a8452

Please sign in to comment.