Compare commits
24 Commits
0.2.0-alph
...
0.3.1-alph
| Author | SHA1 | Date | |
|---|---|---|---|
| b876173ae2 | |||
| c565f74e47 | |||
| 658915ddb9 | |||
|
|
d49e797f0e | ||
| 6e30715e60 | |||
| cef53fd3a1 | |||
| 18097684ba | |||
| dcdc583e18 | |||
| 23d289f9f7 | |||
| a3d7f9463b | |||
| 766a9740d6 | |||
| 2507e806f3 | |||
| 976e91c837 | |||
| 7197e75cb4 | |||
| 9266a89dc3 | |||
| b3c608b0eb | |||
| 17efcd379f | |||
| c25bb19cf9 | |||
| 842ed01212 | |||
| 2c2a902280 | |||
| 33419b9ebc | |||
| 972af6719d | |||
| 4a339a6ee5 | |||
| 530f280842 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,4 +13,5 @@
|
||||
!gradlew.bat
|
||||
!LICENSE
|
||||
!readme.md
|
||||
!settings.gradle
|
||||
!settings.gradle
|
||||
!run/
|
||||
11
README.md
11
README.md
@@ -1,19 +1,22 @@
|
||||
<div align="center">
|
||||
|
||||
<img src="src/main/resources/assets/smooth-chunks/icon.png" width="100">
|
||||
<img src="src/main/resources/assets/animated-chunks/icon.png" width="100">
|
||||
|
||||
# Smooth Chunks
|
||||
# Animated Chunks
|
||||
|
||||
[](https://fabricmc.net)
|
||||

|
||||
|
||||
[](https://modrinth.com/mod/animated-chunks)
|
||||
[](https://curseforge.com/minecraft/mc-mods/animated-chunks)
|
||||
|
||||
An enhanecd fork of [cadenkriese's mod](https://github.com/cadenkriese/smooth-chunks) for the latest versions of the game, with a completely different code base.
|
||||
|
||||
</div>
|
||||
|
||||
## What is this?
|
||||
|
||||
Smooth Chunks is a Fabric mod that adds animations of currently loading chunks. This makes chunk loading generally seem much more pleasant than them appearing out of thin air. There are multiple built-in animations and ease types, and if this isnt't enough, there's an API which will allow you to add your own animations and eases (with ease :trollface:)
|
||||
Animated Chunks is a Fabric mod that adds animations of currently loading chunks. This makes chunk loading generally seem much more pleasant than them appearing out of thin air. There are multiple built-in animations and ease types, and if this isnt't enough, there's an API which will allow you to add your own animations and eases<br/>(with ease :trollface:)
|
||||
|
||||
Generally, this is what you'd call an "eye-candy" mod.
|
||||
|
||||
@@ -44,7 +47,7 @@ Generally, this is what you'd call an "eye-candy" mod.
|
||||
|
||||
## Future plans
|
||||
|
||||
In the future, I plan to extend the scope of this mod to not only smoothen the chunk loading, but entity spawning/despawning/dying, liquid flowing, crops growing etc.
|
||||
In the future, I plan to extend the scope of this mod to not only smoothen the chunk loading, but entity spawning/despawning/dying, liquid flowing, crops growing etc. and support Sodium.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -96,5 +96,5 @@ publishing {
|
||||
}
|
||||
}
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/smooth-chunks.accesswidener")
|
||||
accessWidenerPath = file("src/main/resources/animated-chunks.accesswidener")
|
||||
}
|
||||
|
||||
@@ -3,18 +3,15 @@
|
||||
org.gradle.jvmargs=-Xmx4G
|
||||
|
||||
# Fabric Properties
|
||||
minecraft_version=1.18.2
|
||||
yarn_mappings=1.18.2+build.1
|
||||
loader_version=0.13.3
|
||||
minecraft_version=1.19.2
|
||||
yarn_mappings=1.19.2+build.17
|
||||
loader_version=0.14.9
|
||||
|
||||
# Mod Properties
|
||||
mod_version=0.2.0
|
||||
mod_version=0.3.0
|
||||
maven_group=me.topchetoeu
|
||||
archives_base_name=smooth-chunks
|
||||
archives_base_name=animated-chunks
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.47.8+1.18.2
|
||||
|
||||
autoconfig_version=3.3.1
|
||||
cloth_version=3.2.24
|
||||
modmenu_version=3.2.1
|
||||
fabric_version=[0.0.0,)
|
||||
modmenu_version=[4.0.0,)
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
269
gradlew
vendored
269
gradlew
vendored
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,67 +17,101 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# 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.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
@@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
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.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
@@ -106,80 +140,95 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
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.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
package me.topchetoeu.smoothchunks;
|
||||
package me.topchetoeu.animatedchunks;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||
|
||||
import me.topchetoeu.smoothchunks.Manager.RegisterEvent;
|
||||
import me.topchetoeu.smoothchunks.animation.Animation;
|
||||
import me.topchetoeu.smoothchunks.animation.FallAnimation;
|
||||
import me.topchetoeu.smoothchunks.animation.FlyInAnimation;
|
||||
import me.topchetoeu.smoothchunks.animation.ProgressManager;
|
||||
import me.topchetoeu.smoothchunks.animation.RiseAnimation;
|
||||
import me.topchetoeu.smoothchunks.animation.ScaleAnimation;
|
||||
import me.topchetoeu.smoothchunks.easing.Ease;
|
||||
import me.topchetoeu.smoothchunks.easing.ElasticEase;
|
||||
import me.topchetoeu.smoothchunks.easing.LinearEase;
|
||||
import me.topchetoeu.smoothchunks.easing.SineEase;
|
||||
import me.topchetoeu.smoothchunks.gui.SmoothChunksScreen;
|
||||
import me.topchetoeu.smoothchunks.easing.QuadraticEase;
|
||||
import me.topchetoeu.animatedchunks.Manager.RegisterEvent;
|
||||
import me.topchetoeu.animatedchunks.animation.Animation;
|
||||
import me.topchetoeu.animatedchunks.animation.FallAnimation;
|
||||
import me.topchetoeu.animatedchunks.animation.FlyInAnimation;
|
||||
import me.topchetoeu.animatedchunks.animation.ProgressManager;
|
||||
import me.topchetoeu.animatedchunks.animation.RiseAnimation;
|
||||
import me.topchetoeu.animatedchunks.animation.ScaleAnimation;
|
||||
import me.topchetoeu.animatedchunks.easing.Ease;
|
||||
import me.topchetoeu.animatedchunks.easing.ElasticEase;
|
||||
import me.topchetoeu.animatedchunks.easing.LinearEase;
|
||||
import me.topchetoeu.animatedchunks.easing.QuadraticEase;
|
||||
import me.topchetoeu.animatedchunks.easing.SineEase;
|
||||
import me.topchetoeu.animatedchunks.gui.AnimatedChunksScreen;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientChunkEvents;
|
||||
import net.fabricmc.fabric.api.event.Event;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
|
||||
private static SmoothChunks instance;
|
||||
public static SmoothChunks getInstance() {
|
||||
public final class AnimatedChunks implements ClientModInitializer, ModMenuApi {
|
||||
private static AnimatedChunks instance;
|
||||
public static AnimatedChunks getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
|
||||
.description("Animation takes off very quickly, overshoots, then undershoots, until it reaches the end.")
|
||||
);
|
||||
|
||||
manager.set("elastic");
|
||||
manager.set("sine");
|
||||
}
|
||||
private static void registerAnimations(Manager<Animation> manager) {
|
||||
manager.register(new Descriptor<>(new RiseAnimation(), "rise")
|
||||
@@ -134,7 +134,7 @@ public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
|
||||
registerEases(ease);
|
||||
registerAnimations(animation);
|
||||
|
||||
config = new ConfigManager(new File("config/smooth-chunks.dat"), animation, ease);
|
||||
config = new ConfigManager(new File("config/animated-chunks.dat"), animation, ease, progress);
|
||||
|
||||
EASES_REGISTERING.invoker().register(ease);
|
||||
ANIMATIONS_REGISTERING.invoker().register(animation);
|
||||
@@ -148,7 +148,7 @@ public final class SmoothChunks implements ClientModInitializer, ModMenuApi {
|
||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
return (Screen parent) -> {
|
||||
var _this = getInstance();
|
||||
return new SmoothChunksScreen(parent, _this.animation, _this.ease, _this.config);
|
||||
return new AnimatedChunksScreen(parent, _this.animation, _this.ease, _this.config, _this.progress);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package me.topchetoeu.animatedchunks;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import me.topchetoeu.animatedchunks.animation.Animation;
|
||||
import me.topchetoeu.animatedchunks.animation.ProgressManager;
|
||||
import me.topchetoeu.animatedchunks.easing.Ease;
|
||||
|
||||
public class ConfigManager {
|
||||
public final File configFile;
|
||||
private final Manager<Animation> animation;
|
||||
private final Manager<Ease> ease;
|
||||
private final ProgressManager progress;
|
||||
|
||||
private String readString(InputStream reader) throws IOException {
|
||||
String res = "";
|
||||
int i;
|
||||
|
||||
while ((i = reader.read()) != 0) {
|
||||
if (i == -1) break;
|
||||
res += (char)i;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
private void writeString(OutputStream writer, String str) throws IOException {
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
writer.write((byte)str.charAt(i));
|
||||
}
|
||||
writer.write((byte)0);
|
||||
}
|
||||
|
||||
private float readFloat(InputStream reader) throws IOException {
|
||||
try {
|
||||
var bytes = reader.readNBytes(4);
|
||||
return ByteBuffer.wrap(bytes).getFloat();
|
||||
}
|
||||
catch (IndexOutOfBoundsException e) {
|
||||
throw new EOFException();
|
||||
}
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
try {
|
||||
var reader = new FileInputStream(configFile);
|
||||
String animation = readString(reader);
|
||||
String ease = readString(reader);
|
||||
float duration = readFloat(reader);
|
||||
|
||||
reader.close();
|
||||
|
||||
this.animation.set(animation);
|
||||
this.ease.set(ease);
|
||||
this.progress.setDuration(duration);
|
||||
}
|
||||
catch (IOException e) {
|
||||
save();
|
||||
}
|
||||
}
|
||||
public void save() {
|
||||
try {
|
||||
var writer = new FileOutputStream(configFile);
|
||||
writeString(writer, animation.get().getName());
|
||||
writeString(writer, ease.get().getName());
|
||||
writer.write(ByteBuffer.allocate(4).putFloat(progress.getDuration()).array());
|
||||
writer.close();
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public ConfigManager(File configFile, Manager<Animation> animation, Manager<Ease> ease, ProgressManager progress) {
|
||||
this.configFile = configFile;
|
||||
this.animation = animation;
|
||||
this.ease = ease;
|
||||
this.progress = progress;
|
||||
|
||||
reload();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks;
|
||||
package me.topchetoeu.animatedchunks;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks;
|
||||
package me.topchetoeu.animatedchunks;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.animation;
|
||||
package me.topchetoeu.animatedchunks.animation;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.animation;
|
||||
package me.topchetoeu.animatedchunks.animation;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.animation;
|
||||
package me.topchetoeu.animatedchunks.animation;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.Vec2f;
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.animation;
|
||||
package me.topchetoeu.animatedchunks.animation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.animation;
|
||||
package me.topchetoeu.animatedchunks.animation;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.animation;
|
||||
package me.topchetoeu.animatedchunks.animation;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.easing;
|
||||
package me.topchetoeu.animatedchunks.easing;
|
||||
|
||||
public interface Ease {
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.easing;
|
||||
package me.topchetoeu.animatedchunks.easing;
|
||||
|
||||
public class ElasticEase implements Ease {
|
||||
private float steepness = 1;
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.easing;
|
||||
package me.topchetoeu.animatedchunks.easing;
|
||||
|
||||
public class LinearEase implements Ease {
|
||||
public float ease(float x) {
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.easing;
|
||||
package me.topchetoeu.animatedchunks.easing;
|
||||
|
||||
public class QuadraticEase implements Ease {
|
||||
@Override
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.easing;
|
||||
package me.topchetoeu.animatedchunks.easing;
|
||||
|
||||
public class SineEase implements Ease {
|
||||
@Override
|
||||
@@ -1,26 +1,27 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.sound.PositionedSoundInstance;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.math.ColorHelper.Argb;
|
||||
import me.topchetoeu.smoothchunks.ConfigManager;
|
||||
import me.topchetoeu.smoothchunks.Manager;
|
||||
import me.topchetoeu.smoothchunks.animation.Animation;
|
||||
import me.topchetoeu.smoothchunks.easing.Ease;
|
||||
import me.topchetoeu.smoothchunks.gui.Section.OrderType;
|
||||
import me.topchetoeu.animatedchunks.ConfigManager;
|
||||
import me.topchetoeu.animatedchunks.Manager;
|
||||
import me.topchetoeu.animatedchunks.animation.Animation;
|
||||
import me.topchetoeu.animatedchunks.animation.ProgressManager;
|
||||
import me.topchetoeu.animatedchunks.easing.Ease;
|
||||
import me.topchetoeu.animatedchunks.gui.Section.OrderType;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
||||
public class SmoothChunksScreen extends Screen {
|
||||
public class AnimatedChunksScreen extends Screen {
|
||||
public final Screen parent;
|
||||
private final HorizontalSection mainSection = new HorizontalSection();
|
||||
private final Manager<Animation> animation;
|
||||
private final Manager<Ease> ease;
|
||||
private final ConfigManager config;
|
||||
private final ProgressManager progress;
|
||||
|
||||
public static void playClick() {
|
||||
MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0f));
|
||||
@@ -47,7 +48,6 @@ public class SmoothChunksScreen extends Screen {
|
||||
mainSection.order = OrderType.Justified;
|
||||
mainSection.children.addSelectableChild(selectionsSection());
|
||||
mainSection.children.addSelectableChild(previewSection());
|
||||
// setZOffset(parent.getZOffset() + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,32 +82,51 @@ public class SmoothChunksScreen extends Screen {
|
||||
buttonSection.order = OrderType.Justified;
|
||||
buttonSection.children.addChild(new Label(
|
||||
5, 7,
|
||||
new LiteralText(manager.get().getDisplayName()).formatted(Formatting.BOLD)
|
||||
Text.of(manager.get().getDisplayName()).copy().formatted(Formatting.BOLD)
|
||||
));
|
||||
buttonSection.children.addSelectableChild(new Button(5, 5, Text.of("Select ..."), () -> client.setScreen(selectScreen)));
|
||||
res.children.addSelectableChild(buttonSection);
|
||||
res.children.addChild(new Label(
|
||||
5, 3,
|
||||
new LiteralText("Author: " + manager.get().getAuthorOrDefault())
|
||||
Text.of("Author: " + manager.get().getAuthorOrDefault())
|
||||
).setMaxWidth(width / 2));
|
||||
res.children.addChild(new Label(
|
||||
5, 3,
|
||||
new LiteralText(manager.get().getDescriptionOrDefault()).formatted(Formatting.ITALIC)
|
||||
Text.of(manager.get().getDescriptionOrDefault()).copy().formatted(Formatting.ITALIC)
|
||||
).setMaxWidth(width / 2));
|
||||
|
||||
return res;
|
||||
}
|
||||
private Section durationSection() {
|
||||
var res = new HorizontalSection();
|
||||
res.setTargetWidth(width / 2);
|
||||
var input = new NumberInput(res, 5, 5, progress.getDuration(), (sender, val) -> {
|
||||
if (val <= 0) sender.invalid = true;
|
||||
else {
|
||||
progress.setDuration(val);
|
||||
sender.invalid = false;
|
||||
}
|
||||
});
|
||||
input.width = (int)res.getTargetWidth();
|
||||
res.x = res.y = 5;
|
||||
res.title = Text.of("Duration:");
|
||||
res.children.addSelectableChild(input);
|
||||
return res;
|
||||
}
|
||||
private Section selectionsSection() {
|
||||
var res = new HorizontalSection();
|
||||
res.x = res.y = 5;
|
||||
res.title = Text.of("Animation config:");
|
||||
res.children.addSelectableChild(selectionSection(animation, "Animation"));
|
||||
res.children.addSelectableChild(selectionSection(ease, "Ease"));
|
||||
res.children.addSelectableChild(durationSection());
|
||||
return res;
|
||||
}
|
||||
public SmoothChunksScreen(Screen parent, Manager<Animation> animation, Manager<Ease> ease, ConfigManager config) {
|
||||
super(Text.of("Smooth Chunks Config"));
|
||||
|
||||
public AnimatedChunksScreen(Screen parent, Manager<Animation> animation, Manager<Ease> ease, ConfigManager config, ProgressManager progress) {
|
||||
super(Text.of("Animated Chunks Config"));
|
||||
config.reload();
|
||||
this.progress = progress;
|
||||
this.animation = animation;
|
||||
this.ease = ease;
|
||||
this.config = config;
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
public class Boundbox implements BoundboxProvider {
|
||||
public float x, y, width, height;
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
public interface BoundboxProvider {
|
||||
float getX();
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
@@ -83,7 +83,7 @@ public class Button extends DrawableHelper implements Drawable, Element, Selecta
|
||||
matrices.push();
|
||||
matrices.translate(this.x, this.y, getZOffset());
|
||||
|
||||
hovered = isMouseOver(x, y);
|
||||
hovered = isMouseOver(x - this.x, y - this.y);
|
||||
|
||||
if (hovered) {
|
||||
fill(matrices, 0, 0, (int)getWidth(), (int)getHeight(), Argb.getArgb(32, 255, 255, 255));
|
||||
@@ -109,9 +109,6 @@ public class Button extends DrawableHelper implements Drawable, Element, Selecta
|
||||
public boolean isMouseOver(double x, double y) {
|
||||
if (clicked) return true;
|
||||
|
||||
x -= this.x;
|
||||
y -= this.y;
|
||||
|
||||
return x >= 0 && x < getWidth() && y >= 0 && y < getHeight();
|
||||
}
|
||||
|
||||
@@ -136,7 +133,7 @@ public class Button extends DrawableHelper implements Drawable, Element, Selecta
|
||||
@Override
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int button) {
|
||||
if (button != 0) return false;
|
||||
if (isMouseOver(mouseX, mouseY)) {
|
||||
if (isMouseOver(mouseX - this.x, mouseY - this.x)) {
|
||||
clicked = true;
|
||||
hovered = true;
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import me.topchetoeu.smoothchunks.SmoothChunks;
|
||||
import me.topchetoeu.animatedchunks.AnimatedChunks;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.Drawable;
|
||||
import net.minecraft.client.gui.DrawableHelper;
|
||||
@@ -89,7 +89,7 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
|
||||
return z < 3;
|
||||
}
|
||||
|
||||
private static void myFill(MatrixStack matrices, float x1, float y1, float x2, float y2, float a, float r, float g, float b) {
|
||||
public static void myFill(MatrixStack matrices, float x1, float y1, float x2, float y2, float a, float r, float g, float b) {
|
||||
if (x1 < x2) {
|
||||
float tmp = x1;
|
||||
x1 = x2;
|
||||
@@ -121,15 +121,13 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.disableCull();
|
||||
RenderSystem.disableTexture();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
RenderSystem.setShader(GameRenderer::getPositionColorShader);
|
||||
bufferBuilder.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR);
|
||||
bufferBuilder.vertex(p1.getX(), p1.getY(), p1.getZ()).color(r, g, b, a).next();
|
||||
bufferBuilder.vertex(p2.getX(), p2.getY(), p2.getZ()).color(r, g, b, a).next();
|
||||
bufferBuilder.vertex(p3.getX(), p3.getY(), p3.getZ()).color(r, g, b, a).next();
|
||||
bufferBuilder.vertex(p4.getX(), p4.getY(), p4.getZ()).color(r, g, b, a).next();
|
||||
bufferBuilder.end();
|
||||
BufferRenderer.draw(bufferBuilder);
|
||||
BufferRenderer.drawWithShader(bufferBuilder.end());
|
||||
RenderSystem.enableTexture();
|
||||
RenderSystem.disableBlend();
|
||||
}
|
||||
@@ -170,8 +168,8 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
|
||||
if (progress < 0) progress = 0;
|
||||
if (progress > 1) progress = 1;
|
||||
if (progress < 0.999) {
|
||||
float _progress = SmoothChunks.getInstance().getEaseManager().getValue().ease(progress);
|
||||
SmoothChunks.getInstance().getAnimationManager().getValue().animate(
|
||||
float _progress = AnimatedChunks.getInstance().getEaseManager().getValue().ease(progress);
|
||||
AnimatedChunks.getInstance().getAnimationManager().getValue().animate(
|
||||
_progress, matrices,
|
||||
x * 16, 0, y * 16, 0, 0, 0
|
||||
);
|
||||
@@ -187,7 +185,7 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
|
||||
matrices.pop();
|
||||
}
|
||||
private void renderChunks(MatrixStack matrices, float delta, int n) {
|
||||
duration = SmoothChunks.getInstance().getProgressManager().getDuration();
|
||||
duration = AnimatedChunks.getInstance().getProgressManager().getDuration();
|
||||
// globalProgress += (lastTime - (lastTime = System.nanoTime())) / -1000000000f;
|
||||
globalProgress += delta * 0.05f;
|
||||
matrices.push();
|
||||
@@ -247,9 +245,6 @@ public class ChunkPreview extends DrawableHelper implements Drawable, Element, S
|
||||
public boolean isMouseOver(double x, double y) {
|
||||
if (clicked) return true;
|
||||
|
||||
x -= this.x;
|
||||
y -= this.y;
|
||||
|
||||
return x >= 0 && x < getWidth() && y >= 0 && y < getHeight();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
@@ -16,7 +16,7 @@ public final class HorizontalSection extends Section {
|
||||
|
||||
private float targetWidth;
|
||||
|
||||
public float getTargetWidth(float width) {
|
||||
public float getTargetWidth() {
|
||||
return this.targetWidth;
|
||||
}
|
||||
public void setTargetWidth(float width) {
|
||||
207
src/main/java/me/topchetoeu/animatedchunks/gui/Input.java
Normal file
207
src/main/java/me/topchetoeu/animatedchunks/gui/Input.java
Normal file
@@ -0,0 +1,207 @@
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager.DstFactor;
|
||||
import com.mojang.blaze3d.platform.GlStateManager.SrcFactor;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.Drawable;
|
||||
import net.minecraft.client.gui.DrawableHelper;
|
||||
import net.minecraft.client.gui.Element;
|
||||
import net.minecraft.client.gui.ParentElement;
|
||||
import net.minecraft.client.gui.Selectable;
|
||||
import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
|
||||
import net.minecraft.client.gui.screen.narration.NarrationPart;
|
||||
import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.ColorHelper.Argb;
|
||||
|
||||
public class Input extends DrawableHelper implements Drawable, Element, Selectable, BoundboxProvider {
|
||||
public interface InputAction {
|
||||
void onInput(Input sender, String val);
|
||||
}
|
||||
|
||||
public final MinecraftClient client;
|
||||
private boolean clicked = false;
|
||||
private boolean hovered = false;
|
||||
private boolean isFocused() {
|
||||
return parent.getFocused() == this;
|
||||
}
|
||||
private int index = 0;
|
||||
|
||||
private final ParentElement parent;
|
||||
private String content = "";
|
||||
public int paddingX = 5, paddingY = 2;
|
||||
private float time = 0;
|
||||
public int x, y, width = 100;
|
||||
public boolean invalid = false;
|
||||
public InputAction action = null;
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
public Input setContent(String val) {
|
||||
if (index > val.length()) index = val.length();
|
||||
content = val;
|
||||
action.onInput(this, val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public float getX() {
|
||||
return x;
|
||||
}
|
||||
public float getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public float getWidth() {
|
||||
return width;
|
||||
}
|
||||
public float getHeight() {
|
||||
return 1 + paddingY * 2 + client.textRenderer.fontHeight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendNarrations(NarrationMessageBuilder msgBuilder) {
|
||||
msgBuilder.put(NarrationPart.HINT, "Input");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelectionType getType() {
|
||||
if (isFocused()) return SelectionType.FOCUSED;
|
||||
if (hovered) return SelectionType.HOVERED;
|
||||
return SelectionType.NONE;
|
||||
}
|
||||
@Override
|
||||
public boolean changeFocus(boolean lookForwards) {
|
||||
if (isFocused()) {
|
||||
parent.setFocused(null);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
parent.setFocused(this);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private void renderCursor(MatrixStack matrices, float delta) {
|
||||
time += delta / 20;
|
||||
|
||||
if ((int)(time * 2) % 2 != 0) return;
|
||||
|
||||
// RenderSystem.enableBlend();
|
||||
RenderSystem.setShader(GameRenderer::getPositionColorShader);
|
||||
RenderSystem.disableCull();
|
||||
RenderSystem.disableTexture();
|
||||
RenderSystem.blendFuncSeparate(SrcFactor.ONE_MINUS_DST_COLOR, DstFactor.ONE_MINUS_SRC_COLOR, SrcFactor.ONE, DstFactor.ZERO);
|
||||
|
||||
float x1 = paddingX + client.textRenderer.getWidth(content.substring(0, index)) + 1;
|
||||
float x2 = x1 + 1;
|
||||
// if (index < content.length()) {
|
||||
// x2 += client.textRenderer.getWidth("" + content.charAt(index)) - 2;
|
||||
// }
|
||||
float y1 = paddingY;
|
||||
float y2 = y1 + client.textRenderer.fontHeight;
|
||||
|
||||
ChunkPreview.myFill(matrices, x1, y1, x2, y2, 1, 1, 1, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(MatrixStack matrices, int x, int y, float delta) {
|
||||
int white = Argb.getArgb(255, 255, 255, 255);
|
||||
matrices.push();
|
||||
matrices.translate(this.x, this.y, getZOffset());
|
||||
|
||||
hovered = isMouseOver(x, y);
|
||||
|
||||
// if (hovered) {
|
||||
// fill(matrices, 0, 0, (int)getWidth(), (int)getHeight(), Argb.getArgb(32, 255, 255, 255));
|
||||
// }
|
||||
if (clicked) {
|
||||
fill(matrices, 0, 0, (int)getWidth(), (int)getHeight(), Argb.getArgb(127, 255, 255, 255));
|
||||
}
|
||||
|
||||
client.textRenderer.draw(matrices, content, paddingX + 1, paddingY + 1, white);
|
||||
if (isFocused()) renderCursor(matrices, delta);
|
||||
|
||||
if (invalid) white = 0xFFFF0000;
|
||||
|
||||
drawHorizontalLine(matrices, 0, (int)getWidth() - 1, 0, white);
|
||||
drawVerticalLine(matrices, 0, 0, (int)getHeight() - 1, white);
|
||||
drawVerticalLine(matrices, (int)getWidth() - 1, 0, (int)getHeight() - 1, white);
|
||||
drawHorizontalLine(matrices, 0, (int)getWidth() - 1, (int)getHeight() - 1, white);
|
||||
|
||||
// if (focused) {
|
||||
// }
|
||||
|
||||
matrices.pop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMouseOver(double x, double y) {
|
||||
if (clicked) return true;
|
||||
|
||||
return x >= 0 && x < getWidth() && y >= 0 && y < getHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean charTyped(char chr, int modifiers) {
|
||||
content = content.substring(0, index) + chr + content.substring(index);
|
||||
action.onInput(this, content);
|
||||
index++;
|
||||
time = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
|
||||
if (keyCode == GLFW.GLFW_KEY_BACKSPACE && index > 0) {
|
||||
content = content.substring(0, index - 1) + content.substring(index);
|
||||
action.onInput(this, content);
|
||||
index--;
|
||||
}
|
||||
if (keyCode == GLFW.GLFW_KEY_DELETE && index < content.length()) {
|
||||
time = 0;
|
||||
content = content.substring(0, index) + content.substring(index + 1);
|
||||
action.onInput(this, content);
|
||||
}
|
||||
if (keyCode == GLFW.GLFW_KEY_RIGHT && index < content.length()) {
|
||||
index++;
|
||||
}
|
||||
if (keyCode == GLFW.GLFW_KEY_LEFT && index > 0) {
|
||||
index--;
|
||||
}
|
||||
time = 0;
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int button) {
|
||||
if (button != 0) return false;
|
||||
if (isMouseOver(mouseX - this.x, mouseY - this.y)) {
|
||||
clicked = true;
|
||||
hovered = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
// return true;
|
||||
}
|
||||
@Override
|
||||
public boolean mouseReleased(double mouseX, double mouseY, int button) {
|
||||
if (button != 0) return false;
|
||||
if (clicked) {
|
||||
clicked = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Input(ParentElement parent, int x, int y, InputAction input) {
|
||||
this.parent = parent;
|
||||
this.action = input;
|
||||
this.client = MinecraftClient.getInstance();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import net.minecraft.client.gui.ParentElement;
|
||||
|
||||
public class NumberInput extends Input {
|
||||
public interface InputAction {
|
||||
void input(NumberInput sender, float number);
|
||||
}
|
||||
private float value;
|
||||
public InputAction action;
|
||||
|
||||
public float getValue() {
|
||||
return value;
|
||||
}
|
||||
public NumberInput setValue(float val) {
|
||||
value = val;
|
||||
action.input(this, val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public NumberInput(ParentElement parent, int x, int y, float value, InputAction action) {
|
||||
super(parent, x, y, null);
|
||||
super.action = (sender, val) -> {
|
||||
try {
|
||||
invalid = false;
|
||||
setValue(Float.parseFloat(val.trim()));
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
invalid = true;
|
||||
}
|
||||
};
|
||||
this.action = action;
|
||||
setContent(Float.toString(value));
|
||||
}
|
||||
public NumberInput(ParentElement parent, int x, int y, InputAction action) {
|
||||
this(parent, x, y, 0, action);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -181,7 +181,7 @@ public abstract class Section extends AbstractParentElement implements Drawable,
|
||||
@Override
|
||||
public Optional<Element> hoveredElement(double mouseX, double mouseY) {
|
||||
for (Selectable element : this.children.selectables) {
|
||||
var offset = children.getOffsetAndPos(element);
|
||||
var offset = children.getOffset(element);
|
||||
if (element.getType() != SelectionType.HOVERED || !((Element)element).isMouseOver(mouseX - offset.x, mouseY - offset.y)) continue;
|
||||
return Optional.of((Element)element);
|
||||
}
|
||||
@@ -191,8 +191,8 @@ public abstract class Section extends AbstractParentElement implements Drawable,
|
||||
@Override
|
||||
public boolean mouseScrolled(double mouseX, double mouseY, double delta) {
|
||||
for (Element element : this.children()) {
|
||||
var offset = children.getOffsetAndPos(element);
|
||||
if (!element.mouseScrolled(mouseX - offset.x, mouseY - offset.y, delta)) continue;
|
||||
var offset = children.getOffset(element);
|
||||
if (!element.mouseScrolled(mouseX - offset.x - x, mouseY - offset.y - y, delta)) continue;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -200,8 +200,8 @@ public abstract class Section extends AbstractParentElement implements Drawable,
|
||||
@Override
|
||||
public boolean mouseClicked(double mouseX, double mouseY, int button) {
|
||||
for (Element element : this.children()) {
|
||||
var offset = children.getOffsetAndPos(element);
|
||||
if (!element.mouseClicked(mouseX - offset.x, mouseY - offset.y, button)) continue;
|
||||
var offset = children.getOffset(element);
|
||||
if (!element.mouseClicked(mouseX - offset.x - x, mouseY - offset.y - y, button)) continue;
|
||||
this.setFocused(element);
|
||||
if (button == 0) {
|
||||
this.setDragging(true);
|
||||
@@ -214,8 +214,8 @@ public abstract class Section extends AbstractParentElement implements Drawable,
|
||||
@Override
|
||||
public void mouseMoved(double mouseX, double mouseY) {
|
||||
for (Element element : this.children()) {
|
||||
var offset = children.getOffsetAndPos(element);
|
||||
element.mouseMoved(mouseX - offset.x, mouseY - offset.y);
|
||||
var offset = children.getOffset(element);
|
||||
element.mouseMoved(mouseX - offset.x - x, mouseY - offset.y - y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,8 +224,8 @@ public abstract class Section extends AbstractParentElement implements Drawable,
|
||||
this.setDragging(false);
|
||||
|
||||
for (Element element : children.get()) {
|
||||
var offset = children.getOffsetAndPos(element);
|
||||
if (element.mouseReleased(mouseX - (int)offset.x, mouseY - (int)offset.y, button)) return true;
|
||||
var offset = children.getOffset(element);
|
||||
if (element.mouseReleased(mouseX - (int)offset.x - x, mouseY - (int)offset.y - y, button)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -234,8 +234,8 @@ public abstract class Section extends AbstractParentElement implements Drawable,
|
||||
@Override
|
||||
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) {
|
||||
if (this.getFocused() != null && this.isDragging() && button == 0) {
|
||||
var offset = children.getOffsetAndPos(getFocused());
|
||||
return this.getFocused().mouseDragged(mouseX - offset.x, mouseY - offset.y, button, deltaX, deltaY);
|
||||
var offset = children.getOffset(getFocused());
|
||||
return this.getFocused().mouseDragged(mouseX - offset.x - x, mouseY - offset.y - y, button, deltaX, deltaY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1,15 +1,14 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import me.topchetoeu.smoothchunks.Descriptor;
|
||||
import me.topchetoeu.smoothchunks.Manager;
|
||||
import me.topchetoeu.animatedchunks.Descriptor;
|
||||
import me.topchetoeu.animatedchunks.Manager;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.math.ColorHelper.Argb;
|
||||
@@ -45,11 +44,11 @@ public class SelectionScreen<T> extends Screen {
|
||||
float y = 0;
|
||||
matrices.push();
|
||||
matrices.translate(20, 5, 0);
|
||||
textRenderer.draw(matrices, new LiteralText(element.getDisplayNameOrDefault()).formatted(Formatting.BOLD), 0, y, 0xFFFFFFFF);
|
||||
textRenderer.draw(matrices, Text.of(element.getDisplayNameOrDefault()).copy().formatted(Formatting.BOLD), 0, y, 0xFFFFFFFF);
|
||||
y += textRenderer.fontHeight + 3;
|
||||
textRenderer.draw(matrices, new LiteralText("Author: " + element.getAuthorOrDefault()), 0, y, 0xFFFFFFFF);
|
||||
textRenderer.draw(matrices, Text.of("Author: " + element.getAuthorOrDefault()), 0, y, 0xFFFFFFFF);
|
||||
y += textRenderer.fontHeight + 2;
|
||||
y += drawWarpedText(textRenderer, matrices, new LiteralText(element.getDescriptionOrDefault()).formatted(Formatting.ITALIC), 0, (int)y, width - 40);
|
||||
y += drawWarpedText(textRenderer, matrices, Text.of(element.getDescriptionOrDefault()).copy().formatted(Formatting.ITALIC), 0, (int)y, width - 40);
|
||||
y += 5;
|
||||
matrices.pop();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.gui;
|
||||
package me.topchetoeu.animatedchunks.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
@@ -1,11 +1,11 @@
|
||||
package me.topchetoeu.smoothchunks.mixin;
|
||||
package me.topchetoeu.animatedchunks.mixin;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import me.topchetoeu.smoothchunks.SmoothChunks;
|
||||
import me.topchetoeu.animatedchunks.AnimatedChunks;
|
||||
import net.minecraft.client.render.chunk.ChunkBuilder;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@@ -17,6 +17,6 @@ abstract class BuiltChunkMixin {
|
||||
// ci.cancel();
|
||||
// return;
|
||||
BlockPos origin = ((ChunkBuilder.BuiltChunk)(Object)this).getOrigin();
|
||||
SmoothChunks.getInstance().getProgressManager().unload(origin.getX(), 0, origin.getZ());
|
||||
AnimatedChunks.getInstance().getProgressManager().unload(origin.getX(), 0, origin.getZ());
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package me.topchetoeu.smoothchunks.mixin;
|
||||
package me.topchetoeu.animatedchunks.mixin;
|
||||
|
||||
import net.minecraft.client.gl.GlUniform;
|
||||
import net.minecraft.client.render.BuiltChunkStorage;
|
||||
@@ -7,8 +7,8 @@ import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.render.LightmapTextureManager;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.client.render.Shader;
|
||||
import net.minecraft.client.render.VertexFormat;
|
||||
import net.minecraft.client.render.WorldRenderer;
|
||||
import net.minecraft.client.render.WorldRenderer.ChunkInfo;
|
||||
import net.minecraft.client.render.chunk.ChunkBuilder.BuiltChunk;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.Matrix4f;
|
||||
@@ -21,8 +21,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.ObjectListIterator;
|
||||
import me.topchetoeu.smoothchunks.SmoothChunks;
|
||||
import me.topchetoeu.smoothchunks.animation.ProgressManager;
|
||||
import me.topchetoeu.animatedchunks.AnimatedChunks;
|
||||
import me.topchetoeu.animatedchunks.animation.ProgressManager;
|
||||
|
||||
@Mixin(WorldRenderer.class)
|
||||
abstract class WorldRendererMixin {
|
||||
@@ -31,7 +31,7 @@ abstract class WorldRendererMixin {
|
||||
@Accessor abstract BuiltChunkStorage getChunks();
|
||||
|
||||
private ProgressManager getProgressManager() {
|
||||
return SmoothChunks.getInstance().getProgressManager();
|
||||
return AnimatedChunks.getInstance().getProgressManager();
|
||||
}
|
||||
|
||||
@Inject(method = "render", at = @At(value = "HEAD"))
|
||||
@@ -53,9 +53,9 @@ abstract class WorldRendererMixin {
|
||||
|
||||
getProgressManager().unloadAllFar((int)((WorldRenderer)(Object)this).getViewDistance(), chunkX, chunkY, chunkZ);
|
||||
}
|
||||
@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gl/VertexBuffer;drawVertices()V"), locals=LocalCapture.CAPTURE_FAILHARD)
|
||||
@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gl/VertexBuffer;drawElements()V"), locals=LocalCapture.CAPTURE_FAILHARD)
|
||||
private void renderChunkBefore(RenderLayer renderLayer, MatrixStack matrices, double playerX, double playerY, double playerZ, Matrix4f positionMatrix, CallbackInfo ci,
|
||||
boolean _1, ObjectListIterator<?> _2, VertexFormat _3, Shader shader, GlUniform _4, boolean _5, WorldRenderer.ChunkInfo _6, BuiltChunk chunk) {
|
||||
boolean _1, ObjectListIterator<?> _2, Shader shader, GlUniform _4, ChunkInfo _6, BuiltChunk chunk) {
|
||||
|
||||
matrices.push();
|
||||
|
||||
@@ -63,20 +63,18 @@ abstract class WorldRendererMixin {
|
||||
int y = chunk.getOrigin().getY();
|
||||
int z = chunk.getOrigin().getZ();
|
||||
|
||||
shader.fogStart.set(Float.POSITIVE_INFINITY);
|
||||
|
||||
if (getProgressManager().isChunkLoaded(x, 0, z)) {
|
||||
float progress = getProgressManager().getChunkProgress(x, 0, z);
|
||||
|
||||
if (progress < 0.999) {
|
||||
progress = SmoothChunks.getInstance().getEaseManager().getValue().ease(progress);
|
||||
progress = AnimatedChunks.getInstance().getEaseManager().getValue().ease(progress);
|
||||
|
||||
float centerX = (float)playerX - x;
|
||||
float centerY = (float)playerY - y;
|
||||
float centerZ = (float)playerZ - z;
|
||||
|
||||
matrices.translate(-centerX, -centerY, -centerZ);
|
||||
SmoothChunks.getInstance().getAnimationManager().getValue().animate(progress, matrices, x, y, z, (float)playerX, (float)playerY, (float)playerZ);
|
||||
AnimatedChunks.getInstance().getAnimationManager().getValue().animate(progress, matrices, x, y, z, (float)playerX, (float)playerY, (float)playerZ);
|
||||
matrices.translate(centerX, centerY, centerZ);
|
||||
}
|
||||
}
|
||||
@@ -88,9 +86,9 @@ abstract class WorldRendererMixin {
|
||||
matrices.pop();
|
||||
shader.bind();
|
||||
}
|
||||
@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gl/VertexBuffer;drawVertices()V"), locals=LocalCapture.CAPTURE_FAILHARD)
|
||||
@Inject(method = "renderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gl/VertexBuffer;drawElements()V"), locals=LocalCapture.CAPTURE_FAILHARD)
|
||||
private void renderChunkAfter(RenderLayer renderLayer, MatrixStack matrices, double playerX, double playerY, double playerZ, Matrix4f positionMatrix, CallbackInfo ci,
|
||||
boolean _1, ObjectListIterator<?> _2, VertexFormat _3, Shader _4, GlUniform _5, boolean _6, WorldRenderer.ChunkInfo _7, BuiltChunk chunk) {
|
||||
boolean _1, ObjectListIterator<?> _2, Shader shader, GlUniform _4, ChunkInfo _6, BuiltChunk chunk) {
|
||||
int x = chunk.getOrigin().getX();
|
||||
int z = chunk.getOrigin().getZ();
|
||||
getProgressManager().load(x, 0, z);
|
||||
@@ -1,74 +0,0 @@
|
||||
package me.topchetoeu.smoothchunks;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
|
||||
import me.topchetoeu.smoothchunks.animation.Animation;
|
||||
import me.topchetoeu.smoothchunks.easing.Ease;
|
||||
|
||||
public class ConfigManager {
|
||||
public final File configFile;
|
||||
private final Manager<Animation> animation;
|
||||
private final Manager<Ease> ease;
|
||||
|
||||
private String readString(InputStreamReader reader) throws IOException {
|
||||
String res = "";
|
||||
int i;
|
||||
|
||||
while ((i = reader.read()) != 0) {
|
||||
if (i == -1) break;
|
||||
res += (char)i;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
private void writeString(OutputStreamWriter writer, String str) throws IOException {
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
writer.write((char)str.charAt(i));
|
||||
}
|
||||
writer.write(0);
|
||||
}
|
||||
|
||||
public void reload() {
|
||||
try {
|
||||
var reader = new FileReader(configFile);
|
||||
String animation = readString(reader);
|
||||
String ease = readString(reader);
|
||||
|
||||
reader.close();
|
||||
|
||||
this.animation.set(animation);
|
||||
this.ease.set(ease);
|
||||
}
|
||||
catch (FileNotFoundException e) {
|
||||
save();
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
public void save() {
|
||||
try {
|
||||
var writer = new FileWriter(configFile);
|
||||
writeString(writer, animation.get().getName());
|
||||
writeString(writer, ease.get().getName());
|
||||
writer.close();
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public ConfigManager(File configFile, Manager<Animation> animation, Manager<Ease> ease) {
|
||||
this.configFile = configFile;
|
||||
this.animation = animation;
|
||||
this.ease = ease;
|
||||
|
||||
reload();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "me.topchetoeu.smoothchunks.mixin",
|
||||
"package": "me.topchetoeu.animatedchunks.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [],
|
||||
"client": [
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -1,29 +1,33 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "smooth-chunks",
|
||||
"version": "0.2.0",
|
||||
"name": "Smooth Chunks",
|
||||
"description": "Smooth chunk load animations.",
|
||||
"id": "animated-chunks",
|
||||
"version": "0.3.0",
|
||||
"name": "Animated Chunks",
|
||||
"description": "Animated chunk load animations.",
|
||||
"authors": [ "TopchetoEU" ],
|
||||
"license": "MIT",
|
||||
"icon": "assets/smooth-chunks/icon.png",
|
||||
"icon": "assets/animated-chunks/icon.png",
|
||||
"environment": "client",
|
||||
"accessWidener": "smooth-chunks.accesswidener",
|
||||
"accessWidener": "animated-chunks.accesswidener",
|
||||
"entrypoints": {
|
||||
"client": [
|
||||
"me.topchetoeu.smoothchunks.SmoothChunks"
|
||||
"me.topchetoeu.animatedchunks.AnimatedChunks"
|
||||
],
|
||||
"modmenu": [
|
||||
"me.topchetoeu.smoothchunks.SmoothChunks"
|
||||
"me.topchetoeu.animatedchunks.AnimatedChunks"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"smooth-chunks.mixins.json"
|
||||
"animated-chunks.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.9.3+build.207",
|
||||
"fabric": "*",
|
||||
"minecraft": ">=1.18.2",
|
||||
"modmenu": ">=3.2.1"
|
||||
"minecraft": "=1.19.2",
|
||||
"modmenu": ">=4.0.0"
|
||||
},
|
||||
"breaks": {
|
||||
"sodium": "*",
|
||||
"iris": "*"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user