Skip to content

Commit 67e3a86

Browse files
committed
Merge 1.18 into 1.19.2
2 parents 237239d + 8b2fa7e commit 67e3a86

File tree

5 files changed

+21
-15
lines changed

5 files changed

+21
-15
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id "architectury-plugin" version "3.4-SNAPSHOT"
3-
id "dev.architectury.loom" version "1.3-SNAPSHOT" apply false
3+
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
44
id "maven-publish"
55
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
66
id 'com.palantir.git-version' version '1.0.0'

common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/faster_texture_stitching/StitcherMixin.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,16 @@ public class StitcherMixin {
4141
*/
4242
@Inject(method = "stitch", at = @At("HEAD"), cancellable = true)
4343
private void stitchFast(CallbackInfo ci) {
44+
this.loadableSpriteInfos = null;
4445
if(!ModernFixPlatformHooks.INSTANCE.isLoadingNormally()) {
4546
ModernFix.LOGGER.error("Using vanilla stitcher implementation due to invalid loading state");
4647
return;
4748
}
49+
if(this.texturesToBeStitched.size() < 100) {
50+
// The vanilla implementation is fine for small atlases, and using it allows mods like JEI that depend on
51+
// precise texture alignments to avoid bugs.
52+
return;
53+
}
4854
ci.cancel();
4955
ObjectArrayList<Stitcher.Holder> holderList = new ObjectArrayList<>(this.texturesToBeStitched);
5056
holderList.sort(HOLDER_COMPARATOR);
@@ -69,7 +75,7 @@ private void stitchFast(CallbackInfo ci) {
6975
*/
7076
@Inject(method = "gatherSprites", at = @At("HEAD"), cancellable = true)
7177
private void gatherSpritesFast(Stitcher.SpriteLoader spriteLoader, CallbackInfo ci) {
72-
if(!ModernFixPlatformHooks.INSTANCE.isLoadingNormally())
78+
if(this.loadableSpriteInfos == null)
7379
return;
7480
ci.cancel();
7581
for(StbStitcher.LoadableSpriteInfo info : loadableSpriteInfos) {

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

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ fi
200200

201201

202202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203-
DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"'
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204204

205205
# Collect all arguments for the java command:
206206
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,

gradlew.bat

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ set APP_HOME=%DIRNAME%
3434
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
3535

3636
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37-
set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"
37+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
3838

3939
@rem Find java.exe
4040
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo. 1>&2
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48-
echo. 1>&2
49-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50-
echo location of your Java installation. 1>&2
46+
echo.
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48+
echo.
49+
echo Please set the JAVA_HOME variable in your environment to match the
50+
echo location of your Java installation.
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo. 1>&2
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62-
echo. 1>&2
63-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64-
echo location of your Java installation. 1>&2
60+
echo.
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62+
echo.
63+
echo Please set the JAVA_HOME variable in your environment to match the
64+
echo location of your Java installation.
6565

6666
goto fail
6767

0 commit comments

Comments
 (0)