Skip to content

Commit ce24574

Browse files
authored
1.21.10/.9 update (#5763)
1 parent f8a7bfb commit ce24574

File tree

191 files changed

+1750
-1127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+1750
-1127
lines changed

build.gradle.kts

Lines changed: 49 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
2-
id("fabric-loom") version "1.10-SNAPSHOT"
2+
id("fabric-loom") version "1.11-SNAPSHOT"
33
id("maven-publish")
4-
id("com.gradleup.shadow") version "9.0.0-beta11"
54
}
65

76
base {
@@ -50,7 +49,7 @@ repositories {
5049
}
5150

5251
val modInclude: Configuration by configurations.creating
53-
val library: Configuration by configurations.creating
52+
val jij: Configuration by configurations.creating
5453

5554
configurations {
5655
// include mods
@@ -61,12 +60,12 @@ configurations {
6160
extendsFrom(modInclude)
6261
}
6362

64-
// include libraries
63+
// include libraries (jar-in-jar)
6564
implementation.configure {
66-
extendsFrom(library)
65+
extendsFrom(jij)
6766
}
68-
shadow.configure {
69-
extendsFrom(library)
67+
include.configure {
68+
extendsFrom(jij)
7069
}
7170
}
7271

@@ -78,6 +77,7 @@ dependencies {
7877

7978
modInclude(fabricApi.module("fabric-api-base", properties["fapi_version"] as String))
8079
modInclude(fabricApi.module("fabric-resource-loader-v0", properties["fapi_version"] as String))
80+
modInclude(fabricApi.module("fabric-resource-loader-v1", properties["fapi_version"] as String))
8181

8282
// Compat fixes
8383
modCompileOnly(fabricApi.module("fabric-renderer-indigo", properties["fapi_version"] as String))
@@ -93,16 +93,44 @@ dependencies {
9393
modCompileOnly("com.terraformersmc:modmenu:${properties["modmenu_version"] as String}")
9494

9595
// Libraries
96-
library("meteordevelopment:orbit:${properties["orbit_version"] as String}")
97-
library("org.meteordev:starscript:${properties["starscript_version"] as String}")
98-
library("meteordevelopment:discord-ipc:${properties["discordipc_version"] as String}")
99-
library("org.reflections:reflections:${properties["reflections_version"] as String}")
100-
library("io.netty:netty-handler-proxy:${properties["netty_version"] as String}") { isTransitive = false }
101-
library("io.netty:netty-codec-socks:${properties["netty_version"] as String}") { isTransitive = false }
102-
library("de.florianmichael:WaybackAuthLib:${properties["waybackauthlib_version"] as String}")
103-
104-
// Launch sub project
105-
shadow(project(":launch"))
96+
jij("meteordevelopment:orbit:${properties["orbit_version"] as String}")
97+
jij("org.meteordev:starscript:${properties["starscript_version"] as String}")
98+
jij("meteordevelopment:discord-ipc:${properties["discordipc_version"] as String}")
99+
jij("org.reflections:reflections:${properties["reflections_version"] as String}")
100+
jij("io.netty:netty-handler-proxy:${properties["netty_version"] as String}") { isTransitive = false }
101+
jij("io.netty:netty-codec-socks:${properties["netty_version"] as String}") { isTransitive = false }
102+
jij("de.florianmichael:WaybackAuthLib:${properties["waybackauthlib_version"] as String}")
103+
}
104+
105+
// Handle transitive dependencies for jar-in-jar
106+
// Based on implementation from BaseProject by FlorianMichael/EnZaXD
107+
// Source: https://github.com/FlorianMichael/BaseProject/blob/main/src/main/kotlin/de/florianmichael/baseproject/Fabric.kt
108+
// Licensed under Apache License 2.0
109+
afterEvaluate {
110+
val jijConfig = configurations.findByName("jij") ?: return@afterEvaluate
111+
112+
// Dependencies to exclude from jar-in-jar
113+
val excluded = setOf(
114+
"org.slf4j", // Logging provided by Minecraft
115+
"jsr305" // Compile time annotations only
116+
)
117+
118+
119+
jijConfig.incoming.resolutionResult.allDependencies.forEach { dep ->
120+
val requested = dep.requested.displayName
121+
122+
if (excluded.any { requested.contains(it) }) return@forEach
123+
124+
val compileOnlyDep = dependencies.create(requested) {
125+
isTransitive = false
126+
}
127+
128+
val implDep = dependencies.create(compileOnlyDep)
129+
130+
dependencies.add("compileOnlyApi", compileOnlyDep)
131+
dependencies.add("implementation", implDep)
132+
dependencies.add("include", compileOnlyDep)
133+
}
106134
}
107135

108136
loom {
@@ -141,6 +169,10 @@ tasks {
141169
rename { "${it}_${inputs.properties["archivesName"]}" }
142170
}
143171

172+
// Launch sub project
173+
dependsOn(":launch:compileJava")
174+
from(project(":launch").layout.buildDirectory.dir("classes/java/main"))
175+
144176
manifest {
145177
attributes["Main-Class"] = "meteordevelopment.meteorclient.Main"
146178
}
@@ -162,27 +194,6 @@ tasks {
162194
options.compilerArgs.add("-Xlint:unchecked")
163195
}
164196

165-
shadowJar {
166-
configurations = listOf(project.configurations.shadow.get())
167-
168-
inputs.property("archivesName", project.base.archivesName.get())
169-
170-
from("LICENSE") {
171-
rename { "${it}_${inputs.properties["archivesName"]}" }
172-
}
173-
174-
dependencies {
175-
exclude {
176-
it.moduleGroup == "org.slf4j"
177-
}
178-
}
179-
}
180-
181-
remapJar {
182-
dependsOn(shadowJar)
183-
inputFile.set(shadowJar.get().archiveFile)
184-
}
185-
186197
javadoc {
187198
with(options as StandardJavadocDocletOptions) {
188199
addStringOption("Xdoclint:none", "-quiet")

gradle.properties

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
org.gradle.jvmargs=-Xmx2G
2-
org.gradle.configuration-cache=true
2+
org.gradle.configuration-cache=false
33

44
# Fabric (https://fabricmc.net/develop)
5-
minecraft_version=1.21.8
6-
yarn_mappings=1.21.8+build.1
7-
loader_version=0.16.14
8-
fapi_version=0.129.0+1.21.8
5+
minecraft_version=1.21.10
6+
yarn_mappings=1.21.10+build.1
7+
loader_version=0.17.2
8+
fapi_version=0.135.0+1.21.10
99

1010
# Mod Properties
1111
maven_group=meteordevelopment
@@ -17,16 +17,16 @@ archives_base_name=meteor-client
1717
baritone_version=1.21.5
1818

1919
# Sodium (https://github.com/CaffeineMC/sodium-fabric)
20-
sodium_version=mc1.21.6-0.6.13-fabric
20+
sodium_version=mc1.21.10-0.7.2-fabric
2121

2222
# Lithium (https://github.com/CaffeineMC/lithium-fabric)
23-
lithium_version=mc1.21.6-0.17.0-fabric
23+
lithium_version=mc1.21.10-0.20.0-fabric
2424

2525
# Iris (https://github.com/IrisShaders/Iris)
26-
iris_version=1.9.0+1.21.6-fabric
26+
iris_version=1.9.6+1.21.10-fabric
2727

2828
# ModMenu (https://github.com/TerraformersMC/ModMenu)
29-
modmenu_version=15.0.0-beta.3
29+
modmenu_version=15.0.0
3030

3131
# Orbit (https://github.com/MeteorDevelopment/orbit)
3232
orbit_version=0.2.4
@@ -44,7 +44,7 @@ reflections_version=0.10.2
4444
netty_version=4.1.118.Final
4545

4646
# ViaFabricPlus (https://github.com/ViaVersion/ViaFabricPlus)
47-
viafabricplus_version=4.1.5
47+
viafabricplus_version=4.3.1
4848

4949
# WaybackAuthLib (https://github.com/FlorianMichael/WaybackAuthLib)
5050
waybackauthlib_version=1.0.1

gradle/wrapper/gradle-wrapper.jar

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

gradlew

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH="\\\"\\\""
118117

119118

120119
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
172171
# For Cygwin or MSYS, switch paths to Windows format before running java
173172
if "$cygwin" || "$msys" ; then
174173
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
175-
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
176174

177175
JAVACMD=$( cygpath --unix "$JAVACMD" )
178176

@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
212210

213211
set -- \
214212
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215-
-classpath "$CLASSPATH" \
216213
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217214
"$@"
218215

gradlew.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,10 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=
7473

7574

7675
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
76+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7877

7978
:end
8079
@rem End local scope for the variables with windows NT shell

src/main/java/meteordevelopment/meteorclient/MeteorClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import meteordevelopment.meteorclient.addons.MeteorAddon;
1010
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
1111
import meteordevelopment.meteorclient.events.meteor.KeyEvent;
12-
import meteordevelopment.meteorclient.events.meteor.MouseButtonEvent;
12+
import meteordevelopment.meteorclient.events.meteor.MouseClickEvent;
1313
import meteordevelopment.meteorclient.events.world.TickEvent;
1414
import meteordevelopment.meteorclient.gui.GuiThemes;
1515
import meteordevelopment.meteorclient.gui.WidgetScreen;
@@ -150,20 +150,20 @@ public void onInitializeClient() {
150150
@EventHandler
151151
private void onTick(TickEvent.Post event) {
152152
if (mc.currentScreen == null && mc.getOverlay() == null && KeyBinds.OPEN_COMMANDS.wasPressed()) {
153-
mc.setScreen(new ChatScreen(Config.get().prefix.get()));
153+
mc.setScreen(new ChatScreen(Config.get().prefix.get(), true));
154154
}
155155
}
156156

157157
@EventHandler
158158
private void onKey(KeyEvent event) {
159-
if (event.action == KeyAction.Press && KeyBinds.OPEN_GUI.matchesKey(event.key, 0)) {
159+
if (event.action == KeyAction.Press && KeyBinds.OPEN_GUI.matchesKey(event.input)) {
160160
toggleGui();
161161
}
162162
}
163163

164164
@EventHandler
165-
private void onMouseButton(MouseButtonEvent event) {
166-
if (event.action == KeyAction.Press && KeyBinds.OPEN_GUI.matchesMouse(event.button)) {
165+
private void onMouseClick(MouseClickEvent event) {
166+
if (event.action == KeyAction.Press && KeyBinds.OPEN_GUI.matchesMouse(event.click)) {
167167
toggleGui();
168168
}
169169
}

src/main/java/meteordevelopment/meteorclient/asm/Asm.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ public boolean transformClass(MixinEnvironment environment, String name, ClassNo
114114
return delegate.transformClass(environment, name, classNode);
115115
}
116116

117+
@Override
118+
public boolean couldTransformClass(MixinEnvironment environment, String name) {
119+
return delegate.couldTransformClass(environment, name);
120+
}
121+
117122
@Override
118123
public byte[] generateClass(MixinEnvironment environment, String name) {
119124
return delegate.generateClass(environment, name);

src/main/java/meteordevelopment/meteorclient/commands/arguments/BlockPosArgumentType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public DefaultPosArgument(CoordinateArgument x, CoordinateArgument y, Coordinate
157157

158158
@Override
159159
public <S> Vec3d getPosition(S source) {
160-
Vec3d vec3 = mc.player.getPos();
160+
Vec3d vec3 = mc.player.getEntityPos();
161161
return new Vec3d(this.x.toAbsoluteCoordinate(vec3.x), this.y.toAbsoluteCoordinate(vec3.y), this.z.toAbsoluteCoordinate(vec3.z));
162162
}
163163

src/main/java/meteordevelopment/meteorclient/commands/arguments/PlayerListEntryArgumentType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public PlayerListEntry parse(StringReader reader) throws CommandSyntaxException
4444
PlayerListEntry playerListEntry = null;
4545

4646
for (PlayerListEntry p : mc.getNetworkHandler().getPlayerList()) {
47-
if (p.getProfile().getName().equalsIgnoreCase(argument)) {
47+
if (p.getProfile().name().equalsIgnoreCase(argument)) {
4848
playerListEntry = p;
4949
break;
5050
}
@@ -56,7 +56,7 @@ public PlayerListEntry parse(StringReader reader) throws CommandSyntaxException
5656

5757
@Override
5858
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
59-
return CommandSource.suggestMatching(mc.getNetworkHandler().getPlayerList().stream().map(playerListEntry -> playerListEntry.getProfile().getName()), builder);
59+
return CommandSource.suggestMatching(mc.getNetworkHandler().getPlayerList().stream().map(playerListEntry -> playerListEntry.getProfile().name()), builder);
6060
}
6161

6262
@Override

0 commit comments

Comments
 (0)