diff --git a/build.gradle b/build.gradle index 183d3f8..bc9db2d 100644 --- a/build.gradle +++ b/build.gradle @@ -15,10 +15,7 @@ base { repositories { mavenLocal() maven { url = "https://maven.terraformersmc.com/releases/" } - maven { - name "oth3rMavenSnapshots" - url "https://maven.oth3r.one/snapshots" - } + maven { url = "https://maven.isxander.dev/releases" } } loom { diff --git a/changelog.md b/changelog.md index 799aefc..cb30a6d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,3 @@ -# v1.2.4.4 -* bumped OtterLib version to `0.2.0.0` - * now relies on OtterLib Language Reader - # v1.2.4.3 * added a max OtterLib version as the beta will have breaking changes between major versions diff --git a/gradle.properties b/gradle.properties index a6874f1..2c59928 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,21 +4,21 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -min_minecraft_version=1.21.6 -max_minecraft_version=1.21.6 -minecraft_versions=1.21.6 +min_minecraft_version=1.21.5 +max_minecraft_version=1.21.5 +minecraft_versions=1.21.5 -minecraft_version=1.21.6 -yarn_mappings=1.21.6+build.1 +minecraft_version=1.21.5 +yarn_mappings=1.21.5+build.1 loader_version=0.16.14 # Mod Properties -mod_version=1.2.4.4+1.21.6 +mod_version=1.2.4.3+1.21.5 maven_group=one.oth3r file_name=sit! # Dependencies -fabric_version=0.127.1+1.21.6 -modmenu_version=15.0.0-beta.1 -otterlib_version=0.2.0.0+1.21.6-fabric -otterlib_max_version=0.3.0.0+1.21.6-fabric +fabric_version=0.124.0+1.21.5 +modmenu_version=14.0.0-rc.2 +otterlib_version=0.1.2.1+1.21.5-fabric +otterlib_max_version=0.2.0.0+1.21.5-fabric diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 1b33c55..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index ca025c8..0000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 23d15a9..fcb6fca 100644 --- a/gradlew +++ b/gradlew @@ -15,8 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# SPDX-License-Identifier: Apache-2.0 -# ############################################################################## # @@ -57,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/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/. @@ -85,8 +83,7 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -114,7 +111,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH="\\\"\\\"" +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -147,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -155,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -204,16 +201,16 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. +# 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" \ - -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + org.gradle.wrapper.GradleWrapperMain \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index db3a6ac..93e3f59 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,8 +13,6 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -45,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. goto fail @@ -59,22 +57,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. goto fail :execute @rem Setup the command line -set CLASSPATH= +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/main/java/one/oth3r/sit/utl/Events.java b/src/main/java/one/oth3r/sit/utl/Events.java index 71077a9..f4f2c64 100644 --- a/src/main/java/one/oth3r/sit/utl/Events.java +++ b/src/main/java/one/oth3r/sit/utl/Events.java @@ -74,7 +74,7 @@ public class Events { // just send the sit command if (Data.isInGame()) { if (Data.isSupportedServer()) { - player.networkHandler.sendChatCommand("sit"); + player.networkHandler.sendCommand("sit"); } else { // unsupported server message if not in a Sit! server player.sendMessage(Chat.lang("sit!.chat.unsupported") diff --git a/src/main/java/one/oth3r/sit/utl/Logic.java b/src/main/java/one/oth3r/sit/utl/Logic.java index e5d8387..0433259 100644 --- a/src/main/java/one/oth3r/sit/utl/Logic.java +++ b/src/main/java/one/oth3r/sit/utl/Logic.java @@ -37,7 +37,7 @@ public class Logic { // check if the block is in the right y level limits from the config if (!checkYLimits(player, blockPos)) return false; - ServerWorld serverWorld = player.getWorld(); + ServerWorld serverWorld = player.getServerWorld(); Double sitHeight = Utl.getSittingHeight(player,blockPos,hitResult); @@ -60,7 +60,7 @@ public class Logic { public static boolean sit(ServerPlayerEntity player, BlockPos blockPos, @Nullable BlockHitResult hitResult) { if (!canSit(player, blockPos, hitResult)) return false; // assets - ServerWorld serverWorld = player.getWorld(); + ServerWorld serverWorld = player.getServerWorld(); Double sitHeight = Utl.getSittingHeight(player,blockPos,hitResult); // shouldn't be null because we already checked, but do another check to clear IDE errors assert sitHeight != null; @@ -77,7 +77,7 @@ public class Logic { * @return true if sitting was successful */ public static boolean sitLooking(ServerPlayerEntity player) { - return sit(player, Utl.getBlockPosPlayerIsLookingAt(player.getWorld(),player, + return sit(player, Utl.getBlockPosPlayerIsLookingAt(player.getServerWorld(),player, Utl.getPlayerReach(player)),null); } @@ -151,7 +151,7 @@ public class Logic { // get the new entity DisplayEntity.TextDisplayEntity sitEntity = Data.getSpawnList().get(player); // spawn and ride the entity - player.getWorld().spawnEntity(sitEntity); + player.getServerWorld().spawnEntity(sitEntity); player.startRiding(sitEntity); // add the entity to the list Data.addSitEntity(player, sitEntity); diff --git a/src/main/java/one/oth3r/sit/utl/Utl.java b/src/main/java/one/oth3r/sit/utl/Utl.java index 8e766ce..d6d53bb 100644 --- a/src/main/java/one/oth3r/sit/utl/Utl.java +++ b/src/main/java/one/oth3r/sit/utl/Utl.java @@ -120,7 +120,7 @@ public class Utl { * @return null if not a valid block */ public static Double getSittingHeight(ServerPlayerEntity player, BlockPos blockPos, @Nullable BlockHitResult hit) { - ServerWorld serverWorld = player.getWorld(); + ServerWorld serverWorld = player.getServerWorld(); ServerConfig config = FileData.getServerConfig(); BlockState blockState = serverWorld.getBlockState(blockPos); Block block = blockState.getBlock(); @@ -266,7 +266,7 @@ public class Utl { /// FYI it cant purge an entity from a disconnected player or unloaded chunks // get a list of sit entities - List list = player.getWorld() + List list = player.getServerWorld() .getEntitiesByType(TypeFilter.instanceOf(DisplayEntity.TextDisplayEntity.class), entity -> entity.getName().getString().equals(Data.ENTITY_NAME));