Skip to content

Commit

Permalink
Bump to loom 1.6.polyfrost.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Jul 29, 2024
1 parent 33b9766 commit 996bd06
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 50 deletions.
9 changes: 4 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
kotlin("jvm") version "1.9.10"
kotlin("plugin.serialization") version "1.9.10"

id("gg.essential.loom") version "0.10.0.+"
id("org.polyfrost.loom") version "1.6.polyfrost.5"
id("dev.architectury.architectury-pack200") version "0.1.3"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
Expand Down Expand Up @@ -55,10 +55,10 @@ loom {
pack200Provider.set(Pack200Adapter())
mixinConfig("spice.mixins.json")
}
launchConfigs {
runConfigs {
"client" {
property("mixin.debug", "true")
arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
programArgs("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker")
}
remove(getByName("server"))
}
Expand All @@ -82,7 +82,6 @@ dependencies {
implementation("org.spongepowered:mixin:0.7.11-SNAPSHOT") {
isTransitive = false
}
annotationProcessor("org.spongepowered:mixin:0.8.5-SNAPSHOT")

implementation("org.ow2.asm:asm-tree:9.7")

Expand Down Expand Up @@ -118,7 +117,7 @@ val remapJar by tasks.named<RemapJarTask>("remapJar") {

from(tasks.shadowJar)

input.set(tasks.shadowJar.get().archiveFile)
inputFile.set(tasks.shadowJar.get().archiveFile)
}

val weaveJar by tasks.register<Jar>("weaveJar") {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
22 changes: 13 additions & 9 deletions gradlew
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -198,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

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

goto fail

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

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
20 changes: 2 additions & 18 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,9 @@ pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://maven.architectury.dev/")
maven("https://maven.fabricmc.net")
maven("https://maven.minecraftforge.net/")
maven("https://repo.spongepowered.org/maven/")
maven("https://repo.sk1er.club/repository/maven-releases/")
maven("https://repo.polyfrost.org/releases")
}
resolutionStrategy {
eachPlugin {
when (requested.id.id) {
"gg.essential.loom" -> useModule("gg.essential:architectury-loom:${requested.version}")
}
}
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version("0.6.0")
}

rootProject.name = "spice"
rootProject.name = "Spice"

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
public abstract class GuiOverlayDebugMixin {
@Inject(method = "getDebugInfoRight", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiOverlayDebug;isReducedDebug()Z"))
private void addSpiceDebugInfo(CallbackInfoReturnable<List<String>> cir, long maxMemory, long totalMemory, long freeMemory, long usedMemory, List<String> lines) {
DebugHelper.applyExtraDebugInfo$spice(lines);
DebugHelper.applyExtraDebugInfo$Spice(lines);
}
}
4 changes: 2 additions & 2 deletions src/main/java/wtf/zani/spice/mixin/common/MinecraftMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public abstract class MinecraftMixin {
@Inject(method = "addGraphicsAndWorldToCrashReport", at = @At("HEAD"))
private void addSpiceInfo(CrashReport instance, CallbackInfoReturnable<CrashReport> cir) {
instance.getCategory().addCrashSectionCallable("Spice", Spice::getVersion);
instance.getCategory().addCrashSectionCallable("GLFW", Spice::getGlfwVersion$spice);
instance.getCategory().addCrashSectionCallable("GLFW", Spice::getGlfwVersion$Spice);
}

// in case we cause a crash too early
Expand Down Expand Up @@ -60,6 +60,6 @@ private void fixupCrashReport(CrashReportCategory instance, String name, Callabl

@Inject(method = "startGame", at = @At("HEAD"))
private void initialize(CallbackInfo ci) {
Spice.initialize$spice();
Spice.initialize$Spice();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public abstract class GuiControlsMixin extends GuiScreen {
private static GameSettings.Options[] optionsArr;

@Unique
private final Options spice$options = Spice.getOptions$spice();
private final Options spice$options = Spice.getOptions$Spice();
@Unique
private GuiButton spice$rawInputButton;

Expand All @@ -47,7 +47,7 @@ private void handleAction(GuiButton button, CallbackInfo ci) {
if (!Mouse.isRawInputSupported()) return;

if (button.id == 200) {
Spice.saveOptions$spice();
Spice.getOptions$Spice();
}

if (button.id == spice$rawInputButton.id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public abstract class MinecraftMixin {
private void setupRawInput(CallbackInfo ci) {
if (!Mouse.isRawInputSupported()) return;

Mouse.setRawInput(Spice.getOptions$spice().rawInput);
Mouse.setRawInput(Spice.getOptions$Spice().rawInput);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public abstract class MouseHelperMixin {

@Inject(method = "mouseXYChange", at = @At("HEAD"), cancellable = true)
private void mouseUpdate(CallbackInfo ci) {
if (Spice.getPlatform$spice() != Platform.Weave) return;
if (Spice.getPlatform$Spice() != Platform.Weave) return;

deltaX = Mouse.getDX();
deltaY = Mouse.getDY();
Expand Down

0 comments on commit 996bd06

Please sign in to comment.