Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animated WSprite never displays the last frame #148

Open
fin444 opened this issue Jan 12, 2022 · 0 comments
Open

Animated WSprite never displays the last frame #148

fin444 opened this issue Jan 12, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@fin444
Copy link

fin444 commented Jan 12, 2022

Describe the bug
WSprites with multiple frames never render the last frame.

To Reproduce
Steps to reproduce the behavior:

  1. Create a WSprite with an animation.
  2. Look at it.

Version of the (please complete the following information):

  • Mod: 5.2.0+1.18
  • Fabric API: 0.44.0+1.18
  • Minecraft: 1.18.1

Additional context
This may be caused by the following if statement:

if (currentFrame >= frames.length - 1) {
It goes back to the 0th frame immediately if the currentFrame is the last frame, rather than one greater than the last frame.

@fin444 fin444 added the bug Something isn't working label Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant