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:
2026-09-26 21:16:29 +02:00
co-authored by claude
parent 090e5132b2
commit 9126faa11c
39 changed files with 204 additions and 430 deletions
+6 -5
View File
@@ -4,6 +4,7 @@ subprojects {
repositories { repositories {
maven { url "https://maven.fabricmc.net/" } 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/selimaj-dev/maven" }
maven { url "https://git.selimaj.dev/api/packages/saturnclientmc/maven" }
mavenCentral() mavenCentral()
} }
@@ -19,12 +20,12 @@ subprojects {
configure(subprojects.findAll { it.name != "common" }) { configure(subprojects.findAll { it.name != "common" }) {
dependencies { dependencies {
implementation project(":common") implementation project(":common")
}
sourceSets { sourceSets {
main { main {
resources { resources {
srcDir project(":common").file("src/main/resources") srcDir project(":common").file("src/main/resources")
}
} }
} }
} }
+1 -1
Submodule common updated: 5df42e2b7c...b2cf0cbc38
+3
View File
@@ -7,3 +7,6 @@ org.gradle.caching=true
org.gradle.configuration-cache=false org.gradle.configuration-cache=false
mod_version=0.1.1-beta mod_version=0.1.1-beta
# Saturn's emote library (git.selimaj.dev/saturnclientmc/emotes)
emotes_version=0.1.0
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
Vendored
+3 -3
View File
@@ -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: # Important for running:
# #
@@ -29,7 +29,7 @@
# bash, then to run this script, type that shell name before the whole # bash, then to run this script, type that shell name before the whole
# command line, like: # command line, like:
# #
# ksh Gradle # ksh gradlew
# #
# Busybox and similar reduced shells will NOT work, because this script # Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features: # requires all of these POSIX shell features:
@@ -57,7 +57,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/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/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/.
Vendored
+52 -33
View File
@@ -19,12 +19,39 @@
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem gradlew startup script for Windows
@rem @rem
@rem ########################################################################## @rem ##########################################################################
@rem Set local scope for the variables with windows NT shell @rem Set local scope for the variables, and ensure extensions are enabled
if "%OS%"=="Windows_NT" setlocal 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 set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@@ -45,13 +72,14 @@ 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 1>&2 echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 1>&2 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo. 1>&2 1>&2 echo.
echo Please set the JAVA_HOME variable in your environment to match the 1>&2 1>&2 echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. 1>&2 1>&2 echo location of your Java installation.
goto fail "%COMSPEC%" /c exit 1
goto exitWithErrorLevel
:findJavaFromJavaHome :findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
@@ -59,35 +87,26 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. 1>&2 1>&2 echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 1>&2 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo. 1>&2 1>&2 echo.
echo Please set the JAVA_HOME variable in your environment to match the 1>&2 1>&2 echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. 1>&2 1>&2 echo location of your Java installation.
goto fail "%COMSPEC%" /c exit 1
goto exitWithErrorLevel
:execute :execute
@rem Setup the command line @rem Setup the command line
@rem Execute Gradle @rem Execute gradlew
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* @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 This label must not be changed. We rely on old scripts being able to jump to this point.
@rem End local scope for the variables with windows NT shell :exitWithErrorLevel
if %ERRORLEVEL% equ 0 goto mainEnd @rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
"%COMSPEC%" /c exit %ERRORLEVEL%
: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
+2 -10
View File
@@ -11,7 +11,6 @@ base {
} }
repositories { repositories {
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' } 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. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
// Player Animation Library // Saturn's emote library (limb bending, Emotecraft emotes)
// include modImplementation( include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
// )
implementation project(":common") 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-databind:2.17.0")
include implementation("com.fasterxml.jackson.core:jackson-annotations: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") 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}"
// )
} }
/* /*
+1 -3
View File
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
minecraft_version=1.21.10 minecraft_version=1.21.10
yarn_mappings=1.21.10+build.3 yarn_mappings=1.21.10+build.3
loader_version=0.19.0 loader_version=0.19.0
loom_version=1.15-SNAPSHOT loom_version=1.17.21
fabric_api_version=0.138.4+1.21.10 fabric_api_version=0.138.4+1.21.10
# Mod Properties # Mod Properties
maven_group=org.saturnclient maven_group=org.saturnclient
archives_base_name=saturn-client archives_base_name=saturn-client
# player_anim = 2.0.2+1.21.5
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
import org.saturnclient.common.provider.SaturnProvider; import org.saturnclient.common.provider.SaturnProvider;
import org.saturnclient.common.ref.asset.IdentifierRef; import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.common.ref.game.MinecraftClientRef; import org.saturnclient.common.ref.game.MinecraftClientRef;
import org.saturnclient.cosmetics.Emotes;
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils; import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) { public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
// if (SaturnClient.client == null || SaturnClient.client.world == null) { if (fromPlayerUuid == null) {
// return; return;
// } }
// An empty or unknown ID stops whatever the player is playing.
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
// if (!player.getUuid().equals(fromPlayerUuid)) { emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
// continue; () -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
// }
// 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;
// }
} }
@Override @Override
@@ -9,12 +9,11 @@ import net.minecraft.util.Identifier;
import org.saturnclient.config.Config; import org.saturnclient.config.Config;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.common.provider.Providers; 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.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
/** /**
@@ -45,13 +44,11 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} }
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) { // Sneaking cancels your own emote, for everyone.
// AnimationStack animationStack = if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
// PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player); && Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
// if (animationStack.isActive() && animationStack.getPriority() == 1000) { Emotes.stop(SaturnClient.client.player.getUuid());
// animationStack.removeLayer(1000); ServiceClient.emote("");
// ServiceClient.emote("");
// }
} }
}); });
} }
+2 -10
View File
@@ -11,7 +11,6 @@ base {
} }
repositories { repositories {
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' } 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. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
// Player Animation Library // Saturn's emote library (limb bending, Emotecraft emotes)
// include modImplementation( include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
// )
implementation project(":common") 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-databind:2.17.0")
include implementation("com.fasterxml.jackson.core:jackson-annotations: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") 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}"
// )
} }
/* /*
+1 -3
View File
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
minecraft_version=1.21.11 minecraft_version=1.21.11
yarn_mappings=1.21.11+build.4 yarn_mappings=1.21.11+build.4
loader_version=0.19.0 loader_version=0.19.0
loom_version=1.15-SNAPSHOT loom_version=1.17.21
fabric_api_version=0.141.3+1.21.11 fabric_api_version=0.141.3+1.21.11
# Mod Properties # Mod Properties
maven_group=org.saturnclient maven_group=org.saturnclient
archives_base_name=saturn-client archives_base_name=saturn-client
# player_anim = 2.0.2+1.21.5
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
import org.saturnclient.common.provider.SaturnProvider; import org.saturnclient.common.provider.SaturnProvider;
import org.saturnclient.common.ref.asset.IdentifierRef; import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.common.ref.game.MinecraftClientRef; import org.saturnclient.common.ref.game.MinecraftClientRef;
import org.saturnclient.cosmetics.Emotes;
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils; import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) { public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
// if (SaturnClient.client == null || SaturnClient.client.world == null) { if (fromPlayerUuid == null) {
// return; return;
// } }
// An empty or unknown ID stops whatever the player is playing.
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
// if (!player.getUuid().equals(fromPlayerUuid)) { emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
// continue; () -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
// }
// 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;
// }
} }
@Override @Override
@@ -9,12 +9,11 @@ import net.minecraft.util.Identifier;
import org.saturnclient.config.Config; import org.saturnclient.config.Config;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.common.provider.Providers; 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.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
/** /**
@@ -45,13 +44,11 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} }
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) { // Sneaking cancels your own emote, for everyone.
// AnimationStack animationStack = if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
// PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player); && Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
// if (animationStack.isActive() && animationStack.getPriority() == 1000) { Emotes.stop(SaturnClient.client.player.getUuid());
// animationStack.removeLayer(1000); ServiceClient.emote("");
// ServiceClient.emote("");
// }
} }
}); });
} }
+2 -10
View File
@@ -11,7 +11,6 @@ base {
} }
repositories { repositories {
maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' } 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. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
// Player Animation Library // Saturn's emote library (limb bending, Emotecraft emotes)
include modImplementation( include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
"dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
)
implementation project(":common") 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-databind:2.17.0")
include implementation("com.fasterxml.jackson.core:jackson-annotations: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") 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}"
// )
} }
/* /*
+1 -3
View File
@@ -10,7 +10,7 @@ org.gradle.configuration-cache=false
minecraft_version=1.21.4 minecraft_version=1.21.4
yarn_mappings=1.21.4+build.8 yarn_mappings=1.21.4+build.8
loader_version=0.18.4 loader_version=0.18.4
loom_version=1.15-SNAPSHOT loom_version=1.17.21
# Mod Properties # Mod Properties
maven_group=org.saturnclient maven_group=org.saturnclient
@@ -18,5 +18,3 @@ archives_base_name=saturn-client
# Dependencies # Dependencies
fabric_api_version=0.119.4+1.21.4 fabric_api_version=0.119.4+1.21.4
player_anim = 2.0.3+1.21.4
@@ -11,15 +11,10 @@ import net.minecraft.text.Text;
import org.saturnclient.common.provider.SaturnProvider; import org.saturnclient.common.provider.SaturnProvider;
import org.saturnclient.common.ref.asset.IdentifierRef; import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.common.ref.game.MinecraftClientRef; import org.saturnclient.common.ref.game.MinecraftClientRef;
import org.saturnclient.cosmetics.Emotes;
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils; import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
import org.saturnclient.saturnclient.SaturnClient; 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 { public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public MinecraftClientRef getClient() { public MinecraftClientRef getClient() {
@@ -28,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) { public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
if (SaturnClient.client == null || SaturnClient.client.world == null) { if (fromPlayerUuid == null) {
return; return;
} }
// An empty or unknown ID stops whatever the player is playing.
for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
if (!player.getUuid().equals(fromPlayerUuid)) { emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
continue; () -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
}
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;
}
} }
@Override @Override
@@ -9,12 +9,10 @@ import org.saturnclient.config.Config;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.client.ServiceClient; import org.saturnclient.client.ServiceClient;
import org.saturnclient.common.provider.Providers; import org.saturnclient.common.provider.Providers;
import org.saturnclient.emotes.fabric.Emotes;
import org.saturnclient.ui.screens.EmoteWheel; import org.saturnclient.ui.screens.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
import dev.kosmx.playerAnim.api.layered.AnimationStack;
import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
/** /**
@@ -45,12 +43,11 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} }
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) { // Sneaking cancels your own emote, for everyone.
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player); if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
if (animationStack.isActive() && animationStack.getPriority() == 1000) { && Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
animationStack.removeLayer(1000); Emotes.stop(SaturnClient.client.player.getUuid());
ServiceClient.emote(""); ServiceClient.emote("");
}
} }
}); });
} }
+2 -10
View File
@@ -11,7 +11,6 @@ base {
} }
repositories { repositories {
maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' } 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. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
// Player Animation Library // Saturn's emote library (limb bending, Emotecraft emotes)
include modImplementation( include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
"dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
)
implementation project(":common") 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-databind:2.17.0")
include implementation("com.fasterxml.jackson.core:jackson-annotations: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") 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}"
// )
} }
/* /*
+1 -3
View File
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
minecraft_version=1.21.5 minecraft_version=1.21.5
yarn_mappings=1.21.5+build.1 yarn_mappings=1.21.5+build.1
loader_version=0.18.4 loader_version=0.18.4
loom_version=1.15-SNAPSHOT loom_version=1.17.21
fabric_api_version=0.128.2+1.21.5 fabric_api_version=0.128.2+1.21.5
# Mod Properties # Mod Properties
maven_group=org.saturnclient maven_group=org.saturnclient
archives_base_name=saturn-client archives_base_name=saturn-client
player_anim = 2.0.2+1.21.5
@@ -11,15 +11,10 @@ import net.minecraft.text.Text;
import org.saturnclient.common.provider.SaturnProvider; import org.saturnclient.common.provider.SaturnProvider;
import org.saturnclient.common.ref.asset.IdentifierRef; import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.common.ref.game.MinecraftClientRef; import org.saturnclient.common.ref.game.MinecraftClientRef;
import org.saturnclient.cosmetics.Emotes;
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils; import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
import org.saturnclient.saturnclient.SaturnClient; 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 { public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public MinecraftClientRef getClient() { public MinecraftClientRef getClient() {
@@ -28,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) { public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
if (SaturnClient.client == null || SaturnClient.client.world == null) { if (fromPlayerUuid == null) {
return; return;
} }
// An empty or unknown ID stops whatever the player is playing.
for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
if (!player.getUuid().equals(fromPlayerUuid)) { emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
continue; () -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
}
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;
}
} }
@Override @Override
@@ -9,12 +9,10 @@ import org.saturnclient.config.Config;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.client.ServiceClient; import org.saturnclient.client.ServiceClient;
import org.saturnclient.common.provider.Providers; import org.saturnclient.common.provider.Providers;
import org.saturnclient.emotes.fabric.Emotes;
import org.saturnclient.ui.screens.EmoteWheel; import org.saturnclient.ui.screens.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
import dev.kosmx.playerAnim.api.layered.AnimationStack;
import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
/** /**
@@ -45,12 +43,11 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} }
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) { // Sneaking cancels your own emote, for everyone.
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player); if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
if (animationStack.isActive() && animationStack.getPriority() == 1000) { && Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
animationStack.removeLayer(1000); Emotes.stop(SaturnClient.client.player.getUuid());
ServiceClient.emote(""); ServiceClient.emote("");
}
} }
}); });
} }
+2 -10
View File
@@ -11,7 +11,6 @@ base {
} }
repositories { repositories {
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' } 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. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
// Player Animation Library // Saturn's emote library (limb bending, Emotecraft emotes)
// include modImplementation( include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
// )
implementation project(":common") 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-databind:2.17.0")
include implementation("com.fasterxml.jackson.core:jackson-annotations: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") 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}"
// )
} }
/* /*
+1 -3
View File
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
minecraft_version=1.21.6 minecraft_version=1.21.6
yarn_mappings=1.21.6+build.1 yarn_mappings=1.21.6+build.1
loader_version=0.18.5 loader_version=0.18.5
loom_version=1.15-SNAPSHOT loom_version=1.17.21
fabric_api_version=0.128.2+1.21.6 fabric_api_version=0.128.2+1.21.6
# Mod Properties # Mod Properties
maven_group=org.saturnclient maven_group=org.saturnclient
archives_base_name=saturn-client archives_base_name=saturn-client
# player_anim = 2.0.2+1.21.5
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
import org.saturnclient.common.provider.SaturnProvider; import org.saturnclient.common.provider.SaturnProvider;
import org.saturnclient.common.ref.asset.IdentifierRef; import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.common.ref.game.MinecraftClientRef; import org.saturnclient.common.ref.game.MinecraftClientRef;
import org.saturnclient.cosmetics.Emotes;
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils; import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) { public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
// if (SaturnClient.client == null || SaturnClient.client.world == null) { if (fromPlayerUuid == null) {
// return; return;
// } }
// An empty or unknown ID stops whatever the player is playing.
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
// if (!player.getUuid().equals(fromPlayerUuid)) { emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
// continue; () -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
// }
// 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;
// }
} }
@Override @Override
@@ -8,12 +8,11 @@ import net.minecraft.client.util.InputUtil;
import org.saturnclient.config.Config; import org.saturnclient.config.Config;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.common.provider.Providers; 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.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
/** /**
@@ -44,12 +43,11 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} }
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) { // Sneaking cancels your own emote, for everyone.
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player); if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
// if (animationStack.isActive() && animationStack.getPriority() == 1000) { && Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
// animationStack.removeLayer(1000); Emotes.stop(SaturnClient.client.player.getUuid());
// ServiceClient.emote(""); ServiceClient.emote("");
// }
} }
}); });
} }
+2 -10
View File
@@ -11,7 +11,6 @@ base {
} }
repositories { repositories {
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' } 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. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
// Player Animation Library // Saturn's emote library (limb bending, Emotecraft emotes)
// include modImplementation( include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
// )
implementation project(":common") 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-databind:2.17.0")
include implementation("com.fasterxml.jackson.core:jackson-annotations: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") 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}"
// )
} }
/* /*
+1 -3
View File
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
minecraft_version=1.21.7 minecraft_version=1.21.7
yarn_mappings=1.21.7+build.8 yarn_mappings=1.21.7+build.8
loader_version=0.19.0 loader_version=0.19.0
loom_version=1.15-SNAPSHOT loom_version=1.17.21
fabric_api_version=0.129.0+1.21.7 fabric_api_version=0.129.0+1.21.7
# Mod Properties # Mod Properties
maven_group=org.saturnclient maven_group=org.saturnclient
archives_base_name=saturn-client archives_base_name=saturn-client
# player_anim = 2.0.2+1.21.5
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
import org.saturnclient.common.provider.SaturnProvider; import org.saturnclient.common.provider.SaturnProvider;
import org.saturnclient.common.ref.asset.IdentifierRef; import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.common.ref.game.MinecraftClientRef; import org.saturnclient.common.ref.game.MinecraftClientRef;
import org.saturnclient.cosmetics.Emotes;
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils; import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) { public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
// if (SaturnClient.client == null || SaturnClient.client.world == null) { if (fromPlayerUuid == null) {
// return; return;
// } }
// An empty or unknown ID stops whatever the player is playing.
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
// if (!player.getUuid().equals(fromPlayerUuid)) { emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
// continue; () -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
// }
// 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;
// }
} }
@Override @Override
@@ -8,12 +8,11 @@ import net.minecraft.client.util.InputUtil;
import org.saturnclient.config.Config; import org.saturnclient.config.Config;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.common.provider.Providers; 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.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
/** /**
@@ -44,12 +43,11 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} }
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) { // Sneaking cancels your own emote, for everyone.
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player); if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
// if (animationStack.isActive() && animationStack.getPriority() == 1000) { && Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
// animationStack.removeLayer(1000); Emotes.stop(SaturnClient.client.player.getUuid());
// ServiceClient.emote(""); ServiceClient.emote("");
// }
} }
}); });
} }
+2 -10
View File
@@ -11,7 +11,6 @@ base {
} }
repositories { repositories {
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' } 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. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
// Player Animation Library // Saturn's emote library (limb bending, Emotecraft emotes)
// include modImplementation( include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
// )
implementation project(":common") 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-databind:2.17.0")
include implementation("com.fasterxml.jackson.core:jackson-annotations: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") 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}"
// )
} }
/* /*
+1 -3
View File
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
minecraft_version=1.21.8 minecraft_version=1.21.8
yarn_mappings=1.21.8+build.1 yarn_mappings=1.21.8+build.1
loader_version=0.19.0 loader_version=0.19.0
loom_version=1.15-SNAPSHOT loom_version=1.17.21
fabric_api_version=0.136.1+1.21.8 fabric_api_version=0.136.1+1.21.8
# Mod Properties # Mod Properties
maven_group=org.saturnclient maven_group=org.saturnclient
archives_base_name=saturn-client archives_base_name=saturn-client
# player_anim = 2.0.2+1.21.5
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
import org.saturnclient.common.provider.SaturnProvider; import org.saturnclient.common.provider.SaturnProvider;
import org.saturnclient.common.ref.asset.IdentifierRef; import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.common.ref.game.MinecraftClientRef; import org.saturnclient.common.ref.game.MinecraftClientRef;
import org.saturnclient.cosmetics.Emotes;
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils; import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) { public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
// if (SaturnClient.client == null || SaturnClient.client.world == null) { if (fromPlayerUuid == null) {
// return; return;
// } }
// An empty or unknown ID stops whatever the player is playing.
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
// if (!player.getUuid().equals(fromPlayerUuid)) { emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
// continue; () -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
// }
// 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;
// }
} }
@Override @Override
@@ -8,12 +8,11 @@ import net.minecraft.client.util.InputUtil;
import org.saturnclient.config.Config; import org.saturnclient.config.Config;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.common.provider.Providers; 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.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
/** /**
@@ -44,12 +43,11 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} }
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) { // Sneaking cancels your own emote, for everyone.
// AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player); if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
// if (animationStack.isActive() && animationStack.getPriority() == 1000) { && Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
// animationStack.removeLayer(1000); Emotes.stop(SaturnClient.client.player.getUuid());
// ServiceClient.emote(""); ServiceClient.emote("");
// }
} }
}); });
} }
+2 -10
View File
@@ -11,7 +11,6 @@ base {
} }
repositories { repositories {
// maven { name = "KoSmX Maven"; url = 'https://maven.kosmx.dev/' }
maven { name = "Selimaj"; url = 'https://git.selimaj.dev/api/packages/selimaj-dev/maven' } 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. // Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
// Player Animation Library // Saturn's emote library (limb bending, Emotecraft emotes)
// include modImplementation( include modImplementation("org.saturnclient:emotes-fabric:${project.emotes_version}+${project.minecraft_version}")
// "dev.kosmx.player-anim:player-animation-lib-fabric:${project.player_anim}"
// )
implementation project(":common") 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-databind:2.17.0")
include implementation("com.fasterxml.jackson.core:jackson-annotations: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") 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}"
// )
} }
/* /*
+1 -3
View File
@@ -10,12 +10,10 @@ org.gradle.configuration-cache=false
minecraft_version=1.21.9 minecraft_version=1.21.9
yarn_mappings=1.21.9+build.1 yarn_mappings=1.21.9+build.1
loader_version=0.19.0 loader_version=0.19.0
loom_version=1.15-SNAPSHOT loom_version=1.17.21
fabric_api_version=0.134.1+1.21.9 fabric_api_version=0.134.1+1.21.9
# Mod Properties # Mod Properties
maven_group=org.saturnclient maven_group=org.saturnclient
archives_base_name=saturn-client archives_base_name=saturn-client
# player_anim = 2.0.2+1.21.5
@@ -11,6 +11,7 @@ import net.minecraft.text.Text;
import org.saturnclient.common.provider.SaturnProvider; import org.saturnclient.common.provider.SaturnProvider;
import org.saturnclient.common.ref.asset.IdentifierRef; import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.common.ref.game.MinecraftClientRef; import org.saturnclient.common.ref.game.MinecraftClientRef;
import org.saturnclient.cosmetics.Emotes;
import org.saturnclient.impl.cosmetics.utils.IdentifierUtils; import org.saturnclient.impl.cosmetics.utils.IdentifierUtils;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
@@ -22,31 +23,13 @@ public class SaturnProviderImpl implements SaturnProvider {
@Override @Override
public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) { public void playEmote(UUID fromPlayerUuid, String emoteIdOrNull) {
// if (SaturnClient.client == null || SaturnClient.client.world == null) { if (fromPlayerUuid == null) {
// return; return;
// } }
// An empty or unknown ID stops whatever the player is playing.
// for (AbstractClientPlayerEntity player : SaturnClient.client.world.getPlayers()) { Emotes.get(emoteIdOrNull == null ? "" : emoteIdOrNull).ifPresentOrElse(
// if (!player.getUuid().equals(fromPlayerUuid)) { emote -> org.saturnclient.emotes.fabric.Emotes.play(fromPlayerUuid, emote.animation()),
// continue; () -> org.saturnclient.emotes.fabric.Emotes.stop(fromPlayerUuid));
// }
// 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;
// }
} }
@Override @Override
@@ -9,12 +9,11 @@ import net.minecraft.util.Identifier;
import org.saturnclient.config.Config; import org.saturnclient.config.Config;
import org.saturnclient.saturnclient.SaturnClient; import org.saturnclient.saturnclient.SaturnClient;
import org.saturnclient.common.provider.Providers; 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.EmoteWheel;
import org.saturnclient.ui.screens.ShiftMenu; import org.saturnclient.ui.screens.ShiftMenu;
// import dev.kosmx.playerAnim.api.layered.AnimationStack;
// import dev.kosmx.playerAnim.minecraftApi.PlayerAnimationAccess;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
/** /**
@@ -45,13 +44,11 @@ public class KeyInputHandler {
Providers.saturn.getClient().setScreen(new EmoteWheel()); Providers.saturn.getClient().setScreen(new EmoteWheel());
} }
if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()) { // Sneaking cancels your own emote, for everyone.
// AnimationStack animationStack = if (SaturnClient.client.player != null && SaturnClient.client.player.isSneaking()
// PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player); && Emotes.playing(SaturnClient.client.player.getUuid()).isPresent()) {
// if (animationStack.isActive() && animationStack.getPriority() == 1000) { Emotes.stop(SaturnClient.client.player.getUuid());
// animationStack.removeLayer(1000); ServiceClient.emote("");
// ServiceClient.emote("");
// }
} }
}); });
} }