Replace player-animation-lib with the Saturn emote library
- Every version depends on org.saturnclient:emotes-fabric
(${emotes_version}+<mc>, bundled). playEmote plays Saturn's emotes
through it, and sneaking stops your own emote and tells the server.
Emotes now work on 1.21.6+ too, where player-animation-lib was
commented out.
- Removed every player-animation-lib and bendy-lib reference: the KoSmX
repository, the dependencies, the player_anim properties, and the old
(partly commented out) code in SaturnProviderImpl and KeyInputHandler.
- Build: Loom 1.15 -> 1.17.21 (the emotes jar is built with 1.17 and
older Loom refuses it), Gradle 9.3 -> 9.8 (needed by Loom 1.17), and
sourceSets moved out of the dependencies block in the root build.gradle,
which Gradle 9.8 rejects.
- common: points at the emote-library branch (saturnclientmc/common#5).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+6
-5
@@ -4,6 +4,7 @@ subprojects {
|
||||
repositories {
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url "https://git.selimaj.dev/api/packages/selimaj-dev/maven" }
|
||||
maven { url "https://git.selimaj.dev/api/packages/saturnclientmc/maven" }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@@ -19,12 +20,12 @@ subprojects {
|
||||
configure(subprojects.findAll { it.name != "common" }) {
|
||||
dependencies {
|
||||
implementation project(":common")
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
resources {
|
||||
srcDir project(":common").file("src/main/resources")
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
resources {
|
||||
srcDir project(":common").file("src/main/resources")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
Submodule common updated: 5df42e2b7c...b2cf0cbc38
@@ -7,3 +7,6 @@ org.gradle.caching=true
|
||||
org.gradle.configuration-cache=false
|
||||
|
||||
mod_version=0.1.1-beta
|
||||
|
||||
# Saturn's emote library (git.selimaj.dev/saturnclientmc/emotes)
|
||||
emotes_version=0.1.0
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
# ksh gradlew
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
@@ -57,7 +57,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/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
Vendored
+52
-33
@@ -19,12 +19,39 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem gradlew startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
@rem Catch executions from older scripts and ensure they exit cleanly.
|
||||
@rem This can be removed once we can be reasonably confident that few people
|
||||
@rem will be migrating directly to this new wrapper.
|
||||
goto afterSafetyNet
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
goto exitWithErrorLevel
|
||||
:afterSafetyNet
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -45,13 +72,14 @@ 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
|
||||
1>&2 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.
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto exitWithErrorLevel
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -59,35 +87,26 @@ 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
|
||||
1>&2 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.
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto exitWithErrorLevel
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
@rem Execute gradlew
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel & goto exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem This label must not be changed. We rely on old scripts being able to jump to this point.
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
|
||||
@@ -11,7 +11,6 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
|
||||
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' }
|
||||
}
|
||||
|
||||
@@ -24,10 +23,8 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// Player Animation Library
|
||||
// include modImplementation(
|
||||
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
|
||||
// )
|
||||
// Saturn's emote library (limb bending, Emotecraft emotes)
|
||||
include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
|
||||
|
||||
implementation project(":common")
|
||||
|
||||
@@ -37,11 +34,6 @@ dependencies {
|
||||
include implementation("com.fasterxml.jackson.core:jackson-databind:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
|
||||
|
||||
// Optional: BendyLib
|
||||
// include modRuntimeOnly(
|
||||
// "io.github.kosmx.bendy-lib:bendy-lib-fabric:${project.bendylib_version}"
|
||||
// )
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
|
||||
minecraft_version=1.21.10
|
||||
yarn_mappings=1.21.10+build.3
|
||||
loader_version=0.19.0
|
||||
loom_version=1.15-SNAPSHOT
|
||||
loom_version=1.17.21
|
||||
|
||||
fabric_api_version=0.138.4+1.21.10
|
||||
|
||||
# Mod Properties
|
||||
maven_group=org.saturnclient
|
||||
archives_base_name=saturn-client
|
||||
|
||||
# player_anim = 2.0.2+1.21.5
|
||||
|
||||
+8
-25
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
|
||||
import org.saturnclient.common.provider.SaturnProvider;
|
||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||
import org.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
|
||||
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
|
||||
|
||||
@Override
|
||||
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
|
||||
// if (SaturnClient.client == null || SaturnClient.client.world == null) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
|
||||
// if (!player.getUuid().equals(fromPlayerUuid)) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
|
||||
|
||||
// if (emoteIdOrNull != null && !emoteIdOrNull.isEmpty()) {
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
// animationStack.addAnimLayer(1000,
|
||||
// PlayerAnimationRegistry
|
||||
// .getAnimation(Identifier.of("saturnclient", emoteIdOrNull))
|
||||
// .playAnimation());
|
||||
// } else {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
|
||||
// break;
|
||||
// }
|
||||
if (fromPlayerUuid == null) {
|
||||
return;
|
||||
}
|
||||
// An empty or unknown ID stops whatever the player is playing.
|
||||
Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
|
||||
emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
|
||||
() -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
-10
@@ -9,12 +9,11 @@ import net.minecraft.util.Identifier;
|
||||
import org.saturnclient.config.Config;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.common.provider.Providers;
|
||||
import org.saturnclient.client.ServiceClient;
|
||||
import org.saturnclient.emotes.fabric.Emotes;
|
||||
import org.saturnclient.ui.screens.EmoteWheel;
|
||||
import org.saturnclient.ui.screens.ShiftMenu;
|
||||
|
||||
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/**
|
||||
@@ -45,13 +44,11 @@ public class KeyInputHandler {
|
||||
Providers.saturn.getClient().setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) {
|
||||
// AnimationStack animationStack =
|
||||
// PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// ServiceClient.emote("");
|
||||
// }
|
||||
// Sneaking cancels your own emote, for everyone.
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
|
||||
&& Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
|
||||
Emotes.stop(SaturnClient.client.player.getUuid());
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
|
||||
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' }
|
||||
}
|
||||
|
||||
@@ -24,10 +23,8 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// Player Animation Library
|
||||
// include modImplementation(
|
||||
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
|
||||
// )
|
||||
// Saturn's emote library (limb bending, Emotecraft emotes)
|
||||
include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
|
||||
|
||||
implementation project(":common")
|
||||
|
||||
@@ -37,11 +34,6 @@ dependencies {
|
||||
include implementation("com.fasterxml.jackson.core:jackson-databind:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
|
||||
|
||||
// Optional: BendyLib
|
||||
// include modRuntimeOnly(
|
||||
// "io.github.kosmx.bendy-lib:bendy-lib-fabric:${project.bendylib_version}"
|
||||
// )
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
|
||||
minecraft_version=1.21.11
|
||||
yarn_mappings=1.21.11+build.4
|
||||
loader_version=0.19.0
|
||||
loom_version=1.15-SNAPSHOT
|
||||
loom_version=1.17.21
|
||||
|
||||
fabric_api_version=0.141.3+1.21.11
|
||||
|
||||
# Mod Properties
|
||||
maven_group=org.saturnclient
|
||||
archives_base_name=saturn-client
|
||||
|
||||
# player_anim = 2.0.2+1.21.5
|
||||
|
||||
+8
-25
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
|
||||
import org.saturnclient.common.provider.SaturnProvider;
|
||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||
import org.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
|
||||
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
|
||||
|
||||
@Override
|
||||
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
|
||||
// if (SaturnClient.client == null || SaturnClient.client.world == null) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
|
||||
// if (!player.getUuid().equals(fromPlayerUuid)) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
|
||||
|
||||
// if (emoteIdOrNull != null && !emoteIdOrNull.isEmpty()) {
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
// animationStack.addAnimLayer(1000,
|
||||
// PlayerAnimationRegistry
|
||||
// .getAnimation(Identifier.of("saturnclient", emoteIdOrNull))
|
||||
// .playAnimation());
|
||||
// } else {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
|
||||
// break;
|
||||
// }
|
||||
if (fromPlayerUuid == null) {
|
||||
return;
|
||||
}
|
||||
// An empty or unknown ID stops whatever the player is playing.
|
||||
Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
|
||||
emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
|
||||
() -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
-10
@@ -9,12 +9,11 @@ import net.minecraft.util.Identifier;
|
||||
import org.saturnclient.config.Config;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.common.provider.Providers;
|
||||
import org.saturnclient.client.ServiceClient;
|
||||
import org.saturnclient.emotes.fabric.Emotes;
|
||||
import org.saturnclient.ui.screens.EmoteWheel;
|
||||
import org.saturnclient.ui.screens.ShiftMenu;
|
||||
|
||||
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/**
|
||||
@@ -45,13 +44,11 @@ public class KeyInputHandler {
|
||||
Providers.saturn.getClient().setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) {
|
||||
// AnimationStack animationStack =
|
||||
// PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// ServiceClient.emote("");
|
||||
// }
|
||||
// Sneaking cancels your own emote, for everyone.
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
|
||||
&& Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
|
||||
Emotes.stop(SaturnClient.client.player.getUuid());
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
|
||||
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' }
|
||||
}
|
||||
|
||||
@@ -24,10 +23,8 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// Player Animation Library
|
||||
include modImplementation(
|
||||
"dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
|
||||
)
|
||||
// Saturn's emote library (limb bending, Emotecraft emotes)
|
||||
include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
|
||||
|
||||
implementation project(":common")
|
||||
|
||||
@@ -37,11 +34,6 @@ dependencies {
|
||||
include implementation("com.fasterxml.jackson.core:jackson-databind:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
|
||||
|
||||
// Optional: BendyLib
|
||||
// include modRuntimeOnly(
|
||||
// "io.github.kosmx.bendy-lib:bendy-lib-fabric:${project.bendylib_version}"
|
||||
// )
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,7 +10,7 @@ org.gradle.configuration-cache=false
|
||||
minecraft_version=1.21.4
|
||||
yarn_mappings=1.21.4+build.8
|
||||
loader_version=0.18.4
|
||||
loom_version=1.15-SNAPSHOT
|
||||
loom_version=1.17.21
|
||||
|
||||
# Mod Properties
|
||||
maven_group=org.saturnclient
|
||||
@@ -18,5 +18,3 @@ archives_base_name=saturn-client
|
||||
|
||||
# Dependencies
|
||||
fabric_api_version=0.119.4+1.21.4
|
||||
|
||||
player_anim = 2.0.3+1.21.4
|
||||
|
||||
+6
-29
@@ -11,15 +11,10 @@ import net.minecraft.text.Text;
|
||||
import org.saturnclient.common.provider.SaturnProvider;
|
||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||
import org.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
|
||||
import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationRegistry;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class SaturnProviderImpl implements SaturnProvider {
|
||||
@Override
|
||||
public MinecraftClientRef getClient() {
|
||||
@@ -28,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
|
||||
|
||||
@Override
|
||||
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
|
||||
if (SaturnClient.client == null || SaturnClient.client.world == null) {
|
||||
if (fromPlayerUuid == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
|
||||
if (!player.getUuid().equals(fromPlayerUuid)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
|
||||
|
||||
if (emoteIdOrNull != null && !emoteIdOrNull.isEmpty()) {
|
||||
if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
animationStack.removeLayer(1000);
|
||||
}
|
||||
animationStack.addAnimLayer(1000,
|
||||
PlayerAnimationRegistry
|
||||
.getAnimation(Identifier.of("saturnclient", emoteIdOrNull))
|
||||
.playAnimation());
|
||||
} else {
|
||||
animationStack.removeLayer(1000);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
// An empty or unknown ID stops whatever the player is playing.
|
||||
Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
|
||||
emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
|
||||
() -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-9
@@ -9,12 +9,10 @@ import org.saturnclient.config.Config;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.client.ServiceClient;
|
||||
import org.saturnclient.common.provider.Providers;
|
||||
import org.saturnclient.emotes.fabric.Emotes;
|
||||
import org.saturnclient.ui.screens.EmoteWheel;
|
||||
import org.saturnclient.ui.screens.ShiftMenu;
|
||||
|
||||
import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/**
|
||||
@@ -45,12 +43,11 @@ public class KeyInputHandler {
|
||||
Providers.saturn.getClient().setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) {
|
||||
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
animationStack.removeLayer(1000);
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
// Sneaking cancels your own emote, for everyone.
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
|
||||
&& Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
|
||||
Emotes.stop(SaturnClient.client.player.getUuid());
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
|
||||
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' }
|
||||
}
|
||||
|
||||
@@ -24,10 +23,8 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// Player Animation Library
|
||||
include modImplementation(
|
||||
"dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
|
||||
)
|
||||
// Saturn's emote library (limb bending, Emotecraft emotes)
|
||||
include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
|
||||
|
||||
implementation project(":common")
|
||||
|
||||
@@ -37,11 +34,6 @@ dependencies {
|
||||
include implementation("com.fasterxml.jackson.core:jackson-databind:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
|
||||
|
||||
// Optional: BendyLib
|
||||
// include modRuntimeOnly(
|
||||
// "io.github.kosmx.bendy-lib:bendy-lib-fabric:${project.bendylib_version}"
|
||||
// )
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
|
||||
minecraft_version=1.21.5
|
||||
yarn_mappings=1.21.5+build.1
|
||||
loader_version=0.18.4
|
||||
loom_version=1.15-SNAPSHOT
|
||||
loom_version=1.17.21
|
||||
|
||||
fabric_api_version=0.128.2+1.21.5
|
||||
|
||||
# Mod Properties
|
||||
maven_group=org.saturnclient
|
||||
archives_base_name=saturn-client
|
||||
|
||||
player_anim = 2.0.2+1.21.5
|
||||
|
||||
+6
-29
@@ -11,15 +11,10 @@ import net.minecraft.text.Text;
|
||||
import org.saturnclient.common.provider.SaturnProvider;
|
||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||
import org.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
|
||||
import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationRegistry;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class SaturnProviderImpl implements SaturnProvider {
|
||||
@Override
|
||||
public MinecraftClientRef getClient() {
|
||||
@@ -28,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
|
||||
|
||||
@Override
|
||||
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
|
||||
if (SaturnClient.client == null || SaturnClient.client.world == null) {
|
||||
if (fromPlayerUuid == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
|
||||
if (!player.getUuid().equals(fromPlayerUuid)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
|
||||
|
||||
if (emoteIdOrNull != null && !emoteIdOrNull.isEmpty()) {
|
||||
if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
animationStack.removeLayer(1000);
|
||||
}
|
||||
animationStack.addAnimLayer(1000,
|
||||
PlayerAnimationRegistry
|
||||
.getAnimation(Identifier.of("saturnclient", emoteIdOrNull))
|
||||
.playAnimation());
|
||||
} else {
|
||||
animationStack.removeLayer(1000);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
// An empty or unknown ID stops whatever the player is playing.
|
||||
Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
|
||||
emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
|
||||
() -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-9
@@ -9,12 +9,10 @@ import org.saturnclient.config.Config;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.client.ServiceClient;
|
||||
import org.saturnclient.common.provider.Providers;
|
||||
import org.saturnclient.emotes.fabric.Emotes;
|
||||
import org.saturnclient.ui.screens.EmoteWheel;
|
||||
import org.saturnclient.ui.screens.ShiftMenu;
|
||||
|
||||
import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/**
|
||||
@@ -45,12 +43,11 @@ public class KeyInputHandler {
|
||||
Providers.saturn.getClient().setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) {
|
||||
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
animationStack.removeLayer(1000);
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
// Sneaking cancels your own emote, for everyone.
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
|
||||
&& Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
|
||||
Emotes.stop(SaturnClient.client.player.getUuid());
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
|
||||
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' }
|
||||
}
|
||||
|
||||
@@ -24,10 +23,8 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// Player Animation Library
|
||||
// include modImplementation(
|
||||
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
|
||||
// )
|
||||
// Saturn's emote library (limb bending, Emotecraft emotes)
|
||||
include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
|
||||
|
||||
implementation project(":common")
|
||||
|
||||
@@ -37,11 +34,6 @@ dependencies {
|
||||
include implementation("com.fasterxml.jackson.core:jackson-databind:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
|
||||
|
||||
// Optional: BendyLib
|
||||
// include modRuntimeOnly(
|
||||
// "io.github.kosmx.bendy-lib:bendy-lib-fabric:${project.bendylib_version}"
|
||||
// )
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
|
||||
minecraft_version=1.21.6
|
||||
yarn_mappings=1.21.6+build.1
|
||||
loader_version=0.18.5
|
||||
loom_version=1.15-SNAPSHOT
|
||||
loom_version=1.17.21
|
||||
|
||||
fabric_api_version=0.128.2+1.21.6
|
||||
|
||||
# Mod Properties
|
||||
maven_group=org.saturnclient
|
||||
archives_base_name=saturn-client
|
||||
|
||||
# player_anim = 2.0.2+1.21.5
|
||||
|
||||
+8
-25
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
|
||||
import org.saturnclient.common.provider.SaturnProvider;
|
||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||
import org.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
|
||||
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
|
||||
|
||||
@Override
|
||||
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
|
||||
// if (SaturnClient.client == null || SaturnClient.client.world == null) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
|
||||
// if (!player.getUuid().equals(fromPlayerUuid)) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
|
||||
|
||||
// if (emoteIdOrNull != null && !emoteIdOrNull.isEmpty()) {
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
// animationStack.addAnimLayer(1000,
|
||||
// PlayerAnimationRegistry
|
||||
// .getAnimation(Identifier.of("saturnclient", emoteIdOrNull))
|
||||
// .playAnimation());
|
||||
// } else {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
|
||||
// break;
|
||||
// }
|
||||
if (fromPlayerUuid == null) {
|
||||
return;
|
||||
}
|
||||
// An empty or unknown ID stops whatever the player is playing.
|
||||
Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
|
||||
emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
|
||||
() -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
-9
@@ -8,12 +8,11 @@ import net.minecraft.client.util.InputUtil;
|
||||
import org.saturnclient.config.Config;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.common.provider.Providers;
|
||||
import org.saturnclient.client.ServiceClient;
|
||||
import org.saturnclient.emotes.fabric.Emotes;
|
||||
import org.saturnclient.ui.screens.EmoteWheel;
|
||||
import org.saturnclient.ui.screens.ShiftMenu;
|
||||
|
||||
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/**
|
||||
@@ -44,12 +43,11 @@ public class KeyInputHandler {
|
||||
Providers.saturn.getClient().setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) {
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// ServiceClient.emote("");
|
||||
// }
|
||||
// Sneaking cancels your own emote, for everyone.
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
|
||||
&& Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
|
||||
Emotes.stop(SaturnClient.client.player.getUuid());
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
|
||||
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' }
|
||||
}
|
||||
|
||||
@@ -24,10 +23,8 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// Player Animation Library
|
||||
// include modImplementation(
|
||||
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
|
||||
// )
|
||||
// Saturn's emote library (limb bending, Emotecraft emotes)
|
||||
include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
|
||||
|
||||
implementation project(":common")
|
||||
|
||||
@@ -37,11 +34,6 @@ dependencies {
|
||||
include implementation("com.fasterxml.jackson.core:jackson-databind:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
|
||||
|
||||
// Optional: BendyLib
|
||||
// include modRuntimeOnly(
|
||||
// "io.github.kosmx.bendy-lib:bendy-lib-fabric:${project.bendylib_version}"
|
||||
// )
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
|
||||
minecraft_version=1.21.7
|
||||
yarn_mappings=1.21.7+build.8
|
||||
loader_version=0.19.0
|
||||
loom_version=1.15-SNAPSHOT
|
||||
loom_version=1.17.21
|
||||
|
||||
fabric_api_version=0.129.0+1.21.7
|
||||
|
||||
# Mod Properties
|
||||
maven_group=org.saturnclient
|
||||
archives_base_name=saturn-client
|
||||
|
||||
# player_anim = 2.0.2+1.21.5
|
||||
|
||||
+8
-25
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
|
||||
import org.saturnclient.common.provider.SaturnProvider;
|
||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||
import org.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
|
||||
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
|
||||
|
||||
@Override
|
||||
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
|
||||
// if (SaturnClient.client == null || SaturnClient.client.world == null) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
|
||||
// if (!player.getUuid().equals(fromPlayerUuid)) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
|
||||
|
||||
// if (emoteIdOrNull != null && !emoteIdOrNull.isEmpty()) {
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
// animationStack.addAnimLayer(1000,
|
||||
// PlayerAnimationRegistry
|
||||
// .getAnimation(Identifier.of("saturnclient", emoteIdOrNull))
|
||||
// .playAnimation());
|
||||
// } else {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
|
||||
// break;
|
||||
// }
|
||||
if (fromPlayerUuid == null) {
|
||||
return;
|
||||
}
|
||||
// An empty or unknown ID stops whatever the player is playing.
|
||||
Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
|
||||
emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
|
||||
() -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
-9
@@ -8,12 +8,11 @@ import net.minecraft.client.util.InputUtil;
|
||||
import org.saturnclient.config.Config;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.common.provider.Providers;
|
||||
import org.saturnclient.client.ServiceClient;
|
||||
import org.saturnclient.emotes.fabric.Emotes;
|
||||
import org.saturnclient.ui.screens.EmoteWheel;
|
||||
import org.saturnclient.ui.screens.ShiftMenu;
|
||||
|
||||
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/**
|
||||
@@ -44,12 +43,11 @@ public class KeyInputHandler {
|
||||
Providers.saturn.getClient().setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) {
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// ServiceClient.emote("");
|
||||
// }
|
||||
// Sneaking cancels your own emote, for everyone.
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
|
||||
&& Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
|
||||
Emotes.stop(SaturnClient.client.player.getUuid());
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
|
||||
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' }
|
||||
}
|
||||
|
||||
@@ -24,10 +23,8 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// Player Animation Library
|
||||
// include modImplementation(
|
||||
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
|
||||
// )
|
||||
// Saturn's emote library (limb bending, Emotecraft emotes)
|
||||
include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
|
||||
|
||||
implementation project(":common")
|
||||
|
||||
@@ -37,11 +34,6 @@ dependencies {
|
||||
include implementation("com.fasterxml.jackson.core:jackson-databind:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
|
||||
|
||||
// Optional: BendyLib
|
||||
// include modRuntimeOnly(
|
||||
// "io.github.kosmx.bendy-lib:bendy-lib-fabric:${project.bendylib_version}"
|
||||
// )
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
|
||||
minecraft_version=1.21.8
|
||||
yarn_mappings=1.21.8+build.1
|
||||
loader_version=0.19.0
|
||||
loom_version=1.15-SNAPSHOT
|
||||
loom_version=1.17.21
|
||||
|
||||
fabric_api_version=0.136.1+1.21.8
|
||||
|
||||
# Mod Properties
|
||||
maven_group=org.saturnclient
|
||||
archives_base_name=saturn-client
|
||||
|
||||
# player_anim = 2.0.2+1.21.5
|
||||
|
||||
+8
-25
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
|
||||
import org.saturnclient.common.provider.SaturnProvider;
|
||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||
import org.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
|
||||
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
|
||||
|
||||
@Override
|
||||
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
|
||||
// if (SaturnClient.client == null || SaturnClient.client.world == null) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
|
||||
// if (!player.getUuid().equals(fromPlayerUuid)) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
|
||||
|
||||
// if (emoteIdOrNull != null && !emoteIdOrNull.isEmpty()) {
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
// animationStack.addAnimLayer(1000,
|
||||
// PlayerAnimationRegistry
|
||||
// .getAnimation(Identifier.of("saturnclient", emoteIdOrNull))
|
||||
// .playAnimation());
|
||||
// } else {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
|
||||
// break;
|
||||
// }
|
||||
if (fromPlayerUuid == null) {
|
||||
return;
|
||||
}
|
||||
// An empty or unknown ID stops whatever the player is playing.
|
||||
Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
|
||||
emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
|
||||
() -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
-9
@@ -8,12 +8,11 @@ import net.minecraft.client.util.InputUtil;
|
||||
import org.saturnclient.config.Config;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.common.provider.Providers;
|
||||
import org.saturnclient.client.ServiceClient;
|
||||
import org.saturnclient.emotes.fabric.Emotes;
|
||||
import org.saturnclient.ui.screens.EmoteWheel;
|
||||
import org.saturnclient.ui.screens.ShiftMenu;
|
||||
|
||||
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/**
|
||||
@@ -44,12 +43,11 @@ public class KeyInputHandler {
|
||||
Providers.saturn.getClient().setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) {
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// ServiceClient.emote("");
|
||||
// }
|
||||
// Sneaking cancels your own emote, for everyone.
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
|
||||
&& Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
|
||||
Emotes.stop(SaturnClient.client.player.getUuid());
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
|
||||
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' }
|
||||
}
|
||||
|
||||
@@ -24,10 +23,8 @@ dependencies {
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// Player Animation Library
|
||||
// include modImplementation(
|
||||
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
|
||||
// )
|
||||
// Saturn's emote library (limb bending, Emotecraft emotes)
|
||||
include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
|
||||
|
||||
implementation project(":common")
|
||||
|
||||
@@ -37,11 +34,6 @@ dependencies {
|
||||
include implementation("com.fasterxml.jackson.core:jackson-databind:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-annotations:2.17.0")
|
||||
include implementation("com.fasterxml.jackson.core:jackson-core:2.17.0")
|
||||
|
||||
// Optional: BendyLib
|
||||
// include modRuntimeOnly(
|
||||
// "io.github.kosmx.bendy-lib:bendy-lib-fabric:${project.bendylib_version}"
|
||||
// )
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
|
||||
minecraft_version=1.21.9
|
||||
yarn_mappings=1.21.9+build.1
|
||||
loader_version=0.19.0
|
||||
loom_version=1.15-SNAPSHOT
|
||||
loom_version=1.17.21
|
||||
|
||||
fabric_api_version=0.134.1+1.21.9
|
||||
|
||||
# Mod Properties
|
||||
maven_group=org.saturnclient
|
||||
archives_base_name=saturn-client
|
||||
|
||||
# player_anim = 2.0.2+1.21.5
|
||||
|
||||
+8
-25
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
|
||||
import org.saturnclient.common.provider.SaturnProvider;
|
||||
import org.saturnclient.common.ref.asset.IdentifierRef;
|
||||
import org.saturnclient.common.ref.game.MinecraftClientRef;
|
||||
import org.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
|
||||
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
|
||||
|
||||
@Override
|
||||
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
|
||||
// if (SaturnClient.client == null || SaturnClient.client.world == null) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) {
|
||||
// if (!player.getUuid().equals(fromPlayerUuid)) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(player);
|
||||
|
||||
// if (emoteIdOrNull != null && !emoteIdOrNull.isEmpty()) {
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
// animationStack.addAnimLayer(1000,
|
||||
// PlayerAnimationRegistry
|
||||
// .getAnimation(Identifier.of("saturnclient", emoteIdOrNull))
|
||||
// .playAnimation());
|
||||
// } else {
|
||||
// animationStack.removeLayer(1000);
|
||||
// }
|
||||
|
||||
// break;
|
||||
// }
|
||||
if (fromPlayerUuid == null) {
|
||||
return;
|
||||
}
|
||||
// An empty or unknown ID stops whatever the player is playing.
|
||||
Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
|
||||
emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
|
||||
() -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
-10
@@ -9,12 +9,11 @@ import net.minecraft.util.Identifier;
|
||||
import org.saturnclient.config.Config;
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.common.provider.Providers;
|
||||
import org.saturnclient.client.ServiceClient;
|
||||
import org.saturnclient.emotes.fabric.Emotes;
|
||||
import org.saturnclient.ui.screens.EmoteWheel;
|
||||
import org.saturnclient.ui.screens.ShiftMenu;
|
||||
|
||||
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
|
||||
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/**
|
||||
@@ -45,13 +44,11 @@ public class KeyInputHandler {
|
||||
Providers.saturn.getClient().setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) {
|
||||
// AnimationStack animationStack =
|
||||
// PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
// if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
// animationStack.removeLayer(1000);
|
||||
// ServiceClient.emote("");
|
||||
// }
|
||||
// Sneaking cancels your own emote, for everyone.
|
||||
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
|
||||
&& Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
|
||||
Emotes.stop(SaturnClient.client.player.getUuid());
|
||||
ServiceClient.emote("");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user