diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 0000000..5194abd --- /dev/null +++ b/Changelog.md @@ -0,0 +1,5 @@ +SoulHome - For 1.18.1 Minecraft + +B1 + +The initial build for 1.18.1 Minecraft, with basic patchouli, advancements, and soulkey item to access the user's own skyblock-esque dimension. \ No newline at end of file diff --git a/build.gradle b/build.gradle index b874201..62b65d4 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ buildscript { } apply plugin: 'net.minecraftforge.gradle' +// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply plugin: 'eclipse' apply plugin: 'org.spongepowered.mixin' @@ -31,8 +32,6 @@ archivesBaseName = "${project.jar_name}" java.toolchain.languageVersion = JavaLanguageVersion.of(17) println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) -// Include resources generated by data generators. -sourceSets.main.resources { srcDir 'src/main/generated' } minecraft { mappings channel: 'official', version: "${minecraft_version}" @@ -64,7 +63,7 @@ minecraft { mods { soulhome { - source sourceSets.main + source sourceSets.main } } } @@ -93,6 +92,9 @@ mixin { add sourceSets.main, "soulhome.refmap.json" } +// Include resources generated by data generators. +sourceSets.main.resources { srcDir 'src/main/generated' } + repositories { maven { // location of the maven that hosts JEI files @@ -120,11 +122,7 @@ repositories { } dependencies { - // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed - // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. - // The userdev artifact is a special name and will get all sorts of transformations applied to it. minecraft "net.minecraftforge:forge:${forge_version}" - annotationProcessor 'org.spongepowered:mixin:0.8.2:processor' compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}:9.1.0.44:api") @@ -144,7 +142,7 @@ dependencies { //implementation fg.deobf("curse.maven:ctm-267602:2642375") } -// Example for how to get properties into the manifest for reading by the runtime.. +// Example for how to get properties into the manifest for reading at runtime. jar { manifest { attributes([ @@ -152,7 +150,7 @@ jar { "Specification-Vendor" : "soulhome", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, - "Implementation-Version" : "${version}", + "Implementation-Version" : project.jar.archiveVersion, "Implementation-Vendor" : "soulhome", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "MixinConfigs" : "soulhome.mixins.json" @@ -193,11 +191,11 @@ def parseConfig(File config) { } } -// Example configuration to allow publishing using the maven-publish task +// Example configuration to allow publishing using the maven-publish plugin // This is the preferred method to reobfuscate your jar file jar.finalizedBy('reobfJar') // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing -//publish.dependsOn('reobfJar') +// publish.dependsOn('reobfJar') publishing { publications { @@ -207,7 +205,7 @@ publishing { } repositories { maven { - url "file:///${project.projectDir}/mcmodsrepo" + url "file://${project.projectDir}/mcmodsrepo" } } } diff --git a/gradle.properties b/gradle.properties index 23fb9ae..88328e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx8G #Sat Jan 29 12:10:33 NZDT 2022 minecraft_version=1.18.1 -forge_version=1.18.1-39.0.63 +forge_version=1.18.1-39.0.66 jar_name=SoulHome-Mod build_number=1 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c..7454180 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 84d1f85..e750102 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0..c53aefa 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - 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\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - 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 " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# 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" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/src/main/generated/.cache/cache b/src/main/generated/.cache/cache index 50b50b5..510a810 100644 --- a/src/main/generated/.cache/cache +++ b/src/main/generated/.cache/cache @@ -1,4 +1,4 @@ -6c2c626b8c81aaec7fd91bb62401b2fe79088789 assets/soulhome/lang/en_us.json +d9cfbd3951895f724d266ed41c09df50b658b33f assets/soulhome/lang/en_us.json d9bb2941a407fb2be1631319b0360c1d501b682d assets/soulhome/models/item/guide.json 24ca7242da31f8e5d3a3511153a130555be28b00 assets/soulhome/models/item/soulkey.json b5cf06caa15b475d51c28dbc82329ed25d7421ec data/soulhome/advancements/main/blank.json @@ -10,10 +10,10 @@ b3103094c1e2fb86ca557c8028c91a02505efe46 data/soulhome/advancements/recipes/soul 6e38f71ed21ac598e33778d8d79c92bcaa9b3f9d data/soulhome/advancements/recipes/soulhome.items/soulkey.json c46f503b62dde6e0527a28bdad78cb6fbbe82d6c data/soulhome/patchouli_books/guide/en_us/categories/category.basics.json 90d07ba3c5302020fe2dacd816296633967a39b6 data/soulhome/patchouli_books/guide/en_us/categories/category.multiblocks.json -15a38c7962199e70d532bd825f3896884eb3b55a data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.guide.json -de0340acfd039aacc0202965dabfc67670d0fbe7 data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul.json -2f8075b36db22fcd3d92a7417feec39b0cf42cb5 data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul_key.json -c5228a2e128b4b8aa48d5ff6a7f8da99da2fd142 data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.welcome.json -33aa2b35124ae3110f7edb4e75a48880d60dec31 data/soulhome/patchouli_books/guide/en_us/entries/category.multiblocks/entry.blank.json +51c694061aaec26c71fe443c8f9b2eb4e3afabc8 data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.guide.json +887c7d57c07445a8f2d5506324abb16b68d2249a data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul.json +8224a0d386a04525fade6adfd7553b0689982a22 data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul_key.json +9b65f73ab0518fbed778c3ae9cf3a8f72013d956 data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.welcome.json +76149244933f2a72a927e419929e93acfc443f6d data/soulhome/patchouli_books/guide/en_us/entries/category.multiblocks/entry.blank.json 952e53b33bdad64cbfbad1710234cd8c5f5f2f41 data/soulhome/recipes/guide.json 17fcafa9fe68413745aa1237895f5918f6cb0412 data/soulhome/recipes/soulkey.json diff --git a/src/main/generated/assets/soulhome/lang/en_us.json b/src/main/generated/assets/soulhome/lang/en_us.json index bacff5f..71e2e20 100644 --- a/src/main/generated/assets/soulhome/lang/en_us.json +++ b/src/main/generated/assets/soulhome/lang/en_us.json @@ -27,5 +27,6 @@ "tooltip.item.info.shift": "\u00A77Hold \u00A78[\u00A7eShift\u00A78]", "tooltip.item.info.shift_control": "\u00A77Hold \u00A78[\u00A7eShift\u00A78] \u00A77and \u00A78[\u00A7eControl\u00A78]", "tooltip.item.soulhome.guide": "If patchouli is installed, this is your guide to the mod", - "tooltip.item.soulhome.soulkey": "The key to accessing your own soul. Use for the full duration and it will take you there. As well as anything else nearby." + "tooltip.item.soulhome.soulkey": "The key to accessing your own soul. Use for the full duration and it will take you there. As well as anything else nearby.", + "tooltip.soulhome.patchouli.not_installed": "Patchouli is not installed" } \ No newline at end of file diff --git a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.guide.json b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.guide.json index 9aed594..2b76bc5 100644 --- a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.guide.json +++ b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.guide.json @@ -1,6 +1,6 @@ { "name": "entry.guide", - "category": "category.basics", + "category": "soulhome:category.basics", "icon": "soulhome:guide", "pages": [ { diff --git a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul.json b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul.json index e31970b..2c9ad8c 100644 --- a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul.json +++ b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul.json @@ -1,6 +1,6 @@ { "name": "entry.soul", - "category": "category.basics", + "category": "soulhome:category.basics", "icon": "soulhome:guide", "pages": [ { diff --git a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul_key.json b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul_key.json index 9bedde4..40252f6 100644 --- a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul_key.json +++ b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.soul_key.json @@ -1,6 +1,6 @@ { "name": "entry.soul_key", - "category": "category.basics", + "category": "soulhome:category.basics", "icon": "soulhome:guide", "pages": [ { diff --git a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.welcome.json b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.welcome.json index 7b6110f..8d866a2 100644 --- a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.welcome.json +++ b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.basics/entry.welcome.json @@ -1,6 +1,6 @@ { "name": "entry.welcome", - "category": "category.basics", + "category": "soulhome:category.basics", "icon": "soulhome:guide", "pages": [ { diff --git a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.multiblocks/entry.blank.json b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.multiblocks/entry.blank.json index bfd9ea2..1ee1dc0 100644 --- a/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.multiblocks/entry.blank.json +++ b/src/main/generated/data/soulhome/patchouli_books/guide/en_us/entries/category.multiblocks/entry.blank.json @@ -1,6 +1,6 @@ { "name": "entry.blank", - "category": "category.multiblocks", + "category": "soulhome:category.multiblocks", "icon": "soulhome:guide", "pages": [ { diff --git a/src/main/java/leaf/soulhome/datagen/language/EngLangGen.java b/src/main/java/leaf/soulhome/datagen/language/EngLangGen.java index 10167cb..a199704 100644 --- a/src/main/java/leaf/soulhome/datagen/language/EngLangGen.java +++ b/src/main/java/leaf/soulhome/datagen/language/EngLangGen.java @@ -89,6 +89,8 @@ protected void addTranslations() add(Constants.StringKeys.SHIFT_CONTROL_ITEM_TOOLTIP, "\u00A77Hold \u00A78[\u00A7eShift\u00A78] \u00A77and \u00A78[\u00A7eControl\u00A78]"); add(Constants.StringKeys.CONTROL_ITEM_TOOLTIP, "\u00A77Hold \u00A78[\u00A7eControl\u00A78]"); + add(Constants.StringKeys.PATCHOULI_NOT_INSTALLED, "Patchouli is not installed"); + //Guide book add("soulhome.landing", "They say the soul is infinite. They didn't say how empty it was. Fortunately, we can fill it."); diff --git a/src/main/java/leaf/soulhome/datagen/patchouli/BookStuff.java b/src/main/java/leaf/soulhome/datagen/patchouli/BookStuff.java index 7d44a65..3237c7f 100644 --- a/src/main/java/leaf/soulhome/datagen/patchouli/BookStuff.java +++ b/src/main/java/leaf/soulhome/datagen/patchouli/BookStuff.java @@ -95,7 +95,7 @@ public JsonElement serialize() //enforced jsonobject.addProperty("name", this.name); - jsonobject.addProperty("category", this.category.name); + jsonobject.addProperty("category", "soulhome:" + this.category.name); jsonobject.addProperty("icon", this.icon); JsonArray jsonarray = new JsonArray(); diff --git a/src/main/java/leaf/soulhome/dimensions/SoulChunkGenerator.java b/src/main/java/leaf/soulhome/dimensions/SoulChunkGenerator.java index 2e275cf..d6acb11 100644 --- a/src/main/java/leaf/soulhome/dimensions/SoulChunkGenerator.java +++ b/src/main/java/leaf/soulhome/dimensions/SoulChunkGenerator.java @@ -73,7 +73,7 @@ public Climate.Sampler climateSampler() } @Override - public void applyCarvers(WorldGenRegion p_187691_, long p_187692_, BiomeManager p_187693_, StructureFeatureManager p_187694_, ChunkAccess p_187695_, GenerationStep.Carving p_187696_) + public void applyCarvers(WorldGenRegion worldGenRegion, long p_187692_, BiomeManager biomeManager, StructureFeatureManager structureFeatureManager, ChunkAccess chunkAccess, GenerationStep.Carving carving) { } @@ -90,7 +90,7 @@ public int getGenDepth() } @Override - public void spawnOriginalMobs(WorldGenRegion p_230354_1_) { } + public void spawnOriginalMobs(WorldGenRegion worldGenRegion) { } @Nullable @Override @@ -100,7 +100,7 @@ public BlockPos findNearestMapFeature(ServerLevel world, StructureFeature str } @Override - public void buildSurface(WorldGenRegion p_187697_, StructureFeatureManager p_187698_, ChunkAccess p_187699_) + public void buildSurface(WorldGenRegion worldGenRegion, StructureFeatureManager structureFeatureManager, ChunkAccess chunkAccess) { } @@ -118,9 +118,9 @@ public void createStructures(RegistryAccess registries, StructureFeatureManager public void createReferences(WorldGenLevel world, StructureFeatureManager structures, ChunkAccess chunk) { } @Override - public CompletableFuture fillFromNoise(Executor p_187748_, Blender p_187749_, StructureFeatureManager p_187750_, ChunkAccess p_187751_) + public CompletableFuture fillFromNoise(Executor executor, Blender blender, StructureFeatureManager structureFeatureManager, ChunkAccess chunkAccess) { - return null; + return CompletableFuture.completedFuture(chunkAccess); } @Override @@ -136,13 +136,13 @@ public int getMinY() } @Override - public int getBaseHeight(int x, int z, Heightmap.Types p_156155_, LevelHeightAccessor p_156156_) + public int getBaseHeight(int x, int z, Heightmap.Types heightmapTypes, LevelHeightAccessor levelHeightAccessor) { return DimensionHelper.FLOOR_LEVEL; } @Override - public NoiseColumn getBaseColumn(int x, int z, LevelHeightAccessor p_156152_) + public NoiseColumn getBaseColumn(int x, int z, LevelHeightAccessor levelHeightAccessor) { BlockState[] blockstate = new BlockState[0]; return new NoiseColumn(0, blockstate); diff --git a/src/main/java/leaf/soulhome/items/GuideItem.java b/src/main/java/leaf/soulhome/items/GuideItem.java index c5a9c6b..165c30f 100644 --- a/src/main/java/leaf/soulhome/items/GuideItem.java +++ b/src/main/java/leaf/soulhome/items/GuideItem.java @@ -10,7 +10,9 @@ import leaf.soulhome.registry.ItemsRegistry; import leaf.soulhome.utils.TextHelper; import net.minecraft.ChatFormatting; +import net.minecraft.Util; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -67,7 +69,14 @@ public static Component getEdition() { if (PatchouliCompat.PatchouliIsPresent()) { - return PatchouliAPI.get().getSubtitle(ItemsRegistry.GUIDE.getId()); + try + { + return PatchouliAPI.get().getSubtitle(ItemsRegistry.GUIDE.getId()); + } + catch (IllegalArgumentException e) + { + return new TextComponent(""); + } } else { @@ -80,15 +89,18 @@ public static Component getEdition() public InteractionResultHolder use(Level worldIn, Player playerIn, InteractionHand handIn) { ItemStack stack = playerIn.getItemInHand(handIn); - if (PatchouliCompat.PatchouliIsPresent()) + if (playerIn instanceof ServerPlayer) { - if (playerIn instanceof ServerPlayer) + ServerPlayer serverPlayer = (ServerPlayer) playerIn; + if (PatchouliCompat.PatchouliIsPresent()) + { + PatchouliAPI.get().openBookGUI(serverPlayer, ItemsRegistry.GUIDE.getId()); + } + else { - ServerPlayer player = (ServerPlayer) playerIn; - PatchouliAPI.get().openBookGUI(player, ItemsRegistry.GUIDE.getId()); + playerIn.sendMessage(TextHelper.createTranslatedText(Constants.StringKeys.PATCHOULI_NOT_INSTALLED), Util.NIL_UUID); } } - return new InteractionResultHolder<>(InteractionResult.SUCCESS, stack); } diff --git a/src/main/resources/data/soulhome/worldgen/biome/soulhome.json b/src/main/resources/data/soulhome/worldgen/biome/soulhome.json index 0465ca5..68ddb1a 100644 --- a/src/main/resources/data/soulhome/worldgen/biome/soulhome.json +++ b/src/main/resources/data/soulhome/worldgen/biome/soulhome.json @@ -10,7 +10,9 @@ "sky_color": 7907327, "fog_color": 12638463, "water_color": 4159204, - "water_fog_color": 329011 + "water_fog_color": 329011, + "foliage_color": 4242482, + "grass_color": 7600187 }, "surface_builder": "nope", "carvers": {}, diff --git a/src/main/resources/data/soulhome/worldgen/noise_settings/soulhome.json b/src/main/resources/data/soulhome/worldgen/noise_settings/soulhome.json index ce32ebd..1b6a87c 100644 --- a/src/main/resources/data/soulhome/worldgen/noise_settings/soulhome.json +++ b/src/main/resources/data/soulhome/worldgen/noise_settings/soulhome.json @@ -1,6 +1,11 @@ { "bedrock_roof_position": -2147483648, "bedrock_floor_position": 0, + "legacy_random_source": false, + "noodle_caves_enabled": false, + "aquifers_enabled": false, + "ore_veins_enabled": false, + "noise_caves_enabled": false, "sea_level": 63, "disable_mob_generation": true, "structures": { @@ -27,6 +32,11 @@ "size": 0, "offset": 0 }, + "terrain_shaper": { + "offset": 0.0, + "factor": 1.0, + "jaggedness": 0.0 + }, "size_horizontal": 1, "min_y": 0, "height": 256, @@ -44,6 +54,12 @@ "Properties": { "level": "0" }, - "Name": "minecraft:water" + "Name": "minecraft:air" + }, + "surface_rule": { + "result_state": { + "Name": "minecraft:air" + }, + "type": "minecraft:block" } } \ No newline at end of file diff --git a/src/main/resources/soulhome.mixins.json b/src/main/resources/soulhome.mixins.json index fede38e..97846a2 100644 --- a/src/main/resources/soulhome.mixins.json +++ b/src/main/resources/soulhome.mixins.json @@ -2,7 +2,7 @@ "required": true, "minVersion": "0.8", "package": "leaf.soulhome.mixin", - "compatibilityLevel": "JAVA_8", + "compatibilityLevel": "JAVA_17", "refmap": "soulhome.refmap.json", "mixins": [ ],