This commit is contained in:
kawaiizenbo 2023-12-12 18:38:02 -07:00
parent b84aac97b2
commit 08031c32ba
9 changed files with 38 additions and 26 deletions

View file

@ -1,6 +1,6 @@
# Moonlight Meadows Utility Mod for Modern versions of Minecraft # 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. Default ClickGUI Key is Right Alt.
@ -19,5 +19,5 @@ Grab the latest nightly build [here](https://nightly.link/kawaiizenbo/MoonlightM
## Disclaimer ## 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. This project is not affiliated with Mojang or Microsoft.

View file

@ -1,5 +1,5 @@
plugins { plugins {
id 'fabric-loom' version '1.0-SNAPSHOT' id 'fabric-loom' version '1.4-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }

View file

@ -4,14 +4,14 @@ org.gradle.parallel=true
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.20.2 minecraft_version=1.20.4
yarn_mappings=1.20.2+build.4 yarn_mappings=1.20.4+build.2
loader_version=0.14.22 loader_version=0.15.1
# Mod Properties # Mod Properties
mod_version = 0.1.0 mod_version = 0.1.1
maven_group = me.kawaiizenbo maven_group = me.kawaiizenbo
archives_base_name = moonlight archives_base_name = moonlight
# Dependencies # Dependencies
fabric_version=0.90.0+1.20.2 fabric_version=0.91.2+1.20.4

Binary file not shown.

View file

@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

29
gradlew vendored
View file

@ -83,10 +83,8 @@ done
# This is normally unused # This is normally unused
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} 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
# 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"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@ -133,18 +131,21 @@ location of your Java installation."
fi fi
else else
JAVACMD=java 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 Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi fi
fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #( case $MAX_FD in #(
max*) max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. # 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 ) || MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit" warn "Could not query maximum file descriptor limit"
esac esac
@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #( '' | soft) :;; #(
*) *)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. # 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" || ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD" warn "Could not set maximum file descriptor limit to $MAX_FD"
esac esac
@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done done
fi fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
# shell script including quotes and variable substitutions, so put them in DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# 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 -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \

View file

@ -24,7 +24,7 @@ public class Moonlight implements ModInitializer
public static final Moonlight INSTANCE = new Moonlight(); public static final Moonlight INSTANCE = new Moonlight();
public static final Logger LOGGER = LoggerFactory.getLogger("Moonlight"); public static final Logger LOGGER = LoggerFactory.getLogger("Moonlight");
public static final String clientTag = ColorUtils.aqua + "Moonlight Meadows"; 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 Config CONFIG = new Config();
public static int uiColorA = 0xFF55FFFF; public static int uiColorA = 0xFF55FFFF;
public static int uiColor = 0x55FFFF; public static int uiColor = 0x55FFFF;

View file

@ -19,7 +19,7 @@ public class Timer extends Module
public void onEnable() public void onEnable()
{ {
super.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; current = speed.value;
} }
@ -33,6 +33,12 @@ public class Timer extends Module
public void onDisable() public void onDisable()
{ {
super.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);
} }
} }

View file

@ -1,7 +1,7 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"id": "moonlight", "id": "moonlight",
"version": "${version}", "version": "v0.1.1",
"name": "Moonlight Meadows", "name": "Moonlight Meadows",
"description": "Utility mod with a focus on stability.", "description": "Utility mod with a focus on stability.",
@ -29,7 +29,7 @@
], ],
"depends": { "depends": {
"fabricloader": ">=0.14.21", "fabricloader": ">=0.15.1",
"fabric-api": "*", "fabric-api": "*",
"minecraft": "~1.20", "minecraft": "~1.20",
"java": ">=17" "java": ">=17"