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:
@@ -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