Compare commits

...
9 Commits
Author SHA1 Message Date
selimaj-dev 37db94649f Merge pull request 'Bump the version to 0.1.4-beta' (#46) from release-0.1.4-beta into master
Release / build (release) Successful in 4m36s
Reviewed-on: #46
2026-09-29 16:37:19 +00:00
selimaj-devandclaude 896f4cccc0 Bump the version to 0.1.4-beta
Check / compile (pull_request) Successful in 2m29s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 18:37:03 +02:00
selimaj-dev de3c554e63 Merge pull request 'Hide the cloak on torso-curving emotes and point common at #12' (#45) from release-fixes into master
Reviewed-on: #45
2026-09-29 16:35:28 +00:00
selimaj-devandclaude 8417427059 Point common at the None cloak fix and the sidebar and dock order
Check / compile (pull_request) Successful in 2m29s
Picks up common#12.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 18:35:14 +02:00
selimaj-devandclaude ba5a32fb34 Hide the cloak during emotes that curve the torso
A flat cloak can't follow an arched back, so on the twerk it cut through the player. When the
emote being played bends the torso more than 10 degrees at any point, the cloak is hidden for the
whole emote; hiding it only while the back is curved would make it flicker. Each emote is checked
once and cached. Emotes that bend the torso less still hang the cloak from the leaning chest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 18:34:34 +02:00
selimaj-dev 8b1c94151a Merge pull request 'Use emotes 0.1.1 and point common at the new emotes' (#44) from new-emotes into master
Reviewed-on: #44
2026-09-29 16:03:15 +00:00
selimaj-devandclaude 3623024cce Use emotes 0.1.1 and point common at the new emotes
Check / compile (pull_request) Successful in 2m30s
Emotes 0.1.1 bends the torso the right way round. common now has seven more emotes and a twerk
re-exported for that fix (common#11), so the two move together.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 18:02:50 +02:00
selimaj-dev 2dcbe0302e Merge pull request 'Point common at the twerk emote' (#43) from twerk-emote into master
Reviewed-on: #43
2026-09-29 15:04:46 +00:00
selimaj-devandclaude 502bddd720 Point common at the twerk emote
Check / compile (pull_request) Successful in 2m39s
Picks up the twerk emote and the removal of the front flip (common#10).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 17:01:52 +02:00
3 changed files with 36 additions and 6 deletions
+1 -1
Submodule common updated: ed2914aaf7...b0d75af8c4
+2 -2
View File
@@ -6,10 +6,10 @@ org.gradle.caching=true
# IntelliJ IDEA is not yet fully compatible with configuration cache, see: https://github.com/FabricMC/fabric-loom/issues/1349
org.gradle.configuration-cache=false
mod_version=0.1.3-beta
mod_version=0.1.4-beta
# Saturn's emote library (git.selimaj.dev/saturnclientmc/emotes)
emotes_version=0.1.0
emotes_version=0.1.1
# Loom, for every Minecraft version (read in settings.gradle.kts).
loom_version=1.17.21
@@ -1,6 +1,9 @@
package org.saturnclient.impl.cosmetics;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
import java.util.WeakHashMap;
import org.joml.Matrix3f;
import org.joml.Matrix4f;
@@ -11,6 +14,8 @@ import org.saturnclient.client.player.SaturnPlayer;
import org.saturnclient.common.ref.asset.IdentifierRef;
import org.saturnclient.config.Config;
import org.saturnclient.cosmetics.Cloaks;
import org.saturnclient.emotes.core.Animation;
import org.saturnclient.emotes.core.Bone;
import org.saturnclient.emotes.core.bend.LimbBend;
import org.saturnclient.emotes.core.bend.Vec3;
import org.saturnclient.emotes.fabric.access.BendablePart;
@@ -387,9 +392,34 @@ public class CloakFeatureRenderer extends FeatureRenderer<PlayerEntityRenderStat
}
}
/** A torso bend past this curves the back more than a flat cloak can follow. */
private static final float MAX_CLOAK_BEND = (float) Math.toRadians(10);
/** Whether each animation bends the torso past that at any point. */
private static final Map<Animation, Boolean> BENDS_TORSO = Collections.synchronizedMap(new WeakHashMap<>());
/**
* An emote that bends the torso leans the chest from the hips, so the cloak hangs from where the
* top of the back ends up, turned as much as the torso is there.
* Whether the player is playing an emote that curves the torso (a twerk, the griddy). The cloak
* would cut through the arched back, so it's hidden for the whole emote rather than only while
* the back is curved, which would flicker.
*/
private static boolean playingTorsoBend(SaturnPlayer player) {
return org.saturnclient.emotes.fabric.Emotes.playing(player.uuid)
.map(playing -> BENDS_TORSO.computeIfAbsent(playing.animation(), CloakFeatureRenderer::bendsTorso))
.orElse(false);
}
private static boolean bendsTorso(Animation animation) {
for (float tick = 0; tick <= animation.length(); tick += 0.5f) {
if (animation.sample(tick).get(Bone.BODY).filter(body -> Math.abs(body.bend()) > MAX_CLOAK_BEND).isPresent()) {
return true;
}
}
return false;
}
/**
* An emote that bends the torso a little leans the chest from the hips, so the cloak hangs from
* where the top of the back ends up, turned as much as the torso is there.
*/
private static void followBend(MatrixStack matrices, ModelPart body) {
LimbBend bend = ((BendablePart) (Object) body).saturnEmotes$getBend();
@@ -439,7 +469,7 @@ public class CloakFeatureRenderer extends FeatureRenderer<PlayerEntityRenderStat
//?} else
//SaturnPlayer player = SaturnPlayer.get(state.name);
if (player == null) {
if (player == null || playingTorsoBend(player)) {
return;
}