Skip to content

fix: skin emotes from active character profile - #45

Merged
ryanbarlow97 merged 1 commit into
mainfrom
fix/handsup-skin-refresh
Oct 12, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
fix/handsup-skin-refresh

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

Summary

ItemsAdder 4.0.18 skins emote renderers from the player name, which resolves to the Mojang account skin. It does not re-read the Paper profile after RPCharacters applies a character skin, so /handsup and direct emotes could show the prior character or account skin.

This change pushes the currently active profile textures value into the newly created ItemsAdder renderer through its internal changePlayerSkin method. It applies immediately for /handsup and on the next tick for any emote started through ItemsAdder's PlayerEmotePlayEvent. Reflection failures are contained and logged without preventing an otherwise valid emote.

Verification

  • tfmc-mvn -o -B clean verify passes: 872 tests and the 100% coverage gate.
  • Dev manually confirmed /handsup before and after a character switch.

@github-actions github-actions Bot added the size:M 30-99 effective changed lines (tests excluded in mixed PRs). label Oct 12, 2026
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9b90584b-46cd-4208-9a54-7bc5534240e9
📥 Commits

Reviewing files that changed from the base of the PR and between 31b1ea2 and 3762a7f.

📒 Files selected for processing (2)
  • src/main/java/net/tfminecraft/thievery/inspection/ItemsAdderHandsUpAnimation.java
  • src/test/java/net/tfminecraft/thievery/inspection/ItemsAdderHandsUpAnimationTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Emotes now display the player’s active skin when profile texture data is available, including emotes started outside the hands-up command.
    • Missing skin data or rendering issues no longer prevent the hands-up emote from starting.

Walkthrough

The hands-up animation now applies the player's active profile texture to its renderer. An emote-play event also schedules a next-tick check to apply the texture to any emote that is still playing.

Changes

Emote skin application

Layer / File(s) Summary
Apply the active skin when starting an emote
src/main/java/net/tfminecraft/thievery/inspection/ItemsAdderHandsUpAnimation.java, src/test/java/net/tfminecraft/thievery/inspection/ItemsAdderHandsUpAnimationTest.java
When the animated player exists and the emote is playing, start applies the first non-empty textures property from the player's profile. Tests cover successful application, missing or empty texture data, and renderer failures.
Apply the active skin to playing emotes
src/main/java/net/tfminecraft/thievery/inspection/ItemsAdderHandsUpAnimation.java, src/test/java/net/tfminecraft/thievery/inspection/ItemsAdderHandsUpAnimationTest.java
The emote-play handler schedules a next-tick check. The check applies the profile texture only when the animated player exists and the emote is still playing. Tests cover this check and lookup failures.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant PlayerEmotePlayEvent
  participant ItemsAdderHandsUpAnimation
  participant NextTickScheduler
  participant AnimatedPlayerRenderer
  PlayerEmotePlayEvent->>ItemsAdderHandsUpAnimation: provide player and emote name
  ItemsAdderHandsUpAnimation->>NextTickScheduler: schedule skin check for next tick
  NextTickScheduler->>ItemsAdderHandsUpAnimation: run skinPlayingEmote
  ItemsAdderHandsUpAnimation->>AnimatedPlayerRenderer: apply active textures property if emote is playing
Loading

Merge Risk: ⚪ Minimal · up to 3762a

This change makes hands-up and other emotes show the active character's skin instead of the previous one. Failures in applying the skin are contained and logged, so emotes still play. No merge-blocking risk was identified.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ryanbarlow97
ryanbarlow97 merged commit 3d8be71 into main Oct 12, 2026
3 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/handsup-skin-refresh branch October 12, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant