mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
Compare commits
No commits in common. "6dcd99c12a61e15db25d6785166ae874784fd9f1" and "85cc76a022f201786089cc69f26ab30a852968eb" have entirely different histories.
6dcd99c12a
...
85cc76a022
10 changed files with 41 additions and 60 deletions
|
@ -15,10 +15,7 @@ base {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
maven { url = "https://maven.terraformersmc.com/releases/" }
|
maven { url = "https://maven.terraformersmc.com/releases/" }
|
||||||
maven {
|
maven { url = "https://maven.isxander.dev/releases" }
|
||||||
name "oth3rMavenSnapshots"
|
|
||||||
url "https://maven.oth3r.one/snapshots"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
|
|
|
@ -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
|
# v1.2.4.3
|
||||||
* added a max OtterLib version as the beta will have breaking changes between major versions
|
* added a max OtterLib version as the beta will have breaking changes between major versions
|
||||||
|
|
||||||
|
|
|
@ -4,21 +4,21 @@ org.gradle.parallel=true
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
min_minecraft_version=1.21.6
|
min_minecraft_version=1.21.5
|
||||||
max_minecraft_version=1.21.6
|
max_minecraft_version=1.21.5
|
||||||
minecraft_versions=1.21.6
|
minecraft_versions=1.21.5
|
||||||
|
|
||||||
minecraft_version=1.21.6
|
minecraft_version=1.21.5
|
||||||
yarn_mappings=1.21.6+build.1
|
yarn_mappings=1.21.5+build.1
|
||||||
loader_version=0.16.14
|
loader_version=0.16.14
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.2.4.4+1.21.6
|
mod_version=1.2.4.3+1.21.5
|
||||||
maven_group=one.oth3r
|
maven_group=one.oth3r
|
||||||
file_name=sit!
|
file_name=sit!
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.127.1+1.21.6
|
fabric_version=0.124.0+1.21.5
|
||||||
modmenu_version=15.0.0-beta.1
|
modmenu_version=14.0.0-rc.2
|
||||||
otterlib_version=0.2.0.0+1.21.6-fabric
|
otterlib_version=0.1.2.1+1.21.5-fabric
|
||||||
otterlib_max_version=0.3.0.0+1.21.6-fabric
|
otterlib_max_version=0.2.0.0+1.21.5-fabric
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
7
gradle/wrapper/gradle-wrapper.properties
vendored
7
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -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
|
|
25
gradlew
vendored
25
gradlew
vendored
|
@ -15,8 +15,6 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
|
@ -57,7 +55,7 @@
|
||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (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.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
@ -85,8 +83,7 @@ done
|
||||||
# This is normally unused
|
# This is normally unused
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
@ -114,7 +111,7 @@ case "$( uname )" in #(
|
||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH="\\\"\\\""
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
|
@ -147,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC2039,SC3045
|
# shellcheck disable=SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
|
@ -155,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC2039,SC3045
|
# shellcheck disable=SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
|
@ -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.
|
# 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"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command;
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
# and any embedded shellness will be escaped.
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# double quotes to make sure that they get re-expanded; and
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|
26
gradlew.bat
vendored
26
gradlew.bat
vendored
|
@ -13,8 +13,6 @@
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
@rem SPDX-License-Identifier: Apache-2.0
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
@ -45,11 +43,11 @@ set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
@ -59,22 +57,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@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
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class Events {
|
||||||
// just send the sit command
|
// just send the sit command
|
||||||
if (Data.isInGame()) {
|
if (Data.isInGame()) {
|
||||||
if (Data.isSupportedServer()) {
|
if (Data.isSupportedServer()) {
|
||||||
player.networkHandler.sendChatCommand("sit");
|
player.networkHandler.sendCommand("sit");
|
||||||
} else {
|
} else {
|
||||||
// unsupported server message if not in a Sit! server
|
// unsupported server message if not in a Sit! server
|
||||||
player.sendMessage(Chat.lang("sit!.chat.unsupported")
|
player.sendMessage(Chat.lang("sit!.chat.unsupported")
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class Logic {
|
||||||
// check if the block is in the right y level limits from the config
|
// check if the block is in the right y level limits from the config
|
||||||
if (!checkYLimits(player, blockPos)) return false;
|
if (!checkYLimits(player, blockPos)) return false;
|
||||||
|
|
||||||
ServerWorld serverWorld = player.getWorld();
|
ServerWorld serverWorld = player.getServerWorld();
|
||||||
|
|
||||||
Double sitHeight = Utl.getSittingHeight(player,blockPos,hitResult);
|
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) {
|
public static boolean sit(ServerPlayerEntity player, BlockPos blockPos, @Nullable BlockHitResult hitResult) {
|
||||||
if (!canSit(player, blockPos, hitResult)) return false;
|
if (!canSit(player, blockPos, hitResult)) return false;
|
||||||
// assets
|
// assets
|
||||||
ServerWorld serverWorld = player.getWorld();
|
ServerWorld serverWorld = player.getServerWorld();
|
||||||
Double sitHeight = Utl.getSittingHeight(player,blockPos,hitResult);
|
Double sitHeight = Utl.getSittingHeight(player,blockPos,hitResult);
|
||||||
// shouldn't be null because we already checked, but do another check to clear IDE errors
|
// shouldn't be null because we already checked, but do another check to clear IDE errors
|
||||||
assert sitHeight != null;
|
assert sitHeight != null;
|
||||||
|
@ -77,7 +77,7 @@ public class Logic {
|
||||||
* @return true if sitting was successful
|
* @return true if sitting was successful
|
||||||
*/
|
*/
|
||||||
public static boolean sitLooking(ServerPlayerEntity player) {
|
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);
|
Utl.getPlayerReach(player)),null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ public class Logic {
|
||||||
// get the new entity
|
// get the new entity
|
||||||
DisplayEntity.TextDisplayEntity sitEntity = Data.getSpawnList().get(player);
|
DisplayEntity.TextDisplayEntity sitEntity = Data.getSpawnList().get(player);
|
||||||
// spawn and ride the entity
|
// spawn and ride the entity
|
||||||
player.getWorld().spawnEntity(sitEntity);
|
player.getServerWorld().spawnEntity(sitEntity);
|
||||||
player.startRiding(sitEntity);
|
player.startRiding(sitEntity);
|
||||||
// add the entity to the list
|
// add the entity to the list
|
||||||
Data.addSitEntity(player, sitEntity);
|
Data.addSitEntity(player, sitEntity);
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class Utl {
|
||||||
* @return null if not a valid block
|
* @return null if not a valid block
|
||||||
*/
|
*/
|
||||||
public static Double getSittingHeight(ServerPlayerEntity player, BlockPos blockPos, @Nullable BlockHitResult hit) {
|
public static Double getSittingHeight(ServerPlayerEntity player, BlockPos blockPos, @Nullable BlockHitResult hit) {
|
||||||
ServerWorld serverWorld = player.getWorld();
|
ServerWorld serverWorld = player.getServerWorld();
|
||||||
ServerConfig config = FileData.getServerConfig();
|
ServerConfig config = FileData.getServerConfig();
|
||||||
BlockState blockState = serverWorld.getBlockState(blockPos);
|
BlockState blockState = serverWorld.getBlockState(blockPos);
|
||||||
Block block = blockState.getBlock();
|
Block block = blockState.getBlock();
|
||||||
|
@ -266,7 +266,7 @@ public class Utl {
|
||||||
/// FYI it cant purge an entity from a disconnected player or unloaded chunks
|
/// FYI it cant purge an entity from a disconnected player or unloaded chunks
|
||||||
|
|
||||||
// get a list of sit entities
|
// get a list of sit entities
|
||||||
List<? extends DisplayEntity.TextDisplayEntity> list = player.getWorld()
|
List<? extends DisplayEntity.TextDisplayEntity> list = player.getServerWorld()
|
||||||
.getEntitiesByType(TypeFilter.instanceOf(DisplayEntity.TextDisplayEntity.class),
|
.getEntitiesByType(TypeFilter.instanceOf(DisplayEntity.TextDisplayEntity.class),
|
||||||
entity -> entity.getName().getString().equals(Data.ENTITY_NAME));
|
entity -> entity.getName().getString().equals(Data.ENTITY_NAME));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue