diff --git a/README.md b/README.md index 53150fe..6283c8f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Moonlight Meadows Utility Mod for Modern versions of Minecraft -Requires Fabric API and Minecraft 1.20.2 +Requires Fabric API and Minecraft 1.20.4 Default ClickGUI Key is Right Alt. @@ -19,5 +19,5 @@ Grab the latest nightly build [here](https://nightly.link/kawaiizenbo/MoonlightM ## Disclaimer -Please use this mod at your own risk, we are not responsible for any injury or death caused by this mod. +Please use this mod at your own risk, we are not responsible for any serious injury or death caused by this mod. This project is not affiliated with Mojang or Microsoft. diff --git a/build.gradle b/build.gradle index ef0decd..e74432b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.0-SNAPSHOT' + id 'fabric-loom' version '1.4-SNAPSHOT' id 'maven-publish' } diff --git a/gradle.properties b/gradle.properties index ba817f4..4ef2816 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,14 +4,14 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.20.2 - yarn_mappings=1.20.2+build.4 - loader_version=0.14.22 + minecraft_version=1.20.4 + yarn_mappings=1.20.4+build.2 + loader_version=0.15.1 # Mod Properties - mod_version = 0.1.0 + mod_version = 0.1.1 maven_group = me.kawaiizenbo archives_base_name = moonlight # Dependencies - fabric_version=0.90.0+1.20.2 + fabric_version=0.91.2+1.20.4 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..d64cd49 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f398c33..1af9e09 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# 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"' +# 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 @@ -133,10 +131,13 @@ 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. @@ -144,7 +145,7 @@ 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 @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | 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 @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# 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. + +# 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, 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" \ diff --git a/src/main/java/me/kawaiizenbo/moonlight/Moonlight.java b/src/main/java/me/kawaiizenbo/moonlight/Moonlight.java index e2615e9..784d21e 100644 --- a/src/main/java/me/kawaiizenbo/moonlight/Moonlight.java +++ b/src/main/java/me/kawaiizenbo/moonlight/Moonlight.java @@ -24,7 +24,7 @@ public class Moonlight implements ModInitializer public static final Moonlight INSTANCE = new Moonlight(); public static final Logger LOGGER = LoggerFactory.getLogger("Moonlight"); public static final String clientTag = ColorUtils.aqua + "Moonlight Meadows"; - public static final String versionTag = ColorUtils.magenta + "v0.1.0"; + public static final String versionTag = ColorUtils.magenta + "v0.1.1"; public static Config CONFIG = new Config(); public static int uiColorA = 0xFF55FFFF; public static int uiColor = 0x55FFFF; diff --git a/src/main/java/me/kawaiizenbo/moonlight/module/modules/Timer.java b/src/main/java/me/kawaiizenbo/moonlight/module/modules/Timer.java index 37558ae..9c2f1e1 100644 --- a/src/main/java/me/kawaiizenbo/moonlight/module/modules/Timer.java +++ b/src/main/java/me/kawaiizenbo/moonlight/module/modules/Timer.java @@ -19,7 +19,7 @@ public class Timer extends Module public void onEnable() { super.onEnable(); - mc.renderTickCounter = new RenderTickCounter((float)(20.0*speed.value), 0L); + mc.renderTickCounter = new RenderTickCounter((float)(20.0*speed.value), 0L, this::targetTickRate); current = speed.value; } @@ -33,6 +33,12 @@ public class Timer extends Module public void onDisable() { super.onDisable(); - mc.renderTickCounter = new RenderTickCounter(20.0f, 0L); + mc.renderTickCounter = new RenderTickCounter(20.0f, 0L, this::targetTickRate); + } + + public float targetTickRate(float millis) + { + if(!enabled) return 50.0f; + return (float)(50.0/speed.value); } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 31a03d5..cf8ea5c 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "moonlight", - "version": "${version}", + "version": "v0.1.1", "name": "Moonlight Meadows", "description": "Utility mod with a focus on stability.", @@ -29,7 +29,7 @@ ], "depends": { - "fabricloader": ">=0.14.21", + "fabricloader": ">=0.15.1", "fabric-api": "*", "minecraft": "~1.20", "java": ">=17"