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

[Bug] Crash with EMFAnimationApi.registerSingletonAnimationVariable #308

Open
pythoncoder1234 opened this issue Dec 22, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@pythoncoder1234
Copy link

Describe the bug
Calling EMFAnimationApi.registerSingletonAnimationVariable with a FloatSupplier crashes the game

To Reproduce
Steps to reproduce the behavior:

  1. Register a singleton float variable by calling the registerSingletonAnimationVariable function with a FloatSupplier
  2. Launch the game

Expected behavior
It shouldn't crash (and also should register the variable)

Crashlog
If applicable, add your crashlog or latest.log to help explain your problem.

  • Minecraft Version: [1.21.4]
  • EMF version [2.4.1]
  • Does the issue persist with only EMF installed? Yes
  • latest.log

Additional context
Likely cause of the issue:
Line 86 of EMFAnimationAPI
VariableRegistry.getInstance().registerSimpleFloatVariable(variableName, variableExplanationTranslationKeyOrText, (MathValue.ResultSupplier) variableValueSupplier);
The variableValueSupplier, which does not inherit from MathValue.ResultSupplier, is forcibly cast to it, producing a ClassCastException

@pythoncoder1234 pythoncoder1234 added the bug Something isn't working label Dec 22, 2024
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

2 participants