mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-19 15:09:18 +00:00
Cleanup
This commit is contained in:
22
.github/ISSUE_TEMPLATE/bug_report.md
vendored
22
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,9 +1,6 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: Bug
|
||||
assignees: ''
|
||||
name: Bug report about: Create a report to help us improve title: ''
|
||||
labels: Bug assignees: ''
|
||||
|
||||
---
|
||||
|
||||
@@ -12,6 +9,7 @@ A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
@@ -24,11 +22,13 @@ A clear and concise description of what you expected to happen.
|
||||
If applicable, add screenshots or video recordings to help explain your problem.
|
||||
|
||||
**Server and Plugin Information**
|
||||
- Installed plugins:
|
||||
- Iris Version:
|
||||
- Server Platform and Version [eg: PaperSpigot 1.16.3 #240]:
|
||||
- Operating System (if applicable):
|
||||
- Server Logs:
|
||||
|
||||
- Installed plugins:
|
||||
- Iris Version:
|
||||
- Server Platform and Version [eg: PaperSpigot 1.16.3 #240]:
|
||||
- Operating System (if applicable):
|
||||
- Server Logs:
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here, server timings reports, Iris dump information, complete console log etc. Please do not make Pastebin dumps or screenshot expire.
|
||||
Add any other context about the problem here, server timings reports, Iris dump information, complete console log etc.
|
||||
Please do not make Pastebin dumps or screenshot expire.
|
||||
|
||||
7
.github/ISSUE_TEMPLATE/feature_request.md
vendored
7
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,9 +1,6 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: Enhancement, Addition
|
||||
assignees: ''
|
||||
name: Feature request about: Suggest an idea for this project title: ''
|
||||
labels: Enhancement, Addition assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,5 +2,7 @@
|
||||
|
||||
For 1.16 and below, see the 1.14-1.16 branch. The master branch is for the latest version of minecraft.
|
||||
|
||||
# [Support](https://discord.gg/3xxPTpT) **|** [Documentation](https://docs.volmit.com/iris/) **|** [Git](https://github.com/IrisDimensions)
|
||||
# [Support](https://discord.gg/3xxPTpT) **|** [Documentation](https://docs.volmit.com/iris/) **
|
||||
|** [Git](https://github.com/IrisDimensions)
|
||||
|
||||

|
||||
|
||||
@@ -39,7 +39,7 @@ registerCustomOutputTask('Coco', 'C:/Users/sjoer/Documents/MCServer/plugins');
|
||||
def registerCustomOutputTask(name, path) {
|
||||
tasks.register('build' + name, Copy) {
|
||||
group('development')
|
||||
outputs.upToDateWhen{false}
|
||||
outputs.upToDateWhen { false }
|
||||
dependsOn ':shadowJar'
|
||||
from(file('build/libs/Iris-' + version + '-all.jar'))
|
||||
into(file(path))
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
org.gradle.daemon=true
|
||||
org.gradle.parallel=true
|
||||
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
|
||||
1
gradle/wrapper/gradle-wrapper.properties
vendored
1
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -15,7 +15,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
|
||||
|
||||
203
gradlew
vendored
203
gradlew
vendored
@@ -28,22 +28,22 @@
|
||||
# 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
|
||||
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
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
SAVED="$(pwd)"
|
||||
cd "$(dirname \"$PRG\")/" >/dev/null
|
||||
APP_HOME="$(pwd -P)"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=$(basename "$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"'
|
||||
@@ -51,15 +51,15 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
warn() {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
die() {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
@@ -67,119 +67,118 @@ 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
|
||||
;;
|
||||
MINGW*)
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP*)
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
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"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
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"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ]; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
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.
|
||||
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
|
||||
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"
|
||||
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\""
|
||||
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"`
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ]; then
|
||||
APP_HOME=$(cygpath --path --mixed "$APP_HOME")
|
||||
CLASSPATH=$(cygpath --path --mixed "$CLASSPATH")
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
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)"
|
||||
# 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
|
||||
# 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" ;;
|
||||
esac
|
||||
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" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
save() {
|
||||
for i; do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/"; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# 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"
|
||||
|
||||
134
plains.json
134
plains.json
@@ -1,69 +1,69 @@
|
||||
{
|
||||
"children": [],
|
||||
"decorators": [],
|
||||
"objects": [],
|
||||
"name": "Plains",
|
||||
"layers": [
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 3,
|
||||
"palette": [
|
||||
"GRASS_BLOCK"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 1,
|
||||
"palette": [
|
||||
"DIRT"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 3,
|
||||
"palette": [
|
||||
"DIRT",
|
||||
"COARSE_DIRT"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 6,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 2341,
|
||||
"palette": [
|
||||
"STONE",
|
||||
"ANDESITE",
|
||||
"STONE"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
}
|
||||
],
|
||||
"childShrinkFactor": 1.55,
|
||||
"derivative": "THE_VOID",
|
||||
"auxiliaryGenerators": [
|
||||
{
|
||||
"offsetX": 0,
|
||||
"offsetZ": 0.01,
|
||||
"min": 1,
|
||||
"seed": 1336,
|
||||
"max": 5,
|
||||
"zoom": 3.065
|
||||
},
|
||||
{
|
||||
"offsetX": 0,
|
||||
"offsetZ": 0,
|
||||
"min": 1.01,
|
||||
"seed": 1339,
|
||||
"max": 2,
|
||||
"zoom": 1.6
|
||||
}
|
||||
],
|
||||
"highHeight": 3.66669,
|
||||
"lowHeight": 31.5
|
||||
"children": [],
|
||||
"decorators": [],
|
||||
"objects": [],
|
||||
"name": "Plains",
|
||||
"layers": [
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 3,
|
||||
"palette": [
|
||||
"GRASS_BLOCK"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 1,
|
||||
"palette": [
|
||||
"DIRT"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 1,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 3,
|
||||
"palette": [
|
||||
"DIRT",
|
||||
"COARSE_DIRT"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
},
|
||||
{
|
||||
"minHeight": 6,
|
||||
"terrainZoom": 5,
|
||||
"maxHeight": 2341,
|
||||
"palette": [
|
||||
"STONE",
|
||||
"ANDESITE",
|
||||
"STONE"
|
||||
],
|
||||
"dispersion": "SCATTER"
|
||||
}
|
||||
],
|
||||
"childShrinkFactor": 1.55,
|
||||
"derivative": "THE_VOID",
|
||||
"auxiliaryGenerators": [
|
||||
{
|
||||
"offsetX": 0,
|
||||
"offsetZ": 0.01,
|
||||
"min": 1,
|
||||
"seed": 1336,
|
||||
"max": 5,
|
||||
"zoom": 3.065
|
||||
},
|
||||
{
|
||||
"offsetX": 0,
|
||||
"offsetZ": 0,
|
||||
"min": 1.01,
|
||||
"seed": 1339,
|
||||
"max": 2,
|
||||
"zoom": 1.6
|
||||
}
|
||||
],
|
||||
"highHeight": 3.66669,
|
||||
"lowHeight": 31.5
|
||||
}
|
||||
@@ -23,14 +23,13 @@ import com.volmit.iris.core.command.CommandIris;
|
||||
import com.volmit.iris.core.command.PermissionIris;
|
||||
import com.volmit.iris.core.command.world.CommandLocate;
|
||||
import com.volmit.iris.core.link.BKLink;
|
||||
import com.volmit.iris.core.link.CitizensLink;
|
||||
import com.volmit.iris.core.link.MultiverseCoreLink;
|
||||
import com.volmit.iris.core.link.MythicMobsLink;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.engine.object.IrisCompat;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.EngineCompositeGenerator;
|
||||
import com.volmit.iris.engine.object.IrisCompat;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
@@ -73,7 +72,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
public static BKLink linkBK;
|
||||
public static MultiverseCoreLink linkMultiverseCore;
|
||||
public static MythicMobsLink linkMythicMobs;
|
||||
public static CitizensLink linkCitizens;
|
||||
private static final Queue<Runnable> syncJobs = new ShurikenQueue<>();
|
||||
public static boolean customModels = doesSupportCustomModels();
|
||||
public static boolean awareEntities = doesSupportAwareness();
|
||||
@@ -96,8 +94,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
installDataPacks();
|
||||
}
|
||||
|
||||
public File getDatapacksFolder()
|
||||
{
|
||||
public File getDatapacksFolder() {
|
||||
File props = new File("server.properties");
|
||||
|
||||
if (props.exists()) {
|
||||
@@ -424,12 +421,11 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
}
|
||||
|
||||
public static void debug(String string) {
|
||||
if(!IrisSettings.get().getGeneral().isDebug())
|
||||
{
|
||||
if (!IrisSettings.get().getGeneral().isDebug()) {
|
||||
return;
|
||||
}
|
||||
|
||||
msg( C.LIGHT_PURPLE+ "" + C.BOLD+ string);
|
||||
msg(C.LIGHT_PURPLE + "" + C.BOLD + string);
|
||||
}
|
||||
|
||||
public static void verbose(String string) {
|
||||
@@ -535,21 +531,17 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
return IrisSettings.get().getGenerator().isMcaPregenerator();
|
||||
}
|
||||
|
||||
public static synchronized void reportError(Throwable e)
|
||||
{
|
||||
if(IrisSettings.get().getGeneral().isDebug())
|
||||
{
|
||||
public static synchronized void reportError(Throwable e) {
|
||||
if (IrisSettings.get().getGeneral().isDebug()) {
|
||||
String n = e.getClass().getCanonicalName() + "-" + e.getStackTrace()[0].getClassName() + "-" + e.getStackTrace()[0].getLineNumber();
|
||||
|
||||
if(e.getCause() != null)
|
||||
{
|
||||
if (e.getCause() != null) {
|
||||
n += "-" + e.getCause().getStackTrace()[0].getClassName() + "-" + e.getCause().getStackTrace()[0].getLineNumber();
|
||||
}
|
||||
|
||||
File f = instance.getDataFile("debug", "caught-exceptions", n + ".txt");
|
||||
|
||||
if(!f.exists())
|
||||
{
|
||||
if (!f.exists()) {
|
||||
J.attempt(() -> {
|
||||
PrintWriter pw = new PrintWriter(f);
|
||||
pw.println("Thread: " + Thread.currentThread().getName());
|
||||
|
||||
@@ -20,13 +20,13 @@ package com.volmit.iris.core;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.data.DirectWorldWriter;
|
||||
import com.volmit.iris.engine.data.nbt.io.NBTUtil;
|
||||
import com.volmit.iris.engine.data.nbt.io.NamedTag;
|
||||
import com.volmit.iris.engine.data.nbt.tag.CompoundTag;
|
||||
import com.volmit.iris.engine.data.nbt.tag.IntTag;
|
||||
import com.volmit.iris.engine.data.nbt.tag.ListTag;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
package com.volmit.iris.core;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.data.loader.ObjectResourceLoader;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.engine.data.loader.ResourceLoader;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -20,13 +20,13 @@ package com.volmit.iris.core;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.core.report.Report;
|
||||
import com.volmit.iris.core.report.ReportType;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.IrisWorldCreator;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
@@ -259,14 +259,10 @@ public class IrisProject {
|
||||
assert gx != null;
|
||||
double v = (double) gx.getGenerated() / (double) req;
|
||||
|
||||
if(sender.isPlayer())
|
||||
{
|
||||
if (sender.isPlayer()) {
|
||||
sender.player().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(C.WHITE + "Generating " + Form.pc(v) + ((C.GRAY + " (" + (req - gx.getGenerated()) + " Left)"))));
|
||||
J.sleep(50);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
} else {
|
||||
sender.sendMessage(C.WHITE + "Generating " + Form.pc(v) + ((C.GRAY + " (" + (req - gx.getGenerated()) + " Left)")));
|
||||
J.sleep(1000);
|
||||
}
|
||||
@@ -295,10 +291,7 @@ public class IrisProject {
|
||||
if (sender.isPlayer()) {
|
||||
assert world != null;
|
||||
sender.player().teleport(world.getSpawnLocation());
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
} else {
|
||||
sender.sendMessage(C.WHITE + "Generating Complete!");
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ package com.volmit.iris.core;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.cache.AtomicCache;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.io.IO;
|
||||
|
||||
@@ -24,8 +24,8 @@ import com.volmit.iris.core.command.object.CommandIrisObject;
|
||||
import com.volmit.iris.core.command.studio.CommandIrisStudio;
|
||||
import com.volmit.iris.core.command.what.CommandIrisWhat;
|
||||
import com.volmit.iris.core.command.world.*;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ package com.volmit.iris.core.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.core.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.edit.JigsawEditor;
|
||||
import com.volmit.iris.engine.object.IrisJigsawPiece;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.core.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.edit.JigsawEditor;
|
||||
import com.volmit.iris.engine.object.IrisObject;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
package com.volmit.iris.core.command.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.jigsaw.PlannedStructure;
|
||||
import com.volmit.iris.engine.object.IrisJigsawStructure;
|
||||
import com.volmit.iris.engine.object.IrisPosition;
|
||||
import com.volmit.iris.engine.jigsaw.PlannedStructure;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
@@ -20,8 +20,8 @@ package com.volmit.iris.core.command.object;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.core.command.object;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.ProjectManager;
|
||||
import com.volmit.iris.core.WandManager;
|
||||
import com.volmit.iris.engine.object.IrisObject;
|
||||
|
||||
@@ -21,9 +21,9 @@ package com.volmit.iris.core.command.object;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.WandManager;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.data.Cuboid;
|
||||
import com.volmit.iris.util.data.Cuboid.CuboidDirection;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
import org.bukkit.Location;
|
||||
|
||||
@@ -21,9 +21,9 @@ package com.volmit.iris.core.command.object;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.WandManager;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.data.Cuboid;
|
||||
import com.volmit.iris.util.data.Cuboid.CuboidDirection;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
import org.bukkit.Location;
|
||||
|
||||
@@ -20,8 +20,8 @@ package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ package com.volmit.iris.core.command.studio;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.gui.NoiseExplorer;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.gui.NoiseExplorer;
|
||||
import com.volmit.iris.engine.object.IrisGenerator;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
public class CommandIrisStudioExplorerGenerator extends MortarCommand {
|
||||
public CommandIrisStudioExplorerGenerator() {
|
||||
|
||||
@@ -20,10 +20,10 @@ package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
@@ -103,9 +103,7 @@ public class CommandIrisStudioGoto extends MortarCommand {
|
||||
J.s(() -> sender.player().teleport(l));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
else {
|
||||
} else {
|
||||
sender.sendMessage(args[0] + " is not a biome or region in this dimension. (Biome teleportation works best!");
|
||||
}
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.object.InventorySlotType;
|
||||
import com.volmit.iris.engine.object.IrisLootTable;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.InventorySlotType;
|
||||
import com.volmit.iris.engine.object.IrisLootTable;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
|
||||
@@ -28,10 +28,8 @@ import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
public class CommandIrisStudioMap extends MortarCommand
|
||||
{
|
||||
public CommandIrisStudioMap()
|
||||
{
|
||||
public class CommandIrisStudioMap extends MortarCommand {
|
||||
public CommandIrisStudioMap() {
|
||||
super("map", "render");
|
||||
setDescription("Render a map (gui outside of mc)");
|
||||
requiresPermission(Iris.perm.studio);
|
||||
@@ -44,16 +42,13 @@ public class CommandIrisStudioMap extends MortarCommand
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(MortarSender sender, String[] args)
|
||||
{
|
||||
if(!IrisSettings.get().isStudio())
|
||||
{
|
||||
public boolean handle(MortarSender sender, String[] args) {
|
||||
if (!IrisSettings.get().isStudio()) {
|
||||
sender.sendMessage("To use Iris Studio, please enable studio in Iris/settings.json");
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!IrisSettings.get().isUseServerLaunchedGuis())
|
||||
{
|
||||
if (!IrisSettings.get().isUseServerLaunchedGuis()) {
|
||||
sender.sendMessage("To use Iris Guis, please enable serverLaunchedGuis in Iris/settings.json");
|
||||
return true;
|
||||
}
|
||||
@@ -74,8 +69,7 @@ public class CommandIrisStudioMap extends MortarCommand
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getArgsUsage()
|
||||
{
|
||||
protected String getArgsUsage() {
|
||||
return "[pack] [seed=1337]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
|
||||
public class CommandIrisStudioPackage extends MortarCommand {
|
||||
public CommandIrisStudioPackage() {
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.noise.CNG;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisProject;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.noise.CNG;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
|
||||
@@ -20,10 +20,10 @@ package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.object.IrisEntity;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.IrisEntity;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.core.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.IrisProject;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.core.command.what;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.Command;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ package com.volmit.iris.core.command.what;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.core.command.what;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
import com.volmit.iris.util.plugin.MortarSender;
|
||||
import org.bukkit.Material;
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
package com.volmit.iris.core.command.what;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisObject;
|
||||
import com.volmit.iris.engine.object.IrisObjectPlacement;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
package com.volmit.iris.core.command.world;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.gui.Pregenerator;
|
||||
import com.volmit.iris.core.link.MultiverseCoreLink;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.core.gui.Pregenerator;
|
||||
import com.volmit.iris.engine.IrisWorldCreator;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.plugin.MortarCommand;
|
||||
|
||||
@@ -106,10 +106,12 @@ public class CommandIrisPregen extends MortarCommand {
|
||||
}
|
||||
try {
|
||||
new Pregenerator(world, getVal(args[0]) * 2);
|
||||
} catch (NumberFormatException e) {Iris.reportError(e);
|
||||
} catch (NumberFormatException e) {
|
||||
Iris.reportError(e);
|
||||
sender.sendMessage("Invalid argument in command");
|
||||
return true;
|
||||
} catch (NullPointerException e) {Iris.reportError(e);
|
||||
} catch (NullPointerException e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
sender.sendMessage("No radius specified (check error in console)");
|
||||
} catch (HeadlessException e) {
|
||||
@@ -130,12 +132,15 @@ public class CommandIrisPregen extends MortarCommand {
|
||||
World world = Bukkit.getWorld(args[1]);
|
||||
try {
|
||||
new Pregenerator(world, getVal(args[0]) * 2);
|
||||
} catch (NumberFormatException e) {Iris.reportError(e);
|
||||
} catch (NumberFormatException e) {
|
||||
Iris.reportError(e);
|
||||
sender.sendMessage("Invalid argument in command");
|
||||
return true;
|
||||
} catch (NullPointerException e) {Iris.reportError(e);
|
||||
} catch (NullPointerException e) {
|
||||
Iris.reportError(e);
|
||||
sender.sendMessage("Not all required parameters specified");
|
||||
} catch (HeadlessException e) {Iris.reportError(e);
|
||||
} catch (HeadlessException e) {
|
||||
Iris.reportError(e);
|
||||
sender.sendMessage("If you are seeing this and are using a hosted server, please turn off 'useServerLaunchedGUIs' in the settings");
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ public class JigsawEditor implements Listener {
|
||||
if (e.getPlayer().equals(player)) {
|
||||
try {
|
||||
target = player.getTargetBlockExact(7).getLocation();
|
||||
} catch (Throwable ex) {Iris.reportError(ex);
|
||||
} catch (Throwable ex) {
|
||||
Iris.reportError(ex);
|
||||
target = player.getLocation();
|
||||
return;
|
||||
}
|
||||
@@ -147,7 +148,8 @@ public class JigsawEditor implements Listener {
|
||||
exit();
|
||||
try {
|
||||
IO.writeAll(targetSaveLocation, new JSONObject(new Gson().toJson(piece)).toString(4));
|
||||
} catch (IOException e) {Iris.reportError(e);
|
||||
} catch (IOException e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,6 @@ public class IrisRenderer {
|
||||
}
|
||||
|
||||
public void set(double worldX, double worldZ) {
|
||||
((Engine) renderer).getWorld().getBlockAt((int) worldX, 20, (int) worldZ).setType(Material.DIAMOND_BLOCK);
|
||||
renderer.getWorld().getBlockAt((int) worldX, 20, (int) worldZ).setType(Material.DIAMOND_BLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ package com.volmit.iris.core.gui;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.IrisComplex;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
@@ -80,7 +80,7 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
private int h = 0;
|
||||
private double lx = 0;
|
||||
private double lz = 0;
|
||||
private KList<LivingEntity> lastEntities = new KList<>();
|
||||
private final KList<LivingEntity> lastEntities = new KList<>();
|
||||
private double ox = 0;
|
||||
private double oz = 0;
|
||||
private double hx = 0;
|
||||
@@ -88,10 +88,10 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
private double oxp = 0;
|
||||
private double ozp = 0;
|
||||
private Engine engine;
|
||||
private KMap<String, Long> notifications = new KMap<>();
|
||||
private final KMap<String, Long> notifications = new KMap<>();
|
||||
double tfps = 240D;
|
||||
int ltc = 3;
|
||||
private ChronoLatch centities = new ChronoLatch(1000);
|
||||
private final ChronoLatch centities = new ChronoLatch(1000);
|
||||
private final RollingSequence rs = new RollingSequence(512);
|
||||
private final O<Integer> m = new O<>();
|
||||
private int tid = 0;
|
||||
@@ -175,11 +175,10 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
return colorFunction.apply(wx, wz);
|
||||
}
|
||||
|
||||
public void notify(String s)
|
||||
{
|
||||
public void notify(String s) {
|
||||
notifications.put(s, M.ms() + 2500);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
|
||||
@@ -192,12 +191,15 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
}
|
||||
if (e.getKeyCode() == KeyEvent.VK_CONTROL) {
|
||||
control = true;
|
||||
}if (e.getKeyCode() == KeyEvent.VK_SEMICOLON) {
|
||||
}
|
||||
if (e.getKeyCode() == KeyEvent.VK_SEMICOLON) {
|
||||
debug = true;
|
||||
} if (e.getKeyCode() == KeyEvent.VK_SLASH) {
|
||||
}
|
||||
if (e.getKeyCode() == KeyEvent.VK_SLASH) {
|
||||
help = true;
|
||||
helpIgnored = true;
|
||||
} if (e.getKeyCode() == KeyEvent.VK_ALT) {
|
||||
}
|
||||
if (e.getKeyCode() == KeyEvent.VK_ALT) {
|
||||
alt = true;
|
||||
}
|
||||
}
|
||||
@@ -217,7 +219,8 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
if (e.getKeyCode() == KeyEvent.VK_SLASH) {
|
||||
help = false;
|
||||
helpIgnored = true;
|
||||
} if (e.getKeyCode() == KeyEvent.VK_ALT) {
|
||||
}
|
||||
if (e.getKeyCode() == KeyEvent.VK_ALT) {
|
||||
alt = false;
|
||||
}
|
||||
|
||||
@@ -225,19 +228,12 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
if (e.getKeyCode() == KeyEvent.VK_F) {
|
||||
follow = !follow;
|
||||
|
||||
if(player != null && follow)
|
||||
{
|
||||
if (player != null && follow) {
|
||||
notify("Following " + player.getName() + ". Press F to disable");
|
||||
}
|
||||
|
||||
else if(follow)
|
||||
{
|
||||
} else if (follow) {
|
||||
notify("Can't follow, no one is in the world");
|
||||
follow = false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
} else {
|
||||
notify("Follow Off");
|
||||
}
|
||||
|
||||
@@ -253,7 +249,7 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
if (e.getKeyCode() == KeyEvent.VK_P) {
|
||||
lowtile = !lowtile;
|
||||
dump();
|
||||
notify("Rendering "+(lowtile ? "Low" : "High")+" Quality Tiles");
|
||||
notify("Rendering " + (lowtile ? "Low" : "High") + " Quality Tiles");
|
||||
return;
|
||||
}
|
||||
if (e.getKeyCode() == KeyEvent.VK_E) {
|
||||
@@ -284,11 +280,9 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
|
||||
int currentMode = currentType.ordinal();
|
||||
|
||||
for(RenderType i : RenderType.values())
|
||||
{
|
||||
if (e.getKeyChar() == String.valueOf(i.ordinal()+1).charAt(0)) {
|
||||
if(i.ordinal() != currentMode)
|
||||
{
|
||||
for (RenderType i : RenderType.values()) {
|
||||
if (e.getKeyChar() == String.valueOf(i.ordinal() + 1).charAt(0)) {
|
||||
if (i.ordinal() != currentMode) {
|
||||
currentType = i;
|
||||
dump();
|
||||
notify("Rendering " + Form.capitalizeWords(currentType.name().toLowerCase().replaceAll("\\Q_\\E", " ")));
|
||||
@@ -298,14 +292,13 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
}
|
||||
|
||||
if (e.getKeyCode() == KeyEvent.VK_M) {
|
||||
currentType = RenderType.values()[(currentMode+1) % RenderType.values().length];
|
||||
currentType = RenderType.values()[(currentMode + 1) % RenderType.values().length];
|
||||
notify("Rendering " + Form.capitalizeWords(currentType.name().toLowerCase().replaceAll("\\Q_\\E", " ")));
|
||||
dump();
|
||||
}
|
||||
}
|
||||
|
||||
private void dump()
|
||||
{
|
||||
private void dump() {
|
||||
positions.clear();
|
||||
fastpositions.clear();
|
||||
}
|
||||
@@ -418,17 +411,15 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
hz += Math.abs(hz - lz) * 0.36;
|
||||
}
|
||||
|
||||
if(centities.flip())
|
||||
{
|
||||
if (centities.flip()) {
|
||||
J.s(() -> {
|
||||
synchronized (lastEntities)
|
||||
{
|
||||
synchronized (lastEntities) {
|
||||
lastEntities.clear();
|
||||
lastEntities.addAll(world.getEntitiesByClass(LivingEntity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
lowq = Math.max(Math.min((int)M.lerp(8, 28, velocity / 1000D), 28), 8);
|
||||
lowq = Math.max(Math.min((int) M.lerp(8, 28, velocity / 1000D), 28), 8);
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
Graphics2D g = (Graphics2D) gx;
|
||||
w = getWidth();
|
||||
@@ -495,8 +486,7 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
}
|
||||
|
||||
private void hanleFollow() {
|
||||
if(follow && player != null)
|
||||
{
|
||||
if (follow && player != null) {
|
||||
animateTo(player.getLocation().getX(), player.getLocation().getZ());
|
||||
}
|
||||
}
|
||||
@@ -504,21 +494,16 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
private void renderOverlays(Graphics2D g) {
|
||||
renderPlayer(g);
|
||||
|
||||
if(help)
|
||||
{
|
||||
if (help) {
|
||||
renderOverlayHelp(g);
|
||||
}
|
||||
|
||||
else if(debug)
|
||||
{
|
||||
} else if (debug) {
|
||||
renderOverlayDebug(g);
|
||||
}
|
||||
|
||||
renderOverlayLegend(g);
|
||||
|
||||
renderHoverOverlay(g, shift);
|
||||
if(!notifications.isEmpty())
|
||||
{
|
||||
if (!notifications.isEmpty()) {
|
||||
renderNotification(g);
|
||||
}
|
||||
}
|
||||
@@ -526,7 +511,7 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
private void renderOverlayLegend(Graphics2D g) {
|
||||
KList<String> l = new KList<>();
|
||||
l.add("Zoom: " + Form.pc(mscale, 0));
|
||||
l.add("Blocks: " + Form.f((int)mscale * w) + " by " + Form.f((int)mscale * h));
|
||||
l.add("Blocks: " + Form.f((int) mscale * w) + " by " + Form.f((int) mscale * h));
|
||||
l.add("BPP: " + Form.f(mscale, 1));
|
||||
l.add("Render Mode: " + Form.capitalizeWords(currentType.name().toLowerCase().replaceAll("\\Q_\\E", " ")));
|
||||
|
||||
@@ -536,10 +521,8 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
private void renderNotification(Graphics2D g) {
|
||||
drawCardCB(g, notifications.k());
|
||||
|
||||
for(String i : notifications.k())
|
||||
{
|
||||
if(M.ms() > notifications.get(i))
|
||||
{
|
||||
for (String i : notifications.k()) {
|
||||
if (M.ms() > notifications.get(i)) {
|
||||
notifications.remove(i);
|
||||
}
|
||||
}
|
||||
@@ -548,47 +531,40 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
private void renderPlayer(Graphics2D g) {
|
||||
Player b = null;
|
||||
|
||||
for(Player i : world.getPlayers())
|
||||
{
|
||||
for (Player i : world.getPlayers()) {
|
||||
b = i;
|
||||
renderPosition(g, i.getLocation().getX(), i.getLocation().getZ());
|
||||
}
|
||||
|
||||
synchronized (lastEntities)
|
||||
{
|
||||
synchronized (lastEntities) {
|
||||
double dist = Double.MAX_VALUE;
|
||||
LivingEntity h = null;
|
||||
|
||||
for(LivingEntity i : lastEntities)
|
||||
{
|
||||
if(i instanceof Player)
|
||||
{
|
||||
for (LivingEntity i : lastEntities) {
|
||||
if (i instanceof Player) {
|
||||
continue;
|
||||
}
|
||||
|
||||
renderMobPosition(g, i, i.getLocation().getX(), i.getLocation().getZ());
|
||||
if(shift)
|
||||
{
|
||||
if (shift) {
|
||||
double d = i.getLocation().distanceSquared(new Location(i.getWorld(), getWorldX(hx), i.getLocation().getY(), getWorldZ(hz)));
|
||||
|
||||
if(d < dist)
|
||||
{
|
||||
if (d < dist) {
|
||||
dist = d;
|
||||
h = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(h != null && shift)
|
||||
{
|
||||
if (h != null && shift) {
|
||||
g.setColor(Color.red);
|
||||
g.fillRoundRect((int)getScreenX(h.getLocation().getX()) - 10, (int)getScreenZ(h.getLocation().getZ()) - 10, 20, 20, 20, 20);
|
||||
g.fillRoundRect((int) getScreenX(h.getLocation().getX()) - 10, (int) getScreenZ(h.getLocation().getZ()) - 10, 20, 20, 20, 20);
|
||||
KList<String> k = new KList<>();
|
||||
k.add(Form.capitalizeWords(h.getType().name().toLowerCase(Locale.ROOT).replaceAll("\\Q_\\E", " ")) + h.getEntityId());
|
||||
|
||||
k.add("Pos: " + h.getLocation().getBlockX() + ", " + h.getLocation().getBlockY() + ", " + h.getLocation().getBlockZ());
|
||||
k.add("UUID: " + h.getUniqueId().toString());
|
||||
k.add("HP: " + h.getHealth() + " / " + h.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
|
||||
k.add("Pos: " + h.getLocation().getBlockX() + ", " + h.getLocation().getBlockY() + ", " + h.getLocation().getBlockZ());
|
||||
k.add("UUID: " + h.getUniqueId());
|
||||
k.add("HP: " + h.getHealth() + " / " + h.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
|
||||
|
||||
drawCardTR(g, k);
|
||||
}
|
||||
@@ -598,32 +574,26 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
}
|
||||
|
||||
private void animateTo(double wx, double wz) {
|
||||
double cx = getWorldX(getWidth()/2);
|
||||
double cz = getWorldZ(getHeight()/2);
|
||||
double cx = getWorldX(getWidth() / 2);
|
||||
double cz = getWorldZ(getHeight() / 2);
|
||||
ox += (wx - cx);
|
||||
oz += (wz - cz);
|
||||
}
|
||||
|
||||
private void renderPosition(Graphics2D g, double x, double z)
|
||||
{
|
||||
if(texture != null)
|
||||
{
|
||||
g.drawImage(texture, (int)getScreenX(x), (int)getScreenZ(z), 66, 66, (img, infoflags, xx, xy, width, height) -> true);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
private void renderPosition(Graphics2D g, double x, double z) {
|
||||
if (texture != null) {
|
||||
g.drawImage(texture, (int) getScreenX(x), (int) getScreenZ(z), 66, 66, (img, infoflags, xx, xy, width, height) -> true);
|
||||
} else {
|
||||
g.setColor(Color.darkGray);
|
||||
g.fillRoundRect((int)getScreenX(x) - 15, (int)getScreenZ(z) - 15, 30, 30, 15, 15);
|
||||
g.fillRoundRect((int) getScreenX(x) - 15, (int) getScreenZ(z) - 15, 30, 30, 15, 15);
|
||||
g.setColor(Color.cyan.darker().darker());
|
||||
g.fillRoundRect((int)getScreenX(x) - 10, (int)getScreenZ(z) - 10, 20, 20, 10, 10);
|
||||
g.fillRoundRect((int) getScreenX(x) - 10, (int) getScreenZ(z) - 10, 20, 20, 10, 10);
|
||||
}
|
||||
}
|
||||
|
||||
private void renderMobPosition(Graphics2D g, LivingEntity e, double x, double z)
|
||||
{
|
||||
private void renderMobPosition(Graphics2D g, LivingEntity e, double x, double z) {
|
||||
g.setColor(Color.red.darker().darker());
|
||||
g.fillRoundRect((int)getScreenX(x) - 2, (int)getScreenZ(z) - 2, 4, 4, 4, 4);
|
||||
g.fillRoundRect((int) getScreenX(x) - 2, (int) getScreenZ(z) - 2, 4, 4, 4, 4);
|
||||
}
|
||||
|
||||
private void renderHoverOverlay(Graphics2D g, boolean detailed) {
|
||||
@@ -632,22 +602,21 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
KList<String> l = new KList<>();
|
||||
l.add("Biome: " + biome.getName());
|
||||
l.add("Region: " + region.getName() + "(" + region.getLoadKey() + ")");
|
||||
if(detailed)
|
||||
{
|
||||
l.add("Block " + (int)getWorldX(hx) + ", " + (int)getWorldZ(hz));
|
||||
l.add("Chunk " + ((int)getWorldX(hx)>>4) + ", " + ((int)getWorldZ(hz)>>4));
|
||||
l.add("Region " + (((int)getWorldX(hx)>>4)>>5) + ", " + (((int)getWorldZ(hz)>>4)>>5));
|
||||
if (detailed) {
|
||||
l.add("Block " + (int) getWorldX(hx) + ", " + (int) getWorldZ(hz));
|
||||
l.add("Chunk " + ((int) getWorldX(hx) >> 4) + ", " + ((int) getWorldZ(hz) >> 4));
|
||||
l.add("Region " + (((int) getWorldX(hx) >> 4) >> 5) + ", " + (((int) getWorldZ(hz) >> 4) >> 5));
|
||||
l.add("Key: " + biome.getLoadKey());
|
||||
l.add("File: " + biome.getLoadFile());
|
||||
}
|
||||
|
||||
drawCardAt((float)hx, (float)hz, 0, 0, g, l);
|
||||
drawCardAt((float) hx, (float) hz, 0, 0, g, l);
|
||||
}
|
||||
|
||||
private void renderOverlayDebug(Graphics2D g) {
|
||||
KList<String> l = new KList<>();
|
||||
l.add("Velocity: " + (int)velocity);
|
||||
l.add("Center Pos: " + Form.f((int)getWorldX(getWidth()/2)) + ", " + Form.f((int)getWorldZ(getHeight()/2)));
|
||||
l.add("Velocity: " + (int) velocity);
|
||||
l.add("Center Pos: " + Form.f((int) getWorldX(getWidth() / 2)) + ", " + Form.f((int) getWorldZ(getHeight() / 2)));
|
||||
drawCardBL(g, l);
|
||||
}
|
||||
|
||||
@@ -674,32 +643,26 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
drawCardTL(g, l);
|
||||
}
|
||||
|
||||
private void drawCardTL(Graphics2D g, KList<String> text)
|
||||
{
|
||||
private void drawCardTL(Graphics2D g, KList<String> text) {
|
||||
drawCardAt(0, 0, 0, 0, g, text);
|
||||
}
|
||||
|
||||
private void drawCardBR(Graphics2D g, KList<String> text)
|
||||
{
|
||||
private void drawCardBR(Graphics2D g, KList<String> text) {
|
||||
drawCardAt(getWidth(), getHeight(), 1, 1, g, text);
|
||||
}
|
||||
|
||||
private void drawCardBL(Graphics2D g, KList<String> text)
|
||||
{
|
||||
private void drawCardBL(Graphics2D g, KList<String> text) {
|
||||
drawCardAt(0, getHeight(), 0, 1, g, text);
|
||||
}
|
||||
|
||||
private void drawCardTR(Graphics2D g, KList<String> text)
|
||||
{
|
||||
private void drawCardTR(Graphics2D g, KList<String> text) {
|
||||
drawCardAt(getWidth(), 0, 1, 0, g, text);
|
||||
}
|
||||
|
||||
private void open()
|
||||
{
|
||||
private void open() {
|
||||
IrisComplex complex = engine.getFramework().getComplex();
|
||||
File r = null;
|
||||
switch(currentType)
|
||||
{
|
||||
switch (currentType) {
|
||||
case BIOME, LAYER_LOAD, DECORATOR_LOAD, OBJECT_LOAD, HEIGHT -> r = complex.getTrueBiomeStream().get(getWorldX(hx), getWorldZ(hz)).openInVSCode();
|
||||
case BIOME_LAND -> r = complex.getLandBiomeStream().get(getWorldX(hx), getWorldZ(hz)).openInVSCode();
|
||||
case BIOME_SEA -> r = complex.getSeaBiomeStream().get(getWorldX(hx), getWorldZ(hz)).openInVSCode();
|
||||
@@ -710,41 +673,32 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
notify("Opening " + r.getPath() + " in VSCode");
|
||||
}
|
||||
|
||||
private void teleport()
|
||||
{
|
||||
private void teleport() {
|
||||
J.s(() -> {
|
||||
if(player != null)
|
||||
{
|
||||
if (player != null) {
|
||||
double h = engine.getFramework().getComplex().getTrueHeightStream().get(getWorldX(hx), getWorldZ(hz));
|
||||
player.teleport(new Location(player.getWorld(), getWorldX(hx), h, getWorldZ(hz)));
|
||||
notify("Teleporting to " + Form.f((int)getWorldX(hx)) +", " + Form.f((int)h) + ", " + Form.f((int)getWorldZ(hz)));
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
notify("Teleporting to " + Form.f((int) getWorldX(hx)) + ", " + Form.f((int) h) + ", " + Form.f((int) getWorldZ(hz)));
|
||||
} else {
|
||||
notify("No player in world, can't teleport.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void drawCardCB(Graphics2D g, KList<String> text)
|
||||
{
|
||||
drawCardAt(getWidth()/2, getHeight(), 0.5, 1, g, text);
|
||||
private void drawCardCB(Graphics2D g, KList<String> text) {
|
||||
drawCardAt(getWidth() / 2, getHeight(), 0.5, 1, g, text);
|
||||
}
|
||||
|
||||
private void drawCardCT(Graphics2D g, KList<String> text)
|
||||
{
|
||||
drawCardAt(getWidth()/2, 0, 0.5, 0, g, text);
|
||||
private void drawCardCT(Graphics2D g, KList<String> text) {
|
||||
drawCardAt(getWidth() / 2, 0, 0.5, 0, g, text);
|
||||
}
|
||||
|
||||
private void drawCardAt(float x, float y, double pushX, double pushZ, Graphics2D g, KList<String> text)
|
||||
{
|
||||
private void drawCardAt(float x, float y, double pushX, double pushZ, Graphics2D g, KList<String> text) {
|
||||
g.setFont(new Font("Hevetica", Font.BOLD, 16));
|
||||
int h = 0;
|
||||
int w = 0;
|
||||
|
||||
for(String i : text)
|
||||
{
|
||||
for (String i : text) {
|
||||
h += g.getFontMetrics().getHeight();
|
||||
w = Math.max(w, g.getFontMetrics().stringWidth(i));
|
||||
}
|
||||
@@ -752,21 +706,20 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
w += 28;
|
||||
h += 28;
|
||||
|
||||
int cw = (int) ((w+26) * pushX);
|
||||
int ch = (int) ((h+26) * pushZ);
|
||||
int cw = (int) ((w + 26) * pushX);
|
||||
int ch = (int) ((h + 26) * pushZ);
|
||||
|
||||
g.setColor(Color.darkGray);
|
||||
g.fillRect((int)x + 7 + 2-cw , (int)y + 7 + 2-ch, w + 7, h + 7); // Shadow
|
||||
g.fillRect((int) x + 7 + 2 - cw, (int) y + 7 + 2 - ch, w + 7, h + 7); // Shadow
|
||||
g.setColor(Color.gray);
|
||||
g.fillRect((int)x + 7 + 1-cw, (int)y + 7 + 1-ch, w + 7, h + 7); // Shadow
|
||||
g.fillRect((int) x + 7 + 1 - cw, (int) y + 7 + 1 - ch, w + 7, h + 7); // Shadow
|
||||
g.setColor(Color.white);
|
||||
g.fillRect((int)x + 7-cw, (int)y + 7-ch, w + 7, h + 7);
|
||||
g.fillRect((int) x + 7 - cw, (int) y + 7 - ch, w + 7, h + 7);
|
||||
|
||||
g.setColor(Color.black);
|
||||
int m = 0;
|
||||
for(String i : text)
|
||||
{
|
||||
g.drawString(i, x + 14-cw, y + 14 -ch + (++m * g.getFontMetrics().getHeight()));
|
||||
for (String i : text) {
|
||||
g.drawString(i, x + 14 - cw, y + 14 - ch + (++m * g.getFontMetrics().getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -785,7 +738,8 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
try {
|
||||
nv.texture = ImageIO.read(file);
|
||||
frame.setIconImage(ImageIO.read(file));
|
||||
} catch (IOException e) {Iris.reportError(e);
|
||||
} catch (IOException e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -811,13 +765,9 @@ public class IrisVision extends JPanel implements MouseWheelListener, KeyListene
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if(control)
|
||||
{
|
||||
if (control) {
|
||||
teleport();
|
||||
}
|
||||
|
||||
else if(alt)
|
||||
{
|
||||
} else if (alt) {
|
||||
open();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.File;
|
||||
@@ -250,7 +249,8 @@ public class NoiseExplorer extends JPanel implements MouseWheelListener {
|
||||
if (file != null) {
|
||||
try {
|
||||
frame.setIconImage(ImageIO.read(file));
|
||||
} catch (IOException e) {Iris.reportError(e);
|
||||
} catch (IOException e) {
|
||||
Iris.reportError(e);
|
||||
}
|
||||
}
|
||||
frame.setSize(1440, 820);
|
||||
@@ -283,7 +283,8 @@ public class NoiseExplorer extends JPanel implements MouseWheelListener {
|
||||
if (file != null) {
|
||||
try {
|
||||
frame.setIconImage(ImageIO.read(file));
|
||||
} catch (IOException e) {Iris.reportError(e);
|
||||
} catch (IOException e) {
|
||||
Iris.reportError(e);
|
||||
}
|
||||
}
|
||||
frame.setSize(1440, 820);
|
||||
|
||||
@@ -192,8 +192,7 @@ public class Pregenerator implements Listener {
|
||||
flushWorld();
|
||||
}
|
||||
|
||||
while(wait.isNotEmpty())
|
||||
{
|
||||
while (wait.isNotEmpty()) {
|
||||
J.sleep(50);
|
||||
}
|
||||
|
||||
@@ -263,7 +262,7 @@ public class Pregenerator implements Listener {
|
||||
totalChunks.getAndAdd(1024);
|
||||
mcaDefer.add(new ChunkPosition(x, z));
|
||||
install(mcg, mca);
|
||||
} else {
|
||||
} else {
|
||||
totalChunks.getAndAdd(1024);
|
||||
mcaDefer.add(new ChunkPosition(x, z));
|
||||
e.complete();
|
||||
@@ -277,7 +276,8 @@ public class Pregenerator implements Listener {
|
||||
try {
|
||||
Files.move(from.toPath(), to.toPath());
|
||||
return true;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
|
||||
@@ -285,7 +285,8 @@ public class Pregenerator implements Listener {
|
||||
IO.copyFile(from, to);
|
||||
from.delete();
|
||||
return true;
|
||||
} catch (IOException e) {Iris.reportError(e);
|
||||
} catch (IOException e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
|
||||
@@ -307,13 +308,12 @@ public class Pregenerator implements Listener {
|
||||
if (PaperLib.isPaper()) {
|
||||
method.set("PaperAsync (Slow)");
|
||||
|
||||
while(wait.size() > 8192)
|
||||
{
|
||||
while (wait.size() > 8192) {
|
||||
J.sleep(25);
|
||||
}
|
||||
|
||||
mcaIteration.accept(mcaox, mcaoz, (ii, jj) -> {
|
||||
ChunkPosition cx = new ChunkPosition(ii,jj);
|
||||
ChunkPosition cx = new ChunkPosition(ii, jj);
|
||||
PaperLib.getChunkAtAsync(world, ii, jj).thenAccept((c) -> {
|
||||
draw(ii, jj, COLOR_MCA_GENERATE_SLOW_ASYNC);
|
||||
draw(ii, jj, COLOR_MCA_GENERATED);
|
||||
@@ -321,8 +321,7 @@ public class Pregenerator implements Listener {
|
||||
vcax.set(ii);
|
||||
vcaz.set(jj);
|
||||
|
||||
synchronized (wait)
|
||||
{
|
||||
synchronized (wait) {
|
||||
wait.remove(cx);
|
||||
}
|
||||
});
|
||||
@@ -358,7 +357,8 @@ public class Pregenerator implements Listener {
|
||||
|
||||
try {
|
||||
q.pop().run();
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -521,7 +521,8 @@ public class Pregenerator implements Listener {
|
||||
while (order.isNotEmpty()) {
|
||||
try {
|
||||
order.pop().run();
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -590,7 +591,8 @@ public class Pregenerator implements Listener {
|
||||
if (file != null) {
|
||||
try {
|
||||
frame.setIconImage(ImageIO.read(file));
|
||||
} catch (IOException ignored) {Iris.reportError(ignored);
|
||||
} catch (IOException ignored) {
|
||||
Iris.reportError(ignored);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2021 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.volmit.iris.core.link;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class CitizensLink {
|
||||
public CitizensLink() {
|
||||
|
||||
}
|
||||
|
||||
public boolean supported() {
|
||||
return getCitizens() != null;
|
||||
}
|
||||
|
||||
public Plugin getCitizens() {
|
||||
|
||||
return Bukkit.getPluginManager().getPlugin("Citizens");
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,8 @@ public class MultiverseCoreLink {
|
||||
Field f = mvWorldManager.getClass().getDeclaredField("worldsFromTheConfig");
|
||||
f.setAccessible(true);
|
||||
return (Map<String, ?>) f.get(mvWorldManager);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -97,7 +98,8 @@ public class MultiverseCoreLink {
|
||||
Plugin p = getMultiverse();
|
||||
Object mvWorldManager = p.getClass().getDeclaredMethod("getMVWorldManager").invoke(p);
|
||||
mvWorldManager.getClass().getDeclaredMethod("saveWorldsConfig").invoke(mvWorldManager);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -110,7 +112,8 @@ public class MultiverseCoreLink {
|
||||
try {
|
||||
String t = worldNameTypes.get(worldName);
|
||||
return t == null ? defaultType : t;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
return defaultType;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ public class INMS {
|
||||
|
||||
try {
|
||||
return Bukkit.getServer().getClass().getCanonicalName().split("\\Q.\\E")[3];
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
Iris.error("Failed to determine server nms version!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -61,7 +62,8 @@ public class INMS {
|
||||
Iris.info("Craftbukkit " + code + " <-> " + b.getClass().getSimpleName() + " Successfully Bound");
|
||||
|
||||
return b;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@ public class NMSBinding17_1 implements INMSBinding {
|
||||
private Object getBiomeStorage(ChunkGenerator.BiomeGrid g) {
|
||||
try {
|
||||
return getFieldForBiomeStorage(g).get(g);
|
||||
} catch (IllegalAccessException e) {Iris.reportError(e);
|
||||
} catch (IllegalAccessException e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -64,7 +65,8 @@ public class NMSBinding17_1 implements INMSBinding {
|
||||
f = storage.getClass().getDeclaredField("biome");
|
||||
f.setAccessible(true);
|
||||
return f;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
Iris.error(storage.getClass().getCanonicalName());
|
||||
}
|
||||
@@ -128,7 +130,8 @@ public class NMSBinding17_1 implements INMSBinding {
|
||||
f.setAccessible(true);
|
||||
//noinspection unchecked
|
||||
return (T) f.invoke(from, par);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -141,7 +144,8 @@ public class NMSBinding17_1 implements INMSBinding {
|
||||
f.setAccessible(true);
|
||||
//noinspection unchecked
|
||||
return (T) f.invoke(null, par);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -154,7 +158,8 @@ public class NMSBinding17_1 implements INMSBinding {
|
||||
f.setAccessible(true);
|
||||
//noinspection unchecked
|
||||
return (T) f.get(from);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -167,7 +172,8 @@ public class NMSBinding17_1 implements INMSBinding {
|
||||
f.setAccessible(true);
|
||||
//noinspection unchecked
|
||||
return (T) f.get(null);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -230,7 +236,8 @@ public class NMSBinding17_1 implements INMSBinding {
|
||||
try {
|
||||
BiomeStorage s = (BiomeStorage) getFieldForBiomeStorage(chunk).get(chunk);
|
||||
s.setBiome(x, y, z, (BiomeBase) somethingVeryDirty);
|
||||
} catch (IllegalAccessException e) {Iris.reportError(e);
|
||||
} catch (IllegalAccessException e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,17 +20,17 @@ package com.volmit.iris.engine;
|
||||
|
||||
import com.google.common.util.concurrent.AtomicDouble;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.actuator.IrisTerrainActuator;
|
||||
import com.volmit.iris.engine.modifier.IrisCaveModifier;
|
||||
import com.volmit.iris.engine.noise.CNG;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.modifier.IrisCaveModifier;
|
||||
import com.volmit.iris.engine.noise.CNG;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.object.common.CaveResult;
|
||||
import com.volmit.iris.engine.stream.ProceduralStream;
|
||||
import com.volmit.iris.engine.stream.interpolation.Interpolated;
|
||||
import com.volmit.iris.engine.object.common.CaveResult;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.math.M;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
@@ -19,12 +19,15 @@
|
||||
package com.volmit.iris.engine;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.framework.*;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisBiomePaletteLayer;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.engine.object.IrisObjectPlacement;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.Chunk;
|
||||
@@ -97,28 +100,24 @@ public class IrisEngine extends BlockPopulator implements Engine {
|
||||
}
|
||||
|
||||
private void computeBiomeMaxes() {
|
||||
for(IrisBiome i : getDimension().getAllBiomes(this))
|
||||
{
|
||||
for (IrisBiome i : getDimension().getAllBiomes(this)) {
|
||||
double density = 0;
|
||||
|
||||
for(IrisObjectPlacement j : i.getObjects())
|
||||
{
|
||||
for (IrisObjectPlacement j : i.getObjects()) {
|
||||
density += j.getDensity() * j.getChance();
|
||||
}
|
||||
|
||||
maxBiomeObjectDensity = Math.max(maxBiomeObjectDensity, density);
|
||||
density = 0;
|
||||
|
||||
for(IrisDecorator j : i.getDecorators())
|
||||
{
|
||||
for (IrisDecorator j : i.getDecorators()) {
|
||||
density += Math.max(j.getStackMax(), 1) * j.getChance();
|
||||
}
|
||||
|
||||
maxBiomeDecoratorDensity = Math.max(maxBiomeDecoratorDensity, density);
|
||||
density = 0;
|
||||
|
||||
for(IrisBiomePaletteLayer j : i.getLayers())
|
||||
{
|
||||
for (IrisBiomePaletteLayer j : i.getLayers()) {
|
||||
density++;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@ package com.volmit.iris.engine;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.object.IrisDimensionIndex;
|
||||
import com.volmit.iris.engine.object.IrisPosition;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineCompound;
|
||||
import com.volmit.iris.engine.framework.EngineData;
|
||||
import com.volmit.iris.engine.framework.EngineTarget;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.object.IrisDimensionIndex;
|
||||
import com.volmit.iris.engine.object.IrisPosition;
|
||||
import com.volmit.iris.engine.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.atomics.AtomicRollingSequence;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
|
||||
@@ -23,11 +23,11 @@ import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.actuator.IrisBiomeActuator;
|
||||
import com.volmit.iris.engine.actuator.IrisDecorantActuator;
|
||||
import com.volmit.iris.engine.actuator.IrisTerrainActuator;
|
||||
import com.volmit.iris.engine.framework.*;
|
||||
import com.volmit.iris.engine.modifier.IrisCaveModifier;
|
||||
import com.volmit.iris.engine.modifier.IrisDepositModifier;
|
||||
import com.volmit.iris.engine.modifier.IrisPostModifier;
|
||||
import com.volmit.iris.engine.modifier.IrisRavineModifier;
|
||||
import com.volmit.iris.engine.framework.*;
|
||||
import com.volmit.iris.util.scheduling.ChronoLatch;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.block.Biome;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.engine;
|
||||
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.framework.EngineCompositeGenerator;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.util.fakenews.FakeWorld;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
|
||||
@@ -20,13 +20,13 @@ package com.volmit.iris.engine;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedWorldManager;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
|
||||
@@ -20,15 +20,15 @@ package com.volmit.iris.engine.actuator;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisBiomeCustom;
|
||||
import com.volmit.iris.engine.data.chunk.TerrainChunk;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedActuator;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.hunk.view.BiomeGridHunkView;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisBiomeCustom;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.engine.data.chunk.TerrainChunk;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
package com.volmit.iris.engine.actuator;
|
||||
|
||||
import com.volmit.iris.engine.decorator.*;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedActuator;
|
||||
import com.volmit.iris.engine.framework.EngineDecorator;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
package com.volmit.iris.engine.actuator;
|
||||
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedActuator;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
package com.volmit.iris.engine.cache;
|
||||
|
||||
import com.volmit.iris.util.scheduling.IrisLock;
|
||||
import com.volmit.iris.util.math.M;
|
||||
import com.volmit.iris.util.scheduling.IrisLock;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
@@ -76,7 +76,8 @@ public class B {
|
||||
Material mm = Material.valueOf(bx);
|
||||
materialCache.put(bx, mm);
|
||||
return mm;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
nullMaterialCache.add(bx);
|
||||
return null;
|
||||
}
|
||||
@@ -111,7 +112,8 @@ public class B {
|
||||
}
|
||||
|
||||
return bdx;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
Iris.warn("Unknown Block Data '" + bdxf + "'");
|
||||
}
|
||||
|
||||
@@ -143,7 +145,8 @@ public class B {
|
||||
BlockData bx = Bukkit.createBlockData(ix);
|
||||
blockDataCache.put(ix, bx);
|
||||
return bx;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
|
||||
@@ -154,7 +157,8 @@ public class B {
|
||||
try {
|
||||
BlockData bd = Material.valueOf(i).createBlockData();
|
||||
blockDataCache.put(ix, bd);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,8 @@ public class DirectWorldWriter {
|
||||
|
||||
MCAUtil.write(writeBuffer.get(i), f, true);
|
||||
writeBuffer.remove(i);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
@@ -157,7 +158,8 @@ public class DirectWorldWriter {
|
||||
}
|
||||
|
||||
return getBlockData(tag);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
return B.get("AIR");
|
||||
@@ -238,14 +240,11 @@ public class DirectWorldWriter {
|
||||
public void verify(int mcaox, int mcaoz) {
|
||||
MCAFile file = getMCA(mcaox, mcaoz);
|
||||
|
||||
for(int i = 0; i < 32; i++)
|
||||
{
|
||||
for(int j = 0; j < 32; j++)
|
||||
{
|
||||
for (int i = 0; i < 32; i++) {
|
||||
for (int j = 0; j < 32; j++) {
|
||||
Chunk c = file.getChunk(i, j);
|
||||
|
||||
if(c == null)
|
||||
{
|
||||
if (c == null) {
|
||||
Iris.warn("Chunk " + ((mcaox << 5) + i) + ", " + ((mcaoz << 5) + j) + " is null in MCA File " + mcaox + ", " + mcaoz);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ public class LinkedTerrainChunk implements TerrainChunk {
|
||||
private ChunkData createChunkData(int maxHeight) {
|
||||
try {
|
||||
return Bukkit.createChunkData(new HeightedFakeWorld(maxHeight));
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
@@ -126,23 +126,21 @@ public class ResourceLoader<T extends IrisRegistrant> {
|
||||
t.setLoader(manager);
|
||||
lock.unlock();
|
||||
return t;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
lock.unlock();
|
||||
failLoad(j, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public KList<T> loadAll(KList<String> s)
|
||||
{
|
||||
public KList<T> loadAll(KList<String> s) {
|
||||
KList<T> m = new KList<>();
|
||||
|
||||
for(String i : s)
|
||||
{
|
||||
for (String i : s) {
|
||||
T t = load(i);
|
||||
|
||||
if(t != null)
|
||||
{
|
||||
if (t != null) {
|
||||
m.add(t);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,19 +93,22 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
} else if (SHORT_LITERAL_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
return new ShortTag(Short.parseShort(s.substring(0, s.length() - 1)));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("short not in range: \"" + s.substring(0, s.length() - 1) + "\"");
|
||||
}
|
||||
} else if (LONG_LITERAL_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
return new LongTag(Long.parseLong(s.substring(0, s.length() - 1)));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("long not in range: \"" + s.substring(0, s.length() - 1) + "\"");
|
||||
}
|
||||
} else if (INT_LITERAL_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
return new IntTag(Integer.parseInt(s));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("int not in range: \"" + s.substring(0, s.length() - 1) + "\"");
|
||||
}
|
||||
} else if (DOUBLE_LITERAL_PATTERN.matcher(s).matches()) {
|
||||
@@ -152,7 +155,8 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
Tag<?> element = parseAnything(decrementMaxDepth(maxDepth));
|
||||
try {
|
||||
list.addUnchecked(element);
|
||||
} catch (IllegalArgumentException ex) {Iris.reportError(ex);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException(ex.getMessage());
|
||||
}
|
||||
if (!ptr.nextArrayElement()) {
|
||||
@@ -187,7 +191,8 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
if (NUMBER_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
byteList.add(Byte.parseByte(s));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("byte not in range: \"" + s + "\"");
|
||||
}
|
||||
} else {
|
||||
@@ -213,7 +218,8 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
if (NUMBER_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
intList.add(Integer.parseInt(s));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("int not in range: \"" + s + "\"");
|
||||
}
|
||||
} else {
|
||||
@@ -235,7 +241,8 @@ public final class SNBTParser implements MaxDepthIO {
|
||||
if (NUMBER_PATTERN.matcher(s).matches()) {
|
||||
try {
|
||||
longList.add(Long.parseLong(s));
|
||||
} catch (NumberFormatException ex) {Iris.reportError(ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw ptr.parseException("long not in range: \"" + s + "\"");
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
package com.volmit.iris.engine.decorator;
|
||||
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class IrisCeilingDecorator extends IrisEngineDecorator {
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
package com.volmit.iris.engine.decorator;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedComponent;
|
||||
import com.volmit.iris.engine.framework.EngineDecorator;
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
package com.volmit.iris.engine.decorator;
|
||||
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class IrisSeaFloorDecorator extends IrisEngineDecorator {
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
package com.volmit.iris.engine.decorator;
|
||||
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class IrisSeaSurfaceDecorator extends IrisEngineDecorator {
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
package com.volmit.iris.engine.decorator;
|
||||
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public class IrisShoreLineDecorator extends IrisEngineDecorator {
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
package com.volmit.iris.engine.decorator;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.DecorationPart;
|
||||
import com.volmit.iris.engine.object.InferredType;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDecorator;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import org.bukkit.block.data.Bisected;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.gui.Renderer;
|
||||
import com.volmit.iris.core.gui.RenderType;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.core.gui.Renderer;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.parallax.ParallaxAccess;
|
||||
import com.volmit.iris.engine.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
@@ -231,7 +231,8 @@ public interface Engine extends DataProvider, Fallible, GeneratorAccess, LootPro
|
||||
try {
|
||||
InventoryHolder m = (InventoryHolder) block.getState();
|
||||
addItems(false, m.getInventory(), rx, tables, slot, x, y, z, 15);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -269,7 +270,8 @@ public interface Engine extends DataProvider, Fallible, GeneratorAccess, LootPro
|
||||
try {
|
||||
Arrays.parallelSort(nitems, (a, b) -> rng.nextInt());
|
||||
break;
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.IrisComplex;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.IrisComplex;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.parallax.ParallaxAccess;
|
||||
import com.volmit.iris.util.math.RollingSequence;
|
||||
@@ -38,7 +38,8 @@ public interface EngineComponent {
|
||||
if (this instanceof Listener) {
|
||||
Iris.instance.unregisterListener((Listener) this);
|
||||
}
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,20 +19,20 @@
|
||||
package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.IrisEngineCompound;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.nms.BiomeBaseInjector;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.engine.IrisEngineCompound;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.data.DirectWorldWriter;
|
||||
import com.volmit.iris.engine.data.chunk.TerrainChunk;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.object.IrisPosition;
|
||||
import com.volmit.iris.engine.data.DirectWorldWriter;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.parallel.BurstExecutor;
|
||||
import com.volmit.iris.engine.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
@@ -120,7 +120,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
new MortarSender(i, Iris.instance.getTag()).sendMessage("Dimension Hotloaded");
|
||||
i.playSound(i.getLocation(), Sound.BLOCK_COPPER_PLACE, 1f, 1.25f);
|
||||
}
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
});
|
||||
@@ -142,7 +143,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
J.a(() -> hotloader.check());
|
||||
getComposite().clean();
|
||||
}
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
|
||||
@@ -163,7 +165,6 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
File iris = new File(world.getWorldFolder(), "iris");
|
||||
|
||||
if (iris.exists() && iris.isDirectory()) {
|
||||
searching:
|
||||
for (File i : iris.listFiles()) {
|
||||
// Look for v1 location
|
||||
if (i.isDirectory() && i.getName().equals("dimensions")) {
|
||||
@@ -318,7 +319,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
populators.addAll(compound.get().getPopulators());
|
||||
hotloader = new ReactiveFolder(data.getDataFolder(), (a, c, d) -> hotload());
|
||||
dim.installDataPack(() -> data, Iris.instance.getDatapacksFolder());
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
Iris.error("FAILED TO INITIALIZE DIMENSION FROM " + world.toString());
|
||||
}
|
||||
@@ -326,7 +328,6 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
|
||||
/**
|
||||
* Place strongholds in the world
|
||||
*
|
||||
*/
|
||||
public void placeStrongholds(World world) {
|
||||
EngineData metadata = getComposite().getEngineMetadata();
|
||||
@@ -362,7 +363,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
try {
|
||||
Object o = getBP(clazz, clazzSG, clazzBP, nmsWorld, blockPosToTest, chunkGenerator);
|
||||
future.complete(o);
|
||||
} catch (Exception e) {Iris.reportError(e);
|
||||
} catch (Exception e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
future.complete(e);
|
||||
}
|
||||
@@ -383,7 +385,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
strongholds.add(ipos);
|
||||
|
||||
}
|
||||
} catch (Exception e) {Iris.reportError(e);
|
||||
} catch (Exception e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -398,7 +401,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
getComposite().saveEngineMetadata();
|
||||
});
|
||||
|
||||
} catch (Exception e) {Iris.reportError(e);
|
||||
} catch (Exception e) {
|
||||
Iris.reportError(e);
|
||||
strongholds.add(new IrisPosition(1337, 32, -1337));
|
||||
metadata.setStrongholdPositions(strongholds);
|
||||
Iris.warn("Couldn't properly find the stronghold position for this world. Is this headless mode? Are you not using 1.16 or higher?");
|
||||
@@ -917,7 +921,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
public boolean isClosed() {
|
||||
try {
|
||||
return getComposite().getEngine(0).isClosed();
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -926,7 +931,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
public EngineTarget getTarget() {
|
||||
try {
|
||||
return getComposite().getEngine(0).getTarget();
|
||||
} catch (NullPointerException e) {Iris.reportError(e);
|
||||
} catch (NullPointerException e) {
|
||||
Iris.reportError(e);
|
||||
Iris.info("Failed to get composite engine. Please re-create the world in case you notice issues");
|
||||
return null;
|
||||
}
|
||||
@@ -965,7 +971,8 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
|
||||
try {
|
||||
dim.getDimensionalComposite().forEach((m) -> IrisDataManager.loadAnyDimension(m.getDimension()).getAllAnyBiomes().forEach((i) -> v.put(i.getLoadKey(), i)));
|
||||
} catch (Throwable ignored) {Iris.reportError(ignored);
|
||||
} catch (Throwable ignored) {
|
||||
Iris.reportError(ignored);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.actuator.IrisTerrainActuator;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.actuator.IrisTerrainActuator;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.object.IrisPosition;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
|
||||
@@ -48,7 +48,8 @@ public class EngineData {
|
||||
try {
|
||||
f.getParentFile().mkdirs();
|
||||
return new Gson().fromJson(IO.readAll(f), EngineData.class);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
public interface EngineDecorator extends EngineComponent {
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.engine.IrisComplex;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.IrisComplex;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
@@ -19,16 +19,16 @@
|
||||
package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.IrisComplex;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.object.common.IObjectPlacer;
|
||||
import com.volmit.iris.engine.object.tile.TileData;
|
||||
import com.volmit.iris.engine.IrisComplex;
|
||||
import com.volmit.iris.engine.cache.Cache;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.jigsaw.PlannedStructure;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.object.common.IObjectPlacer;
|
||||
import com.volmit.iris.engine.object.tile.TileData;
|
||||
import com.volmit.iris.engine.parallax.ParallaxAccess;
|
||||
import com.volmit.iris.engine.parallax.ParallaxChunkMeta;
|
||||
import com.volmit.iris.engine.parallel.BurstExecutor;
|
||||
@@ -184,7 +184,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
});
|
||||
|
||||
getEngine().getMetrics().getParallaxInsert().put(p.getMilliseconds());
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
Iris.error("Failed to insert parallax at chunk " + (x >> 4) + " " + (z >> 4));
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -214,7 +215,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
Iris.warn("Failed to read positional features in chunk " + (i + cx) + " " + (j + cz) + "(" + e.getClass().getSimpleName() + ")");
|
||||
}
|
||||
@@ -252,8 +254,7 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
|
||||
burst.complete();
|
||||
|
||||
if(getEngine().getDimension().isPlaceObjects())
|
||||
{
|
||||
if (getEngine().getDimension().isPlaceObjects()) {
|
||||
burst = MultiBurst.burst.burst(bs);
|
||||
|
||||
for (i = -s; i <= s; i++) {
|
||||
@@ -287,7 +288,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
getParallaxAccess().setChunkGenerated(x, z);
|
||||
p.end();
|
||||
getEngine().getMetrics().getParallax().put(p.getMilliseconds());
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
Iris.error("Failed to generate parallax in " + x + " " + z);
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -299,8 +301,7 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
return after;
|
||||
}
|
||||
|
||||
if(getEngine().getDimension().isPlaceObjects())
|
||||
{
|
||||
if (getEngine().getDimension().isPlaceObjects()) {
|
||||
int xx = x << 4;
|
||||
int zz = z << 4;
|
||||
RNG rng = new RNG(Cache.key(x, z)).nextParallelRNG(getEngine().getTarget().getWorld().getSeed());
|
||||
@@ -376,8 +377,7 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
default KList<Runnable> generateParallaxJigsaw(RNG rng, int x, int z, IrisBiome biome, IrisRegion region) {
|
||||
KList<Runnable> placeAfter = new KList<>();
|
||||
|
||||
if(getEngine().getDimension().isPlaceObjects())
|
||||
{
|
||||
if (getEngine().getDimension().isPlaceObjects()) {
|
||||
boolean placed = false;
|
||||
|
||||
if (getEngine().getDimension().getStronghold() != null) {
|
||||
@@ -441,7 +441,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
if (rng.chance(i.getChance() + rng.d(-0.005, 0.005)) && rng.chance(getComplex().getObjectChanceStream().get(x << 4, z << 4))) {
|
||||
try {
|
||||
place(rng, x << 4, z << 4, i);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
Iris.error("Failed to place objects in the following biome: " + biome.getName());
|
||||
Iris.error("Object(s) " + i.getPlace().toString(", ") + " (" + e.getClass().getSimpleName() + ").");
|
||||
Iris.error("Are these objects missing?");
|
||||
@@ -458,7 +459,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
if (rng.chance(i.getChance() + rng.d(-0.005, 0.005)) && rng.chance(getComplex().getObjectChanceStream().get(x << 4, z << 4))) {
|
||||
try {
|
||||
place(rng, x << 4, z << 4, i);
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
Iris.error("Failed to place objects in the following biome: " + biome.getName());
|
||||
Iris.error("Object(s) " + i.getPlace().toString(", ") + " (" + e.getClass().getSimpleName() + ").");
|
||||
Iris.error("Are these objects missing?");
|
||||
@@ -589,8 +591,7 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
int x = xg.get();
|
||||
int z = zg.get();
|
||||
|
||||
if(getEngine().getDimension().isPlaceObjects())
|
||||
{
|
||||
if (getEngine().getDimension().isPlaceObjects()) {
|
||||
KList<IrisRegion> r = getAllRegions();
|
||||
KList<IrisBiome> b = getAllBiomes();
|
||||
|
||||
@@ -629,7 +630,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
if (getEngine().getDimension().getStronghold() != null) {
|
||||
try {
|
||||
jig = Math.max(jig, getData().getJigsawStructureLoader().load(getEngine().getDimension().getStronghold()).getMaxDimension());
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
Iris.error("THIS IS THE ONE");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -648,7 +650,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
|
||||
try {
|
||||
return IrisObject.sampleSize(getData().getObjectLoader().findFile(i));
|
||||
} catch (IOException ex) {Iris.reportError(ex);
|
||||
} catch (IOException ex) {
|
||||
Iris.reportError(ex);
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -668,7 +671,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
synchronized (zg) {
|
||||
zg.getAndSet(Math.max(bv.getBlockZ(), zg.get()));
|
||||
}
|
||||
} catch (Throwable ed) {Iris.reportError(ed);
|
||||
} catch (Throwable ed) {
|
||||
Iris.reportError(ed);
|
||||
|
||||
}
|
||||
});
|
||||
@@ -686,7 +690,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
|
||||
try {
|
||||
return IrisObject.sampleSize(getData().getObjectLoader().findFile(j));
|
||||
} catch (IOException ioException) {Iris.reportError(ioException);
|
||||
} catch (IOException ioException) {
|
||||
Iris.reportError(ioException);
|
||||
ioException.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -706,7 +711,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
synchronized (zg) {
|
||||
zg.getAndSet((int) Math.max(Math.ceil(bv.getBlockZ() * ms), zg.get()));
|
||||
}
|
||||
} catch (Throwable ee) {Iris.reportError(ee);
|
||||
} catch (Throwable ee) {
|
||||
Iris.reportError(ee);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -22,8 +22,8 @@ import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisEffect;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import com.volmit.iris.util.math.M;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import lombok.Data;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -64,7 +64,8 @@ public class EnginePlayer {
|
||||
for (IrisEffect j : biome.getEffects()) {
|
||||
try {
|
||||
j.apply(player, getEngine());
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -83,7 +84,8 @@ public class EnginePlayer {
|
||||
lastSample = M.ms();
|
||||
sampleBiomeRegion();
|
||||
}
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.core.gui.Renderer;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisObjectPlacement;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.parallax.ParallaxAccess;
|
||||
|
||||
public interface GeneratorAccess extends DataProvider, Renderer {
|
||||
|
||||
@@ -20,10 +20,10 @@ package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.data.DirectWorldWriter;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.engine.data.DirectWorldWriter;
|
||||
import com.volmit.iris.engine.data.DataProvider;
|
||||
import com.volmit.iris.engine.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.math.M;
|
||||
@@ -139,7 +139,8 @@ public interface IrisAccess extends Hotloadable, DataProvider {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {Iris.reportError(e);
|
||||
} catch (Throwable e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
@@ -199,7 +200,8 @@ public interface IrisAccess extends Hotloadable, DataProvider {
|
||||
}
|
||||
|
||||
tries.getAndIncrement();
|
||||
} catch (Throwable xe) {Iris.reportError(xe);
|
||||
} catch (Throwable xe) {
|
||||
Iris.reportError(xe);
|
||||
xe.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
package com.volmit.iris.engine.framework;
|
||||
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.data.chunk.TerrainChunk;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import lombok.Data;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
@@ -20,9 +20,9 @@ package com.volmit.iris.engine.hunk.io;
|
||||
|
||||
import com.volmit.iris.engine.data.IOAdapter;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.util.oldnbt.ByteArrayTag;
|
||||
import com.volmit.iris.util.io.CustomOutputStream;
|
||||
import com.volmit.iris.util.function.Function3;
|
||||
import com.volmit.iris.util.io.CustomOutputStream;
|
||||
import com.volmit.iris.util.oldnbt.ByteArrayTag;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.engine.hunk.io;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.tile.TileData;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.tile.TileData;
|
||||
import com.volmit.iris.engine.parallel.BurstExecutor;
|
||||
import com.volmit.iris.engine.parallel.GridLock;
|
||||
import com.volmit.iris.engine.parallel.MultiBurst;
|
||||
@@ -109,7 +109,8 @@ public class HunkRegionSlice<T> {
|
||||
|
||||
try {
|
||||
lock.withNasty(i.getX(), i.getZ(), () -> save.remove(i));
|
||||
} catch (Throwable eer) {Iris.reportError(eer);
|
||||
} catch (Throwable eer) {
|
||||
Iris.reportError(eer);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -137,7 +138,8 @@ public class HunkRegionSlice<T> {
|
||||
|
||||
try {
|
||||
return adapter.read(factory, (ByteArrayTag) t);
|
||||
} catch (IOException xe) {Iris.reportError(xe);
|
||||
} catch (IOException xe) {
|
||||
Iris.reportError(xe);
|
||||
e.set(xe);
|
||||
}
|
||||
|
||||
@@ -175,7 +177,8 @@ public class HunkRegionSlice<T> {
|
||||
public void save(Hunk<T> region, int x, int z) {
|
||||
try {
|
||||
lock.withIO(x, z, () -> write(region, x, z));
|
||||
} catch (IOException e) {Iris.reportError(e);
|
||||
} catch (IOException e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -218,7 +221,8 @@ public class HunkRegionSlice<T> {
|
||||
if (contains(x, z)) {
|
||||
try {
|
||||
v = read(x, z);
|
||||
} catch (IOException e) {Iris.reportError(e);
|
||||
} catch (IOException e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.engine.hunk.storage;
|
||||
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.util.function.Consumer4;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.function.Consumer4;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package com.volmit.iris.engine.hunk.view;
|
||||
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.data.chunk.LinkedTerrainChunk;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
package com.volmit.iris.engine.jigsaw;
|
||||
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.object.common.IObjectPlacer;
|
||||
import com.volmit.iris.engine.object.tile.TileData;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.object.common.IObjectPlacer;
|
||||
import com.volmit.iris.engine.object.tile.TileData;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.math.AxisAlignedBB;
|
||||
import com.volmit.iris.util.math.BlockPosition;
|
||||
|
||||
@@ -20,12 +20,12 @@ package com.volmit.iris.engine.jigsaw;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisDataManager;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.IrisWorlds;
|
||||
import com.volmit.iris.engine.framework.EngineParallaxManager;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.parallax.ParallaxChunkMeta;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.engine.object.common.IObjectPlacer;
|
||||
import com.volmit.iris.engine.parallax.ParallaxChunkMeta;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
@@ -166,7 +166,6 @@ public enum LightingCategory {
|
||||
|
||||
/**
|
||||
* Initializes the lighting in the chunk for this category
|
||||
*
|
||||
*/
|
||||
public abstract void initialize(LightingChunk chunk);
|
||||
|
||||
@@ -180,7 +179,6 @@ public enum LightingCategory {
|
||||
/**
|
||||
* Sets whether this category of light is dirty, indicating this category of light is all good,
|
||||
* or that more work is needed spreading light around.
|
||||
*
|
||||
*/
|
||||
public abstract void setDirty(LightingChunk chunk, boolean dirty);
|
||||
|
||||
@@ -195,7 +193,6 @@ public enum LightingCategory {
|
||||
/**
|
||||
* Sets the light level in a section at the coordinates specified.
|
||||
* No bounds checking is performed.
|
||||
*
|
||||
*/
|
||||
public abstract void set(LightingCube section, int x, int y, int z, int level);
|
||||
}
|
||||
@@ -462,7 +462,8 @@ public class LightingChunk {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {Iris.reportError(t);
|
||||
} catch (Throwable t) {
|
||||
Iris.reportError(t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class LightingChunkNeighboring {
|
||||
/**
|
||||
* Gets a relative neighboring chunk, and then a vertical cube in that chunk, if possible.
|
||||
*
|
||||
* @param cy Cube absolute y-coordinate
|
||||
* @param cy Cube absolute y-coordinate
|
||||
* @return cube, null if the chunk or cube is not available
|
||||
*/
|
||||
public LightingCube getCube(int deltaChunkX, int deltaChunkZ, int cy) {
|
||||
@@ -77,7 +77,7 @@ public class LightingChunkNeighboring {
|
||||
/**
|
||||
* Sets the neighbor representing the given relative chunk
|
||||
*
|
||||
* @param neighbor to set to
|
||||
* @param neighbor to set to
|
||||
*/
|
||||
public void set(int deltaChunkX, int deltaChunkZ, LightingChunk neighbor) {
|
||||
values[getIndexByChunk(deltaChunkX, deltaChunkZ)] = neighbor;
|
||||
|
||||
@@ -136,9 +136,9 @@ public class LightingCube {
|
||||
* higher light value if all these tests pass.
|
||||
* The x/y/z coordinates are allowed to check neighboring cubes.
|
||||
*
|
||||
* @param x The X-coordinate of the block (-1 to 16)
|
||||
* @param y The Y-coordinate of the block (-1 to 16)
|
||||
* @param z The Z-coordinate of the block (-1 to 16)
|
||||
* @param x The X-coordinate of the block (-1 to 16)
|
||||
* @param y The Y-coordinate of the block (-1 to 16)
|
||||
* @param z The Z-coordinate of the block (-1 to 16)
|
||||
* @return higher light level if propagated, otherwise the old light value
|
||||
*/
|
||||
public int getLightIfHigherNeighbor(LightingCategory category, int old_light, int faceMask, int x, int y, int z) {
|
||||
|
||||
@@ -68,7 +68,7 @@ public class LightingCubeNeighboring {
|
||||
/**
|
||||
* Sets the neighbor representing the given relative cube
|
||||
*
|
||||
* @param neighbor to set to, is allowed to be null to set to 'none'
|
||||
* @param neighbor to set to, is allowed to be null to set to 'none'
|
||||
*/
|
||||
public void set(int deltaCubeX, int deltaCubeY, int deltaCubeZ, LightingCube neighbor) {
|
||||
values[getIndexByCube(deltaCubeX, deltaCubeY, deltaCubeZ)] = neighbor;
|
||||
|
||||
@@ -412,7 +412,8 @@ public class LightingService extends AsyncTask {
|
||||
while (paused) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {Iris.reportError(e);
|
||||
} catch (InterruptedException e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
synchronized (tasks) {
|
||||
@@ -468,7 +469,8 @@ public class LightingService extends AsyncTask {
|
||||
// Process the task
|
||||
try {
|
||||
currentTask.process();
|
||||
} catch (Throwable t) {Iris.reportError(t);
|
||||
} catch (Throwable t) {
|
||||
Iris.reportError(t);
|
||||
t.printStackTrace();
|
||||
Iris.error("Failed to process task: " + currentTask.getStatus());
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ public class LightingTaskBatch implements LightingTask {
|
||||
return coords;
|
||||
} else //noinspection ReplaceNullCheck
|
||||
if (this.chunks_coords != null) {
|
||||
return this.chunks_coords;
|
||||
} else {
|
||||
return new long[0];
|
||||
}
|
||||
return this.chunks_coords;
|
||||
} else {
|
||||
return new long[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,8 @@ public class LightingTaskBatch implements LightingTask {
|
||||
return true;
|
||||
} catch (InterruptedException | TimeoutException e1) {
|
||||
Iris.reportError(e1);
|
||||
} catch (ExecutionException ex) {Iris.reportError(ex);
|
||||
} catch (ExecutionException ex) {
|
||||
Iris.reportError(ex);
|
||||
ex.printStackTrace();
|
||||
Iris.error("Error while processing");
|
||||
return false;
|
||||
@@ -441,15 +442,18 @@ public class LightingTaskBatch implements LightingTask {
|
||||
try {
|
||||
future.get(200, TimeUnit.MILLISECONDS);
|
||||
break;
|
||||
} catch (TimeoutException e) {Iris.reportError(e);
|
||||
} catch (TimeoutException e) {
|
||||
Iris.reportError(e);
|
||||
if (this.aborted) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {Iris.reportError(e);
|
||||
} catch (InterruptedException e) {
|
||||
Iris.reportError(e);
|
||||
// Ignore
|
||||
} catch (ExecutionException e) {Iris.reportError(e);
|
||||
} catch (ExecutionException e) {
|
||||
Iris.reportError(e);
|
||||
e.printStackTrace();
|
||||
Iris.error("Failed to apply lighting data for " + getShortStatus());
|
||||
|
||||
|
||||
@@ -99,9 +99,11 @@ public class LightingTaskWorld implements LightingTask {
|
||||
// Wait until region list is loaded synchronously
|
||||
try {
|
||||
regionsLoadedFuture.get();
|
||||
} catch (InterruptedException ex) {Iris.reportError(ex);
|
||||
} catch (InterruptedException ex) {
|
||||
Iris.reportError(ex);
|
||||
// Ignore
|
||||
} catch (ExecutionException ex) {Iris.reportError(ex);
|
||||
} catch (ExecutionException ex) {
|
||||
Iris.reportError(ex);
|
||||
throw new RuntimeException("Failed to load regions", ex.getCause());
|
||||
}
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
package com.volmit.iris.engine.modifier;
|
||||
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.noise.FastNoiseDouble;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisCaveLayer;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedModifier;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.noise.FastNoiseDouble;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisCaveLayer;
|
||||
import com.volmit.iris.engine.object.common.CaveResult;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
@@ -18,16 +18,16 @@
|
||||
|
||||
package com.volmit.iris.engine.modifier;
|
||||
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedModifier;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDepositGenerator;
|
||||
import com.volmit.iris.engine.object.IrisObject;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedModifier;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.util.data.HeightMap;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.util.BlockVector;
|
||||
|
||||
|
||||
@@ -19,16 +19,16 @@
|
||||
package com.volmit.iris.engine.modifier;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedModifier;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.common.CaveResult;
|
||||
import com.volmit.iris.engine.parallel.BurstExecutor;
|
||||
import com.volmit.iris.engine.parallel.MultiBurst;
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.object.common.CaveResult;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.Levelled;
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
package com.volmit.iris.engine.modifier;
|
||||
|
||||
import com.volmit.iris.engine.data.B;
|
||||
import com.volmit.iris.engine.noise.CNG;
|
||||
import com.volmit.iris.engine.object.NoiseStyle;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedModifier;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.noise.CNG;
|
||||
import com.volmit.iris.engine.object.NoiseStyle;
|
||||
import com.volmit.iris.util.math.BlockPosition;
|
||||
import com.volmit.iris.util.math.ChunkPosition;
|
||||
import com.volmit.iris.util.math.MathHelper;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
package com.volmit.iris.engine.noise;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.interpolation.IrisInterpolation;
|
||||
import com.volmit.iris.engine.object.common.IRare;
|
||||
import com.volmit.iris.engine.stream.ProceduralStream;
|
||||
import com.volmit.iris.engine.stream.arithmetic.FittedStream;
|
||||
@@ -26,7 +27,6 @@ import com.volmit.iris.engine.stream.sources.CNGStream;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.function.NoiseInjector;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.engine.interpolation.IrisInterpolation;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user